Separating RICPLT from it/dep repo.
[it/dep.git] / ric-aux / helm / dashboard / templates / deployment.yaml
@@ -14,7 +14,8 @@
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
-
+{{- $imagectx := dict "ctx" . "defaultregistry" .Values.dashboard.image.registry }}
+{{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.dashboard.imagePullPolicy }}
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -39,14 +40,14 @@ spec:
     spec:
       hostname: {{ include "common.name.dashboard" . }}
       imagePullSecrets:
-        - name: {{ include "common.repositoryCred" . }}
+        - name: {{ include "common.dockerregistry.credential" $imagectx }}
       {{- with .Values.dashboard.nodeselector }}
       nodeSelector: {{ toYaml . | trim | nindent 8 -}}
       {{- end }}
       containers:
         - name: {{ include "common.containername.dashboard" . }}
-          image: {{ include "common.repository" . }}/{{ .Values.dashboard.image.name }}:{{ .Values.dashboard.image.tag }}
-          imagePullPolicy: {{ include "common.pullPolicy" . }}
+          image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.dashboard.image.name }}:{{ .Values.dashboard.image.tag }}
+          imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $pullpolicyctx }}
           ports:
             - name: http
               containerPort: {{ include "common.serviceport.dashboard.container" . }}