From 7b6752005bed6f23287be709509da1d3fa4018d0 Mon Sep 17 00:00:00 2001 From: Ahree Hong Date: Mon, 3 Jun 2024 14:04:45 -0700 Subject: [PATCH] Chart improvements Signed-off-by: Ahree Hong --- tinkerbell/rufio/templates/deployment.yaml | 3 +++ tinkerbell/rufio/values.yaml | 1 + tinkerbell/smee/templates/_ports.tpl | 4 ++++ tinkerbell/stack/templates/kubevip.yaml | 4 ++++ tinkerbell/stack/values.yaml | 9 +++++++++ 5 files changed, 21 insertions(+) diff --git a/tinkerbell/rufio/templates/deployment.yaml b/tinkerbell/rufio/templates/deployment.yaml index e61d8858..962db403 100644 --- a/tinkerbell/rufio/templates/deployment.yaml +++ b/tinkerbell/rufio/templates/deployment.yaml @@ -37,6 +37,9 @@ spec: - /manager args: - --leader-elect + {{- range .Values.additionalArgs }} + - {{ . }} + {{- end }} securityContext: allowPrivilegeEscalation: false livenessProbe: diff --git a/tinkerbell/rufio/values.yaml b/tinkerbell/rufio/values.yaml index 29534655..39589bbe 100644 --- a/tinkerbell/rufio/values.yaml +++ b/tinkerbell/rufio/values.yaml @@ -9,6 +9,7 @@ resources: limits: cpu: 500m memory: 128Mi +additionalArgs: [] serviceAccountName: rufio-controller-manager rufioLeaderElectionRoleName: rufio-leader-election-role managerRoleName: rufio-manager-role diff --git a/tinkerbell/smee/templates/_ports.tpl b/tinkerbell/smee/templates/_ports.tpl index 48b49249..aab0ea24 100644 --- a/tinkerbell/smee/templates/_ports.tpl +++ b/tinkerbell/smee/templates/_ports.tpl @@ -14,7 +14,11 @@ {{- end }} {{- define "urlJoiner" }} +{{- if .urlDict.port }} {{- $host := printf "%v:%v" .urlDict.host .urlDict.port }} {{- $newDict := set .urlDict "host" $host }} {{- print (urlJoin $newDict) }} +{{- else }} +{{- print (urlJoin .urlDict) }} +{{- end }} {{- end }} diff --git a/tinkerbell/stack/templates/kubevip.yaml b/tinkerbell/stack/templates/kubevip.yaml index 6941193e..951ba1b4 100644 --- a/tinkerbell/stack/templates/kubevip.yaml +++ b/tinkerbell/stack/templates/kubevip.yaml @@ -27,6 +27,10 @@ spec: value: "true" - name: enableServicesElection value: "true" + {{- range .Values.stack.kubevip.additionalEnv }} + - name: {{ .name | quote }} + value: {{ .value | quote }} + {{- end }} {{- with .Values.stack.kubevip.interface }} - name: vip_interface value: {{ . }} diff --git a/tinkerbell/stack/values.yaml b/tinkerbell/stack/values.yaml index 7ef63191..52f8fded 100644 --- a/tinkerbell/stack/values.yaml +++ b/tinkerbell/stack/values.yaml @@ -33,6 +33,15 @@ stack: roleBindingName: kube-vip-rolebinding # Customize the interface KubeVIP advertises on. When unset, KubeVIP will autodetect the interface. # interface: enp0s8 + + # Additional environment variables to pass to the kubevip container. Each entry is expected to have a + # name and value key. Some keys are already defined - refer to the deployment.yaml template for + # details. + # + # Example + # - name: MY_ENV_VAR + # value: my-value + additionalEnv: [] # Relay allows us to listen and respond to layer broadcast DHCP requests relay: name: dhcp-relay