Skip to content

Commit cc9cd0b

Browse files
committed
fix(helm): rename registry statefulset
It was originally named "cache-registry" at the time the project was also called "cache-registry". Thus, when reworking the chart, its name was replaced by a template to name it by the name of the project. Then, when the project was renamed kube-image-keeper, the registry name was templated as kube-image-keeper instead of cache-registry. This commit intend to fix this mistake and set a proper name for the registry.
1 parent 898acbb commit cc9cd0b

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

helm/kube-image-keeper/templates/registry-statefulset.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
apiVersion: apps/v1
22
kind: StatefulSet
33
metadata:
4-
name: {{ include "kube-image-keeper.fullname" . }}
4+
name: registry
55
labels:
66
{{- include "kube-image-keeper.registry-labels" . | nindent 4 }}
77
spec:
8-
serviceName: {{ .Release.Name }}
8+
serviceName: registry
99
selector:
1010
matchLabels:
1111
{{- include "kube-image-keeper.registry-selectorLabels" . | nindent 6 }}
@@ -39,7 +39,7 @@ spec:
3939
{{- if .Values.registry.persistence.enabled }}
4040
volumeMounts:
4141
- mountPath: /var/lib/registry
42-
name: {{ include "kube-image-keeper.fullname" . }}-data
42+
name: registry-data
4343
{{- end }}
4444
- name: garbage-collector
4545
image: "{{ .Values.registry.image.repository }}:{{ .Values.registry.image.tag }}"
@@ -54,7 +54,7 @@ spec:
5454
{{- if .Values.registry.persistence.enabled }}
5555
volumeMounts:
5656
- mountPath: /var/lib/registry
57-
name: {{ include "kube-image-keeper.fullname" . }}-data
57+
name: registry-data
5858
{{- end }}
5959
{{- end }}
6060
containers:
@@ -78,7 +78,7 @@ spec:
7878
{{- if .Values.registry.persistence.enabled }}
7979
volumeMounts:
8080
- mountPath: /var/lib/registry
81-
name: {{ include "kube-image-keeper.fullname" . }}-data
81+
name: registry-data
8282
{{- end }}
8383
{{- with .Values.nodeSelector }}
8484
nodeSelector:
@@ -95,7 +95,7 @@ spec:
9595
{{- if .Values.registry.persistence.enabled }}
9696
volumeClaimTemplates:
9797
- metadata:
98-
name: {{ include "kube-image-keeper.fullname" . }}-data
98+
name: registry-data
9999
spec:
100100
accessModes: [ "ReadWriteOnce" ]
101101
storageClassName: {{ .Values.registry.persistence.storageClass }}

helm/kube-image-keeper/templates/registry-ui-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
{{- toYaml .Values.registryUI.resources | nindent 12 }}
3838
env:
3939
- name: REGISTRY_HOST
40-
value: kube-image-keeper-service
40+
value: registry-service
4141
- name: REGISTRY_PORT
4242
value: "5000"
4343
- name: REGISTRY_PROTOCOL

helm/kube-image-keeper/templates/service.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
# name: {{ include "kube-image-keeper.fullname" . }}
5-
name: kube-image-keeper-service
4+
name: registry
65
labels:
76
{{- include "kube-image-keeper.registry-labels" . | nindent 4 }}
87
spec:

internal/registry/registry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/google/go-containerregistry/pkg/v1/remote/transport"
1515
)
1616

17-
var Endpoint = "kube-image-keeper-service:5000"
17+
var Endpoint = "registry-service:5000"
1818
var Protocol = "http://"
1919

2020
// See https://github.com/kubernetes/apimachinery/blob/v0.20.6/pkg/util/validation/validation.go#L198

0 commit comments

Comments
 (0)