diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/Chart.yaml b/Chart.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/Chart.yaml rename to Chart.yaml diff --git a/dist/cdb/templates/front-config.yaml b/dist/cdb/templates/front-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b209efd1f00822209627207d6a03fe2ce3512176 --- /dev/null +++ b/dist/cdb/templates/front-config.yaml @@ -0,0 +1,8 @@ +--- +# Source: cdb/templates/front-config.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: cdb-front +data: + API_URL: "http://api.esouvannavong.takima.school" diff --git a/dist/cdb/templates/front-deployment.yaml b/dist/cdb/templates/front-deployment.yaml new file mode 100644 index 0000000000000000000000000000000000000000..86edd8affbbed64f30f3af9c19ff7b7b878c9a51 --- /dev/null +++ b/dist/cdb/templates/front-deployment.yaml @@ -0,0 +1,68 @@ +--- +# Source: cdb/templates/front-deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cdb-front + labels: + app: front +spec: + replicas: 1 + selector: + matchLabels: + app: front + template: + metadata: + labels: + app: front + spec: + imagePullSecrets: + - name: takima-school-registry + securityContext: + runAsUser: 101 + runAsGroup: 101 + + containers: + - name: front + image: registry.gitlab.com/takima-school/images/cdb/www:latest + 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: cdb-front + key: API_URL diff --git a/dist/cdb/templates/front-ingress.yaml b/dist/cdb/templates/front-ingress.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f77a584b6e53cb9902874428c1fe60e8b4056e16 --- /dev/null +++ b/dist/cdb/templates/front-ingress.yaml @@ -0,0 +1,19 @@ +--- +# Source: cdb/templates/front-ingress.yaml +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: cdb-front +spec: + ingressClassName: nginx + rules: + - host: www.esouvannavong.takima.school + http: + paths: + - backend: + service: + name: cdb-front + port: + number: 80 + path: / + pathType: Prefix diff --git a/dist/cdb/templates/front-service.yaml b/dist/cdb/templates/front-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..eb70755e5888dfd97bde580e3c0c1443f4ce9686 --- /dev/null +++ b/dist/cdb/templates/front-service.yaml @@ -0,0 +1,13 @@ +--- +# Source: cdb/templates/front-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: cdb-front +spec: + selector: + app: front + ports: + - protocol: TCP + port: 80 + targetPort: 8080 diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/.gitignore b/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/.gitignore deleted file mode 100644 index 77738287f0e619e47739347e957fda11878d3fff..0000000000000000000000000000000000000000 --- a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/.gitignore +++ /dev/null @@ -1 +0,0 @@ -dist/ \ No newline at end of file diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-config.yaml b/templates/front-config.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-config.yaml rename to templates/front-config.yaml diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-deployment.yaml b/templates/front-deployment.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-deployment.yaml rename to templates/front-deployment.yaml diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-ingress.yaml b/templates/front-ingress.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-ingress.yaml rename to templates/front-ingress.yaml diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-service.yaml b/templates/front-service.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/templates/front-service.yaml rename to templates/front-service.yaml diff --git a/k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/values.yaml b/values.yaml similarity index 100% rename from k8s-trainees-main-boilerplate-day-3-step-1/boilerplate/day-3/step-1/values.yaml rename to values.yaml