Skip to content
Snippets Groups Projects
Commit 8f90740a authored by Aurélien BOURLIATOUX's avatar Aurélien BOURLIATOUX :speech_balloon:
Browse files

Init Helm resources

parent 54d20eff
No related branches found
No related tags found
No related merge requests found
dist/
\ No newline at end of file
apiVersion: v2
name: cdb
description: All applications in the cdb ecosystem
# 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.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
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. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: snapshot
maintainers:
- name: takiformation
email: takiformation@takima.school
{{- if .Values.front.enabled }}
{{- $apiUrl := "" }}
{{- if .Values.api.ingress.tlsEnabled }}
{{- $apiUrl = printf "https://%s" .Values.api.ingress.host | quote }}
{{- else }}
{{- $apiUrl = printf "http://%s" .Values.api.ingress.host | quote }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.name }}-front
data:
API_URL: {{ $apiUrl }}
{{- end }}
\ No newline at end of file
{{- if .Values.front.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.name }}-front
labels:
app: front
spec:
replicas: {{ .Values.front.replicaCount }}
selector:
matchLabels:
app: front
template:
metadata:
labels:
app: front
spec:
imagePullSecrets:
- name: takima-school-registry
securityContext:
runAsUser: 101
runAsGroup: 101
containers:
- name: front
image: {{ .Values.front.image.repository }}:{{ .Values.front.image.tag }}
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
requests:
memory: "32M"
cpu: "0.1"
limits:
memory: "128M"
cpu: "1"
startupProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 3
periodSeconds: 1
successThreshold: 1
failureThreshold: 5
livenessProbe:
httpGet:
path: /health
port: 8080
periodSeconds: 3
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /health
port: 8080
periodSeconds: 1
successThreshold: 1
failureThreshold: 3
securityContext:
allowPrivilegeEscalation: false
env:
- name: API_URL
valueFrom:
configMapKeyRef:
name: {{ .Values.name }}-front
key: API_URL
{{- end }}
\ No newline at end of file
{{- if .Values.front.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: {{ .Values.name }}-front
spec:
rules:
- host: {{ .Values.front.ingress.host }}
http:
paths:
- backend:
service:
name: {{ .Values.name }}-front
port:
number: 80
path: /
pathType: Prefix
{{- if .Values.front.ingress.tlsEnabled }}
tls:
- hosts:
- {{ .Values.front.ingress.host }}
secretName: app-wildcard
{{- end }}
{{- end }}
\ No newline at end of file
{{- if .Values.front.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.name }}-front
spec:
selector:
app: front
ports:
- protocol: TCP
port: 80
targetPort: 8080
{{- end }}
\ No newline at end of file
# Default values for CDB app.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
# We have only done front for now
name: cdb
api:
ingress:
tlsEnabled: false
host: api.to-replace.takima.school
front:
enabled: true
image:
repository: registry.gitlab.com/takima-school/images/cdb/www
tag: latest
replicaCount: 1
ingress:
tlsEnabled: false
host: www.to-replace.takima.school
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment