Skip to content

Commit fdf070f

Browse files
Merge pull request #150 from jacobweinstock/smee-flags-to-envs
Use env vars in Smee instead of CLI flags: ## Description <!--- Please describe what this PR is going to change --> This allows an unset value for an env variable to invoke Smee's automatic IP detection to trigger. With CLI flags this automatic IP detection doesnt work. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 2395b41 + 68c36dd commit fdf070f

File tree

4 files changed

+87
-48
lines changed

4 files changed

+87
-48
lines changed

tinkerbell/smee/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.6.1
19+
version: 0.6.2
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to

tinkerbell/smee/templates/deployment.yaml

Lines changed: 80 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -47,51 +47,90 @@ spec:
4747
- image: {{ .Values.image }}
4848
imagePullPolicy: {{ .Values.imagePullPolicy }}
4949
args:
50-
- -log-level={{ .Values.logLevel }}
51-
{{- if eq $roleType "Role"}}
52-
- -backend-kube-namespace={{ .Release.Namespace }}
53-
{{- end }}
54-
- -dhcp-addr={{ printf "%v:%v" .Values.dhcp.ip .Values.dhcp.port }}
55-
- -dhcp-enabled={{ .Values.dhcp.enabled }}
56-
- -dhcp-tftp-port={{ .Values.dhcp.tftpPort }}
57-
- -dhcp-http-ipxe-binary-path={{ .Values.dhcp.httpIPXE.binaryUrl.path }}
58-
- -dhcp-http-ipxe-binary-port={{ .Values.dhcp.httpIPXE.binaryUrl.port }}
59-
- -dhcp-http-ipxe-binary-scheme={{ .Values.dhcp.httpIPXE.binaryUrl.scheme }}
60-
- -dhcp-http-ipxe-script-path={{ .Values.dhcp.httpIPXE.scriptUrl.path }}
61-
- -dhcp-http-ipxe-script-port={{ .Values.dhcp.httpIPXE.scriptUrl.port }}
62-
- -dhcp-http-ipxe-script-scheme={{ .Values.dhcp.httpIPXE.scriptUrl.scheme }}
63-
- -dhcp-mode={{ .Values.dhcp.mode }}
64-
- -extra-kernel-args={{ join " " ( append .Values.http.additionalKernelArgs ( printf "tink_worker_image=%s" ( required "missing tinkWorkerImage" .Values.tinkWorkerImage ) ) ) }}
65-
- -http-ipxe-binary-enabled={{ .Values.http.ipxeBinaryEnabled }}
66-
- -http-ipxe-script-enabled={{ .Values.http.ipxeScriptEnabled }}
67-
- -http-port={{ .Values.http.port }}
68-
- -osie-url={{include "urlJoiner" (dict "urlDict" .Values.http.osieUrl)}}
69-
- -tink-server={{ printf "%v:%v" .Values.http.tinkServer.ip .Values.http.tinkServer.port }}
70-
- -tink-server-tls={{ .Values.http.tinkServer.tls }}
71-
- -tink-server-insecure-tls={{ .Values.http.tinkServer.insecureTLS }}
72-
- -trusted-proxies={{ required "missing trustedProxies" ( join "," $trustedProxies ) }}
73-
- -syslog-enabled={{ .Values.syslog.enabled }}
74-
- -ipxe-script-patch={{ .Values.ipxeScriptPatch }}
75-
- -tftp-enabled={{ .Values.tftp.enabled }}
76-
- -tftp-timeout={{ .Values.tftp.timeout }}
77-
- -tftp-port={{ .Values.tftp.port }}
78-
- -syslog-port={{ .Values.syslog.port }}
79-
- -http-addr={{ .Values.http.ip }}
80-
- -syslog-addr={{ .Values.syslog.ip }}
81-
- -tftp-addr={{ .Values.tftp.ip }}
82-
- -dhcp-http-ipxe-binary-host={{ .Values.dhcp.httpIPXE.binaryUrl.host}}
83-
- -dhcp-http-ipxe-script-host={{ .Values.dhcp.httpIPXE.scriptUrl.host }}
84-
- -dhcp-syslog-ip={{ .Values.dhcp.syslogIp }}
85-
- -dhcp-tftp-ip={{ .Values.dhcp.tftpIp }}
86-
- -dhcp-ip-for-packet={{ .Values.dhcp.ipForPacket }}
87-
- -iso-enabled={{ .Values.iso.enabled }}
88-
- -iso-url={{ .Values.iso.url }}
89-
- -iso-magic-string={{ .Values.iso.magicString }}
90-
- -iso-static-ipam-enabled={{ .Values.iso.staticIPAMEnabled }}
9150
{{- range .Values.additionalArgs }}
9251
- {{ . }}
9352
{{- end }}
9453
env:
54+
- name: SMEE_LOG_LEVEL
55+
value: {{ .Values.logLevel | quote }}
56+
- name: SMEE_DHCP_ADDR
57+
value: {{ printf "%v:%v" .Values.dhcp.ip .Values.dhcp.port | quote }}
58+
- name: SMEE_DHCP_ENABLED
59+
value: {{ .Values.dhcp.enabled | quote }}
60+
- name: SMEE_DHCP_TFTP_PORT
61+
value: {{ .Values.dhcp.tftpPort | quote }}
62+
- name: SMEE_DHCP_HTTP_IPXE_BINARY_PATH
63+
value: {{ .Values.dhcp.httpIPXE.binaryUrl.path | quote }}
64+
- name: SMEE_DHCP_HTTP_IPXE_BINARY_PORT
65+
value: {{ .Values.dhcp.httpIPXE.binaryUrl.port | quote }}
66+
- name: SMEE_DHCP_HTTP_IPXE_BINARY_SCHEME
67+
value: {{ .Values.dhcp.httpIPXE.binaryUrl.scheme | quote }}
68+
- name: SMEE_DHCP_HTTP_IPXE_SCRIPT_PATH
69+
value: {{ .Values.dhcp.httpIPXE.scriptUrl.path | quote }}
70+
- name: SMEE_DHCP_HTTP_IPXE_SCRIPT_PORT
71+
value: {{ .Values.dhcp.httpIPXE.scriptUrl.port | quote }}
72+
- name: SMEE_DHCP_HTTP_IPXE_SCRIPT_SCHEME
73+
value: {{ .Values.dhcp.httpIPXE.scriptUrl.scheme | quote }}
74+
- name: SMEE_DHCP_MODE
75+
value: {{ .Values.dhcp.mode | quote }}
76+
- name: SMEE_EXTRA_KERNEL_ARGS
77+
value: {{ join " " ( append .Values.http.additionalKernelArgs ( printf "tink_worker_image=%s" ( required "missing tinkWorkerImage" .Values.tinkWorkerImage ) ) ) | quote }}
78+
- name: SMEE_HTTP_IPXE_BINARY_ENABLED
79+
value: {{ .Values.http.ipxeBinaryEnabled | quote }}
80+
- name: SMEE_HTTP_IPXE_SCRIPT_ENABLED
81+
value: {{ .Values.http.ipxeScriptEnabled | quote }}
82+
- name: SMEE_HTTP_PORT
83+
value: {{ .Values.http.port | quote }}
84+
- name: SMEE_OSIE_URL
85+
value: {{include "urlJoiner" (dict "urlDict" .Values.http.osieUrl) | quote }}
86+
- name: SMEE_TINK_SERVER
87+
value: {{ printf "%v:%v" .Values.http.tinkServer.ip .Values.http.tinkServer.port | quote }}
88+
- name: SMEE_TINK_SERVER_TLS
89+
value: {{ .Values.http.tinkServer.tls | quote }}
90+
- name: SMEE_TINK_SERVER_INSECURE_TLS
91+
value: {{ .Values.http.tinkServer.insecureTLS | quote }}
92+
- name: SMEE_TRUSTED_PROXIES
93+
value: {{ required "missing trustedProxies" ( join "," $trustedProxies ) | quote }}
94+
- name: SMEE_SYSLOG_ENABLED
95+
value: {{ .Values.syslog.enabled | quote }}
96+
- name: SMEE_IPXE_SCRIPT_PATCH
97+
value: {{ .Values.ipxeScriptPatch | quote }}
98+
- name: SMEE_TFTP_ENABLED
99+
value: {{ .Values.tftp.enabled | quote }}
100+
- name: SMEE_TFTP_TIMEOUT
101+
value: {{ .Values.tftp.timeout | quote }}
102+
- name: SMEE_TFTP_PORT
103+
value: {{ .Values.tftp.port | quote }}
104+
- name: SMEE_SYSLOG_PORT
105+
value: {{ .Values.syslog.port | quote }}
106+
- name: SMEE_HTTP_ADDR
107+
value: {{ .Values.http.ip | quote }}
108+
- name: SMEE_SYSLOG_ADDR
109+
value: {{ .Values.syslog.ip | quote }}
110+
- name: SMEE_TFTP_ADDR
111+
value: {{ .Values.tftp.ip | quote }}
112+
- name: SMEE_DHCP_HTTP_IPXE_BINARY_HOST
113+
value: {{ .Values.dhcp.httpIPXE.binaryUrl.host | quote }}
114+
- name: SMEE_DHCP_HTTP_IPXE_SCRIPT_HOST
115+
value: {{ .Values.dhcp.httpIPXE.scriptUrl.host | quote }}
116+
- name: SMEE_DHCP_SYSLOG_IP
117+
value: {{ .Values.dhcp.syslogIp | quote }}
118+
- name: SMEE_DHCP_TFTP_IP
119+
value: {{ .Values.dhcp.tftpIp | quote }}
120+
- name: SMEE_DHCP_IP_FOR_PACKET
121+
value: {{ .Values.dhcp.ipForPacket | quote }}
122+
- name: SMEE_ISO_ENABLED
123+
value: {{ .Values.iso.enabled | quote }}
124+
- name: SMEE_ISO_URL
125+
value: {{ .Values.iso.url | quote }}
126+
- name: SMEE_ISO_MAGIC_STRING
127+
value: {{ .Values.iso.magicString | quote }}
128+
- name: SMEE_ISO_STATIC_IPAM_ENABLED
129+
value: {{ .Values.iso.staticIPAMEnabled | quote }}
130+
{{- if eq $roleType "Role"}}
131+
- name: SMEE_BACKEND_KUBE_NAMESPACE
132+
value: {{ .Release.Namespace | quote }}
133+
{{- end }}
95134
{{- range .Values.additionalEnv }}
96135
- name: {{ .name | quote }}
97136
value: {{ .value | quote }}

