From edc1c00f5488197d8a3544be18f398675d189bec Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Mon, 18 Jan 2021 17:18:22 -0500 Subject: [PATCH] Add pull secret for registry.local Pulling portieris from registry.local will fail without imagePullSecrets set. containerd.log shows "failed to resolve reference" for the image:tag. Partial-Bug: 1912696 Change-Id: I5dbfaaa80873135d03b7a40304a925817d0380ae Signed-off-by: Michel Thebeau --- portieris-helm/centos/portieris-helm.spec | 2 ++ ...002-add-image-pull-secrets-to-images.patch | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 portieris-helm/files/0002-add-image-pull-secrets-to-images.patch diff --git a/portieris-helm/centos/portieris-helm.spec b/portieris-helm/centos/portieris-helm.spec index 67f6e51..f7c82ac 100644 --- a/portieris-helm/centos/portieris-helm.spec +++ b/portieris-helm/centos/portieris-helm.spec @@ -27,6 +27,7 @@ Source2: index.yaml BuildArch: noarch Patch01: 0001-Squash-required-portieris-fixes.patch +Patch02: 0002-add-image-pull-secrets-to-images.patch BuildRequires: helm BuildRequires: chartmuseum @@ -37,6 +38,7 @@ StarlingX portieris charts %prep %setup -n portieris %patch01 -p1 +%patch02 -p1 %build # Host a server for the charts diff --git a/portieris-helm/files/0002-add-image-pull-secrets-to-images.patch b/portieris-helm/files/0002-add-image-pull-secrets-to-images.patch new file mode 100644 index 0000000..8a51266 --- /dev/null +++ b/portieris-helm/files/0002-add-image-pull-secrets-to-images.patch @@ -0,0 +1,28 @@ +From 77a11903c2486d07cd3b078f99476b3a855fdce0 Mon Sep 17 00:00:00 2001 +From: Michel Thebeau +Date: Mon, 18 Jan 2021 17:02:39 -0500 +Subject: [PATCH] add image pull secrets to images + +Signed-off-by: Michel Thebeau +--- + helm/portieris/templates/deployment.yaml | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/helm/portieris/templates/deployment.yaml b/helm/portieris/templates/deployment.yaml +index b72c599..d8f3590 100644 +--- a/helm/portieris/templates/deployment.yaml ++++ b/helm/portieris/templates/deployment.yaml +@@ -21,6 +21,10 @@ spec: + release: {{ .Release.Name }} + spec: + serviceAccountName: portieris ++ {{ if .Values.image.host }} ++ imagePullSecrets: ++ - name: default-registry-key ++ {{ end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.host | default "docker.io/ibmcom" }}/{{ .Values.image.image }}:{{ .Values.image.tag }}" +-- +2.29.2 +