Adapt labels to kubernetes standard (#210)
Co-authored-by: Jonatan Redondo <jredondo@theworkshop.com>
This commit is contained in:
parent
c80b03a91d
commit
904866b509
|
|
@ -41,6 +41,9 @@ helm.sh/chart: {{ include "cadvisor.chart" . }}
|
|||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{ toYaml .Values.commonLabels }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ kind: ClusterRole
|
|||
metadata:
|
||||
name: {{ template "cadvisor.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
rules:
|
||||
- apiGroups: ['policy']
|
||||
resources: ['podsecuritypolicies']
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ kind: ClusterRoleBinding
|
|||
metadata:
|
||||
name: {{ template "cadvisor.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
|
|
|
|||
|
|
@ -8,20 +8,15 @@ metadata:
|
|||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
chart: {{ template "cadvisor.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- include "cadvisor.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- include "cadvisor.selectorLabels" . | nindent 8 }}
|
||||
{{- range $key, $value := .Values.podLabels }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
|
|
@ -30,17 +25,17 @@ spec:
|
|||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ if .Values.priorityClassName }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ .Values.priorityClassName }}
|
||||
{{- end }}
|
||||
{{ if .Values.image.pullSecrets }}
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "cadvisor.serviceAccountName" . }}
|
||||
{{ if .Values.hostNetwork }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostNetwork: true
|
||||
{{- end }}
|
||||
containers:
|
||||
|
|
@ -57,7 +52,7 @@ spec:
|
|||
mountPath: {{ default .path .mount }}
|
||||
readOnly: {{ list nil true | has .readOnly }}
|
||||
{{- end }}
|
||||
{{ if .Values.podSecurityContext.create }}
|
||||
{{- if .Values.podSecurityContext.create }}
|
||||
securityContext:
|
||||
privileged: {{ .Values.podSecurityContext.privileged }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ kind: PodSecurityPolicy
|
|||
metadata:
|
||||
name: {{ template "cadvisor.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
spec:
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
|
|
|
|||
|
|
@ -4,10 +4,7 @@ metadata:
|
|||
name: {{ template "cadvisor.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
chart: {{ template "cadvisor.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
|
|
@ -15,5 +12,5 @@ spec:
|
|||
targetPort: {{ .Values.container.port }}
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
{{- include "cadvisor.selectorLabels" . | nindent 4 }}
|
||||
type: ClusterIP
|
||||
|
|
|
|||
|
|
@ -4,4 +4,6 @@ kind: ServiceAccount
|
|||
metadata:
|
||||
name: {{ template "cadvisor.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "cadvisor.labels" . | nindent 4 }}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ metadata:
|
|||
name: {{ template "cadvisor.name" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "cadvisor.name" . }}
|
||||
chart: {{ template "cadvisor.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- include "cadvisor.labels" . | nindent 4}}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
|
|
@ -30,3 +27,4 @@ spec:
|
|||
{{- toYaml .Values.metrics.metricRelabelings | nindent 8 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ resources: {}
|
|||
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
commonLabels: {}
|
||||
|
||||
daemonsetAnnotations:
|
||||
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
|
||||
|
|
|
|||
Loading…
Reference in New Issue