tinkerbell/stack/Chart.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ dependencies:
44
version: 0.3.0
55
- name: smee
66
repository: file://../smee
7-
version: 0.6.1
7+
version: 0.6.2
88
- name: rufio
99
repository: file://../rufio
1010
version: 0.4.0
1111
- name: hegel
1212
repository: file://../hegel
1313
version: 0.4.1
14-
digest: sha256:9b0f3f4ca5702645d6fed436ada76fe1af7940facdd9365d5cbef8a3cbd8de49
15-
generated: "2024-11-27T10:37:21.996702604-07:00"
14+
digest: sha256:fede76afbde378fe066fa9076c7c416d4f049306f31bfbc68139692749a45854
15+
generated: "2024-12-06T12:39:53.980909198-07:00"

tinkerbell/stack/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.6.1
19+
version: 0.6.2
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
2323
# follow Semantic Versioning. They should reflect the version the application is using.
2424
# It is recommended to use it with quotes.
25-
appVersion: "0.6.1"
25+
appVersion: "0.6.2"
2626

2727
dependencies:
2828
- name: tink
2929
version: "0.3.0"
3030
repository: "file://../tink"
3131
- name: smee
32-
version: "0.6.1"
32+
version: "0.6.2"
3333
repository: "file://../smee"
3434
- name: rufio
3535
version: "0.4.0"

0 commit comments

Comments
 (0)