From ef645f404b72df2ccb9e48f402d57b4bc28f18dc Mon Sep 17 00:00:00 2001 From: Mateusz Urbanek Date: Mon, 29 Jul 2024 18:52:19 +0200 Subject: [PATCH] feat: added values schema Signed-off-by: Mateusz Urbanek --- .pre-commit-config.yaml | 31 ++-- anza-labs/lubelog/Chart.yaml | 2 +- anza-labs/lubelog/README.md | 3 +- anza-labs/lubelog/values.schema.json | 256 +++++++++++++++++++++++++++ anza-labs/lubelog/values.yaml | 1 - 5 files changed, 278 insertions(+), 15 deletions(-) create mode 100644 anza-labs/lubelog/values.schema.json diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3a1d7f..b766721 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,23 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - - repo: https://github.com/compilerla/conventional-pre-commit - rev: v3.3.0 - hooks: - - id: conventional-pre-commit - stages: [commit-msg] - - repo: https://github.com/norwoodj/helm-docs - rev: v1.14.2 - hooks: - - id: helm-docs - args: - - "--badge-style=flat" +- repo: https://github.com/compilerla/conventional-pre-commit + rev: v3.3.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] +- repo: https://github.com/norwoodj/helm-docs + rev: v1.14.2 + hooks: + - id: helm-docs + args: + - "--badge-style=flat" +- repo: https://github.com/losisin/helm-values-schema-json + rev: v1.5.2 + hooks: + - id: helm-schema + args: + - "-draft=7" + - "-indent=2" + - "-input=anza-labs/lubelog/values.yaml" + - "-output=anza-labs/lubelog/values.schema.json" diff --git a/anza-labs/lubelog/Chart.yaml b/anza-labs/lubelog/Chart.yaml index 8f67ec9..ca0da2f 100644 --- a/anza-labs/lubelog/Chart.yaml +++ b/anza-labs/lubelog/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v2 name: lubelog description: LubeLogger is a web-based vehicle maintenance and fuel mileage tracker type: application -version: 0.1.2 +version: 0.1.3 diff --git a/anza-labs/lubelog/README.md b/anza-labs/lubelog/README.md index 013bafd..f9433cd 100644 --- a/anza-labs/lubelog/README.md +++ b/anza-labs/lubelog/README.md @@ -1,6 +1,6 @@ # lubelog -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) +![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) LubeLogger is a web-based vehicle maintenance and fuel mileage tracker @@ -32,7 +32,6 @@ LubeLogger is a web-based vehicle maintenance and fuel mileage tracker | podAnnotations | object | `{}` | Annotations to be added to the pods. | | podLabels | object | `{}` | Labels to be added to the pods. | | podSecurityContext | object | `{}` | | -| postgres | object | `{"connect":false,"create":false,"database":"postgres","host":"postgres","keyRef":"POSTGRES_CONNECTION","name":"","password":"postgres","port":5432,"user":"postgres"}` | PostgreSQL connection details. | | postgres.connect | bool | `false` | Defines if the LubeLogger should connect to the Postgres backend. It has no effect when `postgres.create=true`. | | postgres.create | bool | `false` | Defines if the secret with Postgres connection details should be created. | | postgres.database | string | `"postgres"` | Database name. | diff --git a/anza-labs/lubelog/values.schema.json b/anza-labs/lubelog/values.schema.json new file mode 100644 index 0000000..df99c35 --- /dev/null +++ b/anza-labs/lubelog/values.schema.json @@ -0,0 +1,256 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "properties": { + "affinity": { + "properties": {}, + "type": "object" + }, + "autoscaling": { + "properties": { + "enabled": { + "type": "boolean" + }, + "maxReplicas": { + "type": "integer" + }, + "minReplicas": { + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "type": "integer" + } + }, + "type": "object" + }, + "config": { + "properties": { + "LANG": { + "type": "string" + }, + "LC_ALL": { + "type": "string" + }, + "LOGLEVEL": { + "type": "string" + } + }, + "type": "object" + }, + "fullnameOverride": { + "type": "string" + }, + "image": { + "properties": { + "pullPolicy": { + "type": "string" + }, + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "type": "object" + }, + "imagePullSecrets": { + "type": "array" + }, + "ingress": { + "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, + "className": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "hosts": { + "items": { + "properties": { + "host": { + "type": "string" + }, + "paths": { + "items": { + "properties": { + "path": { + "type": "string" + }, + "pathType": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "type": "array" + }, + "tls": { + "type": "array" + } + }, + "type": "object" + }, + "livenessProbe": { + "properties": { + "httpGet": { + "properties": { + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "nameOverride": { + "type": "string" + }, + "nodeSelector": { + "properties": {}, + "type": "object" + }, + "podAnnotations": { + "properties": {}, + "type": "object" + }, + "podLabels": { + "properties": {}, + "type": "object" + }, + "podSecurityContext": { + "properties": {}, + "type": "object" + }, + "postgres": { + "properties": { + "connect": { + "type": "boolean" + }, + "create": { + "type": "boolean" + }, + "database": { + "type": "string" + }, + "host": { + "type": "string" + }, + "keyRef": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "user": { + "type": "string" + } + }, + "type": "object" + }, + "readinessProbe": { + "properties": { + "httpGet": { + "properties": { + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "replicaCount": { + "type": "integer" + }, + "resources": { + "properties": {}, + "type": "object" + }, + "secret": { + "properties": { + "create": { + "type": "boolean" + }, + "emailFrom": { + "type": "string" + }, + "emailServer": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "port": { + "type": "integer" + }, + "username": { + "type": "string" + } + }, + "type": "object" + }, + "securityContext": { + "properties": {}, + "type": "object" + }, + "service": { + "properties": { + "port": { + "type": "integer" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "serviceAccount": { + "properties": { + "annotations": { + "properties": {}, + "type": "object" + }, + "automount": { + "type": "boolean" + }, + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "tolerations": { + "type": "array" + } + }, + "type": "object" +} diff --git a/anza-labs/lubelog/values.yaml b/anza-labs/lubelog/values.yaml index 59423ff..606ccb1 100644 --- a/anza-labs/lubelog/values.yaml +++ b/anza-labs/lubelog/values.yaml @@ -57,7 +57,6 @@ secret: # -- Password for the email server. password: "" -# -- PostgreSQL connection details. postgres: # -- Defines if the secret with Postgres connection details should be created. create: false