Коммит
48d0135de0
|
@ -14,3 +14,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate the imagePullSecret for a private Container Registry.
|
||||||
|
*/}}
|
||||||
|
{{- define "imagePullSecret" }}
|
||||||
|
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.image.repository (printf "%s:%s" .Values.image.username .Values.image.password | b64enc) | b64enc }}
|
||||||
|
{{- end }}
|
|
@ -17,6 +17,10 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "fullname" . }}
|
app: {{ template "fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Chart.Name }}-acr-secret
|
||||||
|
{{ end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-acr-secret
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
data:
|
||||||
|
.dockerconfigjson: {{ template "imagePullSecret" . }}
|
||||||
|
{{ end }}
|
|
@ -1,3 +1,4 @@
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
image:
|
image:
|
||||||
|
private: false
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
|
@ -14,3 +14,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate the imagePullSecret for a private Container Registry.
|
||||||
|
*/}}
|
||||||
|
{{- define "imagePullSecret" }}
|
||||||
|
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.image.repository (printf "%s:%s" .Values.image.username .Values.image.password | b64enc) | b64enc }}
|
||||||
|
{{- end }}
|
|
@ -17,6 +17,10 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "fullname" . }}
|
app: {{ template "fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Chart.Name }}-acr-secret
|
||||||
|
{{ end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-acr-secret
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
data:
|
||||||
|
.dockerconfigjson: {{ template "imagePullSecret" . }}
|
||||||
|
{{ end }}
|
|
@ -1,5 +1,6 @@
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
image:
|
image:
|
||||||
|
private: false
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
service:
|
service:
|
||||||
internalPort: 3000
|
internalPort: 3000
|
||||||
|
|
|
@ -14,3 +14,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate the imagePullSecret for a private Container Registry.
|
||||||
|
*/}}
|
||||||
|
{{- define "imagePullSecret" }}
|
||||||
|
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.image.repository (printf "%s:%s" .Values.image.username .Values.image.password | b64enc) | b64enc }}
|
||||||
|
{{- end }}
|
|
@ -17,6 +17,10 @@ spec:
|
||||||
labels:
|
labels:
|
||||||
app: {{ template "fullname" . }}
|
app: {{ template "fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Chart.Name }}-acr-secret
|
||||||
|
{{ end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-acr-secret
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
data:
|
||||||
|
.dockerconfigjson: {{ template "imagePullSecret" . }}
|
||||||
|
{{ end }}
|
|
@ -14,4 +14,8 @@ spec:
|
||||||
targetPort: {{ .Values.service.internalPort }}
|
targetPort: {{ .Values.service.internalPort }}
|
||||||
selector:
|
selector:
|
||||||
app: {{ template "fullname" . }}
|
app: {{ template "fullname" . }}
|
||||||
type: ClusterIP
|
{{ if .Values.ingress.enabled }}
|
||||||
|
type: ClusterIP
|
||||||
|
{{ else }}
|
||||||
|
type: LoadBalancer
|
||||||
|
{{ end }}
|
|
@ -1,5 +1,6 @@
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
image:
|
image:
|
||||||
|
private: false
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
service:
|
service:
|
||||||
internalPort: 80
|
internalPort: 80
|
||||||
|
|
|
@ -14,3 +14,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Generate the imagePullSecret for a private Container Registry.
|
||||||
|
*/}}
|
||||||
|
{{- define "imagePullSecret" }}
|
||||||
|
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.image.repository (printf "%s:%s" .Values.image.username .Values.image.password | b64enc) | b64enc }}
|
||||||
|
{{- end }}
|
|
@ -15,6 +15,10 @@ spec:
|
||||||
draft: {{ default "draft-app" .Values.draft }}
|
draft: {{ default "draft-app" .Values.draft }}
|
||||||
app: {{ template "fullname" . }}
|
app: {{ template "fullname" . }}
|
||||||
spec:
|
spec:
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Chart.Name }}-acr-secret
|
||||||
|
{{ end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{{ if .Values.image.private }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-acr-secret
|
||||||
|
type: kubernetes.io/dockerconfigjson
|
||||||
|
data:
|
||||||
|
.dockerconfigjson: {{ template "imagePullSecret" . }}
|
||||||
|
{{ end }}
|
|
@ -3,6 +3,7 @@
|
||||||
# Declare variables to be passed into your templates.
|
# Declare variables to be passed into your templates.
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
image:
|
image:
|
||||||
|
private: false
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
service:
|
service:
|
||||||
externalPort: 80
|
externalPort: 80
|
||||||
|
|
Загрузка…
Ссылка в новой задаче