{"id":320192,"date":"2021-03-24T15:01:18","date_gmt":"2021-03-24T15:01:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=320192"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=320192","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Helm \u0447\u0430\u0440\u0442\u0430\u043c\u0438 \u0438 \u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0430\u043c\u0438 \u2014 \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a Helm \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 Kubernetes, \u0438 \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Helm \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0447\u0430\u0440\u0442\u0430.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0448\u0430\u0431\u043b\u043e\u043d Helm <code>deployment.yaml<\/code> \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 YAML.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u043c\u0443 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u043c\u0443 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e: \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c <code>deployment.yaml<\/code> \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"ispolzovanie-znacheniy-v-shablonah\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445<\/h3>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0430\u0439\u043b deployment.yaml \u0434\u043b\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   name: {{ include &quot;myhelm1.fullname&quot; . }}   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }}     app.kubernetes.io\/managed-by: {{ .Release.Service }} spec:   replicas: {{ .Values.replicaCount }}   selector:     matchLabels:       app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}       app.kubernetes.io\/instance: {{ .Release.Name }}   template:     metadata:       labels:         app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}         app.kubernetes.io\/instance: {{ .Release.Name }}     spec:       containers:         - name: {{ .Chart.Name }}           image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;           imagePullPolicy: {{ .Values.image.pullPolicy }}            terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}            command: ['sh', '-c', 'sleep 60']        {{- with .Values.nodeSelector }}       nodeSelector:         {{- toYaml . | nindent 8 }}       {{- end }}     {{- with .Values.affinity }}       affinity:         {{- toYaml . | nindent 8 }}     {{- end }}     {{- with .Values.tolerations }}       tolerations:         {{- toYaml . | nindent 8 }}     {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e <code>deployment.yaml<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">    app.kubernetes.io\/instance: {{ .Release.Name }}     app.kubernetes.io\/managed-by: {{ .Release.Service }}   replicas: {{ .Values.replicaCount }}       app.kubernetes.io\/instance: {{ .Release.Name }}         app.kubernetes.io\/instance: {{ .Release.Name }}         - name: {{ .Chart.Name }}           image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;           imagePullPolicy: {{ .Values.image.pullPolicy }}<\/code><\/pre>\n<p>  <\/p>\n<p><code>.Release.Name<\/code> \u0438 <code>.Release.Service<\/code> \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u2014 \u043f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430 <a href=\"https:\/\/docs.helm.sh\/chart_template_guide\/\" rel=\"nofollow noopener noreferrer\">https:\/\/docs.helm.sh\/chart_template_guide\/<\/a> \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u0442 \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0438\u0445 \u041e\u0427\u0415\u041d\u042c \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u2014 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u0437 \u0438 \u043d\u0430\u0439\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>deployment.yaml<\/code>, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\ --name test5 --dry-run --debug<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0447\u0442\u0438\u0442\u0435. (\u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u0442\u043b\u0430\u0434\u043a\u0435 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u2014 \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0442\u0440\u0435\u0445\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430.)<\/p>\n<p>  <\/p>\n<p>(\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u0443\u0447\u0435\u0431\u043d\u0438\u043a, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0433\u043e \u0435\u0449\u0435 \u0440\u0430\u0437, \u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0444\u0430\u0439\u043b\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 helm install \u0441 \u043e\u0442\u043b\u0430\u0434\u043a\u043e\u0439 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \/ \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f)<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">    app.kubernetes.io\/instance: test5     app.kubernetes.io\/managed-by: Tiller       app.kubernetes.io\/instance: test5         - name: myhelm1           image: &quot;radial\/busyboxplus:base&quot;           imagePullPolicy: IfNotPresent<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 3 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0438\u0436\u0435 \u0432\u0437\u044f\u0442\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 values.yaml:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">          image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;           imagePullPolicy: {{ .Values.image.pullPolicy }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c <code>values.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image:   repository: radial\/busyboxplus   tag: base   pullPolicy: IfNotPresent<\/code><\/pre>\n<p>  <\/p>\n<p><strong> \u2014 name: {{ .Chart.Name }}<\/strong> \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 Chart.yaml. \u0415\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: v1 appVersion: &quot;1.0&quot; description: A Helm chart for Kubernetes name: myhelm1 version: 0.1.0<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0432\u0441\u0435\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u2014 \u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u0430\u043c\u0435\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u0432\u0438\u0434\u0435\u043b\u0438, \u0447\u0442\u043e \u0432 \u0444\u0430\u0439\u043b\u0430\u0445 YAML \u0435\u0441\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0432 <code>{{ and }}<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0423 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0443\u0441\u0442\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f <code>{{ \u0438 \u043f\u0443\u0441\u0442\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435\u043c }}<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0448\u0430\u0431\u043b\u043e\u043d, \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0435\u043d, \u0433\u0434\u0435 \u0442\u043e\u0447\u043a\u0430 <code>(.)<\/code> \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e\u043c \u0438\u043c\u0435\u043d.<\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0434 \u0447\u0430\u0440\u0442\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d. \u041f\u0440\u043e\u0447\u0442\u0438\u0442\u0435 <code>.Chart.name<\/code> \u043a\u0430\u043a \u00ab\u043d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442 <code>Chart<\/code>, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>name<\/code>\u00bb.<\/p>\n<p>  <\/p>\n<h3 id=\"with\">With<\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">**values.yaml** extract:   nodeSelector:     disktype: ssd     gpu: Nvidia<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">**deployment.yaml** extract:         {{- with .Values.nodeSelector }}       nodeSelector:         {{- toYaml . | nindent 8 }}       {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">      nodeSelector:         disktype: ssd         gpu: Nvidia<\/code><\/pre>\n<p>  <\/p>\n<p><strong>\u041e\u0427\u0415\u041d\u042c \u0432\u0430\u0436\u043d\u043e: \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438\u043c\u0435\u044e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 YAML.<\/strong><\/p>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u0441\u0442\u043e\u0438\u0442 8 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 <code>deployment.yaml<\/code> \u0435\u0441\u0442\u044c <code>{{- toYaml. | nindent 8}}<\/code><\/p>\n<p>  <\/p>\n<p><code>nindent 8<\/code> \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0442\u0441\u0442\u0443\u043f \u043d\u0430 8 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><code>with<\/code> \u2014 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0446\u0438\u043a\u043b\u0430. \u0421\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 <code>.Values.nodeSelector<\/code>: \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0432 Yaml (<code>toYaml<\/code>).<br \/>  \u0422\u043e\u0447\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 <code>toYaml<\/code> \u2014 \u044d\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>.Values.nodeSelector<\/code> \u0432 \u0446\u0438\u043a\u043b\u0435. \u042d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0442\u0430\u043c.<br \/>  \u0421\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0435\u0433\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 <code>sum(1,34,454)<\/code>\u2026 \u043a\u0430\u043a <code>toYaml(.)<\/code>\u2026 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430.<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Pipeline_(Unix)?spm=a2c65.11461447.0.0.524e1b6aycQLfv\" rel=\"nofollow noopener noreferrer\">\u0421\u0438\u043c\u0432\u043e\u043b |<\/a> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a \u0436\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u043e\u0439 Linux.<\/p>\n<p>  <\/p>\n<p><code>affinity<\/code>: \u0438 <code>tolerations<\/code>: <code>with<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u043a\u0430\u043a with \u0442\u0430\u043a\u0436\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <a href=\"https:\/\/docs.helm.sh\/chart_template_guide\/?spm=a2c65.11461447.0.0.524e1b6aycQLfv\" rel=\"nofollow noopener noreferrer\">MODIFYING SCOPE USING WITH<\/a><\/p>\n<p>  <\/p>\n<p>\u0417\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c <code>include<\/code>, \u0432\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433 \u0432\u0441\u0435\u0433\u043e <code>deployment.yaml<\/code> \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 <code>values.yaml<\/code>, <code>Chart.yaml<\/code> \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 <code>service.yaml<\/code> \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0442\u043e\u0436\u0435 \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: v1 kind: Service metadata:   name: {{ include &quot;myhelm1.fullname&quot; . }}   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }}     app.kubernetes.io\/managed-by: {{ .Release.Service }} spec:   type: {{ .Values.service.type }}   ports:     - port: {{ .Values.service.port }}       targetPort: http       protocol: TCP       name: http   selector:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }}<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"peremennye-i-range-diapazon-helm\">\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 range (\u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d) Helm<\/h3>\n<p>  <\/p>\n<p>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 3 \u0441\u0442\u0440\u043e\u043a \u0438\u0437 <code>ingress.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- if .Values.ingress.enabled -}} {{- $fullName := include &quot;myhelm1.fullname&quot; . -}} {{- $ingressPaths := .Values.ingress.paths -}} ... rest of yaml ....     {{- end }}   {{- end }} {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">**values.yaml** extract:  ingress:   enabled: false<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <code>ingress.yaml<\/code> \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 <code>if<\/code> &#8230;, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0438 1 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439. \u0415\u0441\u043b\u0438 \u0432\u0445\u043e\u0434 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u2014 false, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 yaml \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u2014 \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e\u0433\u043e \u0445\u043e\u0442\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0438 2 \u0438 3 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442, \u043a\u0430\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Helm.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u0435\u0444\u0438\u0441 \u0432 <code>{{ \u0438 }}<\/code><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0434\u0435\u0444\u0438\u0441\u044b \/ \u0442\u0438\u0440\u0435 \u0441\u044a\u0435\u0434\u0430\u044e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u0440\u043e\u0431\u0435\u043b\u0430. <code>{{-<\/code> \u0441\u044a\u0435\u0434\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0441\u043b\u0435\u0432\u0430<\/p>\n<p>  <\/p>\n<p><code>-}}<\/code> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0441\u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u044b \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u2014 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 <code>values.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">ingress:   enabled: false   hosts:     - chart-example.local   tls:     - secretName: chart-example-tls       hosts:         - chart-example.local-1         - chart-example.local-2         - chart-example.local-3<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 deployment.yaml :<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- if .Values.ingress.tls }}   tls:   {{- range .Values.ingress.tls }}     - hosts:       {{- range .hosts }}         - {{ . | quote }}       {{- end }}       secretName: {{ .secretName }}   {{- end }} {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">spec:   tls:     - hosts:         - &quot;chart-example.local-1&quot;         - &quot;chart-example.local-2&quot;         - &quot;chart-example.local-3&quot;       secretName: chart-example-tls<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0446\u0438\u043a\u043b \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 (<code>range<\/code>) \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0445\u043e\u0441\u0442\u043e\u0432. <code>quote<\/code> \u043e\u043a\u0440\u0443\u0436\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0438\u043a\u043b <code>range .Values.ingress.tls<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u043c\u0443 \u0446\u0438\u043a\u043b\u0443 3 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u043a\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u0435\u0431\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Extract of **values.yaml**   ingress:   enabled: false   hosts:     - chart-example.local   tls:     - secretName: chart-example-tls-a       hosts:         - chart-example.local-1-a         - chart-example.local-2-a         - chart-example.local-3-a      - secretName: chart-example-tls-b       hosts:         - chart-example.local-1-b         - chart-example.local-2-b      - secretName: chart-example-tls-c       hosts:         - chart-example.local-1-c         - chart-example.local-2-c         - chart-example.local-3-c         - chart-example.local-4-c<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">  tls:     - hosts:         - &quot;chart-example.local-1-a&quot;         - &quot;chart-example.local-2-a&quot;         - &quot;chart-example.local-3-a&quot;       secretName: chart-example-tls-a     - hosts:         - &quot;chart-example.local-1-b&quot;         - &quot;chart-example.local-2-b&quot;       secretName: chart-example-tls-b     - hosts:         - &quot;chart-example.local-1-c&quot;         - &quot;chart-example.local-2-c&quot;         - &quot;chart-example.local-3-c&quot;         - &quot;chart-example.local-4-c&quot;       secretName: chart-example-tls-c<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"importance-of--\">importance of &#8212;<\/h3>\n<p>  <\/p>\n<p>\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u0434\u0435\u0444\u0438\u0441\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- if .Values.ingress.tls }}   tls:   {{- range .Values.ingress.tls }}     - hosts:       {{- range .hosts }}         - {{ . | quote }}       {{- end }}       secretName: {{ .secretName }}   {{- end }} {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0448\u0430\u0431\u043b\u043e\u043d \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u0435\u0444\u0438\u0441\u0430\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{ if .Values.ingress.tls }}   tls:   {{ range .Values.ingress.tls }}     - hosts:       {{ range .hosts }}         - {{ . | quote }}       {{ end }}       secretName: {{ .secretName }}   {{ end }} {{ end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">  tls:     - hosts:          - &quot;chart-example.local-1-a&quot;          - &quot;chart-example.local-2-a&quot;          - &quot;chart-example.local-3-a&quot;        secretName: chart-example-tls-a      - hosts:          - &quot;chart-example.local-1-b&quot;          - &quot;chart-example.local-2-b&quot;        secretName: chart-example-tls-b      - hosts:          - &quot;chart-example.local-1-c&quot;          - &quot;chart-example.local-2-c&quot;          - &quot;chart-example.local-3-c&quot;          - &quot;chart-example.local-4-c&quot;        secretName: chart-example-tls-c <\/code><\/pre>\n<p>  <\/p>\n<p>\u0423 \u0432\u0430\u0441 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u0435\u0444\u0438\u0441\u044b \u043d\u0430 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"_helperstpl\">_helpers.tpl<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435: <code>name: {{include &quot;myhelm1.fullname&quot;. }}<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c <code>include<\/code><\/p>\n<p>  <\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c include \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0432 \u043d\u0430\u0448\u0438 YAML-\u0448\u0430\u0431\u043b\u043e\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0424\u0430\u0439\u043b <code>_helpers.tpl<\/code> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 <code>_helpers.tpl:<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- define &quot;myhelm1.name&quot; -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix &quot;-&quot; -}} {{- end -}}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043c\u044b \u0434\u0430\u0435\u043c \u0438\u043c\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0430. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u0441\u044b\u043b\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e \u0438\u043c\u044f, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u0430\u0435\u0442 myhelm1.name \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: .Chart.Name.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, myhelm1.name \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>.Values.nameOverride<\/code>.<\/p>\n<p>  <\/p>\n<p><code>trunc 63<\/code> \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u043e 63 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><code>trimSuffix &quot;-&quot;<\/code> \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u041e\u0414\u0418\u041d \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0439 <code>-<\/code> \u0435\u0441\u043b\u0438 \u043e\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.<br \/>  \u043d\u043e<\/p>\n<p>  <\/p>\n<p><code>trimSuffix &quot;-<\/code>&quot; \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0445 <code>-<\/code> \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u0435\u0441\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>(\u042d\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0433\u0434\u0435 \u043e\u0431\u0440\u0435\u0437\u043a\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b)<\/p>\n<p>  <\/p>\n<p><code>app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}<\/code><\/p>\n<p>  <\/p>\n<p>\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043a\u0430\u043a<\/p>\n<p>  <\/p>\n<p><code>app.kubernetes.io\/name: myhelm1<\/code><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435: \u043a\u043e\u0434 \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/p>\n<p>  <\/p>\n<p><code>helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}<\/code><\/p>\n<p>  <\/p>\n<p>\u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043a\u0430\u043a<\/p>\n<p>  <\/p>\n<p><code>helm.sh\/chart: myhelm1-0.1.0<\/code><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- define &quot;myhelm1.chart&quot; -}} {{- printf &quot;%s-%s&quot; .Chart.Name .Chart.Version | replace &quot;+&quot; &quot;_&quot; | trunc 63 | trimSuffix &quot;-&quot; -}} {{- end -}}<\/code><\/pre>\n<p>  <\/p>\n<p><code>printf &quot;%s-%s&quot; .Chart.Name .Chart.Version<\/code> \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 <code>.Chart.Name<\/code> \u0438 <code>.Chart.Version<\/code> \u2014 \u043f\u043b\u044e\u0441 \u0441\u0442\u0430\u0432\u0438\u0442 \u0434\u0435\u0444\u0438\u0441 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n<p>  <\/p>\n<p><code>replace &quot;+&quot; &quot;_&quot;<\/code> \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u043b\u044e\u0441\u0430 \u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435 \u044d\u0442\u0438 \u0434\u0432\u0435 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c 10-\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>myhelm1.fullname<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e if \/ else \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u043b\u0436\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">if condition  do something else  do something else end<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u2014 \u044d\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 <code>{{ \u0438 }}<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"bystroe-izuchenie-sintaksisa-shablona-helm\">\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 Helm<\/h3>\n<p>  <\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Helm \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0447\u0430\u0440\u0442\u0430\u0445 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>The Chart Developer&#8217;s Guide: <a href=\"https:\/\/helm.sh\/docs\/topics\/charts\/\" rel=\"nofollow noopener noreferrer\">https:\/\/helm.sh\/docs\/topics\/charts\/<\/a><\/p>\n<p>  <\/p>\n<p>The Chart Template Developer&#8217;s Guide: <a href=\"https:\/\/docs.helm.sh\/chart_template_guide\/\" rel=\"nofollow noopener noreferrer\">https:\/\/docs.helm.sh\/chart_template_guide\/<\/a><\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2013 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0434\u043d\u044f. \u041b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f, \u043a\u0430\u043a \u0438\u0437\u0443\u0447\u0438\u0442\u044c Helm \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442:<\/p>\n<p>  <\/p>\n<p>\u2022 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0444\u0430\u0439\u043b\u043e\u0432<br \/>  \u2022 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0448\u0430\u0431\u043b\u043e\u043d\u0430<br \/>  \u2022 \u043d\u0435 \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0436\u0438\u0432\u044b\u0445 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u043a. \u041e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u043d\u044b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0438<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0432 \u044d\u0442\u043e \u2014 \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u0430 \u0432\u0437\u043b\u043e\u043c \u2014 \u0411\u042b\u0421\u0422\u0420\u042b\u0419.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>values.yaml<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">replicaCount: 1  terminationGracePeriodSeconds: 30  image:   repository: radial\/busyboxplus   tag: base   pullPolicy: IfNotPresent<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e <code>.\/myhelm1\/.helmignore<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">NOTES.txt test-connection.yaml service.yaml ingress.yaml<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 deployment.yaml, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }} spec:   replicas: {{ .Values.replicaCount }}   template:     spec:       containers:         - name: {{ .Chart.Name }}           image: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;           imagePullPolicy: {{ .Values.image.pullPolicy }}            terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u0421\u0415, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e yaml (\u0434\u0430\u0436\u0435 \u041d\u0415\u041f\u0420\u0410\u0412\u0418\u041b\u042c\u041d\u042b\u0419), \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\  --name test5 --dry-run --debug<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">PS C:\\k8&gt; helm install .\\myhelm1\\  --name test5 --dry-run --debug [debug] Created tunnel using local port: '50327'  [debug] SERVER: &quot;127.0.0.1:50327&quot;  [debug] Original chart version: &quot;&quot; [debug] CHART PATH: C:\\k8\\myhelm1  NAME:   test5 REVISION: 1 RELEASED: Fri Feb 15 13:47:49 2019 CHART: myhelm1-0.1.0 USER-SUPPLIED VALUES: {}  COMPUTED VALUES: image:   pullPolicy: IfNotPresent   repository: radial\/busyboxplus   tag: base replicaCount: 1 terminationGracePeriodSeconds: 30  HOOKS: MANIFEST:  --- # Source: myhelm1\/templates\/deployment.yaml apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: myhelm1     helm.sh\/chart: myhelm1-0.1.0     app.kubernetes.io\/instance: test5 spec:   replicas: 1   template:     spec:       containers:         - name: myhelm1           image: &quot;radial\/busyboxplus:base&quot;           imagePullPolicy: IfNotPresent            terminationGracePeriodSeconds: 30<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0437\u0431\u0430\u0432\u044c\u0442\u0435\u0441\u044c \u043e\u0442 \u043f\u0435\u0440\u0432\u044b\u0445 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u00ab\u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445\u00bb \u0441\u0442\u0440\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e grep.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\  --name test5 --dry-run --debug | grep -vE 'debug]|NAME|REVIS|RELEA|ART:|OKS:|FEST:'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0447\u0442\u043e \u043d\u0438\u0436\u0435. \u042d\u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e: \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 yaml \u0434\u043b\u044f \u0438\u0433\u0440\u044b \u0441 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">USER-SUPPLIED VALUES: {}  COMPUTED VALUES: image:   pullPolicy: IfNotPresent   repository: radial\/busyboxplus   tag: base replicaCount: 1 terminationGracePeriodSeconds: 30  --- # Source: myhelm1\/templates\/deployment.yaml apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: myhelm1     helm.sh\/chart: myhelm1-0.1.0     app.kubernetes.io\/instance: test5 spec:   replicas: 1   template:     spec:       containers:         - name: myhelm1           image: &quot;radial\/busyboxplus:base&quot;           imagePullPolicy: IfNotPresent            terminationGracePeriodSeconds: 30<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u043c\u0438\u0442\u0435\u0441\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430:<br \/>  \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0438\u0436\u0435 <code>deployment.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }} spec: #--------------------&gt;&gt; learn spacing &lt;&lt; ------------------------   replicas1: {{ .Values.replicaCount }}   replicas2:   {{ .Values.replicaCount }}   replicas3:    {{ .Values.replicaCount }}   replicas4: '{{ .Values.replicaCount }}'   replicas5: &quot;{{ .Values.replicaCount }}&quot;   replicas6: &quot;{{    .Values.replicaCount }}&quot;   replicas7: &quot;{{    .Values.replicaCount       }}&quot;   replicas: &quot;{{    .Values.replicaCount       }}'   replicas: '{{    .Values.replicaCount       }}&quot;   replicas: {{    .Values.replicaCount       }}&quot;   replicas: &quot;{{    .Values.replicaCount       }}    template:     spec:       containers:         - name: {{ .Chart.Name }}           image1: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;           image2: &quot;{{ .Values.image.repository }} {{ .Values.image.tag }}&quot;           image3: &quot;{{ .Values.image.repository }}{{ .Values.image.tag }}&quot;           image4: {{ .Values.image.repository }}{{ .Values.image.tag }}            imagePullPolicy1: {{ .Values.image.pullPolicy }}           imagePullPolicy2: {{ .Values.image.pullPolicyzzz }}           imagePullPolicy3: {{ .Values.image.pullPolicyeeeeeeeeeee }}            terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">spec: #--------------------&gt;&gt; learn spacing &lt;&lt; ------------------------   replicas1: 1   replicas2:   1   replicas3:    1   replicas4: '1'   replicas5: &quot;1&quot;   replicas6: &quot;1&quot;   replicas7: &quot;1&quot;   template:     spec:       containers:         - name: myhelm1           image1: &quot;radial\/busyboxplus:base&quot;           image2: &quot;radial\/busyboxplus base&quot;           image3: &quot;radial\/busyboxplusbase&quot;           image4: radial\/busyboxplusbase            imagePullPolicy1: IfNotPresent           imagePullPolicy2:           imagePullPolicy3:            terminationGracePeriodSeconds: 30<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432\u044b \u0432\u044b\u0443\u0447\u0438\u043b\u0438 \u0437\u0430 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<p>  <\/p>\n<p>\u0414\u0435\u043b\u0430\u0439\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u0430 \u043a\u043e\u0433\u0434\u0430 \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 <code>deployment.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }} spec: #   replicas1: {{ .Values.replicaCount }}    template:     spec:       containers:         - name: {{ .Chart.Name }}           image1: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;            imagePullPolicy-correct: {{ .Values.image.pullPolicy }}            imagePullPolicy1: {{ Values.image.pullPolicy }}           imagePullPolicy2: {{ .Valu.image.pullPolicyzzz }}           imagePullPolicy3: {{ ..Values.image.pullPolicyeeeeeeeeeee }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\  --name test5 --dry-run --debug | grep -vE 'debug]|NAME|REVIS|RELEA|ART:|OKS:|FEST:'<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Error: parse error in &quot;myhelm1\/templates\/deployment.yaml&quot;: template: myhelm1\/templates\/deployment.yaml:19: function &quot;Values&quot; not defined<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0420\u041e\u0427\u0418\u0422\u0410\u0419\u0422\u0415, \u043f\u043e\u0439\u043c\u0438\u0442\u0435 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Error: parse error in &quot;myhelm1\/templates\/deployment.yaml&quot;: template: myhelm1\/templates\/deployment.yaml:21: unexpected . after term &quot;.&quot;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0420\u041e\u0427\u0418\u0422\u0410\u0419\u0422\u0415, \u043f\u043e\u0439\u043c\u0438\u0442\u0435 \u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">Error: render error in &quot;myhelm1\/templates\/deployment.yaml&quot;: template: myhelm1\/templates\/deployment.yaml:20:36: executing &quot;myhelm1\/templates\/deployment.yaml&quot; at  &lt;.Valu.image.pullPoli...&gt;: can't evaluate field image in type interface {}<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\  --name test5 --dry-run --debug | grep -vE 'debug]|NAME|REVIS|RELEA|ART:|OKS:|FEST:'<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }} spec: #   replicas1: {{ .Values.replicaCount }}    template:     spec:       containers:         - name: {{ .Chart.Name }}           image1: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;            imagePullPolicy1: {{ quote .Values.image.pullPolicy }}            imagePullPolicy2: {{ .Values.image.pullPolicy | quote }}            imagePullPolicy3: &quot;{{ .Values.image.pullPolicy }}&quot;            imagePullPolicy4: {{ .Values.image.pullPolicy | upper }}            imagePullPolicy5: {{ .Values.image.pullPolicy | lower }}  {{ $variable := 123 }}            variable: $variable                      variable: {{ $variable }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 3 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043d\u0438\u0437\u0443 \u2014 use those -\u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0445. \u0423\u0434\u0430\u043b\u0438\u0442\u0435 \u0432\u0441\u0435 3 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>Helm \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439, \u043a\u0430\u043a Python, \u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u043f\u043e\u0447\u0442\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">      containers:         - name: myhelm1           image1: &quot;radial\/busyboxplus:base&quot;            imagePullPolicy1: &quot;IfNotPresent&quot;            imagePullPolicy2: &quot;IfNotPresent&quot;            imagePullPolicy3: &quot;IfNotPresent&quot;            imagePullPolicy4: IFNOTPRESENT            imagePullPolicy5: ifnotpresent            variable: $variable           variable: 123     <\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u0443\u043b\u043e\u0432\u043a\u0430. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435, imagePullPolicy \u0441 1 \u043f\u043e 3 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e. \u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438? \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u0434\u043b\u0438\u0432\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<p><code>deployment.yaml<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1 kind: Deployment metadata:   labels:     app.kubernetes.io\/name: {{ include &quot;myhelm1.name&quot; . }}     helm.sh\/chart: {{ include &quot;myhelm1.chart&quot; . }}     app.kubernetes.io\/instance: {{ .Release.Name }} spec: #   replicas1: {{ .Values.replicaCount }}    template:     spec:       containers:         - name: {{ .Chart.Name }}           image1: &quot;{{ .Values.image.repository }}:{{ .Values.image.tag }}&quot;  #          imagePullPolicy1: {{ quote .Values.image.pullPolicy }}           imagePullPolicy1: {{ quote .Values.image.pullPolicy }}  #          imagePullPolicy2: {{ .Values.image.pullPolicy | quote }}           imagePullPolicy2: {{ .Values.image.pullPolicy | quote }}            imagePullPolicy3: &quot; .Values.image.pullPolicy &quot;           imagePullPolicy3: &quot;{{ .Values.image.pullPolicy }}&quot;            imagePullPolicy4:  .Values.image.pullPolicy | upper            imagePullPolicy4: {{ .Values.image.pullPolicy | upper }}            imagePullPolicy5:  .Values.image.pullPolicy | lower            imagePullPolicy5: {{ .Values.image.pullPolicy | lower }}  {{ $variable := 123 }}            variable: $variable                      variable: {{ $variable }}<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\  --name test5 --dry-run --debug | grep -vE 'debug]|NAME|REVIS|RELEA|ART:|OKS:|FEST:'<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">        - name: myhelm1           image1: &quot;radial\/busyboxplus:base&quot;  #          imagePullPolicy1: &quot;IfNotPresent&quot;           imagePullPolicy1: &quot;IfNotPresent&quot;  #          imagePullPolicy2: &quot;IfNotPresent&quot;           imagePullPolicy2: &quot;IfNotPresent&quot;            imagePullPolicy3: &quot; .Values.image.pullPolicy &quot;           imagePullPolicy3: &quot;IfNotPresent&quot;            imagePullPolicy4:  .Values.image.pullPolicy | upper           imagePullPolicy4: IFNOTPRESENT            imagePullPolicy5:  .Values.image.pullPolicy | lower           imagePullPolicy5: ifnotpresent<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043a \u0437\u0430\u043c\u0435\u0442\u043a\u0430\u043c \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442. \u0418\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<\/p>\n<p>  <\/p>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 <code>{{ and }}<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0417\u0430\u0442\u0435\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<p>\u041b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e, \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>{ { and { }<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>{{ and }}<\/code>\u2026 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 1 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<p><code>{ and }<\/code> \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430\u0445 \u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0447\u0442\u0435\u043d\u0438\u044f <code>{{ and }}<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">          imagePullPolicy1: { { quote .Values.image.pullPolicy } }           imagePullPolicy1: {{ quote .Values.image.pullPolicy }}            imagePullPolicy2: { .Values.image.pullPolicy | quote }           imagePullPolicy2: {{ .Values.image.pullPolicy | quote }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">          imagePullPolicy1: { { quote .Values.image.pullPolicy } }           imagePullPolicy1: &quot;IfNotPresent&quot;            imagePullPolicy2: { .Values.image.pullPolicy | quote }           imagePullPolicy2: &quot;IfNotPresent&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">helm install .\\myhelm1\\ --set replicaCount={1,2,3}  --name test5 --dry-run --debug | grep -vE 'debug]|NAME|REVIS|RELEA|ART:|OKS:|FEST:'<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"obuchenie-na-drugih-shablonah\">\u041e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445<\/h3>\n<p>  <\/p>\n<p>\u0412 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Helm \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"https:\/\/github.com\/helm\/charts\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts<\/a> \u0435\u0441\u0442\u044c \u043f\u043e\u0447\u0442\u0438 300 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 Helm.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0443 \u043b\u0443\u0447\u0448\u0438\u0445: \u0443 \u044d\u0442\u0438\u0445 \u043b\u044e\u0434\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432 \u0432\u044b \u0443\u0436\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 80% \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432. (\u041d\u043e \u044d\u0442\u0438 2 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430).<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c 4 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u0447\u0430\u0440\u0442\u043e\u0432 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432:<\/p>\n<p>  <\/p>\n<p>\u2022 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b Helm<br \/>  \u2022 \u044d\u0442\u0438 2 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0440\u043e\u043a\u0430<br \/>  \u2022 300 \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c Helm<br \/>  \u2022 \u043c\u0435\u0442\u043e\u0434 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0432\u0437\u043b\u043e\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u0438\u044f \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 3 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0443\u043f\u0440\u0430\u0436\u043d\u0435\u043d\u0438\u0439<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f Helm \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u0430 \u043d\u0430 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u043d\u0430 \u043d\u0438\u0437\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435.<\/p>\n<p>  <\/p>\n<p>\u0418\u0449\u0438\u0442\u0435 \u0438\u0434\u0435\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c, \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c Helm.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 <a href=\"https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/lamp\/templates\/NOTES.txt\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/lamp\/templates\/NOTES.txt<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435, \u043a\u0430\u043a \u043d\u0430 \u0447\u0430\u0440\u0442\u0435 LAMP \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0439 <code>.Values.ingress.enabled<\/code><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- if .Values.ingress.enabled }}  INGRESS:       Please make sure that you have an ingress controller instance {{ if .Values.ingress.ssl }}and a lego instance       {{- end -}} running       and that you have configured the A Records of {{ template &quot;lamp.domain&quot; . }} and its       subdomains to point to your ingress controllers ip address. {{- else }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0440\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u0438\u0434\u0435\u044e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0447\u0430\u0440\u0442\u044b \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u0438: \u043c\u043d\u043e\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f NOTES.txt \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: <a href=\"https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/lamp\/templates\/NOTES.txt\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/lamp\/templates\/NOTES.txt<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">1. You can now connect to the following services:        {{- if not .Values.ingress.enabled }}       export CHARTIP=$(kubectl get svc {{ template &quot;lamp.fullname&quot; . }} --output=jsonpath={.status.loadBalancer.ingress..ip})       {{- end }}        Main Site:         {{- if .Values.ingress.enabled }}         http{{ if .Values.ingress.ssl }}s{{ end }}:\/\/{{ template &quot;lamp.domain&quot; . }}         {{- else }}         http:\/\/$CHARTIP         {{- end }}       {{- if .Values.phpmyadmin.enabled }}        PHPMyAdmin:       {{- if .Values.ingress.enabled }}         http{{ if .Values.ingress.ssl }}s{{ end }}:\/\/{{ .Values.phpmyadmin.subdomain }}.{{ template &quot;lamp.domain&quot; . }}       {{- else }}         http:\/\/$CHARTIP:{{ .Values.phpmyadmin.port }}       {{- end }}       {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u2014 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0435\u0441\u043b\u0438 \u0447\u0430\u0440\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e: <a href=\"https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/mongodb\/templates\/NOTES.txt\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/mongodb\/templates\/NOTES.txt<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{{- if contains .Values.service.type &quot;LoadBalancer&quot; }} {{- if not .Values.mongodbRootPassword }} -------------------------------------------------------------------------------  WARNING      By specifying &quot;service.type=LoadBalancer&quot; and not specifying &quot;mongodbRootPassword&quot;     you have most  likely exposed the MongoDB service externally without any     authentication mechanism.      For security reasons, we strongly suggest that you switch to &quot;ClusterIP&quot; or     &quot;NodePort&quot;. As alternative, you can also specify a valid password on the     &quot;mongodbRootPassword&quot; parameter.  ------------------------------------------------------------------------------- {{- end }} {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0441 <code>.Values.service.type<\/code> &quot;<code>NodePort<\/code>&quot;, &quot;<code>LoadBalancer<\/code>&quot; \u0438\u043b\u0438 &quot;ClusterIP&quot;: <a href=\"https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/mongodb\/templates\/NOTES.txt\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/blob\/master\/stable\/mongodb\/templates\/NOTES.txt<\/a><\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">To connect to your database from outside the cluster execute the following commands:  {{- if contains &quot;NodePort&quot; .Values.service.type }}      export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath=&quot;{.items[0].status.addresses[0].address}&quot;)     export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath=&quot;{.spec.ports[0].nodePort}&quot; services {{ template &quot;mongodb.fullname&quot; . }})     mongo --host $NODE_IP --port $NODE_PORT {{- if .Values.usePassword }} --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD{{- end }}  {{- else if contains &quot;LoadBalancer&quot; .Values.service.type }}    NOTE: It may take a few minutes for the LoadBalancer IP to be available.         Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template &quot;mongodb.fullname&quot; . }}'      export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template &quot;mongodb.fullname&quot; . }} --template &quot;{{&quot;{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}&quot;}}&quot;)     mongo --host $SERVICE_IP --port {{ .Values.service.nodePort }} {{- if .Values.usePassword }} --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD{{- end }}  {{- else if contains &quot;ClusterIP&quot; .Values.service.type }}      kubectl port-forward --namespace {{ .Release.Namespace }} svc\/{{ template &quot;mongodb.fullname&quot; . }} 27017:27017 &amp;     mongo --host 127.0.0.1 {{- if .Values.usePassword }} --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD{{- end }}  {{- end }}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c \u0432\u044b \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u043b\u0438 \u043c\u0435\u043d\u0435\u0435 3 \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0447\u0430\u0440\u0442\u043e\u0432. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0442\u0430\u043c \u0434\u0435\u043d\u044c (\u0438 \u043e\u043d\u043e \u0442\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442\u2026 \u0435\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0442\u043a\u0438).<\/p>\n<p>  <\/p>\n<h3 id=\"kak-ispolzovat-filesget\">\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c .Files.Get<\/h3>\n<p>  <\/p>\n<p>\u041d\u0430 <a href=\"https:\/\/docs.helm.sh\/chart_template_guide\/\" rel=\"nofollow noopener noreferrer\">https:\/\/docs.helm.sh\/chart_template_guide\/<\/a>\u2026 \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432\u2026 (\u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0430\u0431\u0437\u0430\u0446) \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 Helm \u0435\u0441\u0442\u044c 80 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>.Files.Get.<\/code><br \/>  <a href=\"https:\/\/github.com\/helm\/charts\/search?utf8=%E2%9C%93&amp;q=.Files.Get&amp;type\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/search?utf8=%E2%9C%93&amp;q=.Files.Get&amp;type<\/a>=<br \/>  \u0412 \u043f\u0435\u0440\u0432\u044b\u0445 10 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b 5 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <code>.Files.Get.<\/code><br \/>  \u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e Helm, \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 <a href=\"https:\/\/github.com\/helm\/charts\/tree\/master\/stable\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/helm\/charts\/tree\/master\/stable<\/a>.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/548720\/\"> https:\/\/habr.com\/ru\/post\/548720\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043c\u044b \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u043c, \u043a\u0430\u043a Helm \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 Kubernetes, \u0438 \u0443\u0437\u043d\u0430\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Helm \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u0447\u0430\u0440\u0442\u0430.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-320192","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=320192"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/320192\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=320192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=320192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=320192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}