Skip to content

Commit a4b37a7

Browse files
authored
hook-bootkit: read tinkerbell_insecure_tls from kernel cmdline and pass it to worker as TINKERBELL_INSECURE_TLS (#234)
#### hook-bootkit: read `tinkerbell_insecure_tls` from kernel cmdline and pass it to worker as TINKERBELL_INSECURE_TLS - this fits in with - tinkerbell/smee#479 - tinkerbell/tink#960 Signed-off-by: Ricardo Pardini <[email protected]>
2 parents d19cfbb + 32cbf8d commit a4b37a7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

images/hook-bootkit/main.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ type tinkWorkerConfig struct {
4242

4343
// tinkServerTLS is whether or not to use TLS for tink-server communication.
4444
tinkServerTLS string
45-
httpProxy string
46-
httpsProxy string
47-
noProxy string
45+
46+
// tinkServerInsecureTLS is whether or not to use insecure TLS for tink-server communication; only applies is TLS itself is on
47+
tinkServerInsecureTLS string
48+
49+
httpProxy string
50+
httpsProxy string
51+
noProxy string
4852
}
4953

5054
func main() {
@@ -167,6 +171,7 @@ func run(ctx context.Context, log logr.Logger) error {
167171
fmt.Sprintf("REGISTRY_PASSWORD=%s", cfg.password),
168172
fmt.Sprintf("TINKERBELL_GRPC_AUTHORITY=%s", cfg.grpcAuthority),
169173
fmt.Sprintf("TINKERBELL_TLS=%s", cfg.tinkServerTLS),
174+
fmt.Sprintf("TINKERBELL_INSECURE_TLS=%s", cfg.tinkServerInsecureTLS),
170175
fmt.Sprintf("WORKER_ID=%s", cfg.workerID),
171176
fmt.Sprintf("ID=%s", cfg.workerID),
172177
fmt.Sprintf("HTTP_PROXY=%s", cfg.httpProxy),
@@ -267,6 +272,8 @@ func parseCmdLine(cmdLines []string) (cfg tinkWorkerConfig) {
267272
cfg.tinkWorkerImage = cmdLine[1]
268273
case "tinkerbell_tls":
269274
cfg.tinkServerTLS = cmdLine[1]
275+
case "tinkerbell_insecure_tls":
276+
cfg.tinkServerInsecureTLS = cmdLine[1]
270277
case "HTTP_PROXY":
271278
cfg.httpProxy = cmdLine[1]
272279
case "HTTPS_PROXY":

0 commit comments

Comments
 (0)