Skip to content

Commit

Permalink
fix: standardize resource naming in chart templates (#216)
Browse files Browse the repository at this point in the history
Co-authored-by: aalexand <[email protected]>
  • Loading branch information
aalexandru and aalexand authored Aug 12, 2024
1 parent 261778a commit 89bb6fd
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-registry-client/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ maintainers:
- name: radu-catalina
email: [email protected]

version: 0.3.0
version: 0.3.1
appVersion: v1.6.0
2 changes: 1 addition & 1 deletion charts/cluster-registry-client/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cluster-registry-client

![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.6.0](https://img.shields.io/badge/AppVersion-v1.6.0-informational?style=flat-square)
![Version: 0.3.1](https://img.shields.io/badge/Version-0.3.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.6.0](https://img.shields.io/badge/AppVersion-v1.6.0-informational?style=flat-square)

Cluster Registry is a Rest API representing the source of record for all Kubernetes clusters in the infrastructure fleet. All clusters are automatically registered, and the information is accurately reflected in the Cluster Registry using a client-server architecture.

Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-registry-client/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-registry-client
name: {{ include "cluster-registry-client.fullname" . }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-registry-client
name: {{ include "cluster-registry-client.fullname" . }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
roleRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-registry-client/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: client-config
name: {{ include "cluster-registry-client.fullname" . }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
Expand Down
9 changes: 5 additions & 4 deletions charts/cluster-registry-client/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {{- include "cluster-registry-client.labels" . | nindent 4 }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
name: {{ include "cluster-registry-client.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
Expand Down Expand Up @@ -29,7 +30,7 @@ spec:
image: "{{ .Values.image.registry }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: client-config
- name: {{ include "cluster-registry-client.fullname" . }}-config
mountPath: /config.yaml
subPath: config.yaml
ports:
Expand Down Expand Up @@ -81,8 +82,8 @@ spec:
securityContext:
allowPrivilegeEscalation: false
volumes:
- name: client-config
- name: {{ include "cluster-registry-client.fullname" . }}-config
configMap:
name: client-config
name: {{ include "cluster-registry-client.fullname" . }}-config
serviceAccountName: {{ include "cluster-registry-client.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds | required ".Values.terminationGracePeriodSeconds is required" }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind: PodDisruptionBudget
metadata:
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
name: {{ template "cluster-registry-client.fullname" . }}
name: {{ include "cluster-registry-client.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-registry-client/templates/podmonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
{{- if .Values.podMonitor.extraLabels }}
{{- toYaml .Values.podMonitor.extraLabels | nindent 4 }}
{{- end }}
name: cluster-registry-client
name: {{ include "cluster-registry-client.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
jobLabel: app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cluster-registry-leader-election
name: {{ include "cluster-registry-client.fullname" . }}-leader-election
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cluster-registry-leader-election
name: {{ include "cluster-registry-client.fullname" . }}-leader-election
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-client.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cluster-registry-leader-election
name: {{ include "cluster-registry-client.fullname" . }}-leader-election
subjects:
- kind: ServiceAccount
name: {{ include "cluster-registry-client.serviceAccountName" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/cluster-registry-sync-manager/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ maintainers:
- name: radu-catalina
email: [email protected]

version: 0.1.2
version: 0.1.3
appVersion: v1.6.0
2 changes: 1 addition & 1 deletion charts/cluster-registry-sync-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cluster-registry-sync-manager

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.6.0](https://img.shields.io/badge/AppVersion-v1.6.0-informational?style=flat-square)
![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.6.0](https://img.shields.io/badge/AppVersion-v1.6.0-informational?style=flat-square)

Cluster Registry is a Rest API representing the source of record for all Kubernetes clusters in the infrastructure fleet. All clusters are automatically registered, and the information is accurately reflected in the Cluster Registry using a client-server architecture.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-registry-sync-manager
name: {{ include "cluster-registry-sync-manager.fullname" . }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cluster-registry-sync-manager
name: {{ include "cluster-registry-sync-manager.fullname" . }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
roleRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: sync-manager-config
name: {{ include "cluster-registry-sync-manager.fullname" . }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels: {{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
name: {{ include "cluster-registry-sync-manager.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
Expand Down Expand Up @@ -29,7 +30,7 @@ spec:
image: "{{ .Values.image.registry }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: sync-manager-config
- name: {{ include "cluster-registry-sync-manager.fullname" . }}-config
mountPath: /config.yaml
subPath: config.yaml
ports:
Expand Down Expand Up @@ -81,8 +82,8 @@ spec:
securityContext:
allowPrivilegeEscalation: false
volumes:
- name: sync-manager-config
- name: {{ include "cluster-registry-sync-manager.fullname" . }}-config
configMap:
name: sync-manager-config
name: {{ include "cluster-registry-sync-manager.fullname" . }}-config
serviceAccountName: {{ include "cluster-registry-sync-manager.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds | required ".Values.terminationGracePeriodSeconds is required" }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kind: PodDisruptionBudget
metadata:
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
name: {{ template "cluster-registry-sync-manager.fullname" . }}
name: {{ include "cluster-registry-sync-manager.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
{{- if .Values.podMonitor.extraLabels }}
{{- toYaml .Values.podMonitor.extraLabels | nindent 4 }}
{{- end }}
name: cluster-registry-sync-manager
name: {{ include "cluster-registry-sync-manager.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
jobLabel: app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cluster-registry-leader-election
name: {{ include "cluster-registry-sync-manager.fullname" . }}-leader-election
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cluster-registry-leader-election
name: {{ include "cluster-registry-sync-manager.fullname" . }}-leader-election
namespace: {{ .Release.Namespace }}
labels:
{{- include "cluster-registry-sync-manager.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cluster-registry-leader-election
name: {{ include "cluster-registry-sync-manager.fullname" . }}-leader-election
subjects:
- kind: ServiceAccount
name: {{ include "cluster-registry-sync-manager.serviceAccountName" . }}
Expand Down

0 comments on commit 89bb6fd

Please sign in to comment.