Skip to content

feat(ec): support for HostCABundlePath template function #5337

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

Closed
Closed
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
7 changes: 7 additions & 0 deletions pkg/template/static_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func (ctx StaticCtx) FuncMap() template.FuncMap {
funcMap["Lookup"] = ctx.lookup

funcMap["PrivateCACert"] = ctx.privateCACert
funcMap["HostCABundlePath"] = ctx.hostCABundlePath

return funcMap
}
Expand Down Expand Up @@ -683,3 +684,9 @@ func (ctx StaticCtx) privateCACert() string {
// return the name of a configmap holding additional CA certificates provided by the end user at install time
return os.Getenv("SSL_CERT_CONFIGMAP")
}

// hostCABundlePath returns the path to the host's CA bundle. This is set by embedded cluster using the
// an env var via the helm chart.
func (ctx StaticCtx) hostCABundlePath() string {
return os.Getenv("HOST_CA_BUNDLE_PATH")
}
Loading