Skip to content

Commit

Permalink
Merge branch 'substrate-alertrules' of github.com:w3f/polkadot-charts…
Browse files Browse the repository at this point in the history
… into substrate-alertrules
  • Loading branch information
ironoa committed Sep 2, 2020
2 parents fb972de + ea7a9d2 commit cb71b25
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/polkadot/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@ polkadot-custom-chainspec
{{- define "polkadot-deployer.podRestarterName" -}}
{{ .Release.Name }}-pod-restarter
{{- end }}

{{/* Json for private docker registry */}}
{{- define "imagePullSecret" }}
{{- with .Values.imagePullSecret.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/polkadot/templates/secret-docker-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ if .Values.imagePullSecret }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.imagePullSecret.secretName | default "dockerregistrysecret" }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
{{ end }}
4 changes: 4 additions & 0 deletions charts/polkadot/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ spec:
subPath: custom_chainspec.json
{{- end }}
{{- end }}
{{- if .Values.imagePullSecret }}
imagePullSecrets:
- name: {{ .Values.imagePullSecret.secretName }}
{{- end }}
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image.repo }}:{{ .Values.image.tag }}
Expand Down
8 changes: 8 additions & 0 deletions charts/polkadot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ serviceMonitorLabels:
release: prometheus-operator

inPeers: "500"

# imagePullSecret:
# secretName: docker-registry-secret #k8s secret name
# imageCredentials:
# registry: registry.digitalocean.com #docker registry url
# username: username #registry username
# password: password #registry password

0 comments on commit cb71b25

Please sign in to comment.