Skip to content

Commit e0fce4e

Browse files
committed
Finalize schema - passes unit tests
1 parent fc44490 commit e0fce4e

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

charts/external-dns/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,11 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
130130
| podSecurityContext | object | See _values.yaml_ | [Pod security context](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#podsecuritycontext-v1-core), this supports full customisation. |
131131
| policy | string | `"upsert-only"` | How DNS records are synchronized between sources and providers; available values are `create-only`, `sync`, & `upsert-only`. |
132132
| priorityClassName | string | `nil` | Priority class name for the `Pod`. |
133+
| provider | object | `{"name":"aws","webhook":{"readTimeout":null,"sidecar":{"args":[],"env":[],"extraVolumeMounts":[],"image":{"pullPolicy":"IfNotPresent","repository":null,"tag":null},"livenessProbe":{"failureThreshold":2,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"readinessProbe":{"failureThreshold":6,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":5,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"securityContext":{},"service":{"port":8080},"serviceMonitor":{"bearerTokenFile":null,"interval":null,"metricRelabelings":[],"relabelings":[],"scheme":null,"scrapeTimeout":null,"tlsConfig":{}}},"url":null,"writeTimeout":null}}` | Provider configuration |
133134
| provider.name | string | `"aws"` | _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). |
135+
| provider.webhook | object | `{"readTimeout":null,"sidecar":{"args":[],"env":[],"extraVolumeMounts":[],"image":{"pullPolicy":"IfNotPresent","repository":null,"tag":null},"livenessProbe":{"failureThreshold":2,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"readinessProbe":{"failureThreshold":6,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":5,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"securityContext":{},"service":{"port":8080},"serviceMonitor":{"bearerTokenFile":null,"interval":null,"metricRelabelings":[],"relabelings":[],"scheme":null,"scrapeTimeout":null,"tlsConfig":{}}},"url":null,"writeTimeout":null}` | Webhook configuration |
134136
| provider.webhook.readTimeout | integer | `nil` | Webhook read timeout |
135-
| provider.webhook.sidecar | object | `{"args":[],"env":[],"extraVolumeMounts":[],"image":{"pullPolicy":"IfNotPresent","repository":null,"tag":null},"livenessProbe":{"failureThreshold":2,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"readinessProbe":{"failureThreshold":6,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":5,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"securityContext":{},"service":{"port":8080},"serviceMonitor":{"bearerTokenFile":null,"interval":null,"metricRelabelings":[],"relabelings":[],"scheme":null,"scrapeTimeout":null,"tlsConfig":{}}}` | Webhook sidecar container |
137+
| provider.webhook.sidecar | object | `{"args":[],"env":[],"extraVolumeMounts":[],"image":{"pullPolicy":"IfNotPresent","repository":null,"tag":null},"livenessProbe":{"failureThreshold":2,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"readinessProbe":{"failureThreshold":6,"httpGet":{"path":"/healthz","port":"http-webhook"},"initialDelaySeconds":5,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5},"resources":{},"securityContext":{},"service":{"port":8080},"serviceMonitor":{"bearerTokenFile":null,"interval":null,"metricRelabelings":[],"relabelings":[],"scheme":null,"scrapeTimeout":null,"tlsConfig":{}}}` | Webhook sidecar container configuration |
136138
| provider.webhook.sidecar.args | list | `[]` | Extra arguments to provide for the `webhook` container. |
137139
| provider.webhook.sidecar.env | list | `[]` | [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `webhook` container. |
138140
| provider.webhook.sidecar.extraVolumeMounts | list | `[]` | Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `webhook` container. |

charts/external-dns/templates/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ spec:
127127
- --managed-record-types={{ . }}
128128
{{- end }}
129129
- --provider={{ $providerName }}
130-
{{- if .Values.provider.webhook.readTimeout }}
130+
{{- if kindIs "map" .Values.provider }}
131+
{{- if .Values.provider.webhook.readTimeout }}
131132
- --webhook-provider-read-timeout={{ .Values.provider.webhook.readTimeout }}
132133
{{- end }}
133134
{{- if .Values.provider.webhook.writeTimeout }}
@@ -136,6 +137,7 @@ spec:
136137
{{- if .Values.provider.webhook.url }}
137138
- --webhook-provider-url={{ .Values.provider.webhook.url }}
138139
{{- end }}
140+
{{- end }}
139141
{{- if kindIs "map" .Values.extraArgs }}
140142
{{- range $key, $value := .Values.extraArgs }}
141143
{{- if not (kindIs "invalid" $value) }}

charts/external-dns/values.schema.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,17 +1153,25 @@
11531153
]
11541154
},
11551155
"provider": {
1156+
"description": "Provider configuration",
11561157
"type": [
11571158
"object",
11581159
"string"
11591160
],
11601161
"properties": {
11611162
"name": {
11621163
"description": "_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).",
1163-
"type": "string"
1164+
"type": [
1165+
"string",
1166+
"null"
1167+
]
11641168
},
11651169
"webhook": {
1166-
"type": "object",
1170+
"description": "Webhook configuration",
1171+
"type": [
1172+
"object",
1173+
"null"
1174+
],
11671175
"properties": {
11681176
"readTimeout": {
11691177
"description": "Webhook read timeout",
@@ -1173,8 +1181,11 @@
11731181
]
11741182
},
11751183
"sidecar": {
1176-
"description": "Webhook sidecar container",
1177-
"type": "object",
1184+
"description": "Webhook sidecar container configuration",
1185+
"type": [
1186+
"object",
1187+
"null"
1188+
],
11781189
"properties": {
11791190
"args": {
11801191
"description": "Extra arguments to provide for the `webhook` container.",

charts/external-dns/values.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,18 +240,20 @@ labelFilter: # @schema type: [string,null]; default: null
240240
# -- Record types to manage (default: A, AAAA, CNAME)
241241
managedRecordTypes: [] # @schema type: [array, null]; item: string; uniqueItems: true
242242

243+
# -- (object) Provider configuration
243244
provider: # @schema type: [object, string]
244245
# -- _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).
245-
name: aws
246-
webhook: # @schema type: [object]
246+
name: aws # @schema type:[string, null]
247+
# -- (object) Webhook configuration
248+
webhook: # @schema type: [object, null]
247249
# -- (string) Webhook URL
248-
url: # @schema type:[string, null]
250+
url: # @schema type:[string, null]; default: null
249251
# -- (integer) Webhook read timeout
250-
readTimeout: # @schema type:[integer, null]
252+
readTimeout: # @schema type:[integer, null]; default: null
251253
# -- (integer) Webhook write timeout
252-
writeTimeout: # @schema type:[integer, null]
253-
# -- Webhook sidecar container
254-
sidecar: # @schema type: [object]
254+
writeTimeout: # @schema type:[integer, null]; default: null
255+
# -- (object) Webhook sidecar container configuration
256+
sidecar: # @schema type: [object, null]; default: null
255257
image:
256258
# -- (string) Image repository for the `webhook` container.
257259
repository: # @schema type:[string, null]; default: null

0 commit comments

Comments
 (0)