From 6f733401e633830dfa15587bfaaeb0caaa67eaba Mon Sep 17 00:00:00 2001 From: travis-cook-sfdc <119886245+travis-cook-sfdc@users.noreply.github.com> Date: Mon, 11 Dec 2023 13:46:07 -0800 Subject: [PATCH] feat: add custom image commands and arguments (#408) * feat: add custom image commands and arguments Add support for customizing an image's command or arguments. In our setup, we have some custom startup & shutdown behavior that need to run before the main process starts for things like enabling / disabling networking or injecting secrets. These cannot be configured with init containers since they need to run in the same place that the main process is going to run. If command / args are empty or not present, they will be excluded from helm, allowing the default command of the image to be used --------- Co-authored-by: Travis Cook --- charts/datahub/Chart.yaml | 12 +- .../acryl-datahub-actions/Chart.yaml | 2 +- .../subcharts/acryl-datahub-actions/README.md | 2 + .../templates/deployment.yaml | 6 + .../acryl-datahub-actions/values.yaml | 4 + .../subcharts/datahub-frontend/Chart.yaml | 2 +- .../subcharts/datahub-frontend/README.md | 6 +- .../templates/deployment.yaml | 6 + .../subcharts/datahub-frontend/values.yaml | 4 + .../datahub/subcharts/datahub-gms/Chart.yaml | 2 +- .../datahub/subcharts/datahub-gms/README.md | 4 +- .../datahub-gms/templates/deployment.yaml | 6 + .../datahub/subcharts/datahub-gms/values.yaml | 4 + .../subcharts/datahub-mae-consumer/Chart.yaml | 2 +- .../subcharts/datahub-mae-consumer/README.md | 120 +++++++++--------- .../templates/deployment.yaml | 6 + .../datahub-mae-consumer/values.yaml | 4 + .../subcharts/datahub-mce-consumer/Chart.yaml | 2 +- .../subcharts/datahub-mce-consumer/README.md | 2 + .../templates/deployment.yaml | 6 + .../datahub-mce-consumer/values.yaml | 4 + 21 files changed, 133 insertions(+), 73 deletions(-) diff --git a/charts/datahub/Chart.yaml b/charts/datahub/Chart.yaml index 1116f7cea..a9dc20591 100644 --- a/charts/datahub/Chart.yaml +++ b/charts/datahub/Chart.yaml @@ -4,25 +4,25 @@ description: A Helm chart for LinkedIn DataHub type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.3.17 +version: 0.3.18 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 0.11.0 dependencies: - name: datahub-gms - version: 0.2.158 + version: 0.2.159 repository: file://./subcharts/datahub-gms condition: datahub-gms.enabled - name: datahub-frontend - version: 0.2.150 + version: 0.2.151 repository: file://./subcharts/datahub-frontend condition: datahub-frontend.enabled - name: datahub-mae-consumer - version: 0.2.152 + version: 0.2.153 repository: file://./subcharts/datahub-mae-consumer condition: global.datahub_standalone_consumers_enabled - name: datahub-mce-consumer - version: 0.2.154 + version: 0.2.155 repository: file://./subcharts/datahub-mce-consumer condition: global.datahub_standalone_consumers_enabled - name: datahub-ingestion-cron @@ -30,7 +30,7 @@ dependencies: repository: file://./subcharts/datahub-ingestion-cron condition: datahub-ingestion-cron.enabled - name: acryl-datahub-actions - version: 0.2.140 + version: 0.2.141 repository: file://./subcharts/acryl-datahub-actions condition: acryl-datahub-actions.enabled maintainers: diff --git a/charts/datahub/subcharts/acryl-datahub-actions/Chart.yaml b/charts/datahub/subcharts/acryl-datahub-actions/Chart.yaml index fe545802c..18272395d 100644 --- a/charts/datahub/subcharts/acryl-datahub-actions/Chart.yaml +++ b/charts/datahub/subcharts/acryl-datahub-actions/Chart.yaml @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.2.140 +version: 0.2.141 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 0.0.11 diff --git a/charts/datahub/subcharts/acryl-datahub-actions/README.md b/charts/datahub/subcharts/acryl-datahub-actions/README.md index dff3ae5e1..a160efa37 100644 --- a/charts/datahub/subcharts/acryl-datahub-actions/README.md +++ b/charts/datahub/subcharts/acryl-datahub-actions/README.md @@ -17,6 +17,8 @@ Current chart version is `0.0.3` | extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | | fullnameOverride | string | `"acryl-datahub-actions"` | | | global.datahub.gms.port | string | `"8080"` | | +| image.args | list | `[]` | Override the image's args. Used to configure custom startup or shutdown behavior | +| image.command | list | `[]` | Override the image's command. Used to configure custom startup or shutdown behavior | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"acryldata/datahub-actions"` | | | image.tag | string | `"v0.0.6"` | | diff --git a/charts/datahub/subcharts/acryl-datahub-actions/templates/deployment.yaml b/charts/datahub/subcharts/acryl-datahub-actions/templates/deployment.yaml index eced012f4..37f4a622c 100644 --- a/charts/datahub/subcharts/acryl-datahub-actions/templates/deployment.yaml +++ b/charts/datahub/subcharts/acryl-datahub-actions/templates/deployment.yaml @@ -70,6 +70,12 @@ spec: - name: http containerPort: 9093 protocol: TCP + {{- if .Values.image.command }} + command: {{ .Values.image.command | toJson }} + {{- end }} + {{- if .Values.image.args }} + args: {{ .Values.image.args | toJson }} + {{- end }} env: - name: DATAHUB_GMS_HOST value: {{ (((.Values.datahub).gms).host | default ((.Values.global.datahub).gms).host) | default (printf "%s-%s" .Release.Name "datahub-gms") | trunc 63 | trimSuffix "-"}} diff --git a/charts/datahub/subcharts/acryl-datahub-actions/values.yaml b/charts/datahub/subcharts/acryl-datahub-actions/values.yaml index 7b3fa91b1..65e1cdcaa 100644 --- a/charts/datahub/subcharts/acryl-datahub-actions/values.yaml +++ b/charts/datahub/subcharts/acryl-datahub-actions/values.yaml @@ -7,6 +7,10 @@ image: repository: acryldata/datahub-actions tag: "v0.0.1" pullPolicy: IfNotPresent + # Override the image's command & args with a new one. + # This may be necessary for custom startup or shutdown behaviors + command: + args: imagePullSecrets: [] nameOverride: "" diff --git a/charts/datahub/subcharts/datahub-frontend/Chart.yaml b/charts/datahub/subcharts/datahub-frontend/Chart.yaml index 6820c7824..e467d63a8 100644 --- a/charts/datahub/subcharts/datahub-frontend/Chart.yaml +++ b/charts/datahub/subcharts/datahub-frontend/Chart.yaml @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.2.150 +version: 0.2.151 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: v0.11.0 diff --git a/charts/datahub/subcharts/datahub-frontend/README.md b/charts/datahub/subcharts/datahub-frontend/README.md index 85874de5d..c3adf021e 100644 --- a/charts/datahub/subcharts/datahub-frontend/README.md +++ b/charts/datahub/subcharts/datahub-frontend/README.md @@ -21,7 +21,9 @@ Current chart version is `0.2.0` | fullnameOverride | string | `"datahub-frontend"` | | | global.datahub_analytics_enabled | boolean | true | | | global.datahub.gms.port | string | `"8080"` | | - | global.datahub.frontend.validateSignUpEmail | boolean | true | Enforces user sign up through invite link to use a valid email. | +| global.datahub.frontend.validateSignUpEmail | boolean | true | Enforces user sign up through invite link to use a valid email. | +| image.args | list | `[]` | Override the image's args. Used to configure custom startup or shutdown behavior | +| image.command | list | `[]` | Override the image's command. Used to configure custom startup or shutdown behavior | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"linkedin/datahub-frontend-react"` | | | image.tag | string | `"head"` | | @@ -48,7 +50,7 @@ Current chart version is `0.2.0` | oidcAuthentication.oktaDomain | string | `""` | Okta domain, e.g. `dev-12345.okta.com`; needed only if `provider` is set to `okta` | | oidcAuthentication.azureTenantId | string | `""` | Azure directory (tenant) ID; neede only if `provider` is set to `azure` | | oidcAuthentication.user_name_claim | string | `""` | The attribute that will contain the username used on the DataHub platform | -| oidcAuthentication.user_name_claim_regex | string | `""` | A regex string used for extracting the username from the userNameClaim attribute | +| oidcAuthentication.user_name_claim_regex | string | `""` | A regex string used for extracting the username from the userNameClaim attribute | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | | | readinessProbe.initialDelaySeconds | int | `60` | | diff --git a/charts/datahub/subcharts/datahub-frontend/templates/deployment.yaml b/charts/datahub/subcharts/datahub-frontend/templates/deployment.yaml index e480eed58..df9549a07 100644 --- a/charts/datahub/subcharts/datahub-frontend/templates/deployment.yaml +++ b/charts/datahub/subcharts/datahub-frontend/templates/deployment.yaml @@ -68,6 +68,12 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ required "Global or specific tag is required" (.Values.image.tag | default .Values.global.datahub.version) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.image.command }} + command: {{ .Values.image.command | toJson }} + {{- end }} + {{- if .Values.image.args }} + args: {{ .Values.image.args | toJson }} + {{- end }} lifecycle: {{- toYaml .Values.lifecycle | nindent 12 }} ports: diff --git a/charts/datahub/subcharts/datahub-frontend/values.yaml b/charts/datahub/subcharts/datahub-frontend/values.yaml index 79d9c8bb5..0bfc4fb63 100644 --- a/charts/datahub/subcharts/datahub-frontend/values.yaml +++ b/charts/datahub/subcharts/datahub-frontend/values.yaml @@ -10,6 +10,10 @@ image: repository: linkedin/datahub-frontend-react tag: pullPolicy: IfNotPresent + # Override the image's command & args with a new one. + # This may be necessary for custom startup or shutdown behaviors + command: + args: imagePullSecrets: [] nameOverride: "" diff --git a/charts/datahub/subcharts/datahub-gms/Chart.yaml b/charts/datahub/subcharts/datahub-gms/Chart.yaml index b494fcc1f..8e5da2e85 100644 --- a/charts/datahub/subcharts/datahub-gms/Chart.yaml +++ b/charts/datahub/subcharts/datahub-gms/Chart.yaml @@ -12,7 +12,7 @@ description: A Helm chart for LinkedIn DataHub's datahub-gms component type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.2.158 +version: 0.2.159 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: v0.11.0 diff --git a/charts/datahub/subcharts/datahub-gms/README.md b/charts/datahub/subcharts/datahub-gms/README.md index 7aeb6b3be..8f946f6ce 100644 --- a/charts/datahub/subcharts/datahub-gms/README.md +++ b/charts/datahub/subcharts/datahub-gms/README.md @@ -38,7 +38,9 @@ Current chart version is `0.2.0` | global.sql.datasource.username | string | `"datahub"` | | | global.sql.datasource.password.secretRef | string | `"mysql-secrets"` | | | global.sql.datasource.password.secretKey | string | `"mysql-password"` | | -| global.graph_service_impl | string | `elasticsearch` | One of `elasticsearch` or `neo4j`. Determines which backend to use for the GMS graph service. Elasticsearch is recommended for a simplified deployment. | +| global.graph_service_impl | string | `elasticsearch` | One of `elasticsearch` or `neo4j`. Determines which backend to use for the GMS graph service. Elasticsearch is recommended for a simplified deployment. | +| image.args | list | `[]` | Override the image's args. Used to configure custom startup or shutdown behavior | +| image.command | list | `[]` | Override the image's command. Used to configure custom startup or shutdown behavior | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"linkedin/datahub-gms"` | | | image.tag | string | `"head"` | | diff --git a/charts/datahub/subcharts/datahub-gms/templates/deployment.yaml b/charts/datahub/subcharts/datahub-gms/templates/deployment.yaml index 57cc865b6..7578cd47b 100644 --- a/charts/datahub/subcharts/datahub-gms/templates/deployment.yaml +++ b/charts/datahub/subcharts/datahub-gms/templates/deployment.yaml @@ -72,6 +72,12 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ required "Global or specific tag is required" (.Values.image.tag | default .Values.global.datahub.version) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.image.command }} + command: {{ .Values.image.command | toJson }} + {{- end }} + {{- if .Values.image.args }} + args: {{ .Values.image.args | toJson }} + {{- end }} ports: - name: http containerPort: 8080 diff --git a/charts/datahub/subcharts/datahub-gms/values.yaml b/charts/datahub/subcharts/datahub-gms/values.yaml index 96110be70..6aed828a0 100644 --- a/charts/datahub/subcharts/datahub-gms/values.yaml +++ b/charts/datahub/subcharts/datahub-gms/values.yaml @@ -10,6 +10,10 @@ image: repository: linkedin/datahub-gms pullPolicy: IfNotPresent tag: + # Override the image's command & args with a new one. + # This may be necessary for custom startup or shutdown behaviors + command: + args: imagePullSecrets: [] nameOverride: "" diff --git a/charts/datahub/subcharts/datahub-mae-consumer/Chart.yaml b/charts/datahub/subcharts/datahub-mae-consumer/Chart.yaml index f9e738e2a..3a1d7e489 100644 --- a/charts/datahub/subcharts/datahub-mae-consumer/Chart.yaml +++ b/charts/datahub/subcharts/datahub-mae-consumer/Chart.yaml @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.2.152 +version: 0.2.153 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: v0.11.0 diff --git a/charts/datahub/subcharts/datahub-mae-consumer/README.md b/charts/datahub/subcharts/datahub-mae-consumer/README.md index fbae00c03..0571ebf23 100644 --- a/charts/datahub/subcharts/datahub-mae-consumer/README.md +++ b/charts/datahub/subcharts/datahub-mae-consumer/README.md @@ -6,65 +6,67 @@ Current chart version is `0.2.0` ## Chart Values -| Key | Type | Default | Description | -|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| affinity | object | `{}` | | -| exporters.jmx.enabled | boolean | false | | -| extraLabels | object | `{}` | Extra labels for deployment configuration | +| Key | Type | Default | Description | +|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| affinity | object | `{}` | | +| exporters.jmx.enabled | boolean | false | | +| extraLabels | object | `{}` | Extra labels for deployment configuration | | extraEnvs | Extra [environment variables][] which will be appended to the `env:` definition for the container | `[]` | -| extraSidecars | list | `[]` | Add additional sidecar containers to the deployment pod(s) | +| extraSidecars | list | `[]` | Add additional sidecar containers to the deployment pod(s) | | extraVolumes | Templatable string of additional `volumes` to be passed to the `tpl` function | "" | | extraVolumeMounts | Templatable string of additional `volumeMounts` to be passed to the `tpl` function | "" | -| fullnameOverride | string | `"datahub-mae-consumer"` | | -| global.datahub_analytics_enabled | boolean | true | | -| global.datahub.mae_consumer.port | string | `"9091"` | | -| global.datahub.mae_consumer.nodePort | string | `"30002"` | | -| global.elasticsearch.host | string | `"elasticsearch"` | | -| global.elasticsearch.port | string | `"9200"` | | -| global.kafka.bootstrap.server | string | `"broker:9092"` | | -| global.kafka.schemaregistry.url | string | `"http://schema-registry:8081"` | | -| global.neo4j.host | string | `"neo4j:7474"` | | -| global.neo4j.uri | string | `"bolt://neo4j"` | | -| global.neo4j.username | string | `"neo4j"` | | -| global.neo4j.password.secretRef | string | `"neo4j-secrets"` | | -| global.neo4j.password.secretKey | string | `"neo4j-password"` | | -| global.hostAliases[0].hostnames[0] | string | `"broker"` | | -| global.hostAliases[0].hostnames[1] | string | `"mysql"` | | -| global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | -| global.hostAliases[0].hostnames[3] | string | `"neo4j"` | | -| global.hostAliases[0].ip | string | `"192.168.0.104"` | | -| global.graph_service_impl | string | `elasticsearch` | One of `elasticsearch` or `neo4j`. Determines which backend to use for the GMS graph service. Elasticsearch is recommended for a simplified deployment. | -| image.pullPolicy | string | `"IfNotPresent"` | | -| image.repository | string | `"linkedin/datahub-mae-consumer"` | | -| image.tag | string | `"head"` | | -| imagePullSecrets | list | `[]` | | -| ingress.annotations | object | `{}` | | -| ingress.enabled | bool | `false` | | -| ingress.hosts[0].host | string | `"chart-example.local"` | | -| ingress.hosts[0].paths | list | `[]` | | -| ingress.tls | list | `[]` | | -| livenessProbe.initialDelaySeconds | int | `60` | | -| livenessProbe.periodSeconds | int | `30` | | -| livenessProbe.failureThreshold | int | `8` | | -| nameOverride | string | `""` | | -| nodeSelector | object | `{}` | | -| podAnnotations | object | `{}` | | -| podSecurityContext | object | `{}` | | -| readinessProbe.initialDelaySeconds | int | `60` | | -| readinessProbe.periodSeconds | int | `30` | | -| readinessProbe.failureThreshold | int | `8` | | -| replicaCount | int | `1` | | -| revisionHistoryLimit | int | `10` | | -| resources | object | `{}` | | -| securityContext | object | `{}` | | -| service.port | int | `80` | | -| service.type | string | `"ClusterIP"` | | -| serviceAccount.annotations | object | `{}` | | -| serviceAccount.create | bool | `true` | | -| serviceAccount.name | string | `nil` | | -| serviceMonitor.create | bool | `false` | If set true and `global.datahub.monitoring.enablePrometheus` is set `true` it will create a ServiceMonitor resource | -| tolerations | list | `[]` | | -| datahub.metadata_service_authentication.enabled | bool | `true` | Whether Metadata Service Authentication is enabled. | -| global.datahub.metadata_service_authentication.systemClientId | string | `"__datahub_system"` | The internal system id that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | -| global.datahub.metadata_service_authentication.systemClientSecret.secretRef | string | `nil` | The reference to a secret containing the internal system secret that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | -| global.datahub.metadata_service_authentication.systemClientSecret.secretKey | string | `nil` | The key of a secret containing the internal system secret that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | +| fullnameOverride | string | `"datahub-mae-consumer"` | | +| global.datahub_analytics_enabled | boolean | true | | +| global.datahub.mae_consumer.port | string | `"9091"` | | +| global.datahub.mae_consumer.nodePort | string | `"30002"` | | +| global.elasticsearch.host | string | `"elasticsearch"` | | +| global.elasticsearch.port | string | `"9200"` | | +| global.kafka.bootstrap.server | string | `"broker:9092"` | | +| global.kafka.schemaregistry.url | string | `"http://schema-registry:8081"` | | +| global.neo4j.host | string | `"neo4j:7474"` | | +| global.neo4j.uri | string | `"bolt://neo4j"` | | +| global.neo4j.username | string | `"neo4j"` | | +| global.neo4j.password.secretRef | string | `"neo4j-secrets"` | | +| global.neo4j.password.secretKey | string | `"neo4j-password"` | | +| global.hostAliases[0].hostnames[0] | string | `"broker"` | | +| global.hostAliases[0].hostnames[1] | string | `"mysql"` | | +| global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | +| global.hostAliases[0].hostnames[3] | string | `"neo4j"` | | +| global.hostAliases[0].ip | string | `"192.168.0.104"` | | +| global.graph_service_impl | string | `elasticsearch` | One of `elasticsearch` or `neo4j`. Determines which backend to use for the GMS graph service. Elasticsearch is recommended for a simplified deployment. | +| image.args | list | `[]` | Override the image's args. Used to configure custom startup or shutdown behavior | +| image.command | list | `[]` | Override the image's command. Used to configure custom startup or shutdown behavior | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"linkedin/datahub-mae-consumer"` | | +| image.tag | string | `"head"` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths | list | `[]` | | +| ingress.tls | list | `[]` | | +| livenessProbe.initialDelaySeconds | int | `60` | | +| livenessProbe.periodSeconds | int | `30` | | +| livenessProbe.failureThreshold | int | `8` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| readinessProbe.initialDelaySeconds | int | `60` | | +| readinessProbe.periodSeconds | int | `30` | | +| readinessProbe.failureThreshold | int | `8` | | +| replicaCount | int | `1` | | +| revisionHistoryLimit | int | `10` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `nil` | | +| serviceMonitor.create | bool | `false` | If set true and `global.datahub.monitoring.enablePrometheus` is set `true` it will create a ServiceMonitor resource | +| tolerations | list | `[]` | | +| datahub.metadata_service_authentication.enabled | bool | `true` | Whether Metadata Service Authentication is enabled. | +| global.datahub.metadata_service_authentication.systemClientId | string | `"__datahub_system"` | The internal system id that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | +| global.datahub.metadata_service_authentication.systemClientSecret.secretRef | string | `nil` | The reference to a secret containing the internal system secret that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | +| global.datahub.metadata_service_authentication.systemClientSecret.secretKey | string | `nil` | The key of a secret containing the internal system secret that is used to communicate with DataHub GMS. Required if metadata_service_authentication is 'true'. | diff --git a/charts/datahub/subcharts/datahub-mae-consumer/templates/deployment.yaml b/charts/datahub/subcharts/datahub-mae-consumer/templates/deployment.yaml index 74e33d0a8..0db5c7c1f 100644 --- a/charts/datahub/subcharts/datahub-mae-consumer/templates/deployment.yaml +++ b/charts/datahub/subcharts/datahub-mae-consumer/templates/deployment.yaml @@ -63,6 +63,12 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ required "Global or specific tag is required" (.Values.image.tag | default .Values.global.datahub.version) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.image.command }} + command: {{ .Values.image.command | toJson }} + {{- end }} + {{- if .Values.image.args }} + args: {{ .Values.image.args | toJson }} + {{- end }} ports: - name: http containerPort: 9091 diff --git a/charts/datahub/subcharts/datahub-mae-consumer/values.yaml b/charts/datahub/subcharts/datahub-mae-consumer/values.yaml index 2639188ae..6adb518c6 100644 --- a/charts/datahub/subcharts/datahub-mae-consumer/values.yaml +++ b/charts/datahub/subcharts/datahub-mae-consumer/values.yaml @@ -10,6 +10,10 @@ image: repository: linkedin/datahub-mae-consumer pullPolicy: IfNotPresent tag: + # Override the image's command & args with a new one. + # This may be necessary for custom startup or shutdown behaviors + command: + args: imagePullSecrets: [] nameOverride: "" diff --git a/charts/datahub/subcharts/datahub-mce-consumer/Chart.yaml b/charts/datahub/subcharts/datahub-mce-consumer/Chart.yaml index 9da495f5b..07e6d799c 100644 --- a/charts/datahub/subcharts/datahub-mce-consumer/Chart.yaml +++ b/charts/datahub/subcharts/datahub-mce-consumer/Chart.yaml @@ -12,7 +12,7 @@ description: A Helm chart for Kubernetes type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.2.154 +version: 0.2.155 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: v0.11.0 diff --git a/charts/datahub/subcharts/datahub-mce-consumer/README.md b/charts/datahub/subcharts/datahub-mce-consumer/README.md index 240a8d6d6..0b7e525ca 100644 --- a/charts/datahub/subcharts/datahub-mce-consumer/README.md +++ b/charts/datahub/subcharts/datahub-mce-consumer/README.md @@ -24,6 +24,8 @@ Current chart version is `0.2.0` | global.hostAliases[0].hostnames[2] | string | `"elasticsearch"` | | | global.hostAliases[0].hostnames[3] | string | `"neo4j"` | | | global.hostAliases[0].ip | string | `"192.168.0.104"` | | +| image.args | list | `[]` | Override the image's args. Used to configure custom startup or shutdown behavior | +| image.command | list | `[]` | Override the image's command. Used to configure custom startup or shutdown behavior | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"linkedin/datahub-mce-consumer"` | | | image.tag | string | `"head"` | | diff --git a/charts/datahub/subcharts/datahub-mce-consumer/templates/deployment.yaml b/charts/datahub/subcharts/datahub-mce-consumer/templates/deployment.yaml index f8c201363..40506c157 100644 --- a/charts/datahub/subcharts/datahub-mce-consumer/templates/deployment.yaml +++ b/charts/datahub/subcharts/datahub-mce-consumer/templates/deployment.yaml @@ -67,6 +67,12 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ required "Global or specific tag is required" (.Values.image.tag | default .Values.global.datahub.version) }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.image.command }} + command: {{ .Values.image.command | toJson }} + {{- end }} + {{- if .Values.image.args }} + args: {{ .Values.image.args | toJson }} + {{- end }} ports: - name: http containerPort: 9090 diff --git a/charts/datahub/subcharts/datahub-mce-consumer/values.yaml b/charts/datahub/subcharts/datahub-mce-consumer/values.yaml index f8c45f7b9..2f9448b95 100644 --- a/charts/datahub/subcharts/datahub-mce-consumer/values.yaml +++ b/charts/datahub/subcharts/datahub-mce-consumer/values.yaml @@ -10,6 +10,10 @@ image: repository: linkedin/datahub-mce-consumer pullPolicy: IfNotPresent tag: + # Override the image's command & args with a new one. + # This may be necessary for custom startup or shutdown behaviors + command: + args: imagePullSecrets: [] nameOverride: ""