Skip to content

Commit

Permalink
Tinkerbell chart improvements (#101)
Browse files Browse the repository at this point in the history
## Description
This PR adds the following:
- Templates out the args for the rufio deployment so that users can provide other rufio flags if desired.
- Updates "urlJoiner" to not add a colon to the url if no port is provided
- Allows kubevip `prometheus_server` to be set to override the default address

## Why is this needed
These changes allow the tinkerbell chart to be more customizable for various use cases

## How Has This Been Tested?
Tested manually with EKS-Anywhere

## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
mergify[bot] authored Jun 10, 2024
2 parents 43a6c2c + 7b67520 commit 2fb7daf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tinkerbell/rufio/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ spec:
- /manager
args:
- --leader-elect
{{- range .Values.additionalArgs }}
- {{ . }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
livenessProbe:
Expand Down
1 change: 1 addition & 0 deletions tinkerbell/rufio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ resources:
limits:
cpu: 500m
memory: 128Mi
additionalArgs: []
serviceAccountName: rufio-controller-manager
rufioLeaderElectionRoleName: rufio-leader-election-role
managerRoleName: rufio-manager-role
Expand Down
4 changes: 4 additions & 0 deletions tinkerbell/smee/templates/_ports.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 4 additions & 0 deletions tinkerbell/stack/templates/kubevip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {{ . }}
Expand Down
9 changes: 9 additions & 0 deletions tinkerbell/stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2fb7daf

Please sign in to comment.