Skip to content

Commit

Permalink
add support for sidecar containers via extraContainers (#141)
Browse files Browse the repository at this point in the history
* add support for sidecar containers via extraContainers

Signed-off-by: Devin Young <[email protected]>

.

.

* fix namespacing

Signed-off-by: Devin Young <[email protected]>

---------

Signed-off-by: Devin Young <[email protected]>
  • Loading branch information
imdevin567 authored Oct 2, 2023
1 parent c5e789b commit c770242
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.26.0
version: 1.27.0
appVersion: 1.11.1
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand All @@ -20,5 +20,5 @@ engine: gotpl
type: application
annotations:
artifacthub.io/changes: |
- kind: changed
description: Upgrade CoreDNS to 1.11.1
- kind: added
description: Added support for sidecar containers via extraContainers
2 changes: 2 additions & 0 deletions charts/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ The command removes all the Kubernetes components associated with the chart and
| `nodeSelector` | Node labels for pod assignment | {} |
| `tolerations` | Tolerations for pod assignment | [] |
| `zoneFiles` | Configure custom Zone files | [] |
| `extraContainers` | Optional array of sidecar containers | [] |
| `extraVolumes` | Optional array of volumes to create | [] |
| `extraVolumeMounts` | Optional array of volumes to mount inside the CoreDNS container | [] |
| `extraSecrets` | Optional array of secrets to mount inside the CoreDNS container | [] |
Expand Down Expand Up @@ -136,6 +137,7 @@ The command removes all the Kubernetes components associated with the chart and
| `autoscaler.livenessProbe.timeoutSeconds` | When the probe times out | `5` |
| `autoscaler.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `3` |
| `autoscaler.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
| `autoscaler.extraContainers` | Optional array of sidecar containers | [] |
| `deployment.enabled` | Optionally disable the main deployment and its respective resources. | `true` |
| `deployment.name` | Name of the deployment if `deployment.enabled` is true. Otherwise the name of an existing deployment for the autoscaler or HPA to target. | `""` |
| `deployment.annotations` | Annotations to add to the main deployment | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions charts/coredns/templates/deployment-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,6 @@ spec:
{{ toYaml .Values.autoscaler.customFlags | indent 10 }}
{{- end }}
{{- end }}
{{- if .Values.autoscaler.extraContainers }}
{{ toYaml .Values.autoscaler.extraContainers | indent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/coredns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ spec:
{{- if .Values.securityContext }}
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- end }}
{{- if .Values.extraContainers }}
{{ toYaml .Values.extraContainers | indent 8 }}
{{- end }}
volumes:
- name: config-volume
Expand Down
11 changes: 11 additions & 0 deletions charts/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ zoneFiles: []
# example.com. IN A 192.168.99.102
# *.example.com. IN A 192.168.99.102

# optional array of sidecar containers
extraContainers: []
# - name: some-container-name
# image: some-image:latest
# imagePullPolicy: Always
# optional array of extra volumes to create
extraVolumes: []
# - name: some-volume-name
Expand Down Expand Up @@ -349,6 +354,12 @@ autoscaler:
failureThreshold: 3
successThreshold: 1

# optional array of sidecar containers
extraContainers: []
# - name: some-container-name
# image: some-image:latest
# imagePullPolicy: Always

deployment:
enabled: true
name: ""
Expand Down

0 comments on commit c770242

Please sign in to comment.