File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -559,3 +559,19 @@ Check if public URL uses HTTPS
559559true
560560{{- end -}}
561561{{- end }}
562+
563+ {{/*
564+ Get image repository for a component
565+ Expected dict: { "root": $, "component": "app" }
566+ Returns the repository to use, either component-specific or global
567+ */ }}
568+ {{- define " openops.imageRepository" -}}
569+ {{- $root := .root -}}
570+ {{- $component := .component -}}
571+ {{- $componentConfig := index $root .Values $component -}}
572+ {{- if and $componentConfig .repository (ne $componentConfig .repository " " ) -}}
573+ {{- $componentConfig .repository -}}
574+ {{- else -}}
575+ {{- $root .Values.image.repository -}}
576+ {{- end -}}
577+ {{- end }}
Original file line number Diff line number Diff line change 4747 {{- include "openops.initContainers" (dict "root" . "component" "analytics") | nindent 6 }}
4848 containers :
4949 - name : {{ .Values.analytics.name }}
50- image : " {{ .Values.image.repository }}/{{ .Values.analytics.image }}:{{ .Values.analytics.tag }}"
50+ image : " {{ include " openops.imageRepository" (dict "root" . "component" "analytics") }}/{{ .Values.analytics.image }}:{{ .Values.analytics.tag }}"
5151 imagePullPolicy : {{ .Values.image.pullPolicy }}
5252 {{- include "openops.containerSecurityContext" (dict "root" .) | nindent 8 }}
5353 env :
Original file line number Diff line number Diff line change 5151 {{- include "openops.initContainers" (dict "root" . "component" "app") | nindent 6 }}
5252 containers :
5353 - name : {{ .Values.app.name }}
54- image : " {{ .Values.image.repository }}/{{ .Values.app.image }}:{{ .Values.global.version }}"
54+ image : " {{ include " openops.imageRepository" (dict "root" . "component" "app") }}/{{ .Values.app.image }}:{{ .Values.global.version }}"
5555 imagePullPolicy : {{ .Values.image.pullPolicy }}
5656 {{- if .Values.global.containerSecurityContext.enabled }}
5757 securityContext :
Original file line number Diff line number Diff line change 4747 {{- include "openops.initContainers" (dict "root" . "component" "engine") | nindent 6 }}
4848 containers :
4949 - name : {{ .Values.engine.name }}
50- image : " {{ .Values.image.repository }}/{{ .Values.engine.image }}:{{ .Values.global.version }}"
50+ image : " {{ include " openops.imageRepository" (dict "root" . "component" "engine") }}/{{ .Values.engine.image }}:{{ .Values.global.version }}"
5151 imagePullPolicy : {{ .Values.image.pullPolicy }}
5252 {{- include "openops.containerSecurityContext" (dict "root" .) | nindent 10 }}
5353 command : [ "/bin/sh", "-c", "cp -r /var/tmp-base/. /tmp/ && node main.js" ]
Original file line number Diff line number Diff line change 4949 {{- include "openops.initContainers" (dict "root" . "component" "tables") | nindent 6 }}
5050 containers :
5151 - name : {{ .Values.tables.name }}
52- image : " {{ .Values.image.repository }}/{{ .Values.tables.image }}:{{ .Values.tables.tag }}"
52+ image : " {{ include " openops.imageRepository" (dict "root" . "component" "tables") }}/{{ .Values.tables.image }}:{{ .Values.tables.tag }}"
5353 imagePullPolicy : {{ .Values.image.pullPolicy }}
5454 {{- if .Values.global.containerSecurityContext.enabled }}
5555 securityContext :
Original file line number Diff line number Diff line change 4545 "image" : {
4646 "type" : " string"
4747 },
48+ "repository" : {
49+ "type" : " string" ,
50+ "description" : " Override global image.repository for app (empty = use global)"
51+ },
4852 "replicas" : {
4953 "type" : " integer" ,
5054 "minimum" : 0
6165 "image" : {
6266 "type" : " string"
6367 },
68+ "repository" : {
69+ "type" : " string" ,
70+ "description" : " Override global image.repository for engine (empty = use global)"
71+ },
6472 "replicas" : {
6573 "type" : " integer" ,
6674 "minimum" : 0
7785 "image" : {
7886 "type" : " string"
7987 },
88+ "repository" : {
89+ "type" : " string" ,
90+ "description" : " Image repository for tables (defaults to public.ecr.aws/openops)"
91+ },
8092 "tag" : {
8193 "type" : " string" ,
8294 "description" : " Immutable version tag for tables image" ,
98110 "image" : {
99111 "type" : " string"
100112 },
113+ "repository" : {
114+ "type" : " string" ,
115+ "description" : " Image repository for analytics (defaults to public.ecr.aws/openops)"
116+ },
101117 "tag" : {
102118 "type" : " string" ,
103119 "description" : " Immutable version tag for analytics image" ,
Original file line number Diff line number Diff line change @@ -164,6 +164,7 @@ secretEnv:
164164app :
165165 name : openops-app
166166 image : openops-app
167+ repository : " " # Override global image.repository (empty = use global)
167168 replicas : 2 # Minimum 2 for high availability
168169 resources :
169170 requests :
199200engine :
200201 name : openops-engine
201202 image : openops-engine
203+ repository : " " # Override global image.repository (empty = use global)
202204 replicas : 2 # Minimum 2 for high availability
203205 resources :
204206 requests :
@@ -237,6 +239,7 @@ engine:
237239tables :
238240 name : openops-tables
239241 image : openops-tables
242+ repository : " public.ecr.aws/openops" # Always use public ECR for tables
240243 tag : " 0.2.17"
241244 replicas : 1
242245 resources :
@@ -299,6 +302,7 @@ tables:
299302analytics :
300303 name : openops-analytics
301304 image : openops-analytics
305+ repository : " public.ecr.aws/openops" # Always use public ECR for analytics
302306 tag : " 0.14.4"
303307 replicas : 1
304308 resources :
You can’t perform that action at this time.
0 commit comments