From b87239cf332a0dffe31e9d83992292eabb0546c9 Mon Sep 17 00:00:00 2001 From: Jeremy E <34139712+JeremyEastham@users.noreply.github.com> Date: Fri, 1 Dec 2023 08:50:42 -0600 Subject: [PATCH] Create Kubernetes deployment files (TODO: FIX) --- current_deployment_fixme.yaml | 38 ++++++++++++++++++++++++ kubernetes.yaml => kubernetes_fixme.yaml | 24 +++++++-------- 2 files changed, 50 insertions(+), 12 deletions(-) create mode 100644 current_deployment_fixme.yaml rename kubernetes.yaml => kubernetes_fixme.yaml (79%) diff --git a/current_deployment_fixme.yaml b/current_deployment_fixme.yaml new file mode 100644 index 00000000..b41c98d9 --- /dev/null +++ b/current_deployment_fixme.yaml @@ -0,0 +1,38 @@ +# FIXME This is the file that was used to deploy the current version of the cluster + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: agtern-deployment + labels: + app: agtern +spec: + replicas: 1 + selector: + matchLabels: + app: agtern + template: + metadata: + labels: + app: agtern + spec: + containers: + - name: agtern + image: jeremyeastham/agtern:dev + ports: + - containerPort: 8000 + +--- + +apiVersion: v1 +kind: Service +metadata: + name: agtern-service +spec: + selector: + app: agtern + ports: + - protocol: TCP + port: 80 + targetPort: 8000 + type: LoadBalancer diff --git a/kubernetes.yaml b/kubernetes_fixme.yaml similarity index 79% rename from kubernetes.yaml rename to kubernetes_fixme.yaml index 1e73834c..9f6ebed3 100644 --- a/kubernetes.yaml +++ b/kubernetes_fixme.yaml @@ -30,7 +30,7 @@ metadata: spec: accessModes: - ReadWriteOnce - storageClassName: manual + storageClassName: local-storage resources: requests: storage: 1Gi @@ -44,21 +44,21 @@ metadata: spec: accessModes: - ReadWriteOnce - storageClassName: manual + storageClassName: local-storage resources: requests: storage: 1Gi --- -apiVersion: v1 +apiVersion: apps/v1 kind: Deployment metadata: name: agtern-deployment labels: app: agtern spec: - replicas: 0 + replicas: 1 selector: matchLabels: app: agtern @@ -69,7 +69,7 @@ spec: spec: containers: - name: agtern - image: ghcr.io/agtern:dev + image: jeremyeastham/agtern:dev ports: - containerPort: 8000 volumeMounts: @@ -77,13 +77,13 @@ spec: mountPath: /app/data - name: log-volume mountPath: /app/log - volumes: - - name: data-volume - persistentVolumeClaim: - claimName: data-pvc - - name: log-volume - persistentVolumeClaim: - claimName: config-pvc + volumes: + - name: data-volume + persistentVolumeClaim: + claimName: data-pvc + - name: log-volume + persistentVolumeClaim: + claimName: log-pvc ---