ci
This commit is contained in:
2
talks-slides-dist/templates/NOTES.txt
Normal file
2
talks-slides-dist/templates/NOTES.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Déploiement Talks slides (Nginx).
|
||||
Vérifiez l’Ingress et le DNS pour l’URL publique.
|
||||
41
talks-slides-dist/templates/_helpers.tpl
Normal file
41
talks-slides-dist/templates/_helpers.tpl
Normal file
@@ -0,0 +1,41 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "talks-slides.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
*/}}
|
||||
{{- define "talks-slides.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 }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "talks-slides.labels" -}}
|
||||
helm.sh/chart: {{ include "talks-slides.name" . }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
app.kubernetes.io/name: {{ include "talks-slides.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "talks-slides.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "talks-slides.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
67
talks-slides-dist/templates/deployment.yaml
Normal file
67
talks-slides-dist/templates/deployment.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "talks-slides.fullname" . }}
|
||||
labels:
|
||||
{{- include "talks-slides.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.slides.autoscaling.enabled }}
|
||||
replicas: {{ .Values.slides.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "talks-slides.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "talks-slides.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.slides.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.slides.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: nginx
|
||||
image: "{{ .Values.slides.image.repository }}:{{ .Values.slides.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.slides.image.pullPolicy }}
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: false
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
{{- toYaml .Values.slides.resources | nindent 12 }}
|
||||
{{- with .Values.slides.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.slides.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.slides.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
45
talks-slides-dist/templates/ingress.yaml
Normal file
45
talks-slides-dist/templates/ingress.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
{{- if .Values.slides.ingress.enabled -}}
|
||||
{{- $tlsOn := or .Values.slides.ingress.tls.enabled .Values.slides.ingress.certManager.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "talks-slides.fullname" . }}
|
||||
labels:
|
||||
{{- include "talks-slides.labels" . | nindent 4 }}
|
||||
{{- if or .Values.slides.ingress.certManager.enabled .Values.slides.ingress.annotations }}
|
||||
annotations:
|
||||
{{- if .Values.slides.ingress.certManager.enabled }}
|
||||
cert-manager.io/cluster-issuer: {{ .Values.slides.ingress.certManager.clusterIssuer | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.slides.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.slides.ingress.className }}
|
||||
ingressClassName: {{ .Values.slides.ingress.className }}
|
||||
{{- end }}
|
||||
{{- if $tlsOn }}
|
||||
tls:
|
||||
- hosts:
|
||||
{{- range .Values.slides.ingress.hosts }}
|
||||
- {{ .host | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .Values.slides.ingress.tls.secretName | default (printf "%s-tls" (include "talks-slides.fullname" .)) }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.slides.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "talks-slides.fullname" $ }}
|
||||
port:
|
||||
number: {{ $.Values.slides.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
15
talks-slides-dist/templates/service.yaml
Normal file
15
talks-slides-dist/templates/service.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "talks-slides.fullname" . }}
|
||||
labels:
|
||||
{{- include "talks-slides.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.slides.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.slides.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "talks-slides.selectorLabels" . | nindent 4 }}
|
||||
Reference in New Issue
Block a user