Skip to content

Commit 1773618

Browse files
committed
Added support for the instance customisation plugin image tag to be stored in a private repo
1 parent 4fa9c42 commit 1773618

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

charts/instance-customisation-plugin/templates/deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ spec:
3535
labels:
3636
app.kubernetes.io/name: sps-instance-customisation-plugin
3737
spec:
38-
tolerations:
39-
- operator: "Exists"
4038
containers:
4139
- image: {{ .Values.image }}
4240
imagePullPolicy: Always
4341
name: sps-instance-customisation-plugin
4442
ports:
4543
- containerPort: {{ .Values.port }}
44+
{{ if and (ne .Values.imageCredentials.registry "") (ne .Values.imageCredentials.username "") (ne .Values.imageCredentials.password "") }}
45+
imagePullSecrets:
46+
- name: sps-instance-customisation-plugin
47+
{{ end }}
4648
---
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{- define "imagePullSecret" }}
2+
{{- with .Values.imageCredentials }}
3+
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
4+
{{- end }}
5+
{{- end }}
6+
{{ if and (ne .Values.imageCredentials.registry "") (ne .Values.imageCredentials.username "") (ne .Values.imageCredentials.password "") }}
7+
apiVersion: v1
8+
kind: Secret
9+
metadata:
10+
name: sps-instance-customisation-plugin
11+
namespace: {{ .Release.Namespace }}
12+
type: kubernetes.io/dockerconfigjson
13+
data:
14+
.dockerconfigjson: {{ template "imagePullSecret" . }}
15+
{{ end }}

charts/instance-customisation-plugin/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
# The image of the instance customisation plugin container
33
image: "ghcr.io/scalablepixelstreaming/apis/instance-customisation-plugin:latest"
44

5+
# Credentials for the instance customisation plugin image if it is pulled from a private registry
6+
imageCredentials:
7+
registry: ""
8+
username: ""
9+
password: ""
10+
email: ""
11+
512
# The port this instance customisation plugin should listen on
613
port: 55774

0 commit comments

Comments
 (0)