Browse Source

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 <Michel.Thebeau@windriver.com>
changes/49/772449/4 vr/stx.5.0
Michel Thebeau 3 months ago
committed by Michel Thebeau
parent
commit
edc1c00f54
2 changed files with 30 additions and 0 deletions
  1. +2
    -0
      portieris-helm/centos/portieris-helm.spec
  2. +28
    -0
      portieris-helm/files/0002-add-image-pull-secrets-to-images.patch

+ 2
- 0
portieris-helm/centos/portieris-helm.spec View File

@ -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


+ 28
- 0
portieris-helm/files/0002-add-image-pull-secrets-to-images.patch View File

@ -0,0 +1,28 @@
From 77a11903c2486d07cd3b078f99476b3a855fdce0 Mon Sep 17 00:00:00 2001
From: Michel Thebeau <Michel.Thebeau@windriver.com>
Date: Mon, 18 Jan 2021 17:02:39 -0500
Subject: [PATCH] add image pull secrets to images
Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
---
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

Loading…
Cancel
Save