diff --git a/configmap.yaml b/configmap.yaml new file mode 100644 index 0000000..1c76003 --- /dev/null +++ b/configmap.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: mon-config +data: + MESSAGE_ACCUEIL: "Bienvenue sur mon appli !" + MODE: "developpement" \ No newline at end of file diff --git a/deployment-dev.yaml b/deployment-dev.yaml new file mode 100644 index 0000000..49588cc --- /dev/null +++ b/deployment-dev.yaml @@ -0,0 +1,18 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mon-deployment + namespace: dev +spec: + replicas: 2 + selector: + matchLabels: + app: mon-nginx + template: + metadata: + labels: + app: mon-nginx + spec: + containers: + - name: nginx + image: nginx \ No newline at end of file diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..63bd589 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mon-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: mon-nginx + template: + metadata: + labels: + app: mon-nginx + spec: + containers: + - name: nginx + image: nginx + volumeMounts: + - name: stockage-nginx + mountPath: /usr/share/nginx/html + volumes: + - name: stockage-nginx + persistentVolumeClaim: + claimName: mon-pvc \ No newline at end of file diff --git a/pvc.yaml b/pvc.yaml new file mode 100644 index 0000000..e9eb5fd --- /dev/null +++ b/pvc.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: mon-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi \ No newline at end of file diff --git a/secret.yaml b/secret.yaml new file mode 100644 index 0000000..02f27c3 --- /dev/null +++ b/secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mon-secret +type: Opaque +data: + DB_PASSWORD: bW90ZGVwYXNzZTEyMw== \ No newline at end of file diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..a8789f2 --- /dev/null +++ b/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: mon-service +spec: + selector: + app: mon-nginx + ports: + - port: 80 + targetPort: 80 + type: ClusterIP \ No newline at end of file