Add namespace support to Kubernetes client (#1446)

* Add namespace support to Kubernetes client

* Fix LastUpdateTime Condition
This commit is contained in:
Jake Sanders
2020-03-31 12:03:32 +01:00
committed by GitHub
parent 1222d076f2
commit 3d274ab6a2
3 changed files with 24 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ package client
var templates = map[string]string{
"deployment": deploymentTmpl,
"service": serviceTmpl,
"namespace": namespaceTmpl,
}
// stripped image pull policy always
@@ -108,3 +109,16 @@ spec:
{{- end }}
{{- end }}
`
var namespaceTmpl = `
apiVersion: v1
kind: Namespace
metadata:
name: "{{ .Metadata.Name }}"
labels:
{{- with .Metadata.Labels }}
{{- range $key, $value := . }}
{{ $key }}: "{{ $value }}"
{{- end }}
{{- end }}
`