Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add imagePullSecret option and dockerhub proxy option #2760

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions helm-chart/templates/adservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
10 changes: 10 additions & 0 deletions helm-chart/templates/cartservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down Expand Up @@ -242,6 +246,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: redis
securityContext:
Expand All @@ -253,6 +261,8 @@ spec:
readOnlyRootFilesystem: true
{{- if .Values.cartDatabase.inClusterRedis.publicRepository }}
image: redis:alpine@sha256:c35af3bbcef51a62c8bae5a9a563c6f1b60d7ebaea4cb5a3ccbcc157580ae098
{{- else if .Values.cartDatabase.inClusterRedis.imageRepository }}
image: {{ .Values.cartDatabase.inClusterRedis.imageRepository }}/redis:alpine
{{- else }}
image: {{ .Values.images.repository }}/redis:alpine
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/checkoutservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/currencyservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/emailservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/loadgenerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.loadGenerator.checkFrontendInitContainer }}
initContainers:
- command:
Expand Down
6 changes: 5 additions & 1 deletion helm-chart/templates/opentelemetry-collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if eq .Values.opentelemetryCollector.projectId "PROJECT_ID" }}
initContainers:
# Init container retrieves the current cloud project id from the metadata server
Expand Down Expand Up @@ -136,7 +140,7 @@ data:
collector-gateway-config-template.yaml: |
receivers:
otlp:
protocols:
protocols:
grpc:
processors:
exporters:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/paymentservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/productcatalogservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/recommendationservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/templates/shippingservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ spec:
seccompProfile:
type: {{ .Values.seccompProfile.type }}
{{- end }}
{{- if .Values.images.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.images.imagePullSecrets | nindent 8 }}
{{- end }}
containers:
- name: server
securityContext:
Expand Down
2 changes: 2 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ images:
repository: us-central1-docker.pkg.dev/google-samples/microservices-demo
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []

serviceAccounts:
# Specifies whether service accounts should be created.
Expand Down Expand Up @@ -206,6 +207,7 @@ cartDatabase:
name: redis-cart
# Uses the public redis image from Docker Hub, otherwise will use the images.repository.
publicRepository: true
imageRepository: ''
externalRedisTlsOrigination:
enable: false
name: exernal-redis-tls-origination
Expand Down