Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recommended kubernetes labels to helm chart #21

Merged
merged 2 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions keda/templates/01-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/name: {{ .Values.serviceAccount.name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
{{- end -}}
6 changes: 6 additions & 0 deletions keda/templates/10-keda-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
creationTimestamp: null
name: {{ .Values.operatorName }}
rules:
Expand Down
6 changes: 6 additions & 0 deletions keda/templates/11-keda-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: {{ .Values.operatorName }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
6 changes: 6 additions & 0 deletions keda/templates/12-keda-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Values.operatorName }}
app.kubernetes.io/name: {{ .Values.operatorName }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: operator
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down
6 changes: 6 additions & 0 deletions keda/templates/20-metrics-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}-external-metrics-reader
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
creationTimestamp: null
name: {{ .Values.operatorName }}-external-metrics-reader
rules:
Expand Down
18 changes: 18 additions & 0 deletions keda/templates/21-metrics-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}-system-auth-delegator
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name}}
name: {{ .Values.operatorName }}:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -15,6 +21,12 @@ subjects:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}-auth-reader
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name}}
name: {{ .Values.operatorName }}-auth-reader
namespace: kube-system
roleRef:
Expand All @@ -29,6 +41,12 @@ subjects:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}-hpa-controller-external-metrics
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: {{ .Values.operatorName }}-hpa-controller-external-metrics
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
5 changes: 5 additions & 0 deletions keda/templates/22-metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Values.operatorName }}-metrics-apiserver
app.kubernetes.io/name: {{ .Values.operatorName }}-metrics-apiserver
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand Down
6 changes: 6 additions & 0 deletions keda/templates/23-metrics-service.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: {{ .Values.operatorName }}-metrics-apiserver
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: {{ .Values.operatorName }}-metrics-apiserver
namespace: {{ .Release.Namespace }}
spec:
Expand Down
32 changes: 19 additions & 13 deletions keda/templates/24-metrics-apiservice.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
name: v1beta1.external.metrics.k8s.io
spec:
service:
name: {{ .Values.operatorName }}-metrics-apiserver
namespace: {{ .Release.Namespace }}
group: external.metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100
apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
labels:
app.kubernetes.io/name: v1beta1.external.metrics.k8s.io
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Values.operatorName }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
name: v1beta1.external.metrics.k8s.io
spec:
service:
name: {{ .Values.operatorName }}-metrics-apiserver
namespace: {{ .Release.Namespace }}
group: external.metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100