From b0f2cbdf62feb815080a5d1e47b0af707d57e363 Mon Sep 17 00:00:00 2001 From: Poornima Date: Wed, 31 Mar 2021 02:02:54 +0530 Subject: [PATCH] Fix for error while pulling images from local registry Added default secret for pulling image from local registry Moved the application into kube-system namespace Closes-Bug: 1917352 Change-Id: I058ac7cfef4919c23bc777967cdfb8105e6d8606 Signed-off-by: Poornima --- stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/redis.yml | 2 ++ .../helm-charts/sdo/templates/u-rendezvous-service.yml | 4 +++- stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/values.yaml | 1 + stx-sdo-helm/stx-sdo-helm/manifests/sdo_manifest.yaml | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/redis.yml b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/redis.yml index 832f006..0709249 100755 --- a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/redis.yml +++ b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/redis.yml @@ -13,6 +13,8 @@ spec: labels: app: redis spec: + imagePullSecrets: + - name: registry-local-secret containers: - name: redis image: {{ .Values.images.tags.redisimage }} diff --git a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/u-rendezvous-service.yml b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/u-rendezvous-service.yml index 46cbfef..0d8ed2e 100755 --- a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/u-rendezvous-service.yml +++ b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/templates/u-rendezvous-service.yml @@ -16,9 +16,11 @@ spec: labels: app: RV-Service spec: + imagePullSecrets: + - name: registry-local-secret initContainers: - name: init-redis - image: busybox:1.28 + image: {{ .Values.images.tags.busyboximage }} command: ['sh', '-c', "until nslookup redis.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for redis; sleep 2; done"] containers: - name: u-rendezvous-service diff --git a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/values.yaml b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/values.yaml index 0c47988..d2c5011 100755 --- a/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/values.yaml +++ b/stx-sdo-helm/stx-sdo-helm/helm-charts/sdo/values.yaml @@ -2,6 +2,7 @@ images: tags: rv: 15201086/rendezvous-service:1.10 redisimage: 15201086/redis:050220213WKAgo + busyboximage: 15201086/busybox:1.28 env: rv_var: RV_SIGNATUREVERIFICATION: "true" diff --git a/stx-sdo-helm/stx-sdo-helm/manifests/sdo_manifest.yaml b/stx-sdo-helm/stx-sdo-helm/manifests/sdo_manifest.yaml index 0763b33..b8b770e 100644 --- a/stx-sdo-helm/stx-sdo-helm/manifests/sdo_manifest.yaml +++ b/stx-sdo-helm/stx-sdo-helm/manifests/sdo_manifest.yaml @@ -6,7 +6,7 @@ metadata: data: chart_name: sdo release: sdo - namespace: stx-sdo + namespace: kube-system source: location: http://172.17.0.1:8080/helm_charts/starlingx/sdo-1.0.0.tgz subpath: sdo @@ -16,6 +16,8 @@ data: timeout: 1800 install: no_hooks: false + values: + imagePullSecrets: [{"name": "default-registry-key"}] upgrade: no_hooks: false pre: