Skip to content

Commit

Permalink
refact: namespace all labels in the helm charts
Browse files Browse the repository at this point in the history
Signed-off-by: wilmardo <info@wilmardenouden.nl>
  • Loading branch information
wilmardo committed Mar 10, 2020
1 parent 9d7b50d commit c13507e
Show file tree
Hide file tree
Showing 31 changed files with 121 additions and 203 deletions.
8 changes: 3 additions & 5 deletions charts/ceph-csi-cephfs/templates/csiplugin-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ metadata:
name: {{ .Values.configMapName | quote }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
data:
config.json: |-
{{ toJson .Values.csiConfig | indent 4 -}}
21 changes: 8 additions & 13 deletions charts/ceph-csi-cephfs/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@ metadata:
name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
selector:
matchLabels:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
updateStrategy:
type: {{ .Values.nodeplugin.updateStrategy }}
template:
metadata:
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }}
hostNetwork: true
Expand Down
11 changes: 4 additions & 7 deletions charts/ceph-csi-cephfs/templates/nodeplugin-grpc-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }}
clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }}
targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}"
{{- end -}}
11 changes: 4 additions & 7 deletions charts/ceph-csi-cephfs/templates/nodeplugin-http-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
{{- if .Values.nodeplugin.httpMetrics.service.clusterIP }}
clusterIP: "{{ .Values.nodeplugin.httpMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.nodeplugin.httpMetrics.service.servicePort }}
targetPort: {{ .Values.nodeplugin.httpMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
type: "{{ .Values.nodeplugin.httpMetrics.service.type }}"
{{- end -}}
8 changes: 3 additions & 5 deletions charts/ceph-csi-cephfs/templates/nodeplugin-rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ metadata:
name: {{ include "ceph-csi-cephfs.nodeplugin.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
subjects:
- kind: ServiceAccount
name: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ metadata:
name: {{ include "ceph-csi-cephfs.serviceAccountName.nodeplugin" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
{{- end -}}
8 changes: 3 additions & 5 deletions charts/ceph-csi-cephfs/templates/provisioner-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
aggregationRule:
clusterRoleSelectors:
- matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
subjects:
- kind: ServiceAccount
name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
Expand Down
21 changes: 8 additions & 13 deletions charts/ceph-csi-cephfs/templates/provisioner-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,21 @@ metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
spec:
replicas: {{ .Values.provisioner.replicaCount }}
selector:
matchLabels:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
template:
metadata:
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
spec:
serviceAccountName: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
containers:
Expand Down
11 changes: 4 additions & 7 deletions charts/ceph-csi-cephfs/templates/provisioner-grpc-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
spec:
{{- if .Values.provisioner.grpcMetrics.service.clusterIP }}
clusterIP: "{{ .Values.provisioner.grpcMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.provisioner.grpcMetrics.service.servicePort }}
targetPort: {{ .Values.provisioner.grpcMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
type: "{{ .Values.provisioner.grpcMetrics.service.type }}"
{{- end -}}
11 changes: 4 additions & 7 deletions charts/ceph-csi-cephfs/templates/provisioner-http-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.fullname" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
spec:
{{- if .Values.provisioner.httpMetrics.service.clusterIP }}
clusterIP: "{{ .Values.provisioner.httpMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.provisioner.httpMetrics.service.servicePort }}
targetPort: {{ .Values.provisioner.httpMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-cephfs.name" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
type: "{{ .Values.provisioner.httpMetrics.service.type }}"
{{- end -}}
8 changes: 3 additions & 5 deletions charts/ceph-csi-cephfs/templates/provisioner-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
rules:
- apiGroups: [""]
resources: ["configmaps"]
Expand Down
8 changes: 3 additions & 5 deletions charts/ceph-csi-cephfs/templates/provisioner-rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
subjects:
- kind: ServiceAccount
name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-rules
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.provisioner.fullname" . }}: "true"
rules:
- apiGroups: [""]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ metadata:
name: {{ include "ceph-csi-cephfs.serviceAccountName.provisioner" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-cephfs.name" . }}
chart: {{ include "ceph-csi-cephfs.chart" . }}
component: {{ .Values.provisioner.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-cephfs.name" . }}
helm.sh/chart: {{ include "ceph-csi-cephfs.chart" . }}
app.kubernetes.io/component: {{ .Values.provisioner.name }}
{{- end -}}
8 changes: 3 additions & 5 deletions charts/ceph-csi-rbd/templates/csiplugin-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ metadata:
name: {{ .Values.configMapName | quote }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-rbd.name" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
helm.sh/chart: {{ include "ceph-csi-rbd.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
data:
config.json: |-
{{ toJson .Values.csiConfig | indent 4 -}}
21 changes: 8 additions & 13 deletions charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,22 @@ metadata:
name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-rbd.name" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
helm.sh/chart: {{ include "ceph-csi-rbd.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
selector:
matchLabels:
app: {{ include "ceph-csi-rbd.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
updateStrategy:
type: {{ .Values.nodeplugin.updateStrategy }}
template:
metadata:
labels:
app: {{ include "ceph-csi-rbd.name" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
helm.sh/chart: {{ include "ceph-csi-rbd.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }}
hostNetwork: true
Expand Down
11 changes: 4 additions & 7 deletions charts/ceph-csi-rbd/templates/nodeplugin-grpc-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-rbd.fullname" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-rbd.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
{{- if .Values.nodeplugin.grpcMetrics.service.clusterIP }}
clusterIP: "{{ .Values.nodeplugin.grpcMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.nodeplugin.grpcMetrics.service.servicePort }}
targetPort: {{ .Values.nodeplugin.grpcMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-rbd.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
type: "{{ .Values.nodeplugin.grpcMetrics.service.type }}"
{{- end -}}
11 changes: 4 additions & 7 deletions charts/ceph-csi-rbd/templates/nodeplugin-http-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ include "ceph-csi-rbd.fullname" . }}
chart: {{ include "ceph-csi-rbd.chart" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
helm.sh/chart: {{ include "ceph-csi-rbd.chart" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
spec:
{{- if .Values.nodeplugin.httpMetrics.service.clusterIP }}
clusterIP: "{{ .Values.nodeplugin.httpMetrics.service.clusterIP }}"
Expand All @@ -34,8 +32,7 @@ spec:
port: {{ .Values.nodeplugin.httpMetrics.service.servicePort }}
targetPort: {{ .Values.nodeplugin.httpMetrics.containerPort }}
selector:
app: {{ include "ceph-csi-rbd.name" . }}
component: {{ .Values.nodeplugin.name }}
release: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ceph-csi-rbd.name" . }}
app.kubernetes.io/component: {{ .Values.nodeplugin.name }}
type: "{{ .Values.nodeplugin.httpMetrics.service.type }}"
{{- end -}}
Loading

0 comments on commit c13507e

Please sign in to comment.