diff --git a/charts/generic-service/Chart.yaml b/charts/generic-service/Chart.yaml index b99e22a..e8c881e 100644 --- a/charts/generic-service/Chart.yaml +++ b/charts/generic-service/Chart.yaml @@ -2,4 +2,4 @@ apiVersion: v1 description: runs a service (with monitoring, ingress, etc.) home: https://github.com/nano-byte/helm-charts/tree/master/charts/generic-service name: generic-service -version: 1.8.2 +version: 1.8.3 diff --git a/charts/generic-service/README.md b/charts/generic-service/README.md index efcbc8b..66f2990 100644 --- a/charts/generic-service/README.md +++ b/charts/generic-service/README.md @@ -51,6 +51,7 @@ app: | `config` | `{}` | YAML/JSON configuration to be mounted as a file in the container | | `configMountPath` | `/config/config.yaml` | The file path in the container to mount the data from `config` into (exposed via `$CONFIG_FILE`) | | `additionalConfigs` | `[]` | Additional `ConfigMap`s with key named `data.yaml` to be mounted (paths appended to `$CONFIG_FILE`) | +| `dnsConfig` | | [DNS config for the pod](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) | | `startupProbe` | | Probe that waits for the service to initially start up | | `livenessProbe` | | Probe that causes the service to be restarted when failing | | `readinessProbe` | | Probe that prevents the service from receiving traffic when failing | diff --git a/charts/generic-service/templates/controller.yaml b/charts/generic-service/templates/controller.yaml index 52c945b..9e00155 100644 --- a/charts/generic-service/templates/controller.yaml +++ b/charts/generic-service/templates/controller.yaml @@ -147,6 +147,9 @@ spec: spec: enableServiceLinks: false securityContext: {{- .Values.securityContext.pod | toYaml | nindent 8 }} + {{- if .Values.dnsConfig }} + dnsConfig: {{- .Values.dnsConfig | toYaml | nindent 8 }} + {{- end }} volumes: {{- if and .Values.persistence.enabled (ne .Values.rollout.controller "StatefulSet") }} - name: persistence diff --git a/charts/generic-service/values.schema.json b/charts/generic-service/values.schema.json index 4720b0c..f59b166 100644 --- a/charts/generic-service/values.schema.json +++ b/charts/generic-service/values.schema.json @@ -113,6 +113,15 @@ "items": {"type": "string"}, "description": "Additional ConfigMaps with key named data.yaml to be mounted (paths appended to $CONFIG_FILE)" }, + "dnsConfig": { + "type": "object", + "properties": { + "nameservers": {"type": "array", "items": {"type": "string"}}, + "searches": {"type": "array", "items": {"type": "string"}}, + "options": {"type": "array", "items": {"type": "object"}} + }, + "description": "DNS config for the pod (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/" + }, "startupProbe": { "type": "object", "description": "Probe that waits for the service to initially start", diff --git a/charts/generic-service/values.yaml b/charts/generic-service/values.yaml index e75df79..c62cdd5 100644 --- a/charts/generic-service/values.yaml +++ b/charts/generic-service/values.yaml @@ -29,6 +29,8 @@ config: {} configMountPath: /config/config.yaml additionalConfigs: [] +dnsConfig: {} + # startupProbe: # httpGet: # port: http-ingress