From f1decc1dd4ed99fc3d448a4be8730f7a93756238 Mon Sep 17 00:00:00 2001 From: Justine Pelletreau Date: Thu, 16 Jun 2022 15:11:26 +0200 Subject: [PATCH] First --- sqnotes/ingr.yml | 19 ++++++++++++ sqnotes/notes-daemonset.yaml | 38 ++++++++++++++++++++++++ sqnotes/notes-persistentvolumeclaim.yaml | 13 ++++++++ sqnotes/notes-service.yaml | 19 ++++++++++++ sqnotes/vol.yml | 15 ++++++++++ 5 files changed, 104 insertions(+) create mode 100644 sqnotes/ingr.yml create mode 100644 sqnotes/notes-daemonset.yaml create mode 100644 sqnotes/notes-persistentvolumeclaim.yaml create mode 100644 sqnotes/notes-service.yaml create mode 100644 sqnotes/vol.yml diff --git a/sqnotes/ingr.yml b/sqnotes/ingr.yml new file mode 100644 index 0000000..a5b806c --- /dev/null +++ b/sqnotes/ingr.yml @@ -0,0 +1,19 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: notes-ingr +spec: + ingressClassName: nginx + rules: + #- host: test.squi.fr + - host: notes.squi.fr + http: + paths: + - pathType: Prefix + backend: + service: + name: notes + port: + number: 8080 + path: / + diff --git a/sqnotes/notes-daemonset.yaml b/sqnotes/notes-daemonset.yaml new file mode 100644 index 0000000..d3f0d7c --- /dev/null +++ b/sqnotes/notes-daemonset.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + annotations: + kompose.cmd: kompose convert -f squinotes.yml + kompose.version: 1.26.1 (a9d05d509) + labels: + io.kompose.service: notes + name: notes +spec: + selector: + matchLabels: + io.kompose.service: notes + template: + metadata: + labels: + io.kompose.service: notes + spec: + containers: + - image: squi/sqnotes:1.0 + name: notes + ports: + - containerPort: 8080 + resources: {} + volumeMounts: + - mountPath: /app/data + name: notes + restartPolicy: Always + volumes: + - name: notes + persistentVolumeClaim: + claimName: sqnotes-data + updateStrategy: {} +status: + currentNumberScheduled: 0 + desiredNumberScheduled: 0 + numberMisscheduled: 0 + numberReady: 0 diff --git a/sqnotes/notes-persistentvolumeclaim.yaml b/sqnotes/notes-persistentvolumeclaim.yaml new file mode 100644 index 0000000..8539daf --- /dev/null +++ b/sqnotes/notes-persistentvolumeclaim.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sqnotes-data +spec: + accessModes: + - ReadWriteOnce + storageClassName: "" + resources: + requests: + storage: 10Gi + volumeName: sqnotes-data diff --git a/sqnotes/notes-service.yaml b/sqnotes/notes-service.yaml new file mode 100644 index 0000000..9521316 --- /dev/null +++ b/sqnotes/notes-service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert -f squinotes.yml + kompose.version: 1.26.1 (a9d05d509) + creationTimestamp: null + labels: + io.kompose.service: notes + name: notes +spec: + ports: + - name: "8080" + port: 8080 + targetPort: 8080 + selector: + io.kompose.service: notes +status: + loadBalancer: {} diff --git a/sqnotes/vol.yml b/sqnotes/vol.yml new file mode 100644 index 0000000..0f7977b --- /dev/null +++ b/sqnotes/vol.yml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: sqnotes-data +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + nfs: + server: nas.sq.lan + path: "/swarmdata/notes" + mountOptions: + - nfsvers=4.2 +