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

[TT-13615] Add imageRegistry #361

Open
wants to merge 7 commits 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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
containers:
- name: bootstrap-tyk-post-install
image: {{ .Values.bootstrap.jobs.postInstall.image.repository }}:{{ .Values.bootstrap.jobs.postInstall.image.tag }}
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.postInstall.image.repository }}:{{ .Values.bootstrap.jobs.postInstall.image.tag }}
command: [ '/app/bin/bootstrap-app-post' ]
imagePullPolicy: IfNotPresent
{{- if .Values.bootstrap.containerSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
containers:
- name: bootstrap-tyk-pre-delete
image: {{ .Values.bootstrap.jobs.preDelete.image.repository }}:{{ .Values.bootstrap.jobs.preDelete.image.tag }}
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.preDelete.image.repository }}:{{ .Values.bootstrap.jobs.preDelete.image.tag }}
command: [ '/app/bin/bootstrap-app-pre-delete' ]
imagePullPolicy: IfNotPresent
{{- if .Values.bootstrap.containerSecurityContext }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
serviceAccountName: {{ default "k8s-bootstrap-role" .Values.bootstrap.serviceAccountName | quote }}
containers:
- name: bootstrap-tyk-pre-install
image: {{ .Values.bootstrap.jobs.preInstall.image.repository }}:{{ .Values.bootstrap.jobs.preInstall.image.tag }}
image: {{ .Values.global.imageRegistry }}{{ .Values.bootstrap.jobs.preInstall.image.repository }}:{{ .Values.bootstrap.jobs.preInstall.image.tag }}
command: ['/app/bin/bootstrap-app-pre-install']
imagePullPolicy: IfNotPresent
{{- if .Values.bootstrap.containerSecurityContext }}
Expand Down
2 changes: 2 additions & 0 deletions components/tyk-bootstrap/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ global:
useSecretName: ""
devPortal: tyk-dev-portal-conf

imageRegistry: ""

bootstrap:
# Trigger to control if we want to bootstrap the Developer Portal component using tyk-bootstrap
devPortal: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ spec:
{{- if and $isSemVer (semverCompare "<=5.0.2" .Values.dashboard.image.tag) }}
initContainers:
- name: init-analytics-conf
image: busybox:1.32
image: {{ .Values.global.imageRegistry }}busybox:1.32
args: ["sh", "-c", 'touch /etc/tyk-dashboard/tyk_analytics.conf && echo "{}" > /etc/tyk-dashboard/tyk_analytics.conf']
{{- if .Values.dashboard.containerSecurityContext }}
securityContext:
Expand All @@ -75,7 +75,7 @@ spec:
name: analytics-conf
{{- end }}
containers:
- image: "{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag }}"
- image: "{{ .Values.global.imageRegistry }}{{ .Values.dashboard.image.repository }}:{{ .Values.dashboard.image.tag }}"
imagePullPolicy: {{ .Values.dashboard.image.pullPolicy }}
name: dashboard-{{ .Chart.Name }}
{{- if .Values.dashboard.containerSecurityContext }}
Expand Down
2 changes: 2 additions & 0 deletions components/tyk-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ global:
# a custom TLS certificate to avoid overwriting yours
useDefaultTykCertificate: true

imageRegistry: ""

# Choose the storageType for Tyk. [ "mongo", "postgres" ]
storageType: postgres

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
imagePullSecrets: {{ toYaml . | nindent 8 }}
{{- end }}
containers:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- image: "{{ .Values.global.imageRegistry }}{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: dev-portal-{{ .Chart.Name }}
{{- if .Values.containerSecurityContext }}
Expand Down
2 changes: 2 additions & 0 deletions components/tyk-dev-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ global:
# In the context of the tyk-developer-portal only, this just runs the bootstrapping jobs only for the portal
bootstrap: true

imageRegistry: ""

# Sensitive configuration of Portal could be set using k8s secret
# You can set following fields:
# - DevPortalLicense - Sets LicenseKey for Developer Portal
Expand Down
4 changes: 2 additions & 2 deletions components/tyk-gateway/templates/deployment-gw-repset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
{{- end }}
initContainers:
- name: "setup-directories"
image: "{{ .Values.gateway.initContainers.setupDirectories.repository }}:{{ .Values.gateway.initContainers.setupDirectories.tag }}"
image: "{{ .Values.global.imageRegistry }}{{ .Values.gateway.initContainers.setupDirectories.repository }}:{{ .Values.gateway.initContainers.setupDirectories.tag }}"
command: ['sh','-c','mkdir -p apps middleware policies && touch policies/policies.json']
workingDir: /mnt/tyk-gateway
{{- if .Values.gateway.containerSecurityContext }}
Expand All @@ -88,7 +88,7 @@ spec:
mountPath: /mnt/tyk-gateway
containers:
- name: gateway-{{ .Chart.Name }}
image: "{{ .Values.gateway.image.repository }}:{{ .Values.gateway.image.tag }}"
image: "{{ .Values.global.imageRegistry }}{{ .Values.gateway.image.repository }}:{{ .Values.gateway.image.tag }}"
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
{{- if .Values.gateway.containerSecurityContext }}
securityContext:
Expand Down
2 changes: 2 additions & 0 deletions components/tyk-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ global:
# - APISecret - Sets node_secret and secret in tyk.conf
useSecretName: ""

imageRegistry: ""

redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down
2 changes: 1 addition & 1 deletion components/tyk-mdcb/templates/deployment-mdcb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: mdcb-{{ .Chart.Name }}
securityContext:
{{- toYaml .Values.mdcb.containerSecurityContext | nindent 12 }}
image: "{{ .Values.mdcb.image.repository }}:{{ .Values.mdcb.image.tag }}"
image: "{{ .Values.global.imageRegistry }}{{ .Values.mdcb.image.repository }}:{{ .Values.mdcb.image.tag }}"
imagePullPolicy: {{ .Values.mdcb.image.pullPolicy }}
command: ["/opt/tyk-sink/tyk-sink", "--c=/etc/tyk-sink/tyk_mdcb.conf"]
ports:
Expand Down
2 changes: 2 additions & 0 deletions components/tyk-mdcb/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
global:
imageRegistry: ""

# Choose the storageType for Tyk. [ "mongo", "postgres" ]
storageType: postgres

Expand Down
2 changes: 1 addition & 1 deletion components/tyk-pump/templates/deployment-pmp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
{{- end }}
containers:
- name: pump-{{ .Chart.Name }}
image: "{{ .Values.pump.image.repository }}:{{ .Values.pump.image.tag }}"
image: "{{ .Values.global.imageRegistry }}{{ .Values.pump.image.repository }}:{{ .Values.pump.image.tag }}"
imagePullPolicy: {{ .Values.pump.image.pullPolicy }}
workingDir: "/opt/tyk-pump"
ports:
Expand Down
1 change: 1 addition & 0 deletions components/tyk-pump/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nameOverride: ""
fullnameOverride: ""

global:
imageRegistry: ""
redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down
4 changes: 3 additions & 1 deletion tyk-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ global:
# OperatorLicense - Tyk Operator license key
useSecretName: ""

imageRegistry: ""

redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down Expand Up @@ -721,7 +723,7 @@ tyk-pump:

image:
# image repository for Tyk pump
repository: docker.tyk.io/tyk-pump/tyk-pump
repository: tykio/tyk-pump-docker-pub

# tag for Tyk pump
tag: v1.11.0
Expand Down
4 changes: 3 additions & 1 deletion tyk-data-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ global:
# - APISecret - Sets node_secret and secret in tyk.conf
useSecretName: ""

imageRegistry: ""

redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down Expand Up @@ -603,7 +605,7 @@ tyk-pump:

image:
# image repository for Tyk pump
repository: docker.tyk.io/tyk-pump/tyk-pump
repository: tykio/tyk-pump-docker-pub

# tag for Tyk pump
tag: v1.11.0
Expand Down
2 changes: 2 additions & 0 deletions tyk-oss/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ global:
# - OperatorLicense - Tyk Operator license key
useSecretName: ""

imageRegistry: ""

redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down
6 changes: 4 additions & 2 deletions tyk-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ global:
# OperatorLicense - Tyk Operator license key
useSecretName: ""

imageRegistry: ""

redis:
# The addrs value will allow you to set your Redis addresses.
#
Expand Down Expand Up @@ -739,7 +741,7 @@ tyk-pump:

image:
# image repository for Tyk pump
repository: docker.tyk.io/tyk-pump/tyk-pump
repository: tykio/tyk-pump-docker-pub

# tag for Tyk pump
tag: v1.11.0
Expand Down Expand Up @@ -1140,7 +1142,7 @@ tyk-dashboard:
# to avoid bootstrap job failure because of the OPA policy restrictions.
# It is used to set TYK_DB_SECURITY_ALLOWADMINRESETPASSWORD
allowAdminPasswordReset: true

# replicaCount specifies number of replicas to be created if kind is Deployment.
replicaCount: 1

Expand Down