Updates and refactors needed to allow the storage backend for the
registry to be changed.
Showing
6 changed files
with
53 additions
and
9 deletions
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | apiVersion: v1 | 2 | apiVersion: v1 |
3 | kind: ConfigMap | 3 | kind: ConfigMap |
4 | metadata: | 4 | metadata: |
5 | name: registry-config | 5 | name: registry-env |
6 | data: | 6 | data: |
7 | REGISTRY_HTTP_TLS_CERTIFICATE: /certs/tls.crt | 7 | REGISTRY_HTTP_TLS_CERTIFICATE: /certs/tls.crt |
8 | REGISTRY_HTTP_TLS_KEY: /certs/tls.key | 8 | REGISTRY_HTTP_TLS_KEY: /certs/tls.key |
... | @@ -10,7 +10,7 @@ data: | ... | @@ -10,7 +10,7 @@ data: |
10 | apiVersion: v1 | 10 | apiVersion: v1 |
11 | kind: Secret | 11 | kind: Secret |
12 | metadata: | 12 | metadata: |
13 | name: registry-secret | 13 | name: registry-env |
14 | stringData: | 14 | stringData: |
15 | --- | 15 | --- |
16 | apiVersion: v1 | 16 | apiVersion: v1 | ... | ... |
registry/charts/registry/etc/config.yaml
0 → 100644
... | @@ -85,16 +85,21 @@ spec: | ... | @@ -85,16 +85,21 @@ spec: |
85 | - name: certificate | 85 | - name: certificate |
86 | secret: | 86 | secret: |
87 | secretName: registry-crt | 87 | secretName: registry-crt |
88 | - name: registry-etc | ||
89 | configMap: | ||
90 | name: registry-etc | ||
88 | 91 | ||
89 | containers: | 92 | containers: |
90 | - name: registry | 93 | - name: registry |
91 | image: registry:2 | 94 | image: registry:2 |
92 | envFrom: | 95 | envFrom: |
93 | - configMapRef: | 96 | - configMapRef: |
94 | name: registry-config | 97 | name: registry-env |
95 | - secretRef: | 98 | - secretRef: |
96 | name: registry-secret | 99 | name: registry-env |
97 | volumeMounts: | 100 | volumeMounts: |
101 | - name: registry-etc | ||
102 | mountPath: /etc/docker/registry/ | ||
98 | - name: registry-data | 103 | - name: registry-data |
99 | mountPath: /var/lib/registry | 104 | mountPath: /var/lib/registry |
100 | - name: certificate | 105 | - name: certificate | ... | ... |
... | @@ -10,6 +10,10 @@ registry: | ... | @@ -10,6 +10,10 @@ registry: |
10 | nodePort: 0 | 10 | nodePort: 0 |
11 | clusterIP: 0 | 11 | clusterIP: 0 |
12 | type: NodePort | 12 | type: NodePort |
13 | etc: null | ||
14 | env: | ||
15 | REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry | ||
16 | secrets: {} | ||
13 | certificate: | 17 | certificate: |
14 | hostNames: | 18 | hostNames: |
15 | - registry.local | 19 | - registry.local | ... | ... |
... | @@ -118,6 +118,9 @@ releases: | ... | @@ -118,6 +118,9 @@ releases: |
118 | app: {{ .Values.namePrefix }}registry | 118 | app: {{ .Values.namePrefix }}registry |
119 | spec: | 119 | spec: |
120 | volumes: | 120 | volumes: |
121 | - name: registry-etc | ||
122 | configMap: | ||
123 | name: {{ .Values.namePrefix }}registry-etc | ||
121 | - name: registry-data | 124 | - name: registry-data |
122 | persistentVolumeClaim: | 125 | persistentVolumeClaim: |
123 | claimName: {{ .Values.namePrefix }}registry-data | 126 | claimName: {{ .Values.namePrefix }}registry-data |
... | @@ -125,23 +128,32 @@ releases: | ... | @@ -125,23 +128,32 @@ releases: |
125 | - name: registry | 128 | - name: registry |
126 | envFrom: | 129 | envFrom: |
127 | - configMapRef: | 130 | - configMapRef: |
128 | name: {{ .Values.namePrefix }}registry-config | 131 | name: {{ .Values.namePrefix }}registry-env |
129 | - secretRef: | 132 | - secretRef: |
130 | name: {{ .Values.namePrefix }}registry-secret | 133 | name: {{ .Values.namePrefix }}registry-env |
131 | - apiVersion: v1 | 134 | - apiVersion: v1 |
132 | kind: ConfigMap | 135 | kind: ConfigMap |
133 | metadata: | 136 | metadata: |
134 | name: {{ .Values.namePrefix }}registry-config | 137 | name: {{ .Values.namePrefix }}registry-env |
135 | namespace: {{ .Values.namespace }} | 138 | namespace: {{ .Values.namespace }} |
136 | data: | 139 | data: |
137 | REGISTRY_REDIS_ADDR: {{ .Values.namePrefix }}registry-redis.{{ .Values.namespace }}.svc.cluster.local | 140 | REGISTRY_REDIS_ADDR: {{ .Values.namePrefix }}registry-redis.{{ .Values.namespace }}.svc.cluster.local |
138 | REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR: redis | 141 | REGISTRY_STORAGE_CACHE_BLOBDESCRIPTOR: redis |
142 | {{- .Values.registry.env | toYaml | nindent 10 }} | ||
143 | {{- if .Values.registry.etc }} | ||
144 | - apiVersion: v1 | ||
145 | kind: ConfigMap | ||
146 | metadata: | ||
147 | name: {{ .Values.namePrefix }}registry-etc | ||
148 | namespace: {{ .Values.namespace }} | ||
149 | data: {{ .Values.registry.etc | toYaml | nindent 10 }} | ||
150 | {{- end }} | ||
139 | - apiVersion: v1 | 151 | - apiVersion: v1 |
140 | kind: Secret | 152 | kind: Secret |
141 | metadata: | 153 | metadata: |
142 | name: {{ .Values.namePrefix }}registry-secret | 154 | name: {{ .Values.namePrefix }}registry-env |
143 | namespace: {{ .Values.namespace }} | 155 | namespace: {{ .Values.namespace }} |
144 | stringData: | 156 | stringData: {{- .Values.registry.secrets | toYaml | nindent 10 }} |
145 | {{- if not (empty (.Values.registry.strategicMergePatches)) }} | 157 | {{- if not (empty (.Values.registry.strategicMergePatches)) }} |
146 | {{- .Values.registry.strategicMergePatches | toYaml | indent 6 }} | 158 | {{- .Values.registry.strategicMergePatches | toYaml | indent 6 }} |
147 | {{- end }} | 159 | {{- end }} | ... | ... |
-
Please register or sign in to post a comment