This is an example of Go template syntax, what are doing here:
- Create
$domainvariable with an empty value. - Create
$nsvariable with a value that comes fromNAMESPACEenvironment variable. So, we need to fill that first to make the logic work. E.gexport NAMESPACE=staging. - Logic / conditional if-else for checking the equality (
eq) of$ns. printffunction for string concatenation.
{{ $domain := "" }}
{{ $ns := env "NAMESPACE" -}}
{{ if eq $ns "staging" -}}
{{ $domain = printf ".%s.svc.cluster.local:2200" $ns }}
{{ else -}}
{{ $domain = printf ".%s.svc.cluster.local:2200" $ns }}
{{ end }}
Admin LUKMANLAB, DevOps Engineer, Site Reliability Engineer, System Administrator.
Game Center
Game News
Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime
Comments are closed, but trackbacks and pingbacks are open.