diff --git a/.github/lint_test_config.yaml b/.github/lint_test_config.yaml index 13e5abca..03c4300f 100644 --- a/.github/lint_test_config.yaml +++ b/.github/lint_test_config.yaml @@ -22,3 +22,5 @@ excluded-charts: - topology-discovery # This chart has a dependency to postresql - postgrest + # This chart has a dependency to CloudNativePG operator + - cloud-native-pg diff --git a/charts/cloud-native-pg/.helmignore b/charts/cloud-native-pg/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/cloud-native-pg/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/cloud-native-pg/Chart.yaml b/charts/cloud-native-pg/Chart.yaml new file mode 100644 index 00000000..75d8961a --- /dev/null +++ b/charts/cloud-native-pg/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v2 +name: cloud-native-pg +description: A Helm chart for creating postgres cluster via CloudNativePG operator +icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4 +type: application +version: 0.0.1 +maintainers: + - name: FRINX diff --git a/charts/cloud-native-pg/README.md b/charts/cloud-native-pg/README.md new file mode 100644 index 00000000..a6d91f8d --- /dev/null +++ b/charts/cloud-native-pg/README.md @@ -0,0 +1,72 @@ +# cloud-native-pg + +A Helm chart for Kubernetes deployment of the cloud-native-pg + +## Get Repo Info + +```console +helm repo add frinx https://FRINXio.github.io/helm-charts +helm repo update +``` + +## Install Chart + +```console +helm install [RELEASE_NAME] frinx/cloud-native-pg +``` + +## Upgrading Chart + +```console +helm upgrade [RELEASE_NAME] frinx/cloud-native-pg +``` + +## Uninstall Chart + +```console +helm uninstall [RELEASE_NAME] +``` + +## Configuration + +| Parameter | Description | Default | +| ------------------------ | ----------------------- | -------------- | +| `name` | Cluster name. If not defined, Chart name is used. | `null` | +| `imageName` | Name of the container image, supporting both tags (:) and digests for deterministic and repeatable deployments (:@sha256:) | `"ghcr.io/cloudnative-pg/postgresql:12.10@sha256:3cd378bf6b4e6bdc495cf478ca893a3490ecdab5332a614d99d2adb41b1e63ce"` | +| `imagePullPolicy` | Image pull policy | `"IfNotPresent"` | +| `imagePullSecrets` | The list of pull secrets to be used to pull the images | `[]` | +| `instances` | Number of instances required in the cluster | `3` | +| `primaryUpdateStrategy` | Deployment strategy to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be automated (unsupervised - default) or manual (supervised) | `"unsupervised"` | +| `primaryUpdateMethod` | Method to follow to upgrade the primary server during a rolling update procedure, after all replicas have been successfully updated: it can be with a switchover (switchover - default) or in-place (restart) | `"switchover"` | +| `startDelay` | The time in seconds that is allowed for a PostgreSQL instance to successfully start up (default 30) | `30` | +| `stopDelay` | The time in seconds that is allowed for a PostgreSQL instance to gracefully shutdown (default 30) | `30` | +| `replicationSlots` | ReplicationSlotsConfiguration encapsulates the configuration of replication slots | `{}` | +| `storage` | StorageConfiguration is the configuration of the storage of the PostgreSQL instances | `{"size": "1Gi"}` | +| `storage.size` | Size of the storage. Required if not already specified in the PVC template. Changes to this field are automatically reapplied to the created PVCs. Size cannot be decreased. | `"1Gi"` | +| `resources` | CPU/Memory resource requests/limits | `{}` | +| `postgresql` | PostgreSQL configuration options (postgresql.conf) | `{}` | +| `bootstrap.initdb.database` | Name of the database used by the application | `"frinx"` | +| `bootstrap.initdb.owner` | Name of the owner of the database in the instance to be used by applications | `"frinx"` | +| `bootstrap.initdb.secret.name` | User secret reference name | `"frinx-user"` | +| `bootstrap.initdb.postInitSQL` | List of SQL queries to be executed as a superuser immediately after the cluster has been created - to be used with extreme care (by default empty) | `{}` | +| `bootstrap.initdb.postInitTemplateSQL` | List of SQL queries to be executed as a superuser in the template1 after the cluster has been created - to be used with extreme care (by default empty) | `{}` | +| `bootstrap.initdb.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) | `{}` | +| `bootstrap.initdb.postInitApplicationSQLRefs.configMapRefs` | ConfigMapRefs holds a list of references to ConfigMaps | `{}` | +| `bootstrap.initdb.postInitApplicationSQLRefs.secretRefs` | SecretRefs holds a list of references to Secrets | `{}` | +| `backup` | BackupConfiguration defines how the backup of the cluster are taken. Currently the only supported backup method is barmanObjectStore. For details and examples refer to the Backup and Recovery section of the documentation | `{}` | +| `superuserSecret.name` | Reference name to secret for superuser | `"frinx-superuser"` | +| `monitoring` | MonitoringConfiguration is the type containing all the monitoring configuration for a certain cluster | `{}` | +| `env` | Env follows the Env format to pass environment variables to the pods created in the cluster | `{}` | +| `envFrom` | EnvFrom follows the EnvFrom format to pass environment variables sources to the pods to be used by Env | `{}` | +| `logLevel` | The instances' log level, one of the following values: error, warning, info (default), debug, trace | `"info"` | +| `affinity` | AffinityConfiguration contains the info we need to create the affinity rules for Pods | `{}` | +| `secrets.superuserSecret.name` | superuser secret reference name | `"frinx-superuser"` | +| `secrets.superuserSecret.username` | superuser username | `"postgres"` | +| `secrets.superuserSecret.password` | superuser password | `"postgres"` | +| `secrets.userSecret.name` | user secret reference name | `"frinx-user"` | +| `secrets.userSecret.username` | user username | `"frinx"` | +| `secrets.userSecret.password` | user password | `"postgres"` | +| `secrets.postInitSqlSecret` | postInitSqlSecret secret reference name | `{}` | + +## CloudNativePG configuration API reference +More details about configuration can be found on [CloudNativePG API reference](https://cloudnative-pg.io/documentation/1.18/api_reference) page. diff --git a/charts/cloud-native-pg/templates/helpers.tpl b/charts/cloud-native-pg/templates/helpers.tpl new file mode 100644 index 00000000..b8446982 --- /dev/null +++ b/charts/cloud-native-pg/templates/helpers.tpl @@ -0,0 +1,72 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "cloud-native-pg.fullname" -}} +{{- or $.Values.name $.Chart.Name | trunc 63 | trimSuffix "-" -}} +{{- end }} + +{{/* +Return true if a secret object should be created +*/}} +{{- define "cloud-native-pg.createSuperuserSecret" -}} +{{- if (.Values.secrets.superuserSecret) -}} + {{- if (not .Values.secrets.superuserSecret.existingSecret ) -}} + {{- true -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Get the password secret. +*/}} +{{- define "cloud-native-pg.superUserSecretName" -}} +{{- if .Values.secrets.superuserSecret.existingSecret }} + {{- printf "%s" (tpl .Values.secrets.superuserSecret.existingSecret $) -}} +{{- else -}} + {{- printf "%s-frinx-superuser" (include "cloud-native-pg.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Return true if a secret object should be created +*/}} +{{- define "cloud-native-pg.createUserSecret" -}} +{{- if (.Values.secrets.userSecret) -}} + {{- if (not .Values.secrets.userSecret.existingSecret ) -}} + {{- true -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Get the password secret. +*/}} +{{- define "cloud-native-pg.userSecretName" -}} +{{- if .Values.secrets.userSecret.existingSecret }} + {{- printf "%s" (tpl .Values.secrets.userSecret.existingSecret $) -}} +{{- else -}} + {{- printf "%s-frinx-user" (include "cloud-native-pg.fullname" .) -}} +{{- end -}} +{{- end -}} + +{{/* +Return true if a secret object should be created +*/}} +{{- define "cloud-native-pg.createPostInitSqlSecret" -}} +{{- if (.Values.secrets.postInitSqlSecret) -}} + {{- if (not .Values.secrets.postInitSqlSecret.existingSecret ) -}} + {{- true -}} + {{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Get the password secret. +*/}} +{{- define "cloud-native-pg.postInitSqlSecretName" -}} +{{- if .Values.secrets.postInitSqlSecret.existingSecret }} + {{- printf "%s" (tpl .Values.secrets.postInitSqlSecret.existingSecret $) -}} +{{- else -}} + {{- printf "%s-post-init-sql-secret" (include "cloud-native-pg.fullname" .) -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/cloud-native-pg/templates/post-init-sql-secret.yaml b/charts/cloud-native-pg/templates/post-init-sql-secret.yaml new file mode 100644 index 00000000..14a03f85 --- /dev/null +++ b/charts/cloud-native-pg/templates/post-init-sql-secret.yaml @@ -0,0 +1,8 @@ +{{- if (include "cloud-native-pg.createPostInitSqlSecret" .) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "cloud-native-pg.fullname" . }}-post-init-sql-secret +stringData: + secret.sql: {{- required "Required value for secrets.postInitSqlSecret.sql" .Values.secrets.postInitSqlSecret.sql | toYaml | indent 1 }} +{{ end }} diff --git a/charts/cloud-native-pg/templates/postgres-cluster.yaml b/charts/cloud-native-pg/templates/postgres-cluster.yaml new file mode 100644 index 00000000..1176acef --- /dev/null +++ b/charts/cloud-native-pg/templates/postgres-cluster.yaml @@ -0,0 +1,106 @@ +apiVersion: postgresql.cnpg.io/v1 +kind: Cluster +metadata: + name: {{ include "cloud-native-pg.fullname" . }} +spec: + instances: {{ .Values.instances }} + imageName: {{ .Values.imageName }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + imagePullSecrets: {{ .Values.imagePullSecrets }} + primaryUpdateStrategy: {{ .Values.primaryUpdateStrategy }} + primaryUpdateMethod: {{ .Values.primaryUpdateMethod }} + logLevel: {{ .Values.logLevel }} + + {{- if .Values.startDelay }} + startDelay: {{ .Values.startDelay }} + {{- end }} + + {{- if .Values.stopDelay }} + stopDelay: {{ .Values.stopDelay }} + {{- end }} + + {{- if .Values.replicationSlots }} + replicationSlots: + {{- toYaml .Values.replicationSlots | nindent 4 }} + {{- end }} + + {{- if .Values.storage }} + storage: + {{- toYaml .Values.storage | nindent 4 }} + {{- end }} + + {{- if .Values.resources }} + resources: + {{- toYaml .Values.resources | nindent 4 }} + {{- end }} + + {{- if .Values.postgresql }} + postgresql: + {{- toYaml .Values.postgresql | nindent 4 }} + {{- end }} + + {{- if .Values.affinity }} + monitoring: + {{- toYaml .Values.affinity | nindent 4 }} + {{- end }} + + bootstrap: + initdb: + database: {{ .Values.bootstrap.initdb.database }} + owner: {{ .Values.bootstrap.initdb.owner }} + secret: + name: {{ include "cloud-native-pg.userSecretName" . }} + {{- if .Values.bootstrap.initdb.postInitSQL }} + postInitSQL: + {{- toYaml .Values.bootstrap.initdb.postInitSQL | nindent 8 }} + {{- end }} + {{- if .Values.bootstrap.initdb.postInitTemplateSQL }} + postInitTemplateSQL: + {{- toYaml .Values.bootstrap.initdb.postInitTemplateSQL | nindent 8 }} + {{- end }} + {{- if .Values.bootstrap.initdb.postInitApplicationSQL }} + postInitApplicationSQL: + {{- toYaml .Values.bootstrap.initdb.postInitApplicationSQL | nindent 8 }} + {{- end }} + {{- if .Values.bootstrap.initdb.postInitApplicationSQLRefs }} + postInitApplicationSQLRefs: + configMapRefs: + {{- range .Values.bootstrap.initdb.postInitApplicationSQLRefs.extraConfigMapRefs }} + - name: {{ .name }} + key: {{ .key }} + {{- end }} + secretRefs: + {{- if .Values.secrets.postInitSqlSecret }} + - name: {{ include "cloud-native-pg.postInitSqlSecretName" . }} + key: secret.sql + {{- end }} + {{- range .Values.bootstrap.initdb.postInitApplicationSQLRefs.extraSecretRefs }} + - name: {{- .name }} + key: {{ .key }} + {{- end }} + {{- end }} + + {{- if .Values.backup }} + backup: + {{- toYaml .Values.backup | nindent 4 }} + {{- end }} + + {{- if .Values.secrets.superuserSecret }} + superuserSecret: + name: {{ include "cloud-native-pg.superUserSecretName" . }} + {{- end }} + + {{- if .Values.env }} + env: + {{- toYaml .Values.env | nindent 4 }} + {{- end }} + + {{- if .Values.envFrom }} + envFrom: + {{- toYaml .Values.envFrom | nindent 4 }} + {{- end }} + + {{- if .Values.monitoring }} + monitoring: + {{- toYaml .Values.monitoring | nindent 4 }} + {{- end }} diff --git a/charts/cloud-native-pg/templates/postgres-superuser-secret.yaml b/charts/cloud-native-pg/templates/postgres-superuser-secret.yaml new file mode 100644 index 00000000..2cc2f57d --- /dev/null +++ b/charts/cloud-native-pg/templates/postgres-superuser-secret.yaml @@ -0,0 +1,10 @@ +{{- if (include "cloud-native-pg.createSuperuserSecret" .) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "cloud-native-pg.fullname" . }}-frinx-superuser +type: kubernetes.io/basic-auth +data: + username: {{ required "Required value for secrets.superuserSecret.username" .Values.secrets.superuserSecret.username | b64enc | quote }} + password: {{ required "Required value for secrets.superuserSecret.password" .Values.secrets.superuserSecret.password | b64enc | quote }} +{{ end }} diff --git a/charts/cloud-native-pg/templates/postgres-user-secret.yaml b/charts/cloud-native-pg/templates/postgres-user-secret.yaml new file mode 100644 index 00000000..a74ec193 --- /dev/null +++ b/charts/cloud-native-pg/templates/postgres-user-secret.yaml @@ -0,0 +1,10 @@ +{{- if (include "cloud-native-pg.createUserSecret" .) }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "cloud-native-pg.fullname" . }}-frinx-user +type: kubernetes.io/basic-auth +data: + username: {{ required "Required value for secrets.userSecret.username" .Values.secrets.userSecret.username | b64enc | quote }} + password: {{ required "Required value for secrets.userSecret.password" .Values.secrets.userSecret.password | b64enc | quote }} +{{ end }} diff --git a/charts/cloud-native-pg/values.yaml b/charts/cloud-native-pg/values.yaml new file mode 100644 index 00000000..c45a1d07 --- /dev/null +++ b/charts/cloud-native-pg/values.yaml @@ -0,0 +1,95 @@ +name: null +imageName: "ghcr.io/cloudnative-pg/postgresql:12.10@sha256:3cd378bf6b4e6bdc495cf478ca893a3490ecdab5332a614d99d2adb41b1e63ce" +imagePullPolicy: IfNotPresent +imagePullSecrets: [] +instances: 3 +primaryUpdateStrategy: "unsupervised" +primaryUpdateMethod: "switchover" +startDelay: 30 +stopDelay: 30 + +replicationSlots: {} + # ReplicationSlotsConfiguration encapsulates the configuration of replication slots + # https://cloudnative-pg.io/documentation/1.18/api_reference/#replicationslotsconfiguration + +storage: + # StorageConfiguration is the configuration of the storage of the PostgreSQL instances + # https://cloudnative-pg.io/documentation/1.18/api_reference/#storageconfiguration + size: "1Gi" + # storageClass: 'default' + # resizeInUseVolumes: true + +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 + # requests: + # cpu: 100m + # memory: 128Mi + +postgresql: {} + # PostgresConfiguration defines the PostgreSQL configuration + # https://cloudnative-pg.io/documentation/1.18/api_reference/#postgresconfiguration + # parameters: + # max_connections: 300 + # shared_buffers: 256MB + # pg_hba: + # - host all all 10.244.0.0/16 md5 + +bootstrap: + initdb: + database: frinx + owner: frinx + # secret: + # name: frinx-user + postInitSQL: {} + postInitTemplateSQL: {} + postInitApplicationSQL: {} + postInitApplicationSQLRefs: + # extraConfigMapRefs holds a list of references to configmaps + # key-value format + extraConfigMapRefs: {} + # extraSecretRefs holds a list of references to secrets + # If secrets.postInitSqlSecret exist, automatically is imported to secretRefs list + # key-value format + extraSecretRefs: {} + +backup: {} + # BackupConfiguration defines how the backup of the cluster are taken. + # Currently the only supported backup method is barmanObjectStore. + # For details and examples refer to the Backup and Recovery section of the documentation + # https://cloudnative-pg.io/documentation/1.18/api_reference/#backupconfiguration + + +monitoring: {} + # MonitoringConfiguration is the type containing all the monitoring configuration for a certain cluster + # https://cloudnative-pg.io/documentation/1.18/api_reference/#MonitoringConfiguration + +env: {} + +envFrom: {} + +logLevel: "info" + +affinity: {} + # AffinityConfiguration contains the info we need to create the affinity rules for Pods + # https://cloudnative-pg.io/documentation/1.18/api_reference/#AffinityConfiguration + +secrets: + superuserSecret: + existingSecret: + username: postgres + password: postgres + userSecret: + existingSecret: + username: frinx + password: frinx + postInitSqlSecret: + # existingSecret: + # name: post-init-sql-secret + # sql: |- + # CREATE SCHEMA inventory AUTHORIZATION inventory; diff --git a/charts/inventory/Chart.yaml b/charts/inventory/Chart.yaml index e1ff9e5e..17852580 100644 --- a/charts/inventory/Chart.yaml +++ b/charts/inventory/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: inventory -version: 4.0.0 +version: 4.1.0 description: A Helm chart for Kubernetes deployment of the Device Inventory type: application home: https://github.com/FRINXio/helm-charts @@ -15,23 +15,8 @@ icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4 appVersion: "1.9.1" annotations: artifacthub.io/changes: | - - kind: removed - description: Removed DEVICE_DISCOVERY_SEED env value and initDataJob - links: - - name: GitHub PR - url: https://github.com/FRINXio/helm-charts/pull/282 - - kind: removed - description: Removed Arango related env values - links: - - name: GitHub PR - url: https://github.com/FRINXio/helm-charts/pull/282 - - kind: changed - description: Changed supported version of inventory to 1.9.1 - links: - - name: GitHub PR - url: https://github.com/FRINXio/helm-charts/pull/282 - kind: added - description: Add initContainer for seeding database + description: Added possibility to set conductor database schema by env variable links: - name: GitHub PR - url: https://github.com/FRINXio/helm-charts/pull/282 + url: https://github.com/FRINXio/helm-charts/pull/332 diff --git a/charts/inventory/README.md b/charts/inventory/README.md index ff6f0778..0f31eb22 100644 --- a/charts/inventory/README.md +++ b/charts/inventory/README.md @@ -66,6 +66,7 @@ helm uninstall [RELEASE_NAME] | `env.POSTGRES_USER` | POSTGRES_USER env value | `postgresU` | | `env.POSTGRES_PASSWORD` | POSTGRES_PASSWORD env value | `postgresP` | | `env.POSTGRES_DB` | POSTGRES_DB env value | `inventory` | +| `env.POSTGRES_DB_SCHEMA` | POSTGRES_DB_SCHEMA env value | `public` | | `env.POSTGRES_HOSTNAME` | POSTGRES_HOSTNAME env value | | | `env.POSTGRES_PORT` | POSTGRES_PORT env value | `5432` | | `env.TOPOLOGY_ENABLED` | Enable/Disable connection to arangodb | `false` | diff --git a/charts/inventory/templates/deployment.yaml b/charts/inventory/templates/deployment.yaml index 46b16934..e6b9bdfe 100644 --- a/charts/inventory/templates/deployment.yaml +++ b/charts/inventory/templates/deployment.yaml @@ -79,7 +79,7 @@ spec: value: "postgres://{{ .Values.env.POSTGRES_USER }}:{{ .Values.env.POSTGRES_PASSWORD }}@{{ .Release.Name }}-postgresql:5432/inventory?sslmode=disable" {{ else }} - name: "DATABASE_URL" - value: "postgres://{{ .Values.env.POSTGRES_USER }}:{{ .Values.env.POSTGRES_PASSWORD }}@{{ .Values.env.POSTGRES_HOSTNAME }}:{{ .Values.env.POSTGRES_PORT }}/{{ .Values.env.POSTGRES_DB }}?sslmode=disable" + value: "postgres://{{ .Values.env.POSTGRES_USER }}:{{ .Values.env.POSTGRES_PASSWORD }}@{{ .Values.env.POSTGRES_HOSTNAME }}:{{ .Values.env.POSTGRES_PORT }}/{{ .Values.env.POSTGRES_DB }}?sslmode=disable&schema={{ .Values.env.POSTGRES_DB_SCHEMA }}" {{ end }} - name: "TOPOLOGY_ENABLED" value: {{ .Values.env.TOPOLOGY_ENABLED | quote }} diff --git a/charts/inventory/values.yaml b/charts/inventory/values.yaml index 197971eb..9c2af6a1 100644 --- a/charts/inventory/values.yaml +++ b/charts/inventory/values.yaml @@ -89,6 +89,7 @@ env: POSTGRES_USER: postgresU POSTGRES_PASSWORD: postgresP POSTGRES_DB: inventory + POSTGRES_DB_SCHEMA: public POSTGRES_HOSTNAME: POSTGRES_PORT: 5432 TOPOLOGY_ENABLED: false diff --git a/charts/workflow-manager/Chart.yaml b/charts/workflow-manager/Chart.yaml index befa7a2e..55a6e409 100644 --- a/charts/workflow-manager/Chart.yaml +++ b/charts/workflow-manager/Chart.yaml @@ -3,7 +3,7 @@ name: workflow-manager description: A Helm chart for Kubernetes deploying conductor-server and workflow-proxy icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4 type: application -version: 2.0.2 +version: 2.1.0 appVersion: "2.1.3" maintainers: - name: FRINX @@ -21,8 +21,8 @@ annotations: - name: schellar image: frinx/schellar:3.0.0 artifacthub.io/changes: | - - kind: fixed - description: Fix ingress + - kind: added + description: Added possibility to set conductor database by env variable links: - name: GitHub PR - url: https://github.com/FRINXio/helm-charts/pull/330 + url: https://github.com/FRINXio/helm-charts/pull/332 diff --git a/charts/workflow-manager/README.md b/charts/workflow-manager/README.md index 34de50cb..5db2c803 100644 --- a/charts/workflow-manager/README.md +++ b/charts/workflow-manager/README.md @@ -76,6 +76,7 @@ helm uninstall [RELEASE_NAME] | `conductorEnv.LOG4J_PROP` | LOG4J_PROP env value | `log4j.properties` | | `conductorEnv.SPRING_DATASOURCE_HOSTNAME` | Hostname of external database | | | `conductorEnv.CONDUCTOR_EXTERNAL_PAYLOAD_STORAGE_POSTGRES_HOSTNAME` | CONDUCTOR_EXTERNAL_PAYLOAD_STORAGE_POSTGRES_HOSTNAME env value | | +| `conductorEnv.DATABASE` | DATABASE env value | `conductor` | | `conductorEnv.SPRING_SEARCHDATASOURCE_HOSTNAME` | SPRING_SEARCHDATASOURCE_HOSTNAME env value | | | `conductorExtraEnv`| Extra env variables for conductor | | | `proxyEnv.AUTH_ENABLED` | AUTH_ENABLED env value | `false` | diff --git a/charts/workflow-manager/templates/deployment.yaml b/charts/workflow-manager/templates/deployment.yaml index ec2b9091..69b98dd6 100644 --- a/charts/workflow-manager/templates/deployment.yaml +++ b/charts/workflow-manager/templates/deployment.yaml @@ -131,11 +131,11 @@ spec: value: jdbc:postgresql://{{ .Release.Name }}-postgresql:5432/conductor?charset=utf8&parseTime=true&interpolateParams=true {{ else }} - name: "SPRING_DATASOURCE_URL" - value: "jdbc:postgresql://{{ .Values.conductorEnv.SPRING_DATASOURCE_HOSTNAME}}:5432/conductor?charset=utf8&parseTime=true&interpolateParams=true" + value: "jdbc:postgresql://{{ .Values.conductorEnv.SPRING_DATASOURCE_HOSTNAME}}:5432/{{ .Values.conductorEnv.DATABASE}}?charset=utf8&parseTime=true&interpolateParams=true" - name: "CONDUCTOR_EXTERNALPAYLOADSTORAGE_POSTGRES_URL" - value: "jdbc:postgresql://{{ .Values.conductorEnv.CONDUCTOR_EXTERNALPAYLOADSTORAGE_POSTGRES_HOSTNAME}}:5432/conductor?charset=utf8&parseTime=true&interpolateParams=true" + value: "jdbc:postgresql://{{ .Values.conductorEnv.CONDUCTOR_EXTERNALPAYLOADSTORAGE_POSTGRES_HOSTNAME}}:5432/{{ .Values.conductorEnv.DATABASE}}?charset=utf8&parseTime=true&interpolateParams=true" - name: "SPRING_SEARCHDATASOURCE_URL" - value: "jdbc:postgresql://{{ .Values.conductorEnv.SPRING_SEARCHDATASOURCE_HOSTNAME}}:5432/conductor?charset=utf8&parseTime=true&interpolateParams=true" + value: "jdbc:postgresql://{{ .Values.conductorEnv.SPRING_SEARCHDATASOURCE_HOSTNAME}}:5432/{{ .Values.conductorEnv.DATABASE}}?charset=utf8&parseTime=true&interpolateParams=true" {{ end }} {{- range $key, $val := .Values.conductorExtraEnv }} - name: {{ $key | quote }} diff --git a/charts/workflow-manager/values.yaml b/charts/workflow-manager/values.yaml index cde9572c..bfcdb53d 100644 --- a/charts/workflow-manager/values.yaml +++ b/charts/workflow-manager/values.yaml @@ -89,6 +89,7 @@ conductorEnv: SPRING_DATASOURCE_HOSTNAME: CONDUCTOR_EXTERNALPAYLOADSTORAGE_POSTGRES_HOSTNAME: SPRING_SEARCHDATASOURCE_HOSTNAME: + DATABASE: conductor conductorExtraEnv: CONDUCTOR_APP_OWNEREMAILMANDATORY: false