Skip to content

Commit

Permalink
add PrivateCACert template function (#4878)
Browse files Browse the repository at this point in the history
* add AdditionalTLSCACert template function

* Update pkg/template/static_context.go

Co-authored-by: Alex Parker <[email protected]>

---------

Co-authored-by: Alex Parker <[email protected]>
  • Loading branch information
laverya and ajp-io authored Sep 12, 2024
1 parent d355e07 commit 6969f1a
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["PrivateCACert"] = ctx.privateCACert

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) 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")
}

0 comments on commit 6969f1a

Please sign in to comment.