Skip to content

Commit

Permalink
add AdditionalTLSCACert template function
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Sep 11, 2024
1 parent b4c1bfa commit d407755
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/template/static_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ func (ctx StaticCtx) FuncMap() template.FuncMap {

funcMap["Lookup"] = ctx.lookup

funcMap["AdditionalTLSCACert"] = ctx.additionalTLSCACert

return funcMap
}

Expand Down Expand Up @@ -676,3 +678,8 @@ func (ctx StaticCtx) lookup(apiversion string, resource string, namespace string
}
return obj
}

func (ctx StaticCtx) additionalTLSCACert() 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")
}

0 comments on commit d407755

Please sign in to comment.