From a8f7b6bc9fe768f8f42c3918b53ae970015de418 Mon Sep 17 00:00:00 2001 From: Finn Date: Sun, 31 Mar 2024 23:47:27 -0700 Subject: [PATCH] add s3staticsites --- k8s/namespaces.yaml | 5 ++++ k8s/s3staticsites/deployment.yaml | 42 +++++++++++++++++++++++++++++++ k8s/s3staticsites/ingress.yaml | 27 ++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 k8s/s3staticsites/deployment.yaml create mode 100644 k8s/s3staticsites/ingress.yaml diff --git a/k8s/namespaces.yaml b/k8s/namespaces.yaml index e594472..e1178fe 100644 --- a/k8s/namespaces.yaml +++ b/k8s/namespaces.yaml @@ -27,3 +27,8 @@ apiVersion: v1 kind: Namespace metadata: name: matrix +--- +apiVersion: v1 +kind: Namespace +metadata: + name: s3staticsites diff --git a/k8s/s3staticsites/deployment.yaml b/k8s/s3staticsites/deployment.yaml new file mode 100644 index 0000000..d6773d1 --- /dev/null +++ b/k8s/s3staticsites/deployment.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: s3staticsite + name: s3staticsite + namespace: s3staticsites +spec: + replicas: 2 + selector: + matchLabels: + app: s3staticsite + template: + metadata: + labels: + app: s3staticsite + spec: + containers: + - image: git.janky.solutions/finn/s3staticsite:latest + name: s3staticsite + resources: {} + envFrom: + - secretRef: + name: s3staticsites + env: + - name: S3_ENDPOINT + value: storage.home.finn.io + ports: + - name: http + containerPort: 5000 +--- +apiVersion: v1 +kind: Service +metadata: + name: s3staticsites + namespace: s3staticsites +spec: + ports: + - name: http + port: 5000 + selector: + app: s3staticsite diff --git a/k8s/s3staticsites/ingress.yaml b/k8s/s3staticsites/ingress.yaml new file mode 100644 index 0000000..19a00be --- /dev/null +++ b/k8s/s3staticsites/ingress.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: s3staticsites + namespace: s3staticsites +spec: + rules: + - host: dev-artifacts.entanglement.garden + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: s3staticsites + port: + name: http + - host: artifacts.entanglement.garden + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: s3staticsites + port: + name: http