Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
uploadDemo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
demo
uploadDemo
Commits
1a5a69a1
Commit
1a5a69a1
authored
Jan 12, 2019
by
卢浩元
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Chart Name lower2
parent
f990bba4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
21 deletions
+18
-21
NOTES.txt
uploadDemo/templates/NOTES.txt
+4
-4
_helpers.tpl
uploadDemo/templates/_helpers.tpl
+3
-3
deployment.yaml
uploadDemo/templates/deployment.yaml
+4
-7
ingress.yaml
uploadDemo/templates/ingress.yaml
+3
-3
service.yaml
uploadDemo/templates/service.yaml
+4
-4
No files found.
uploadDemo/templates/NOTES.txt
View file @
1a5a69a1
...
...
@@ -4,16 +4,16 @@
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "upload
D
emo.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "upload
d
emo.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
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 {{ include "upload
D
emo.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "upload
D
emo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
You can watch the status of by running 'kubectl get svc -w {{ include "upload
d
emo.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "upload
d
emo.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "upload
D
emo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "upload
d
emo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
uploadDemo/templates/_helpers.tpl
View file @
1a5a69a1
...
...
@@ -2,7 +2,7 @@
{
{
/*
Expand
the
name
of
the
chart
.
*/
}
}
{{- define "upload
D
emo.name" -}}
{{- define "upload
d
emo.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
...
...
@@ -11,7 +11,7 @@ Create a default fully qualified app name.
We
truncate
at
63
chars
because
some
Kubernetes
name
fields
are
limited
to
this
(
by
the
DNS
naming
spec
).
If
release
name
contains
chart
name
it
will
be
used
as
a
full
name
.
*/
}
}
{{- define "upload
D
emo.fullname" -}}
{{- define "upload
d
emo.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
...
...
@@ -27,6 +27,6 @@ If release name contains chart name it will be used as a full name.
{
{
/*
Create
chart
name
and
version
as
used
by
the
chart
label
.
*/
}
}
{{- define "upload
D
emo.chart" -}}
{{- define "upload
d
emo.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
uploadDemo/templates/deployment.yaml
View file @
1a5a69a1
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
{{
include "upload
D
emo.fullname" .
}}
name
:
{{
include "upload
d
emo.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "uploadDemo.name" .
}}
helm.sh/chart
:
{{
include "uploadDemo.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
app.kubernetes.io/name
:
{{
include "uploaddemo.name" .
}}
spec
:
replicas
:
{{
.Values.replicaCount
}}
selector
:
matchLabels
:
app.kubernetes.io/name
:
{{
include "upload
D
emo.name" .
}}
app.kubernetes.io/name
:
{{
include "upload
d
emo.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
template
:
metadata
:
labels
:
app.kubernetes.io/name
:
{{
include "upload
D
emo.name" .
}}
app.kubernetes.io/name
:
{{
include "upload
d
emo.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
spec
:
containers
:
...
...
uploadDemo/templates/ingress.yaml
View file @
1a5a69a1
{{
- if .Values.ingress.enabled -
}}
{{
- $fullName
:
= include "upload
D
emo.fullname" . -
}}
{{
- $fullName
:
= include "upload
d
emo.fullname" . -
}}
{{
- $ingressPath
:
= .Values.ingress.path -
}}
apiVersion
:
extensions/v1beta1
kind
:
Ingress
metadata
:
name
:
{{
$fullName
}}
labels
:
app.kubernetes.io/name
:
{{
include "upload
D
emo.name" .
}}
helm.sh/chart
:
{{
include "upload
D
emo.chart" .
}}
app.kubernetes.io/name
:
{{
include "upload
d
emo.name" .
}}
helm.sh/chart
:
{{
include "upload
d
emo.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
{{
- with .Values.ingress.annotations
}}
...
...
uploadDemo/templates/service.yaml
View file @
1a5a69a1
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
{{
include "upload
D
emo.fullname" .
}}
name
:
{{
include "upload
d
emo.fullname" .
}}
labels
:
app.kubernetes.io/name
:
{{
include "upload
D
emo.name" .
}}
helm.sh/chart
:
{{
include "upload
D
emo.chart" .
}}
app.kubernetes.io/name
:
{{
include "upload
d
emo.name" .
}}
helm.sh/chart
:
{{
include "upload
d
emo.chart" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/managed-by
:
{{
.Release.Service
}}
spec
:
...
...
@@ -15,5 +15,5 @@ spec:
protocol
:
TCP
name
:
http
selector
:
app.kubernetes.io/name
:
{{
include "upload
D
emo.name" .
}}
app.kubernetes.io/name
:
{{
include "upload
d
emo.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment