diff --git a/charts/cnpg-cluster/tests/__snapshot__/cnpg-cluster_test.yaml.snap b/charts/cnpg-cluster/tests/__snapshot__/cnpg-cluster_test.yaml.snap index 2883a49..cc65301 100644 --- a/charts/cnpg-cluster/tests/__snapshot__/cnpg-cluster_test.yaml.snap +++ b/charts/cnpg-cluster/tests/__snapshot__/cnpg-cluster_test.yaml.snap @@ -6,7 +6,7 @@ cluster with custom pg_hba: cluster with custom pgparams: 1: | parameters: - timezone: Europe/Paris + TimeZone: Europe/Paris work_mem: 512MB pg_hba: null cluster with enabled backup and recovery: diff --git a/charts/cnpg-cluster/tests/values/pgparams.yaml b/charts/cnpg-cluster/tests/values/pgparams.yaml index 719a0c1..683496d 100644 --- a/charts/cnpg-cluster/tests/values/pgparams.yaml +++ b/charts/cnpg-cluster/tests/values/pgparams.yaml @@ -1,3 +1,3 @@ postgresqlParameters: - timezone: "Europe/Paris" + TimeZone: "Europe/Paris" work_mem: 512MB diff --git a/charts/cnpg-cluster/tests/values/tag.yaml b/charts/cnpg-cluster/tests/values/tag.yaml index a80c24e..c8daa85 100644 --- a/charts/cnpg-cluster/tests/values/tag.yaml +++ b/charts/cnpg-cluster/tests/values/tag.yaml @@ -1,2 +1,2 @@ image: - tag: 12 + tag: "12" diff --git a/charts/cnpg-cluster/values.schema.json b/charts/cnpg-cluster/values.schema.json new file mode 100644 index 0000000..7844c98 --- /dev/null +++ b/charts/cnpg-cluster/values.schema.json @@ -0,0 +1,259 @@ +{ + "type": "object", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "required": [], + "properties": { + "instances": { + "type": ["number"], + "title": "Number of Postgres instances in the cluster", + "default": "1" + }, + "annotations": { + "type": ["object"], + "title": "CNPG cluster annotations" + }, + "image": { + "type": "object", + "title": "Docker image for the PG instances", + "required": [], + "properties": { + "repository": { + "type": ["string"], + "title": "CNPG compatible Postgres image. see https://github.com/cloudnative-pg/postgres-containers", + "default": "\"ghcr.io/cloudnative-pg/postgis\"" + }, + "pullPolicy": { + "type": ["string"], + "title": "Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images", + "default": "IfNotPresent" + }, + "tag": { + "type": ["string"], + "title": "Docker image tag", + "default": "\"15\"" + } + } + }, + "imagePullSecrets": { + "type": ["array"], + "title": "docker image pull secrets. see https://kubernetes.io/fr/docs/tasks/configure-pod-container/pull-image-private-registry/" + }, + "registryCredentials": { + "type": ["object", "null"] + }, + "nameOverride": { + "type": ["string"], + "title": "String to partially override cnpg-cluster.fullname template with a string (will prepend the release name)", + "default": "" + }, + "fullnameOverride": { + "type": ["string"], + "title": "String to fully override cnpg-cluster.fullname template with a string", + "default": "" + }, + "resources": { + "title": "CPU/Memory resource requests/limits", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements", + "description": "We usually recommend not to specify default resources and to leave this as a conscious\nchoice for the user. This also increases chances charts run on environments with little\nresources, such as Minikube. If you do want to specify resources, uncomment the following\nlines, adjust them as necessary, and remove the curly braces after 'resources:'." + }, + "nodeSelector": { + "type": ["object"], + "title": "Postgres instances labels for pod assignment" + }, + "tolerations": { + "type": ["array"], + "title": "Postgres instances labels for tolerations pod assignment" + }, + "extraAffinity": { + "type": ["object"], + "title": "Extra configuration for Cluster's affinity resource, see: https://cloudnative-pg.io/documentation/1.17/api_reference/#AffinityConfiguration" + }, + "persistence": { + "type": "object", + "title": "Data persistence configuration", + "required": [], + "properties": { + "size": { + "type": ["string"], + "title": "Size of each instance storage volume", + "default": "8Gi" + }, + "resizeInUseVolumes": { + "type": ["boolean", "null"], + "title": "Resize existent PVCs, defaults to true" + }, + "storageClass": { + "type": ["string"], + "title": "StorageClass to use for database data,", + "description": "Applied after evaluating the PVC template, if available.\nIf not specified, generated PVCs will be satisfied by the default storage class", + "default": "" + }, + "pvcTemplate": { + "type": ["object"], + "title": "Template to be used to generate the Persistent Volume Claim" + } + } + }, + "backup": { + "type": "object", + "title": "Backup configuration", + "required": [], + "properties": { + "enabled": { + "type": ["boolean"], + "title": "Enable backups", + "default": "false" + }, + "schedule": { + "type": ["string"], + "title": "Schedule the backups, for instance every day at midnight", + "description": "this cron format has the seconds on the left", + "default": "\"0 0 0 * * 0\"" + }, + "sqlDumpSchedule": { + "type": ["string"], + "title": "Schedule the SQL dump backups, for instance every day at midnight", + "default": "\"0 0 * * *\"" + }, + "retentionPolicy": { + "type": ["string"], + "title": "RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d').", + "description": "The retention policy is expressed in the form of XXu where XX is a positive integer and\nu is in [dwm] - days, weeks, months.", + "default": "30d" + }, + "barmanObjectStore": { + "type": ["object", "null"], + "title": "Object store credentials and access config", + "description": "See: https://cloudnative-pg.io/documentation/1.20/backup_recovery/" + } + } + }, + "clusterExtraSpec": { + "type": ["object"], + "title": "Extra configuration for Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#clusterspec" + }, + "scheduledBackups": { + "type": ["object"], + "title": "ScheduledBackup resources to create for this Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#ScheduledBackupSpec" + }, + "poolers": { + "type": ["object"], + "title": "Pooler resources to create for this Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#PoolerSpec" + }, + "minSyncReplicas": { + "type": ["number"], + "title": "Minimum of syncrhronous replicas. see https://cloudnative-pg.io/documentation/current/replication/#synchronous-replication", + "default": "0" + }, + "maxSyncReplicas": { + "type": ["number"], + "title": "Maximum of syncrhronous replicas. see https://cloudnative-pg.io/documentation/current/replication/#synchronous-replication", + "default": "0" + }, + "pg_hba": { + "type": ["array"], + "title": "pg_hba entries. See https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html" + }, + "postgresqlParameters": { + "title": "PostgreSQL parameters. See https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html", + "$ref": "https://raw.githubusercontent.com/SocialGouv/json-schemas/main/postgres/parameters.json", + "description": "Define your parameters on https://pgtune.leopard.in.ua" + }, + "externalClusters": { + "type": ["array"], + "title": "define external clusters for recovery/replication see https://cloudnative-pg.io/documentation/current/api_reference/#externalcluster" + }, + "replica": { + "type": "object", + "title": "Replica mode", + "required": [], + "properties": { + "enabled": { + "type": ["boolean"], + "title": "Enable replica mode", + "default": "false" + } + } + }, + "pg_basebackup": { + "type": "object", + "title": "Enable pg_basebackup on bootstrap, see https://cloudnative-pg.io/documentation/current/bootstrap/#bootstrap-from-a-live-cluster-pg_basebackup", + "required": [], + "properties": { + "enabled": { + "type": ["boolean"], + "title": "Enable pg_basebackup bootstrap, see https://cloudnative-pg.io/documentation/current/bootstrap/#bootstrap-from-a-live-cluster-pg_basebackup", + "default": "false" + }, + "source": { + "type": ["string", "null"], + "title": "externalCluster cluster name for the pg_basebackup" + } + } + }, + "extensions": { + "$ref": "https://raw.githubusercontent.com/SocialGouv/json-schemas/main/postgres/extensions.json" + }, + "dbName": { + "type": ["string"], + "title": "Name of the default database to create", + "default": "app" + }, + "dbOwner": { + "type": ["string"], + "title": "Name of the default user to create", + "default": "app" + }, + "monitoring": { + "type": "object", + "title": "Monitoring. see https://cloudnative-pg.io/documentation/current/monitoring/", + "required": [], + "properties": { + "enablePodMonitor": { + "type": ["boolean"], + "title": "Enable metrics monitoring. see https://cloudnative-pg.io/documentation/current/monitoring/", + "default": "false" + } + } + }, + "superuserSecretName": { + "type": ["string", "null"], + "title": "To force the super user secret name" + }, + "dbSecretName": { + "type": ["string", "null"], + "title": "To force the DB secret name" + }, + "recovery": { + "type": "object", + "title": "Recovery. see https://cloudnative-pg.io/documentation/current/backup_recovery/#recovery", + "required": [], + "properties": { + "enabled": { + "type": ["boolean"], + "title": "Enable recovery", + "default": "false" + }, + "targetTime": { + "type": ["string"], + "title": "Time to restore from, in RFC3339 format https://datatracker.ietf.org/doc/html/rfc3339", + "default": "\"2020-11-26 15:22:00.00000+00\"" + }, + "barmanObjectStore": { + "type": ["object", "null"], + "title": "Object store credentials and access config", + "description": "See: https://cloudnative-pg.io/documentation/current/backup_recovery/" + } + } + }, + "postInitApplicationSQL": { + "type": ["string"], + "title": "List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty)", + "default": "" + }, + "postInitApplicationSQLRefs": { + "type": ["object", "null"], + "description": "Points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array (by default empty\nSee https://cloudnative-pg.io/documentation/current/api_reference/#postinitapplicationsqlrefs" + } + } +} diff --git a/charts/cnpg-cluster/values.yaml b/charts/cnpg-cluster/values.yaml index f448988..435f1b3 100644 --- a/charts/cnpg-cluster/values.yaml +++ b/charts/cnpg-cluster/values.yaml @@ -1,24 +1,28 @@ +# yaml-language-server: $schema=./values.schema.json + # Default values for cnpg-cluster. # This is a YAML-formatted file. # Declare variables to be passed into your templates. -# -- Number of Postgres instances in the cluster +# @param {number} [instances] Number of Postgres instances in the cluster instances: 1 +# @param {object} [annotations] CNPG cluster annotations annotations: {} +# @param {object} [image] Docker image for the PG instances image: - # -- Postgres image repository. Keep empty to use operator's default image. See: https://cloudnative-pg.io/documentation/1.17/operator_capability_levels/#override-of-operand-images-through-the-crd - # repository: "ghcr.io/cloudnative-pg/postgresql" + # @param {string} [repository] CNPG compatible Postgres image. see https://github.com/cloudnative-pg/postgres-containers repository: "ghcr.io/cloudnative-pg/postgis" - # -- Postgres image pull policy + # @param {string} [pullPolicy] Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images pullPolicy: IfNotPresent - # -- Override the Postgres image tag + # @param {string} [tag] Docker image tag tag: "15" -# -- Docker-registry secret names as an array +# @param {array} [imagePullSecrets] docker image pull secrets. see https://kubernetes.io/fr/docs/tasks/configure-pod-container/pull-image-private-registry/ imagePullSecrets: [] -# -- Create a docker-registry secret and use it as imagePullSecrets + +# @param {object,null} [registryCredentials] registryCredentials: # Eg: # mygitlab: @@ -26,18 +30,20 @@ registryCredentials: # email: foo@example.org # username: foobar # password: secret -# -- String to partially override cnpg-cluster.fullname template with a string (will prepend the release name) + +# @param {string} [nameOverride] String to partially override cnpg-cluster.fullname template with a string (will prepend the release name) nameOverride: "" -# -- String to fully override cnpg-cluster.fullname template with a string + +# @param {string} [fullnameOverride] String to fully override cnpg-cluster.fullname template with a string fullnameOverride: "" -# -- CPU/Memory resource requests/limits +# We usually recommend not to specify default resources and to leave this as a conscious +# choice for the user. This also increases chances charts run on environments with little +# resources, such as Minikube. If you do want to specify resources, uncomment the following +# lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# @param {https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements} [resources] CPU/Memory resource requests/limits resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. # limits: # cpu: 100m # memory: 128Mi @@ -45,46 +51,47 @@ resources: # cpu: 100m # memory: 128Mi -# -- Postgres instances labels for pod assignment +# @param {object} [nodeSelector] Postgres instances labels for pod assignment nodeSelector: {} -# -- Postgres instances labels for tolerations pod assignment +# @param {array} [tolerations] Postgres instances labels for tolerations pod assignment tolerations: [] -# -- Extra configuration for Cluster's affinity resource, -# see: https://cloudnative-pg.io/documentation/1.17/api_reference/#AffinityConfiguration +# @param {object} [extraAffinity] Extra configuration for Cluster's affinity resource, see: https://cloudnative-pg.io/documentation/1.17/api_reference/#AffinityConfiguration extraAffinity: {} +# @param {object} [persistence] Data persistence configuration persistence: - # -- Size of each instance storage volume + # @param {string} [size] Size of each instance storage volume size: 8Gi - # -- Resize existent PVCs, defaults to true + # @param {boolean,null} [resizeInUseVolumes] Resize existent PVCs, defaults to true resizeInUseVolumes: - # persistence.storageClass -- StorageClass to use for database data, # Applied after evaluating the PVC template, if available. # If not specified, generated PVCs will be satisfied by the default storage class + # @param {string} [storageClass] StorageClass to use for database data, storageClass: "" - # persistence.pvcTemplate -- Template to be used to generate the Persistent Volume Claim + # @param {object} [pvcTemplate] Template to be used to generate the Persistent Volume Claim pvcTemplate: {} +# @param {object} [backup] Backup configuration backup: - # -- Enable backups + # @param {boolean} [enabled] Enable backups enabled: false - # -- Schedule the backups, for instance every day at midnight # this cron format has the seconds on the left + # @param {string} [schedule] Schedule the backups, for instance every day at midnight schedule: "0 0 0 * * 0" - # -- Schedule the SQL dump backups, for instance every day at midnight + # @param {string} [sqlDumpSchedule] Schedule the SQL dump backups, for instance every day at midnight sqlDumpSchedule: "0 0 * * *" - # -- RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d'). # The retention policy is expressed in the form of XXu where XX is a positive integer and # u is in [dwm] - days, weeks, months. + # @param {string} [retentionPolicy] RetentionPolicy is the retention policy to be used for backups and WALs (i.e. '60d'). retentionPolicy: 30d - # -- Object store credentials and access config # See: https://cloudnative-pg.io/documentation/1.20/backup_recovery/ + # @param {object,null} [barmanObjectStore] Object store credentials and access config barmanObjectStore: # destinationPath: # endpointURL: @@ -99,19 +106,16 @@ backup: # name: # key: -# -- Extra configuration for Cluster resource. -# See: https://cloudnative-pg.io/documentation/1.17/api_reference/#clusterspec +# @param {object} [clusterExtraSpec] Extra configuration for Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#clusterspec clusterExtraSpec: {} -# -- ScheduledBackup resources to create for this Cluster resource -# See: https://cloudnative-pg.io/documentation/1.17/api_reference/#ScheduledBackupSpec +# @param {object} [scheduledBackups] ScheduledBackup resources to create for this Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#ScheduledBackupSpec scheduledBackups: {} # Eg: # daily: # schedule: "0 0 0 * * *" -# -- Poller resources to create for this Cluster resource -# See: https://cloudnative-pg.io/documentation/1.17/api_reference/#PoolerSpec +# @param {object} [poolers] Pooler resources to create for this Cluster resource. See: https://cloudnative-pg.io/documentation/1.17/api_reference/#PoolerSpec poolers: {} # Eg: # rw: @@ -123,41 +127,61 @@ poolers: {} # max_client_conn: "1000" # default_pool_size: "10" +# @param {number} [minSyncReplicas] Minimum of syncrhronous replicas. see https://cloudnative-pg.io/documentation/current/replication/#synchronous-replication minSyncReplicas: 0 +# @param {number} [maxSyncReplicas] Maximum of syncrhronous replicas. see https://cloudnative-pg.io/documentation/current/replication/#synchronous-replication maxSyncReplicas: 0 -# https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html +# @param {array} [pg_hba] pg_hba entries. See https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html pg_hba: [] +# Define your parameters on https://pgtune.leopard.in.ua +# @param {https://raw.githubusercontent.com/SocialGouv/json-schemas/main/postgres/parameters.json} [postgresqlParameters] PostgreSQL parameters. See https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html postgresqlParameters: {} -# https://cloudnative-pg.io/documentation/1.19/api_reference/#externalcluster +# @param {array} [externalClusters] define external clusters for recovery/replication see https://cloudnative-pg.io/documentation/current/api_reference/#externalcluster externalClusters: [] +# @param {object} [replica] Replica mode replica: + # @param {boolean} [enabled] Enable replica mode + enabled: false + +# @param {object} [pg_basebackup] Enable pg_basebackup on bootstrap, see https://cloudnative-pg.io/documentation/current/bootstrap/#bootstrap-from-a-live-cluster-pg_basebackup +pg_basebackup: + # @param {boolean} [enabled] Enable pg_basebackup bootstrap, see https://cloudnative-pg.io/documentation/current/bootstrap/#bootstrap-from-a-live-cluster-pg_basebackup enabled: false + # @param {string,null} [source] externalCluster cluster name for the pg_basebackup + source: +# @param {https://raw.githubusercontent.com/SocialGouv/json-schemas/main/postgres/extensions.json} [extensions] extensions: [] +# @param {string} [dbName] Name of the default database to create dbName: app +# @param {string} [dbName] Name of the default user to create dbOwner: app +# @param {object} [monitoring] Monitoring. see https://cloudnative-pg.io/documentation/current/monitoring/ monitoring: + # @param {boolean} [enablePodMonitor] Enable metrics monitoring. see https://cloudnative-pg.io/documentation/current/monitoring/ enablePodMonitor: false +# @param {string,null} [superuserSecretName] To force the super user secret name superuserSecretName: +# @param {string,null} [dbSecretName] To force the DB secret name dbSecretName: +# @param {object} [recovery] Recovery. see https://cloudnative-pg.io/documentation/current/backup_recovery/#recovery recovery: + # @param {boolean} [enabled] Enable recovery enabled: false - # -- Name of the source cluster in the backups - - # -- Time to restore from, in RFC3339 format https://datatracker.ietf.org/doc/html/rfc3339 - # targetTime: "2020-11-26 15:22:00.00000+00" + # @param {string} [targetTime] Time to restore from, in RFC3339 format https://datatracker.ietf.org/doc/html/rfc3339 + targetTime: "2020-11-26 15:22:00.00000+00" - # -- Object store credentials and access config - # See: https://cloudnative-pg.io/documentation/1.20/backup_recovery/ + # See: https://cloudnative-pg.io/documentation/current/backup_recovery/ + # @param {object,null} [barmanObjectStore] Object store credentials and access config barmanObjectStore: # destinationPath: # endpointURL: @@ -174,10 +198,12 @@ recovery: # name: # key: -# List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) +# @param {string} [postInitApplicationSQL] List of SQL queries to be executed as a superuser in the application database right after is created - to be used with extreme care (by default empty) postInitApplicationSQL: "" -# PostInitApplicationSQLRefs points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array (by default empty) +# Points references to ConfigMaps or Secrets which contain SQL files, the general implementation order to these references is from all Secrets to all ConfigMaps, and inside Secrets or ConfigMaps, the implementation order is same as the order of each array (by default empty +# See https://cloudnative-pg.io/documentation/current/api_reference/#postinitapplicationsqlrefs +# @param {object,null} [postInitApplicationSQLRefs] postInitApplicationSQLRefs: # configMapRefs: # - name: post-init-sql-configmap @@ -185,8 +211,3 @@ postInitApplicationSQLRefs: # secretRefs: # - name: post-init-sql-secret # key: secret.sql - -# -pg_basebackup: - enabled: false - source: diff --git a/charts/maildev/tests/__snapshot__/maildev_test.yaml.snap b/charts/maildev/tests/__snapshot__/maildev_test.yaml.snap index 87c84a0..69d6ccd 100644 --- a/charts/maildev/tests/__snapshot__/maildev_test.yaml.snap +++ b/charts/maildev/tests/__snapshot__/maildev_test.yaml.snap @@ -31,13 +31,7 @@ cron enabled: httpGet: path: /healthz port: http - resources: - limits: - cpu: null - memory: null - requests: - cpu: null - memory: null + resources: {} volumeMounts: - mountPath: /home/node/maildev-data name: data @@ -184,13 +178,7 @@ default manifest: httpGet: path: /healthz port: http - resources: - limits: - cpu: null - memory: null - requests: - cpu: null - memory: null + resources: {} volumeMounts: - mountPath: /home/node/maildev-data name: data @@ -230,13 +218,7 @@ persistence and existingClaim enabled: httpGet: path: /healthz port: http - resources: - limits: - cpu: null - memory: null - requests: - cpu: null - memory: null + resources: {} volumeMounts: - mountPath: /home/node/maildev-data name: data @@ -277,13 +259,7 @@ persistence enabled: httpGet: path: /healthz port: http - resources: - limits: - cpu: null - memory: null - requests: - cpu: null - memory: null + resources: {} volumeMounts: - mountPath: /home/node/maildev-data name: data diff --git a/charts/maildev/values.schema.json b/charts/maildev/values.schema.json new file mode 100644 index 0000000..c3b1251 --- /dev/null +++ b/charts/maildev/values.schema.json @@ -0,0 +1,153 @@ +{ + "type": "object", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "required": [], + "properties": { + "namespace": { + "type": ["string", "null"], + "title": "destination namespace" + }, + "host": { + "type": ["string", "null"], + "title": "default hostname" + }, + "servicePort": { + "type": ["number"], + "title": "service port", + "default": "1025" + }, + "certSecretName": { + "type": ["string", "null"], + "title": "ingress SSL cert name" + }, + "repositoryName": { + "type": ["string", "null"], + "title": "helm repositoryName" + }, + "replicaCount": { + "type": ["number"], + "title": "Number of replicas", + "default": "1" + }, + "image": { + "type": "object", + "title": "Docker image", + "required": [], + "properties": { + "repository": { + "type": ["string"], + "title": "image repository", + "default": "maildev/maildev" + }, + "pullPolicy": { + "type": ["string"], + "title": "Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images", + "default": "IfNotPresent" + }, + "tag": { + "type": ["string"], + "title": "Docker image tag", + "default": "\"2.1.0\"" + } + } + }, + "extraArgs": { + "type": ["array"], + "title": "Extra startup arguments." + }, + "persistence": { + "type": "object", + "title": "persistence config", + "required": [], + "properties": { + "enabled": { + "type": ["boolean", "null"], + "title": "enable persistence" + }, + "accessMode": { + "type": ["string"], + "default": "ReadWriteMany" + }, + "size": { + "type": ["string"], + "default": "1024M" + }, + "storageClass": { + "type": ["string"], + "default": "" + }, + "existingClaim": { + "type": ["string"], + "default": "" + }, + "mountPath": { + "type": ["string"], + "default": "/home/node/maildev-data" + } + } + }, + "cron": { + "type": "object", + "description": "To clean some old mails when persistence is enabled", + "required": [], + "properties": { + "enabled": { + "type": ["boolean", "null"], + "title": "enable cron cleanups", + "description": "To clean some old mails when persistence is enabled" + }, + "image": { + "type": "object", + "title": "Docker image", + "required": [], + "properties": { + "repository": { + "type": ["string"], + "title": "image repository", + "default": "busybox" + }, + "pullPolicy": { + "type": ["string"], + "title": "Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images", + "default": "IfNotPresent" + }, + "tag": { + "type": ["string"], + "title": "Docker image tag", + "default": "latest" + } + } + }, + "schedule": { + "type": ["string"], + "title": "Cleanup schedule", + "default": "\"0 1 * * *\"" + }, + "daysToKeep": { + "type": ["number"], + "title": "Retention", + "default": "15" + } + } + }, + "ingress": { + "type": "object", + "required": [], + "properties": { + "enabled": { + "type": ["boolean"], + "title": "enable ingress", + "default": "true" + }, + "annotations": { + "type": ["object"], + "title": "ingress annotation" + } + } + }, + "resources": { + "title": "CPU/Memory resource requests/limits", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements" + } + } +} diff --git a/charts/maildev/values.yaml b/charts/maildev/values.yaml index a5c29f7..54354f7 100644 --- a/charts/maildev/values.yaml +++ b/charts/maildev/values.yaml @@ -1,49 +1,85 @@ -enabled: +# yaml-language-server: $schema=./values.schema.json + +# @param {string,null} [namespace] destination namespace namespace: + +# @param {string,null} [host] default hostname host: + +# @param {number} [servicePort] service port servicePort: 1025 + +# @param {string,null} [certSecretName] ingress SSL cert name certSecretName: + +# @param {string,null} [repositoryName] helm repositoryName repositoryName: +# @param {number} [replicaCount] Number of replicas replicaCount: 1 +# @param {object} [image] Docker image image: + # @param {string} [repository] image repository repository: maildev/maildev - tag: 2.1.0 + # @param {string} [pullPolicy] Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images pullPolicy: IfNotPresent + # @param {string} [tag] Docker image tag + tag: "2.1.0" -extraArgs: +# @param {array} [extraArgs] Extra startup arguments. +extraArgs: [] # - "--outgoing-host" # - "smtp.yourdomaine.com" # - "--outgoing-port" # - "25" +# @param {object} [persistence] persistence config persistence: + # @param {boolean,null} [enabled] enable persistence enabled: + # @param {string} [accessMode] accessMode: ReadWriteMany + # @param {string} [size] size: 1024M + # @param {string} [storageClass] storageClass: "" + # @param {string} [existingClaim] existingClaim: "" + # @param {string} [mountPath] mountPath: /home/node/maildev-data # To clean some old mails when persistence is enabled +# @param {object} [cron] cron: + # @param {boolean,null} [enabled] enable cron cleanups enabled: + # @param {object} [image] Docker image image: + # @param {string} [repository] image repository repository: busybox - tag: latest + # @param {string} [pullPolicy] Docker image pull policy. see https://kubernetes.io/docs/concepts/containers/images#updating-images pullPolicy: IfNotPresent + # @param {string} [tag] Docker image tag + tag: latest + # @param {string} [schedule] Cleanup schedule schedule: "0 1 * * *" + # @param {number} [daysToKeep] Retention daysToKeep: 15 +# @param {object} [ingress] ingress: + # @param {boolean} [enabled] enable ingress enabled: true + # @param {object} [annotations] ingress annotation annotations: {} +# @param {https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.24.0/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements} [resources] CPU/Memory resource requests/limits resources: - limits: - cpu: - memory: - requests: - cpu: - memory: + {} + # limits: + # cpu: + # memory: + # requests: + # cpu: + # memory: