Merge pull request #3568 from nabokihms/rook-add-image-pull-secrets

rook: Add image pull secrets option
This commit is contained in:
Blaine Gardner
2019-08-29 14:02:03 -06:00
committed by GitHub
5 changed files with 32 additions and 0 deletions
+1
View File
@@ -64,6 +64,7 @@ an example usage
- The CSI driver is enabled by default. Documentation has been changed significantly for block and filesystem to use the CSI driver instead of flex.
While the flex driver is still supported, it is anticipated to be deprecated soon.
- The `Mon.PreferredCount` setting has been removed.
- imagePullSecrets option added to helm-chart
## Known Issues
@@ -14,3 +14,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Define imagePullSecrets option to pass to all service accounts
*/}}
{{- define "imagePullSecrets" }}
{{- if .Values.imagePullSecrets -}}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets }}
{{- end -}}
{{- end -}}
@@ -7,6 +7,7 @@ metadata:
operator: rook
storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
# Service account for the Ceph OSDs. Must exist and cannot be renamed.
apiVersion: v1
@@ -17,6 +18,7 @@ metadata:
operator: rook
storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
# Service account for the Ceph Mgr. Must exist and cannot be renamed.
apiVersion: v1
@@ -27,6 +29,7 @@ metadata:
operator: rook
storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
apiVersion: v1
kind: ServiceAccount
@@ -36,27 +39,32 @@ metadata:
operator: rook
storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
# Service account for the cephfs csi driver
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-cephfs-plugin-sa
{{ template "imagePullSecrets" . }}
---
# Service account for the cephfs csi provisioner
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-cephfs-provisioner-sa
{{ template "imagePullSecrets" . }}
---
# Service account for the rbd csi driver
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-rbd-plugin-sa
{{ template "imagePullSecrets" . }}
---
# Service account for the rbd csi provisioner
apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-rbd-provisioner-sa
{{ template "imagePullSecrets" . }}
+4
View File
@@ -105,3 +105,7 @@ hostpathRequiresPrivileged: false
# Disable automatic orchestration when new devices are discovered.
disableDeviceHotplug: false
# imagePullSecrets option allow to pull docker images from private docker registry. Option will be passed to all service accounts.
# imagePullSecrets:
# - name: my-registry-secret
@@ -703,6 +703,9 @@ metadata:
labels:
operator: rook
storage-backend: ceph
# imagePullSecrets:
# - name: my-registry-secret
# OLM: END SERVICE ACCOUNT SYSTEM
# OLM: BEGIN OPERATOR ROLEBINDING
---
@@ -755,6 +758,9 @@ kind: ServiceAccount
metadata:
name: rook-ceph-osd
namespace: rook-ceph
# imagePullSecrets:
# - name: my-registry-secret
# OLM: END SERVICE ACCOUNT OSD
# OLM: BEGIN SERVICE ACCOUNT MGR
---
@@ -764,6 +770,9 @@ kind: ServiceAccount
metadata:
name: rook-ceph-mgr
namespace: rook-ceph
# imagePullSecrets:
# - name: my-registry-secret
# OLM: END SERVICE ACCOUNT MGR
# OLM: BEGIN CMD REPORTER SERVICE ACCOUNT
---