From feab542be5d5487ce87fd6aa1eb6907b13981002 Mon Sep 17 00:00:00 2001 From: Bensidhoum Wissem <wbensidhoum@takima.fr> Date: Wed, 2 Aug 2023 16:13:19 +0200 Subject: [PATCH] delete dist doc --- .gitignore | 1 + dist/cdb/templates/api-config.yaml | 8 --- dist/cdb/templates/api-deployment.yaml | 68 ------------------------ dist/cdb/templates/api-ingress.yaml | 20 ------- dist/cdb/templates/api-service.yaml | 13 ----- dist/cdb/templates/front-config.yaml | 8 --- dist/cdb/templates/front-deployment.yaml | 68 ------------------------ dist/cdb/templates/front-ingress.yaml | 20 ------- dist/cdb/templates/front-service.yaml | 13 ----- dist/cdb/templates/pg-config.yaml | 9 ---- dist/cdb/templates/pg-credentials.yaml | 10 ---- dist/cdb/templates/pg-deployment.yaml | 58 -------------------- dist/cdb/templates/pg-service.yaml | 13 ----- 13 files changed, 1 insertion(+), 308 deletions(-) create mode 100644 .gitignore delete mode 100644 dist/cdb/templates/api-config.yaml delete mode 100644 dist/cdb/templates/api-deployment.yaml delete mode 100644 dist/cdb/templates/api-ingress.yaml delete mode 100644 dist/cdb/templates/api-service.yaml delete mode 100644 dist/cdb/templates/front-config.yaml delete mode 100644 dist/cdb/templates/front-deployment.yaml delete mode 100644 dist/cdb/templates/front-ingress.yaml delete mode 100644 dist/cdb/templates/front-service.yaml delete mode 100644 dist/cdb/templates/pg-config.yaml delete mode 100644 dist/cdb/templates/pg-credentials.yaml delete mode 100644 dist/cdb/templates/pg-deployment.yaml delete mode 100644 dist/cdb/templates/pg-service.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7773828 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ \ No newline at end of file diff --git a/dist/cdb/templates/api-config.yaml b/dist/cdb/templates/api-config.yaml deleted file mode 100644 index 3d39595..0000000 --- a/dist/cdb/templates/api-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Source: cdb/templates/api-config.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: api-config -data: - db-endpoint: pg-service:5432 diff --git a/dist/cdb/templates/api-deployment.yaml b/dist/cdb/templates/api-deployment.yaml deleted file mode 100644 index 2cafec3..0000000 --- a/dist/cdb/templates/api-deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# Source: cdb/templates/api-deployment.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: api - labels: - app: api -spec: - #replicas: 1 - selector: - matchLabels: - app: api - template: - metadata: - labels: - app: api - spec: - securityContext: - runAsUser: 1001 - runAsGroup: 1001 - containers: - - name: api - image: registry.gitlab.com/takima-school/images/cdb/api:latest - ports: - - containerPort: 80 - env: - - name: DB_ENDPOINT - valueFrom: - configMapKeyRef: - name: api-config - key: db-endpoint - - name: POSTGRES_DB - valueFrom: - configMapKeyRef: - name: pg-config - key: db-name - - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: pg-credentials - key: user - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: pg-credentials - key: password - resources: - limits: - memory: "256Mi" - cpu: "1" - requests: - memory: "192Mi" - cpu: "100m" - livenessProbe: - httpGet: - path: /actuator/health/liveness # Endpoint à vérifier pour la sonde - port: 8080 # Port sur lequel le conteneur écoute - initialDelaySeconds: 30 # Délai avant de démarrer la première sonde après le démarrage du conteneur - periodSeconds: 10 # Période entre chaque sondage - readinessProbe: - httpGet: - path: /actuator/health/readiness - port: 8080 - initialDelaySeconds: 10 - periodSeconds: 5 - imagePullSecrets: - - name: takima-school-registry diff --git a/dist/cdb/templates/api-ingress.yaml b/dist/cdb/templates/api-ingress.yaml deleted file mode 100644 index e0065bb..0000000 --- a/dist/cdb/templates/api-ingress.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: cdb/templates/api-ingress.yaml -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: nginx - name: api-ingress -spec: - rules: - - host: api.wbensidhoum.takima.school - http: - paths: - - backend: - service: - name: api-service - port: - number: 80 - path: / - pathType: Prefix diff --git a/dist/cdb/templates/api-service.yaml b/dist/cdb/templates/api-service.yaml deleted file mode 100644 index 1cc3a89..0000000 --- a/dist/cdb/templates/api-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: cdb/templates/api-service.yaml -apiVersion: v1 -kind: Service -metadata: - name: api-service -spec: - selector: - app: api - ports: - - protocol: TCP - port: 80 - targetPort: 8080 diff --git a/dist/cdb/templates/front-config.yaml b/dist/cdb/templates/front-config.yaml deleted file mode 100644 index 8e19226..0000000 --- a/dist/cdb/templates/front-config.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Source: cdb/templates/front-config.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: cdb-front -data: - API_URL: "http://api.wbensidhoum.takima.school" diff --git a/dist/cdb/templates/front-deployment.yaml b/dist/cdb/templates/front-deployment.yaml deleted file mode 100644 index 86edd8a..0000000 --- a/dist/cdb/templates/front-deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ ---- -# 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 deleted file mode 100644 index edd7da1..0000000 --- a/dist/cdb/templates/front-ingress.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# Source: cdb/templates/front-ingress.yaml -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - annotations: - kubernetes.io/ingress.class: nginx - name: cdb-front -spec: - rules: - - host: www.wbensidhoum.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 deleted file mode 100644 index eb70755..0000000 --- a/dist/cdb/templates/front-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# 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/dist/cdb/templates/pg-config.yaml b/dist/cdb/templates/pg-config.yaml deleted file mode 100644 index d43b488..0000000 --- a/dist/cdb/templates/pg-config.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# Source: cdb/templates/pg-config.yaml -apiVersion: v1 -kind: ConfigMap -metadata: - name: pg-config -data: - db-name: cdb-db - db_path: "/var/lib/postgresql/data/pgdata" diff --git a/dist/cdb/templates/pg-credentials.yaml b/dist/cdb/templates/pg-credentials.yaml deleted file mode 100644 index 58be43e..0000000 --- a/dist/cdb/templates/pg-credentials.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# Source: cdb/templates/pg-credentials.yaml -apiVersion: v1 -kind: Secret -metadata: - name: pg-credentials -type: Opaque -data: - user: d2lzc2Vt - password: d2lzc2Vt diff --git a/dist/cdb/templates/pg-deployment.yaml b/dist/cdb/templates/pg-deployment.yaml deleted file mode 100644 index d73cee2..0000000 --- a/dist/cdb/templates/pg-deployment.yaml +++ /dev/null @@ -1,58 +0,0 @@ ---- -# Source: cdb/templates/pg-deployment.yaml -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: pg - labels: - app: pg -spec: - volumeClaimTemplates: - - metadata: - name: pg-data - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: 1Gi - replicas: 3 - serviceName: pg-service - selector: - matchLabels: - app: pg - template: - metadata: - labels: - app: pg - spec: - containers: - - name: pg - image: registry.takima.io/school/proxy/postgres:latest - ports: - - containerPort: 5432 - env: - - name: POSTGRES_DB - valueFrom: - configMapKeyRef: - name: pg-config - key: db-name - - name: POSTGRES_USER - valueFrom: - secretKeyRef: - name: pg-credentials - key: user - - name: POSTGRES_PASSWORD - valueFrom: - secretKeyRef: - name: pg-credentials - key: password - - name: PGDATA - valueFrom: - configMapKeyRef: - name: pg-config # Nom du configmap - key: db_path # nom de la clef dans le configMap contenant path ou installer la db dans le volume persistant - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: pg-data - imagePullSecrets: - - name: takima-school-registry diff --git a/dist/cdb/templates/pg-service.yaml b/dist/cdb/templates/pg-service.yaml deleted file mode 100644 index b0067de..0000000 --- a/dist/cdb/templates/pg-service.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -# Source: cdb/templates/pg-service.yaml -apiVersion: v1 -kind: Service -metadata: - name: pg-service -spec: - selector: - app: pg - ports: - - port: 5432 - targetPort: 5432 - protocol: TCP -- GitLab