Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions charts/external-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,34 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
| txtPrefix | string | `nil` | Specify a prefix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtSuffix`. |
| txtSuffix | string | `nil` | Specify a suffix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtPrefix`. |

## Usage

### Configure `extraArgs`

An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times.

Example array:

```yaml
extraArgs:
- --zone-id-filter=/hostedzone/Z00001
- --zone-id-filter=/hostedzone/Z00002
- --zone-id-filter=/hostedzone/Z00003
```

Eample map: (supported values for map are strings, list of strings, and boolean)

```yaml
extraArgs:
extraArgA: valueA # results: "--extraArgA=valueA"
extraArgB: # rendered: "--extraArgB=valueB-1 --extraArgB=valueB-2"
- valueB-1
- valueB-2
extraArgC: true # results: "--extraArgC"
extraArgD: false # results: "--no-extraArgD"
extraArgE: # results: "--extraArgE"
```

----------------------------------------------

Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/).
28 changes: 28 additions & 0 deletions charts/external-dns/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,34 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains

{{ template "chart.valuesSection" . }}

## Usage

### Configure `extraArgs`
Comment thread
farodin91 marked this conversation as resolved.

An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times.

Example array:

```yaml
extraArgs:
- --zone-id-filter=/hostedzone/Z00001
- --zone-id-filter=/hostedzone/Z00002
- --zone-id-filter=/hostedzone/Z00003
```

Eample map: (supported values for map are strings, list of strings, and boolean)

```yaml
extraArgs:
extraArgA: valueA # results: "--extraArgA=valueA"
extraArgB: # rendered: "--extraArgB=valueB-1 --extraArgB=valueB-2"
- valueB-1
- valueB-2
extraArgC: true # results: "--extraArgC"
extraArgD: false # results: "--no-extraArgD"
extraArgE: # results: "--extraArgE"
```

----------------------------------------------

Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/).
6 changes: 6 additions & 0 deletions charts/external-dns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ spec:
{{- range $value }}
- --{{ $key }}={{ tpl (. | toString) $ }}
{{- end }}
{{- else if kindIs "bool" $value }}
{{- if $value }}
- --{{ $key }}
{{- else }}
- --no-{{ $key }}
{{- end }}
{{- else }}
- --{{ $key }}={{ tpl ($value | toString) $ }}
{{- end }}
Expand Down
50 changes: 36 additions & 14 deletions charts/external-dns/tests/deployment-flags_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ release:
tests:
- it: should provide expected default flags
asserts:
- exists :
- exists:
path: spec.template.spec.containers[?(@.name == "external-dns")]
- equal :
- equal:
path: spec.template.spec.containers[?(@.name == "external-dns")].args
value:
- --log-level=info
Expand All @@ -25,9 +25,9 @@ tests:
txtPrefix: ""
txtSuffix: "test-suffix"
asserts:
- exists :
- exists:
path: spec.template.spec.containers[?(@.name == "external-dns")]
- equal :
- equal:
path: spec.template.spec.containers[?(@.name == "external-dns")].args
value:
- --log-level=info
Expand All @@ -50,7 +50,7 @@ tests:
set:
txtSuffix: "custom-suffix"
asserts:
- exists :
- exists:
path: spec.template.spec.containers[?(@.name == "external-dns")]
- contains:
path: spec.template.spec.containers[?(@.name == "external-dns")].args
Expand Down Expand Up @@ -103,14 +103,13 @@ tests:
- --zone-id-filter=/hostedzone/Z00004
- --zone-id-filter=/hostedzone/Z00005


- it: should allow 'extraArgs' to be a slice
set:
extraArgs:
- --extraArgA=valueA
- --extraArgB=valueB
- --extraArgC=valueC-1
- --extraArgC=valueC-2
- --extraArgA=valueA
- --extraArgB=valueB
- --extraArgC=valueC-1
- --extraArgC=valueC-2

asserts:
- equal:
Expand All @@ -129,7 +128,6 @@ tests:
- --extraArgC=valueC-1
- --extraArgC=valueC-2


- it: should allow 'extraArgs' to be a map with its entries potentially being slices (lists) themselves
set:
extraArgs:
Expand All @@ -156,13 +154,37 @@ tests:
- --extraArgC=valueC-1
- --extraArgC=valueC-2

- it: should allow 'extraArgs' to be a map with its entries potentially being boolean
set:
extraArgs:
extraArgA:
no-extraArgB:
extraArgC: true
extraArgD: false

asserts:
- equal:
path: spec.template.spec.containers[?(@.name == "external-dns")].args
value:
- --log-level=info
- --log-format=text
- --interval=1m
- --source=service
- --source=ingress
- --policy=upsert-only
- --registry=txt
- --provider=aws
- --extraArgA
- --extraArgC
- --no-extraArgD
- --no-extraArgB

- it: should throw error when txtPrefix and txtSuffix are set
set:
txtPrefix: "test-prefix"
txtSuffix: "test-suffix"
txtPrefix: "test-prefix"
txtSuffix: "test-suffix"
asserts:
- failedTemplate:
- failedTemplate:
errorMessage: "'txtPrefix' and 'txtSuffix' are mutually exclusive"

- it: should configure custom annotation prefix
Expand Down
Loading