Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hook-bootkit: read tinkerbell_insecure_tls from kernel cmdline and pass it to worker as TINKERBELL_INSECURE_TLS #234

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions images/hook-bootkit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ type tinkWorkerConfig struct {

// tinkServerTLS is whether or not to use TLS for tink-server communication.
tinkServerTLS string
httpProxy string
httpsProxy string
noProxy string

// tinkServerInsecureTLS is whether or not to use insecure TLS for tink-server communication; only applies is TLS itself is on
tinkServerInsecureTLS string

httpProxy string
httpsProxy string
noProxy string
}

func main() {
Expand Down Expand Up @@ -167,6 +171,7 @@ func run(ctx context.Context, log logr.Logger) error {
fmt.Sprintf("REGISTRY_PASSWORD=%s", cfg.password),
fmt.Sprintf("TINKERBELL_GRPC_AUTHORITY=%s", cfg.grpcAuthority),
fmt.Sprintf("TINKERBELL_TLS=%s", cfg.tinkServerTLS),
fmt.Sprintf("TINKERBELL_INSECURE_TLS=%s", cfg.tinkServerInsecureTLS),
fmt.Sprintf("WORKER_ID=%s", cfg.workerID),
fmt.Sprintf("ID=%s", cfg.workerID),
fmt.Sprintf("HTTP_PROXY=%s", cfg.httpProxy),
Expand Down Expand Up @@ -267,6 +272,8 @@ func parseCmdLine(cmdLines []string) (cfg tinkWorkerConfig) {
cfg.tinkWorkerImage = cmdLine[1]
case "tinkerbell_tls":
cfg.tinkServerTLS = cmdLine[1]
case "tinkerbell_insecure_tls":
cfg.tinkServerInsecureTLS = cmdLine[1]
case "HTTP_PROXY":
cfg.httpProxy = cmdLine[1]
case "HTTPS_PROXY":
Expand Down
Loading