Skip to content

Commit

Permalink
Add .dnsConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncampion authored Nov 21, 2023
1 parent 038e535 commit 5c333a5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/generic-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions charts/generic-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
3 changes: 3 additions & 0 deletions charts/generic-service/templates/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions charts/generic-service/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions charts/generic-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ config: {}
configMountPath: /config/config.yaml
additionalConfigs: []

dnsConfig: {}

# startupProbe:
# httpGet:
# port: http-ingress
Expand Down

0 comments on commit 5c333a5

Please sign in to comment.