diff --git a/Dockerfile b/Dockerfile index 1228a54a636214d3380370c79e42b73a07e40646..142bcc04106266edf2ce3cf09820ba893fa9eda9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.15 as builder +FROM golang:1.20 as builder WORKDIR /build COPY go.mod go.mod diff --git a/charts/bbbatscale-support-notify/templates/_helpers.tpl b/charts/bbbatscale-support-notify/templates/_helpers.tpl index 4b478fd97656f3a3a741faeeca2d1927cd41b1ef..71c6be7bf52c1548075d4e8106d04117de23b928 100644 --- a/charts/bbbatscale-support-notify/templates/_helpers.tpl +++ b/charts/bbbatscale-support-notify/templates/_helpers.tpl @@ -60,3 +60,16 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{- define "bbbatscale-support-notify.dockerConfig" -}} +auths: + {{- $auths := .auths }} + {{- range (keys $auths) }} + {{- $auth := get $auths . }} + {{ quote . }}: + username: {{ quote $auth.username }} + password: {{ quote $auth.password }} + auth: {{ printf "%s:%s" $auth.username $auth.password | b64enc }} + email: {{ get $auth "email" | quote }} + {{- end }} +{{- end -}} diff --git a/charts/bbbatscale-support-notify/templates/deployment.yaml b/charts/bbbatscale-support-notify/templates/deployment.yaml index 9987e9a7e3e2ccfeb90e74d922be8031d72a0e62..da565cde9004f2ce9f9cd30e614ecf04e59eae8e 100644 --- a/charts/bbbatscale-support-notify/templates/deployment.yaml +++ b/charts/bbbatscale-support-notify/templates/deployment.yaml @@ -31,11 +31,6 @@ spec: serviceAccountName: {{ include "bbbatscale-support-notify.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: tls - secret: - defaultMode: 420 - secretName: {{ include "bbbatscale-support-notify.fullname" . }}-tls containers: - name: {{ .Chart.Name }} securityContext: @@ -46,18 +41,12 @@ spec: - secretRef: name: {{ include "bbbatscale-support-notify.fullname" . }} env: - - name: NOTIFY_CERT - value: /etc/tls/private/tls.crt - - name: NOTIFY_KEY - value: /etc/tls/private/tls.key + - name: NOTIFY_NOTLS + value: "1" ports: - - name: https - containerPort: 8443 + - name: http + containerPort: 8080 protocol: TCP - volumeMounts: - - mountPath: /etc/tls/private - name: tls - readOnly: true resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml b/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3b35ec3b2a8b77ce11d787c0ef9e0eb4ef226bd8 --- /dev/null +++ b/charts/bbbatscale-support-notify/templates/image-pull-secret.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "bbbatscale-support-notify.fullname" . }}-pullsecret + labels: + {{- include "bbbatscale-support-notify.labels" . | nindent 4 }} +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ include "bbbatscale-support-notify.dockerConfig" .Values.imagePullConfig | fromYaml | toJson | b64enc }} diff --git a/charts/bbbatscale-support-notify/templates/service.yaml b/charts/bbbatscale-support-notify/templates/service.yaml index 328f3ec065e7ee394601d5324e860ffe9f2b3508..3049699d80fd14ac15bae41aeae1c1abbf708b75 100644 --- a/charts/bbbatscale-support-notify/templates/service.yaml +++ b/charts/bbbatscale-support-notify/templates/service.yaml @@ -4,13 +4,11 @@ metadata: name: {{ include "bbbatscale-support-notify.fullname" . }} labels: {{- include "bbbatscale-support-notify.labels" . | nindent 4 }} - annotations: - service.alpha.openshift.io/serving-cert-secret-name: {{ include "bbbatscale-support-notify.fullname" . }}-tls spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} - targetPort: 8443 + targetPort: 8080 protocol: TCP name: http selector: diff --git a/charts/bbbatscale-support-notify/templates/serviceaccount.yaml b/charts/bbbatscale-support-notify/templates/serviceaccount.yaml index 44ffd0e3dd80e4083eec9d4abec10f4020a433b1..60c7463cace465964499b08a5bc71c66b4f3b7ba 100644 --- a/charts/bbbatscale-support-notify/templates/serviceaccount.yaml +++ b/charts/bbbatscale-support-notify/templates/serviceaccount.yaml @@ -9,4 +9,6 @@ metadata: annotations: {{- toYaml . | nindent 4 }} {{- end }} +imagePullSecrets: + - {{ include "bbbatscale-support-notify.fullname" . }}-pullsecret {{- end }} diff --git a/charts/bbbatscale-support-notify/values.yaml b/charts/bbbatscale-support-notify/values.yaml index d78ab74eadb0d4936663c9848f2082f78520642b..b0977fdfa931dee6e2d31052a190b302f654f0db 100644 --- a/charts/bbbatscale-support-notify/values.yaml +++ b/charts/bbbatscale-support-notify/values.yaml @@ -51,7 +51,7 @@ securityContext: {} service: type: ClusterIP - port: 8443 + port: 80 ingress: enabled: true