Update Labels - Application/Component
1) Kubernetes Template (Bootstrap) 2) Other charts within Promenade Repo Change-Id: I872802112587bdff84d3630a5b2542dc4b3f77f8
This commit is contained in:
parent
a48dcacecc
commit
6e81ed7b40
|
@ -13,6 +13,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.pod_test }}
|
||||||
|
{{- $envAll := . }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
|
@ -20,6 +23,8 @@ metadata:
|
||||||
name: {{ print .Release.Name "-test" }}
|
name: {{ print .Release.Name "-test" }}
|
||||||
annotations:
|
annotations:
|
||||||
"helm.sh/hook": test-success
|
"helm.sh/hook": test-success
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "coredns" "test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
containers:
|
containers:
|
||||||
|
@ -44,3 +49,4 @@ spec:
|
||||||
echo "Test failed to resolve all names."
|
echo "Test failed to resolve all names."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -60,3 +60,6 @@ monitoring:
|
||||||
coredns:
|
coredns:
|
||||||
scrape: true
|
scrape: true
|
||||||
port: 9253
|
port: 9253
|
||||||
|
|
||||||
|
manifests:
|
||||||
|
pod_test: true
|
||||||
|
|
|
@ -17,6 +17,10 @@ limitations under the License.
|
||||||
{{- if .Values.manifests.daemonset_anchor }}
|
{{- if .Values.manifests.daemonset_anchor }}
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
{{- $mounts_daemonset_anchor := .Values.pod.mounts.daemonset_anchor.daemonset_anchor }}
|
{{- $mounts_daemonset_anchor := .Values.pod.mounts.daemonset_anchor.daemonset_anchor }}
|
||||||
|
# Strip off "etcd" from service name to get the application name
|
||||||
|
# Note that application can either be kubernetes or calico for now
|
||||||
|
# and may expand in scope in the future
|
||||||
|
{{- $applicationName := .Values.service.name | replace "-etcd" "" }}
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: extensions/v1beta1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
|
@ -29,7 +33,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
labels:
|
labels:
|
||||||
{{ tuple $envAll "kubernetes" "anchor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
{{ tuple $envAll $applicationName "etcd-anchor" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
{{- if .Values.anchor.dns_policy }}
|
{{- if .Values.anchor.dns_policy }}
|
||||||
|
|
|
@ -14,8 +14,11 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
{{- if .Values.manifests.service }}
|
|
||||||
{{- $envAll := . }}
|
{{- $envAll := . }}
|
||||||
|
# Strip off "etcd" from service name to get the application name
|
||||||
|
# Note that application can either be kubernetes or calico for now
|
||||||
|
# and may expand in scope in the future
|
||||||
|
{{- $applicationName := .Values.service.name | replace "-etcd" "" }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
|
@ -24,6 +27,7 @@ metadata:
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
{{ .Values.service.name }}-service: enabled
|
{{ .Values.service.name }}-service: enabled
|
||||||
|
{{ tuple $envAll $applicationName "etcd" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
|
@ -104,4 +108,3 @@ spec:
|
||||||
- name: etc
|
- name: etc
|
||||||
hostPath:
|
hostPath:
|
||||||
path: {{ .Values.etcd.host_etc_path }}
|
path: {{ .Values.etcd.host_etc_path }}
|
||||||
{{- end }}
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
{{/*
|
{{/*
|
||||||
Test etcdctl endpoint health */}}
|
Test etcdctl endpoint health */}}
|
||||||
{{- if .Values.manifests.test_etcd_health }}
|
{{- if .Values.manifests.test_etcd_health }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
{{- $applicationName := .Release.Name }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
|
@ -23,6 +25,8 @@ metadata:
|
||||||
name: "{{ .Release.Name }}-etcd-test"
|
name: "{{ .Release.Name }}-etcd-test"
|
||||||
annotations:
|
annotations:
|
||||||
"helm.sh/hook": "test-success"
|
"helm.sh/hook": "test-success"
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll $applicationName "etcd-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ .Values.labels.anchor.node_selector_key }}: {{ .Values.labels.anchor.node_selector_value }}
|
{{ .Values.labels.anchor.node_selector_key }}: {{ .Values.labels.anchor.node_selector_value }}
|
||||||
|
|
|
@ -13,12 +13,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/}}
|
*/}}
|
||||||
|
|
||||||
|
{{- $envAll := . }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "haproxy" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
|
|
|
@ -25,6 +25,8 @@ metadata:
|
||||||
name: "{{ .Release.Name }}-api-test"
|
name: "{{ .Release.Name }}-api-test"
|
||||||
annotations:
|
annotations:
|
||||||
"helm.sh/hook": "test-success"
|
"helm.sh/hook": "test-success"
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "promenade" "api-test" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
initContainers:
|
initContainers:
|
||||||
|
|
|
@ -5,6 +5,7 @@ metadata:
|
||||||
name: auxiliary-etcd
|
name: auxiliary-etcd
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
|
application: kubernetes
|
||||||
component: auxiliary-etcd
|
component: auxiliary-etcd
|
||||||
promenade: genesis
|
promenade: genesis
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -5,7 +5,7 @@ metadata:
|
||||||
name: bootstrap-armada
|
name: bootstrap-armada
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
app: promenade
|
application: promenade
|
||||||
component: genesis-tiller
|
component: genesis-tiller
|
||||||
spec:
|
spec:
|
||||||
dnsPolicy: Default
|
dnsPolicy: Default
|
||||||
|
|
|
@ -5,6 +5,8 @@ metadata:
|
||||||
name: kubernetes-apiserver
|
name: kubernetes-apiserver
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
|
application: kubernetes
|
||||||
|
component: apiserver
|
||||||
kubernetes-apiserver-service: enabled
|
kubernetes-apiserver-service: enabled
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
|
|
|
@ -6,6 +6,7 @@ metadata:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
tier: control-plane
|
tier: control-plane
|
||||||
|
application: kubernetes
|
||||||
component: kube-controller-manager
|
component: kube-controller-manager
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
|
|
|
@ -5,6 +5,8 @@ metadata:
|
||||||
name: kubernetes-etcd
|
name: kubernetes-etcd
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
|
application: kubernetes
|
||||||
|
component: etcd
|
||||||
# NOTE: This label needs coordination with the etcd deployed via chart.
|
# NOTE: This label needs coordination with the etcd deployed via chart.
|
||||||
kubernetes-etcd-service: enabled
|
kubernetes-etcd-service: enabled
|
||||||
spec:
|
spec:
|
||||||
|
|
|
@ -6,6 +6,7 @@ metadata:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
tier: control-plane
|
tier: control-plane
|
||||||
|
application: kubernetes
|
||||||
component: kube-scheduler
|
component: kube-scheduler
|
||||||
annotations:
|
annotations:
|
||||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||||
|
|
Loading…
Reference in New Issue