ci
This commit is contained in:
4
talks-slides-dist/.helmignore
Normal file
4
talks-slides-dist/.helmignore
Normal file
@@ -0,0 +1,4 @@
|
||||
# Patterns to ignore when building packages.
|
||||
.DS_Store
|
||||
.git/
|
||||
*.tgz
|
||||
11
talks-slides-dist/Chart.yaml
Normal file
11
talks-slides-dist/Chart.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v2
|
||||
name: talks-slides-chart
|
||||
description: Helm chart for Talks slides (Nginx + contenu git)
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "0.1.0"
|
||||
keywords:
|
||||
- slides
|
||||
- nginx
|
||||
- reveal
|
||||
maintainers: []
|
||||
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 }}
|
||||
55
talks-slides-dist/values.yaml
Normal file
55
talks-slides-dist/values.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
# Image : git.specificat.io/specificat.io/talks-slides
|
||||
# Avec release "talks-slides" et nameOverride "talks-slides", le fullname reste cohérent.
|
||||
nameOverride: "talks-slides"
|
||||
fullnameOverride: ""
|
||||
|
||||
slides:
|
||||
image:
|
||||
repository: git.specificat.io/specificat.io/talks-slides
|
||||
tag: "latest"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets:
|
||||
- name: prd-gitea-registry-secret
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
resources:
|
||||
limits:
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
|
||||
autoscaling:
|
||||
enabled: false
|
||||
|
||||
nodeSelector: {}
|
||||
affinity: {}
|
||||
tolerations: []
|
||||
podLabels: {}
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: ""
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: slides.specificat.io
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
# TLS : soit manuel (tls.enabled + secretName), soit via cert-manager (certManager.enabled).
|
||||
# Le nom d’hôte vient de hosts[].host (réutilisé pour le bloc tls.hosts).
|
||||
certManager:
|
||||
enabled: false
|
||||
# Ex. letsencrypt-prod — requis si certManager.enabled est true
|
||||
clusterIssuer: ""
|
||||
tls:
|
||||
enabled: false
|
||||
# Secret TLS dans le namespace (créé par cert-manager ou importé à la main).
|
||||
# Vide : suffixe -tls sur le nom complet de la release (ex. talks-slides-tls).
|
||||
secretName: ""
|
||||
Reference in New Issue
Block a user