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
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
ccd67f2f
Commit
ccd67f2f
authored
5 years ago
by
rjshrjndrn
Browse files
Options
Download
Patches
Plain Diff
Issue #000 feat: helm chart for 3 node private-ingress
parent
eb11ffee
3node
3node_bak_new
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
3node/helm-charts/nginx-private-ingress/.helmignore
+22
-0
3node/helm-charts/nginx-private-ingress/.helmignore
3node/helm-charts/nginx-private-ingress/Chart.yaml
+21
-0
3node/helm-charts/nginx-private-ingress/Chart.yaml
3node/helm-charts/nginx-private-ingress/templates/NOTES.txt
+21
-0
3node/helm-charts/nginx-private-ingress/templates/NOTES.txt
3node/helm-charts/nginx-private-ingress/templates/_helpers.tpl
+63
-0
.../helm-charts/nginx-private-ingress/templates/_helpers.tpl
3node/helm-charts/nginx-private-ingress/templates/configMap.yaml
+24
-0
...elm-charts/nginx-private-ingress/templates/configMap.yaml
3node/helm-charts/nginx-private-ingress/templates/deployment.yaml
+45
-0
...lm-charts/nginx-private-ingress/templates/deployment.yaml
3node/helm-charts/nginx-private-ingress/templates/service.yaml
+15
-0
.../helm-charts/nginx-private-ingress/templates/service.yaml
3node/helm-charts/nginx-private-ingress/templates/serviceaccount.yaml
+8
-0
...harts/nginx-private-ingress/templates/serviceaccount.yaml
with
219 additions
and
0 deletions
+219
-0
3node/helm-charts/nginx-private-ingress/.helmignore
0 → 100644
+
22
−
0
View file @
ccd67f2f
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/Chart.yaml
0 → 100644
+
21
−
0
View file @
ccd67f2f
apiVersion
:
v2
name
:
private-ingress
description
:
A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type
:
application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version
:
0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion
:
1.16.0
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/NOTES.txt
0 → 100644
+
21
−
0
View file @
ccd67f2f
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "private-ingress.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 --namespace {{ .Release.Namespace }} svc -w {{ include "private-ingress.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "private-ingress.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
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 "private-ingress.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 }}
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/_helpers.tpl
0 → 100644
+
63
−
0
View file @
ccd67f2f
{{
/*
vim
:
set
filetype
=
mustache
:
*/
}}
{
{
/*
Expand
the
name
of
the
chart
.
*/
}
}
{{- define "private-ingress.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{
{
/*
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 "private-ingress.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{
{
/*
Create
chart
name
and
version
as
used
by
the
chart
label
.
*/
}
}
{{- define "private-ingress.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{
{
/*
Common
labels
*/
}
}
{{- define "private-ingress.labels" -}}
helm.sh/chart: {{ include "private-ingress.chart" . }}
{{ include "private-ingress.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{
{
/*
Selector
labels
*/
}
}
{{- define "private-ingress.selectorLabels" -}}
app.kubernetes.io/name: {{ include "private-ingress.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{
{
/*
Create
the
name
of
the
service
account
to
use
*/
}
}
{{- define "private-ingress.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "private-ingress.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/configMap.yaml
0 → 100644
+
24
−
0
View file @
ccd67f2f
apiVersion
:
v1
data
:
default.conf
:
|
server {
listen 80;
listen [::]:80;
location /learner/ {
rewrite ^/learner/(.*) /$1 break;
proxy_pass http://learner;
}
location /api/ {
rewrite ^/api/(.*) /$1 break;
proxy_pass http://apimanager-service:8000;
}
location /admin-api/ {
rewrite ^/admin-api/(.*) /$1 break;
proxy_pass http://apimanager-service:8001;
}
}
kind
:
ConfigMap
metadata
:
creationTimestamp
:
null
name
:
private-ingress.conf
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/deployment.yaml
0 → 100644
+
45
−
0
View file @
ccd67f2f
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
private-ingress
namespace
:
dev
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
private-ingress
template
:
metadata
:
labels
:
app
:
private-ingress
volumes
:
-
name
:
config-volume
configMap
:
name
:
private-ingress.conf
spec
:
containers
:
-
name
:
name
image
:
nginx
resources
:
requests
:
cpu
:
100m
memory
:
200Mi
ports
:
-
containerPort
:
80
volumeMounts
:
-
mountPath
:
/etc/nginx/conf.d/
name
:
config-volume
readOnly
:
true
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
private-ingress
namespace
:
dev
spec
:
type
:
LoadBalancer
ports
:
-
port
:
80
targetPort
:
80
selector
:
app
:
private-ingress
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/service.yaml
0 → 100644
+
15
−
0
View file @
ccd67f2f
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
{{
include "private-ingress.fullname" .
}}
labels
:
{{
- include "private-ingress.labels" . | nindent 4
}}
spec
:
type
:
{{
.Values.service.type
}}
ports
:
-
port
:
{{
.Values.service.port
}}
targetPort
:
http
protocol
:
TCP
name
:
http
selector
:
{{
- include "private-ingress.selectorLabels" . | nindent 4
}}
This diff is collapsed.
Click to expand it.
3node/helm-charts/nginx-private-ingress/templates/serviceaccount.yaml
0 → 100644
+
8
−
0
View file @
ccd67f2f
{{
- if .Values.serviceAccount.create -
}}
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
name
:
{{
include "private-ingress.serviceAccountName" .
}}
labels
:
{{
include "private-ingress.labels" . | nindent 4
}}
{{
- 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