Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
1105 Внедрение механизмов обеспечения безопасности цепочки поставки программных проектов
Legacy
scanned-projects
helm
Commits
99f20d82
Unverified
Commit
99f20d82
authored
6 years ago
by
Matthew Fisher
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #4093 from aidtechnology/issue_4092
Migrate 'template' to 'include' in 'helm create'
parents
572743d5
4fbc733a
release-2.17
dev-v2
release-2.10
release-2.11
release-2.12
release-2.13
release-2.14
release-2.15
release-2.16
v2.17.0
v2.17.0-rc.1
v2.16.12
v2.16.11
v2.16.10
v2.16.9
v2.16.8
v2.16.7
v2.16.6
v2.16.5
v2.16.4
v2.16.3
v2.16.2
v2.16.1
v2.16.0
v2.16.0-rc.2
v2.16.0-rc.1
v2.15.2
v2.15.1
v2.15.0
v2.15.0-rc.2
v2.15.0-rc.1
v2.14.3
v2.14.2
v2.14.1
v2.14.0
v2.14.0-rc.2
v2.14.0-rc.1
v2.13.1
v2.13.1-rc.1
v2.13.0
v2.13.0-rc.2
v2.13.0-rc.1
v2.12.3
v2.12.2
v2.12.1
v2.12.0
v2.12.0-rc.2
v2.12.0-rc.1
v2.11.0
v2.11.0-rc.4
v2.11.0-rc.3
v2.11.0-rc.2
v2.11.0-rc.1
v2.10.0
v2.10.0-rc.3
v2.10.0-rc.2
v2.10.0-rc.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/chartutil/create.go
+15
-15
pkg/chartutil/create.go
with
15 additions
and
15 deletions
+15
-15
pkg/chartutil/create.go
+
15
−
15
View file @
99f20d82
...
@@ -129,8 +129,8 @@ kind: Ingress
...
@@ -129,8 +129,8 @@ kind: Ingress
metadata:
metadata:
name: {{ $fullName }}
name: {{ $fullName }}
labels:
labels:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
chart: {{
templat
e "<CHARTNAME>.chart" . }}
chart: {{
includ
e "<CHARTNAME>.chart" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
{{- with .Values.ingress.annotations }}
...
@@ -164,22 +164,22 @@ spec:
...
@@ -164,22 +164,22 @@ spec:
const
defaultDeployment
=
`apiVersion: apps/v1beta2
const
defaultDeployment
=
`apiVersion: apps/v1beta2
kind: Deployment
kind: Deployment
metadata:
metadata:
name: {{
templat
e "<CHARTNAME>.fullname" . }}
name: {{
includ
e "<CHARTNAME>.fullname" . }}
labels:
labels:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
chart: {{
templat
e "<CHARTNAME>.chart" . }}
chart: {{
includ
e "<CHARTNAME>.chart" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
heritage: {{ .Release.Service }}
spec:
spec:
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.replicaCount }}
selector:
selector:
matchLabels:
matchLabels:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
template:
template:
metadata:
metadata:
labels:
labels:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
spec:
spec:
containers:
containers:
...
@@ -217,10 +217,10 @@ spec:
...
@@ -217,10 +217,10 @@ spec:
const
defaultService
=
`apiVersion: v1
const
defaultService
=
`apiVersion: v1
kind: Service
kind: Service
metadata:
metadata:
name: {{
templat
e "<CHARTNAME>.fullname" . }}
name: {{
includ
e "<CHARTNAME>.fullname" . }}
labels:
labels:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
chart: {{
templat
e "<CHARTNAME>.chart" . }}
chart: {{
includ
e "<CHARTNAME>.chart" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
heritage: {{ .Release.Service }}
spec:
spec:
...
@@ -231,7 +231,7 @@ spec:
...
@@ -231,7 +231,7 @@ spec:
protocol: TCP
protocol: TCP
name: http
name: http
selector:
selector:
app: {{
templat
e "<CHARTNAME>.name" . }}
app: {{
includ
e "<CHARTNAME>.name" . }}
release: {{ .Release.Name }}
release: {{ .Release.Name }}
`
`
...
@@ -241,16 +241,16 @@ const defaultNotes = `1. Get the application URL by running these commands:
...
@@ -241,16 +241,16 @@ const defaultNotes = `1. Get the application URL by running these commands:
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{
templat
e "<CHARTNAME>.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{
includ
e "<CHARTNAME>.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{
templat
e "<CHARTNAME>.fullname" . }}'
You can watch the status of by running 'kubectl get svc -w {{
includ
e "<CHARTNAME>.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
templat
e "<CHARTNAME>.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{
includ
e "<CHARTNAME>.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{
templat
e "<CHARTNAME>.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{
includ
e "<CHARTNAME>.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
kubectl port-forward $POD_NAME 8080:80
{{- end }}
{{- end }}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets