Skip to content

Commit

Permalink
struct for mapping values (#1282)
Browse files Browse the repository at this point in the history
* initial struct for mapping values

* add upto isolation values

Signed-off-by: Ishan Khare <[email protected]>

* add coredns plugin values

* add unit testing for helm values struct

Signed-off-by: Ishan Khare <[email protected]>

* use bool pointer for telemetry toggle

Signed-off-by: Ishan Khare <[email protected]>

* add tests for all distros

Signed-off-by: Ishan Khare <[email protected]>

* Update cmd/vcluster/cmd/values/v1/base_values.go

Co-authored-by: Thomas Kosiewski <[email protected]>

* fix lint and change plugin config to yaml

Signed-off-by: Ishan Khare <[email protected]>

* address review comments and improvements

Signed-off-by: Ishan Khare <[email protected]>

---------

Signed-off-by: Ishan Khare <[email protected]>
Co-authored-by: Thomas Kosiewski <[email protected]>
  • Loading branch information
ishankhare07 and ThomasK33 authored Oct 16, 2023
1 parent 605711b commit eb04d58
Show file tree
Hide file tree
Showing 13 changed files with 494 additions and 18 deletions.
2 changes: 1 addition & 1 deletion charts/eks/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Corefile: |-
ready
rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local
{{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }}
vcluster {{ .Values.coredns.plugin.config | b64enc }}
vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }}
{{- end }}
kubernetes cluster.local in-addr.arpa ip6.arpa {
{{- if .Values.pro }}
Expand Down
5 changes: 2 additions & 3 deletions charts/eks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ coredns:
integrated: false
plugin:
enabled: false
config: |-
---
config: []
# example configuration for plugin syntax, will be documented in detail
# - record:
# fqdn: google.com
Expand Down Expand Up @@ -521,6 +520,6 @@ multiNamespaceMode:
enabled: false

telemetry:
disabled: "false"
disabled: false
instanceCreator: "helm"
instanceCreatorUID: ""
2 changes: 1 addition & 1 deletion charts/k0s/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Corefile: |-
ready
rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local
{{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }}
vcluster {{ .Values.coredns.plugin.config | b64enc }}
vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }}
{{- end }}
kubernetes cluster.local in-addr.arpa ip6.arpa {
{{- if .Values.pro }}
Expand Down
5 changes: 2 additions & 3 deletions charts/k0s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ coredns:
integrated: false
plugin:
enabled: false
config: |-
---
config: []
# example configuration for plugin syntax, will be documented in detail
# - record:
# fqdn: google.com
Expand Down Expand Up @@ -489,6 +488,6 @@ multiNamespaceMode:
enabled: false

telemetry:
disabled: "false"
disabled: false
instanceCreator: "helm"
instanceCreatorUID: ""
2 changes: 1 addition & 1 deletion charts/k3s/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Corefile: |-
ready
rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local
{{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }}
vcluster {{ .Values.coredns.plugin.config | b64enc }}
vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }}
{{- end }}
kubernetes cluster.local in-addr.arpa ip6.arpa {
{{- if .Values.pro }}
Expand Down
5 changes: 2 additions & 3 deletions charts/k3s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,7 @@ coredns:
integrated: false
plugin:
enabled: false
config: |-
---
config: []
# example configuration for plugin syntax, will be documented in detail
# - record:
# fqdn: google.com
Expand Down Expand Up @@ -508,7 +507,7 @@ multiNamespaceMode:
enabled: false

telemetry:
disabled: "false"
disabled: false
instanceCreator: "helm"
instanceCreatorUID: ""

Expand Down
2 changes: 1 addition & 1 deletion charts/k8s/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Corefile: |-
ready
rewrite name regex .*\.nodes\.vcluster\.com kubernetes.default.svc.cluster.local
{{- if and .Values.coredns.integrated .Values.coredns.plugin.enabled }}
vcluster {{ .Values.coredns.plugin.config | b64enc }}
vcluster {{ toYaml .Values.coredns.plugin.config | b64enc }}
{{- end }}
kubernetes cluster.local in-addr.arpa ip6.arpa {
{{- if .Values.pro }}
Expand Down
5 changes: 2 additions & 3 deletions charts/k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,7 @@ coredns:
enabled: true
plugin:
enabled: false
config: |-
---
config: []
# example configuration for plugin syntax, will be documented in detail
# - record:
# fqdn: google.com
Expand Down Expand Up @@ -551,6 +550,6 @@ multiNamespaceMode:
enabled: false

telemetry:
disabled: "false"
disabled: false
instanceCreator: "helm"
instanceCreatorUID: ""
Loading

0 comments on commit eb04d58

Please sign in to comment.