Allow the webhook sidecar to be optional in case the webhook is outside the cluster

This commit is contained in:
Eric Ace 2025-06-28 20:36:52 -04:00
parent 8703fd4824
commit fe7054ac97
4 changed files with 9 additions and 0 deletions

View File

@ -143,6 +143,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
| provider.webhook.securityContext | object | See _values.yaml_ | [Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the `webhook` container. |
| provider.webhook.service.port | int | `8080` | Webhook exposed HTTP port for the service. |
| provider.webhook.serviceMonitor | object | See _values.yaml_ | Optional [Service Monitor](https://prometheus-operator.dev/docs/operator/design/#servicemonitor) configuration for the `webhook` container. |
| provider.webhook.sidecar | bool | `true` | If false, then do not add a webhook sidecar to the `external-dns` deployment. |
| rbac.additionalPermissions | list | `[]` | Additional rules to add to the `ClusterRole`. |
| rbac.create | bool | `true` | If `true`, create a `ClusterRole` & `ClusterRoleBinding` with access to the Kubernetes API. |
| readinessProbe | object | See _values.yaml_ | [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container. |

View File

@ -173,6 +173,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if eq $providerName "webhook" }}
{{- if .Values.provider.webhook.sidecar }}
{{- with .Values.provider.webhook }}
- name: webhook
image: {{ include "external-dns.webhookImage" . }}
@ -209,6 +210,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.secretConfiguration.enabled .Values.extraVolumes }}
volumes:
{{- if .Values.secretConfiguration.enabled }}

View File

@ -507,6 +507,10 @@
"type": "object"
}
}
},
"sidecar": {
"description": "If false, then do not add a webhook sidecar to the external-dns deployment.",
"type": "boolean"
}
}
}

View File

@ -244,6 +244,8 @@ provider: # @schema type: [object, string];
# -- _ExternalDNS_ provider name; for the available providers and how to configure them see [README](https://github.com/kubernetes-sigs/external-dns/blob/master/charts/external-dns/README.md#providers).
name: aws
webhook:
# -- (bool) If false, then do not add a webhook sidecar to the `external-dns` deployment.
sidecar: true
image:
# -- (string) Image repository for the `webhook` container.
repository: # @schema type:[string, null]; default: null