Skip to content

Commit f31cfb2

Browse files
Brian HaleyDustin Specker
authored andcommitted
support image registries with authentication
Based on spec in openstack-helm repo, support-OCI-image-registry-with-authentication-turned-on.rst Each Helm chart can configure an OCI image registry and credentials to use. A Kubernetes secret is then created with these info. Service Accounts then specify an imagePullSecret specifying the Secret with creds for the registry. Then any pod using one of these ServiceAccounts may pull images from an authenticated container registry. Change-Id: Iebda4c7a861aa13db921328776b20c14ba346269
1 parent 381d066 commit f31cfb2

189 files changed

Lines changed: 1856 additions & 47 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

calico/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ apiVersion: v1
1515
appVersion: v3.4.0
1616
description: OpenStack-Helm Calico
1717
name: calico
18-
version: 0.1.4
18+
version: 0.1.5
1919
home: https://github.com/projectcalico/calico
2020
icon: https://camo.githubusercontent.com/64c8b5ed6ac97553ae367348e8a59a24e2ed5bdc/687474703a2f2f646f63732e70726f6a65637463616c69636f2e6f72672f696d616765732f66656c69782e706e67
2121
sources:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{/*
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/}}
14+
15+
{{- if and .Values.manifests.secret_registry .Values.endpoints.oci_image_registry.auth.enabled }}
16+
{{ include "helm-toolkit.manifests.secret_registry" ( dict "envAll" . "registryUser" .Chart.Name ) }}
17+
{{- end }}

calico/values.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ dependencies:
166166
- endpoint: internal
167167
service: local_image_registry
168168

169+
secrets:
170+
oci_image_registry:
171+
calico: calico-oci-image-registry
172+
169173
endpoints:
170174
cluster_domain_suffix: cluster.local
171175
local_image_registry:
@@ -180,6 +184,21 @@ endpoints:
180184
port:
181185
registry:
182186
node: 5000
187+
oci_image_registry:
188+
name: oci-image-registry
189+
namespace: oci-image-registry
190+
auth:
191+
enabled: false
192+
calico:
193+
username: calico
194+
password: password
195+
hosts:
196+
default: localhost
197+
host_fqdn_override:
198+
default: null
199+
port:
200+
registry:
201+
default: null
183202
etcd:
184203
auth:
185204
client:
@@ -572,4 +591,5 @@ manifests:
572591
job_calico_settings: true
573592
service_calico_etcd: true
574593
secret_certificates: true
594+
secret_registry: true
575595
...

ceph-client/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ apiVersion: v1
1515
appVersion: v1.0.0
1616
description: OpenStack-Helm Ceph Client
1717
name: ceph-client
18-
version: 0.1.36
18+
version: 0.1.37
1919
home: https://github.com/ceph/ceph-client
2020
...
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{/*
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/}}
14+
15+
{{- if and .Values.manifests.secret_registry .Values.endpoints.oci_image_registry.auth.enabled }}
16+
{{ include "helm-toolkit.manifests.secret_registry" ( dict "envAll" . "registryUser" .Chart.Name ) }}
17+
{{- end }}

ceph-client/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ secrets:
188188
rgw: ceph-bootstrap-rgw-keyring
189189
mgr: ceph-bootstrap-mgr-keyring
190190
admin: ceph-client-admin-keyring
191+
oci_image_registry:
192+
ceph-client: ceph-client-oci-image-registry
191193

192194
network:
193195
public: 192.168.0.0/16
@@ -517,6 +519,21 @@ endpoints:
517519
port:
518520
registry:
519521
node: 5000
522+
oci_image_registry:
523+
name: oci-image-registry
524+
namespace: oci-image-registry
525+
auth:
526+
enabled: false
527+
ceph-client:
528+
username: ceph-client
529+
password: password
530+
hosts:
531+
default: localhost
532+
host_fqdn_override:
533+
default: null
534+
port:
535+
registry:
536+
default: null
520537
ceph_mon:
521538
namespace: null
522539
hosts:
@@ -564,4 +581,5 @@ manifests:
564581
helm_tests: true
565582
cronjob_checkPGs: true
566583
cronjob_defragosds: true
584+
secret_registry: true
567585
...

ceph-mon/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ apiVersion: v1
1515
appVersion: v1.0.0
1616
description: OpenStack-Helm Ceph Mon
1717
name: ceph-mon
18-
version: 0.1.25
18+
version: 0.1.26
1919
home: https://github.com/ceph/ceph
2020
...
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{/*
2+
Licensed under the Apache License, Version 2.0 (the "License");
3+
you may not use this file except in compliance with the License.
4+
You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
*/}}
14+
15+
{{- if and .Values.manifests.secret_registry .Values.endpoints.oci_image_registry.auth.enabled }}
16+
{{ include "helm-toolkit.manifests.secret_registry" ( dict "envAll" . "registryUser" .Chart.Name ) }}
17+
{{- end }}

ceph-mon/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ secrets:
215215
osd: ceph-bootstrap-osd-keyring
216216
mgr: ceph-bootstrap-mgr-keyring
217217
admin: ceph-client-admin-keyring
218+
oci_image_registry:
219+
ceph-mon: ceph-mon-oci-image-registry-key
218220

219221
network:
220222
public: 192.168.0.0/16
@@ -424,6 +426,21 @@ endpoints:
424426
port:
425427
registry:
426428
node: 5000
429+
oci_image_registry:
430+
name: oci-image-registry
431+
namespace: oci-image-registry
432+
auth:
433+
enabled: false
434+
ceph-mon:
435+
username: ceph-mon
436+
password: password
437+
hosts:
438+
default: localhost
439+
host_fqdn_override:
440+
default: null
441+
port:
442+
registry:
443+
default: null
427444
ceph_mon:
428445
namespace: null
429446
hosts:
@@ -473,4 +490,5 @@ manifests:
473490
service_mgr: true
474491
service_mon_discovery: true
475492
job_storage_admin_keys: true
493+
secret_registry: true
476494
...

ceph-osd/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ apiVersion: v1
1515
appVersion: v1.0.0
1616
description: OpenStack-Helm Ceph OSD
1717
name: ceph-osd
18-
version: 0.1.41
18+
version: 0.1.42
1919
home: https://github.com/ceph/ceph
2020
...

0 commit comments

Comments
 (0)