Skip to content

Commit

Permalink
Add labels to all templates. (#174)
Browse files Browse the repository at this point in the history
* Add labels to all templates.

* Bump chart version to 0.1.3, appVersion to 0.3.1.

---------

Co-authored-by: Vladyslav Mostovyk <vmostovyk@gmail.com>
  • Loading branch information
MostovykVlad and MostovykVlad committed Dec 9, 2023
1 parent 28322bb commit d5ad468
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/kor/Chart.yaml
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.2
version: 0.1.3

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.2.8"
appVersion: "0.3.1"
1 change: 1 addition & 0 deletions charts/kor/templates/cronjob.yaml
Expand Up @@ -4,6 +4,7 @@ kind: CronJob
metadata:
name: {{ .Release.Name }}
labels:
{{- include "kor.labels" . | nindent 4 }}
app: {{ .Release.Name }}
spec:
schedule: {{ .Values.cronJob.schedule }}
Expand Down
1 change: 1 addition & 0 deletions charts/kor/templates/deployment.yaml
Expand Up @@ -4,6 +4,7 @@ kind: Deployment
metadata:
name: {{ .Values.prometheusExporter.name }}
labels:
{{- include "kor.labels" . | nindent 4 }}
app: {{ .Values.prometheusExporter.name }}
spec:
{{- with .Values.prometheusExporter.deployment.imagePullSecrets }}
Expand Down
4 changes: 4 additions & 0 deletions charts/kor/templates/role.yaml
Expand Up @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "kor.serviceAccountName" . }}-read-resources-role
labels:
{{- include "kor.labels" . | nindent 4 }}
rules:
- apiGroups: ["*"]
resources:
Expand Down Expand Up @@ -32,6 +34,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "kor.serviceAccountName" . }}-read-resources-clusterrole
labels:
{{- include "kor.labels" . | nindent 4 }}
rules:
- apiGroups: ["*"]
resources:
Expand Down
4 changes: 4 additions & 0 deletions charts/kor/templates/rolebinding.yaml
Expand Up @@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "kor.serviceAccountName" . }}-read-resources-role-binding
labels:
{{- include "kor.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "kor.serviceAccountName" . }}
Expand All @@ -15,6 +17,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "kor.serviceAccountName" . }}-read-resources-clusterrolebinding
labels:
{{- include "kor.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "kor.serviceAccountName" . }}
Expand Down
2 changes: 2 additions & 0 deletions charts/kor/templates/secret.yaml
Expand Up @@ -4,6 +4,8 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-slack-auth-token-secret
labels:
{{- include "kor.labels" . | nindent 4 }}
type: Opaque
data:
slack-auth-token: {{ .Values.cronJob.slackAuthToken | b64enc | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/kor/templates/service.yaml
Expand Up @@ -8,6 +8,7 @@ metadata:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
labels:
{{- include "kor.labels" . | nindent 4 }}
app: {{ .Values.prometheusExporter.name }}
spec:
type: {{ .Values.prometheusExporter.service.type }}
Expand Down
1 change: 1 addition & 0 deletions charts/kor/templates/servicemonitor.yaml
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
{{- include "kor.labels" . | nindent 4 }}
app: {{ .Values.prometheusExporter.name }}
name: {{ .Values.prometheusExporter.name }}
{{- if .Values.prometheusExporter.serviceMonitor.namespace }}
Expand Down

0 comments on commit d5ad468

Please sign in to comment.