Skip to content
Snippets Groups Projects
Commit 447c6d8c authored by Loïc Hervé's avatar Loïc Hervé
Browse files

new boilerplate

parent da9011ce
Branches
No related tags found
No related merge requests found
dist/
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ch3-gitops.iml" filepath="$PROJECT_DIR$/.idea/ch3-gitops.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
{{- if .Values.front.enabled }}
{{- $apiUrl := "" }}
{{- if .Values.api.ingress.tls.enabled }}
{{- if .Values.api.ingress.tlsEnabled }}
{{- $apiUrl = printf "https://%s" .Values.api.ingress.host | quote }}
{{- else }}
{{- $apiUrl = printf "http://%s" .Values.api.ingress.host | quote }}
......@@ -8,7 +8,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: front-config
name: {{ .Values.name }}-front
data:
API_URL: {{ $apiUrl }}
{{- end }}
\ No newline at end of file
......@@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: front
name: {{ .Values.name }}-front
labels:
app: front
spec:
......@@ -16,19 +16,49 @@ spec:
app: front
spec:
imagePullSecrets:
- name: auth-master3-registry
- 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: 80
- containerPort: 8080
resources:
requests:
memory: "100Mi"
memory: "32M"
cpu: "0.1"
limits:
memory: "300Mi"
cpu: "0.5"
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:
......
{{- if .Values.front.enabled }}
{{- if .Values.front.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
{{- if .Values.front.ingress.tls.enabled }}
cert-manager.io/cluster-issuer: letsencrypt-prod
{{- end }}
name: front
name: {{ .Values.name }}-front
spec:
rules:
- host: {{ .Values.front.ingress.host }}
......@@ -16,16 +12,15 @@ spec:
paths:
- backend:
service:
name: {{ .Values.front.serviceName }}
name: {{ .Values.name }}-front
port:
number: {{ .Values.front.servicePort }}
number: 80
path: /
pathType: Prefix
{{- if .Values.front.ingress.tls.enabled }}
{{- if .Values.front.ingress.tlsEnabled }}
tls:
- hosts:
- {{ .Values.front.ingress.host }}
secretName: front-tls
{{- end }}
secretName: app-wildcard
{{- end }}
{{- end }}
\ No newline at end of file
......@@ -2,12 +2,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.front.serviceName }}
name: {{ .Values.name }}-front
spec:
selector:
app: front
ports:
- protocol: TCP
port: {{ .Values.front.servicePort }}
targetPort: 80
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.
## The global properties are used to configure multiple charts at once.
## Extended documentation at doc/charts/globals.md
# We have only done front for now
name: cdb
api:
enabled: true
image:
repository: registry.gitlab.com/takima-school/images/cdb/api
tag: latest
replicaCount: 1
ingress:
tls:
enable: false
tlsEnabled: false
host: api.to-replace.takima.school
front:
enabled: true
image:
repository: registry.master3.takima.io/guide/kubernetes-resources/front
repository: registry.gitlab.com/takima-school/images/cdb/www
tag: latest
serviceName: front
servicePort: 80
replicaCount: 3
replicaCount: 1
ingress:
enabled: true
tlsEnabled: false
host: www.to-replace.takima.school
\ No newline at end of file
tls:
enabled: false
db:
enabled: true
image:
repository: registry.master3.takima.io/guide/kubernetes-resources/db
tag: latest
name: "cdb-db"
path: "/var/lib/postgresql/data/pgdata"
serviceName: db
servicePort: 5432
pvc:
storageClass: gp2
size: 512Mi
credentials:
user: cdb
pwd: cdb123
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment