Enable image pull secret for BESS UPF chart
Change-Id: I48eecb5d29462b286d78086ad677574a39065670
diff --git a/omec/omec-user-plane/templates/secret-registry.yaml b/omec/omec-user-plane/templates/secret-registry.yaml
deleted file mode 100644
index 1502049..0000000
--- a/omec/omec-user-plane/templates/secret-registry.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-{{/*
-# Copyright 2020-present Open Networking Foundation
-
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-*/}}
-
-{{- if .Values.images.credentials }}
----
-kind: Secret
-apiVersion: v1
-metadata:
- name: {{ .Release.Name }}.registry
- labels:
- release: {{ .Release.Name }}
-type: kubernetes.io/dockerconfigjson
-data:
- .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.images.credentials.registry | quote) (printf "%s:%s" .Values.images.credentials.username .Values.images.credentials.password | b64enc) | b64enc | quote }}
-{{- end }}
diff --git a/omec/omec-user-plane/templates/statefulset-upf.yaml b/omec/omec-user-plane/templates/statefulset-upf.yaml
index 3ac3239..0bf4cfa 100644
--- a/omec/omec-user-plane/templates/statefulset-upf.yaml
+++ b/omec/omec-user-plane/templates/statefulset-upf.yaml
@@ -49,9 +49,9 @@
nodeSelector:
{{ .Values.nodeSelectors.upf.label }}: {{ .Values.nodeSelectors.upf.value }}
{{- end }}
- {{- if .Values.images.credentials }}
+ {{- if hasKey .Values.images "pullSecrets" }}
imagePullSecrets:
- - name: {{ .Release.Name }}.registry
+{{ toYaml .Values.images.pullSecrets | indent 8 }}
{{- end }}
initContainers:
- name: bess-init