From 87decc6090e67554f56e0ef41e962489a59a3d2d Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Tue, 24 May 2022 09:30:35 +0200 Subject: [PATCH] Add galerie site --- .../apps/family/galerie-main/deployment.yaml | 27 +++++++++++++++++++ .../apps/family/galerie-main/ingress.yaml | 26 ++++++++++++++++++ .../family/galerie-main/kustomization.yaml | 6 +++++ .../apps/family/galerie-main/service.yaml | 12 +++++++++ .../family/galerie-staging/deployment.yaml | 27 +++++++++++++++++++ .../apps/family/galerie-staging/ingress.yaml | 26 ++++++++++++++++++ .../galerie-staging/kustomization copy.yaml | 6 +++++ .../family/galerie-staging/kustomization.yaml | 6 +++++ .../apps/family/galerie-staging/service.yaml | 12 +++++++++ flux/cluster/apps/family/kustomization.yaml | 6 +++++ flux/cluster/apps/family/registry-creds.yaml | 19 +++++++++++++ flux/cluster/apps/kustomization.yaml | 1 + flux/cluster/core/namespaces/family.yaml | 6 +++++ 13 files changed, 180 insertions(+) create mode 100644 flux/cluster/apps/family/galerie-main/deployment.yaml create mode 100644 flux/cluster/apps/family/galerie-main/ingress.yaml create mode 100644 flux/cluster/apps/family/galerie-main/kustomization.yaml create mode 100644 flux/cluster/apps/family/galerie-main/service.yaml create mode 100644 flux/cluster/apps/family/galerie-staging/deployment.yaml create mode 100644 flux/cluster/apps/family/galerie-staging/ingress.yaml create mode 100644 flux/cluster/apps/family/galerie-staging/kustomization copy.yaml create mode 100644 flux/cluster/apps/family/galerie-staging/kustomization.yaml create mode 100644 flux/cluster/apps/family/galerie-staging/service.yaml create mode 100644 flux/cluster/apps/family/kustomization.yaml create mode 100644 flux/cluster/apps/family/registry-creds.yaml create mode 100644 flux/cluster/core/namespaces/family.yaml diff --git a/flux/cluster/apps/family/galerie-main/deployment.yaml b/flux/cluster/apps/family/galerie-main/deployment.yaml new file mode 100644 index 0000000..3f99feb --- /dev/null +++ b/flux/cluster/apps/family/galerie-main/deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: galerie-deployment + namespace: family + labels: + app: galerie-deployment + keel.sh/policy: force + keel.sh/match-tag: "true" +spec: + replicas: 1 + selector: + matchLabels: + app: galerie-deployment + template: + metadata: + labels: + app: galerie-deployment + spec: + containers: + - name: galerie-deployment + imagePullPolicy: Always + image: registry.asraphiel.dev/library/galerie:main + ports: + - containerPort: 80 + imagePullSecrets: + - name: registry-creds \ No newline at end of file diff --git a/flux/cluster/apps/family/galerie-main/ingress.yaml b/flux/cluster/apps/family/galerie-main/ingress.yaml new file mode 100644 index 0000000..15aef51 --- /dev/null +++ b/flux/cluster/apps/family/galerie-main/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: galerie-deployment-ingress +spec: + rules: + - host: "galerievanslagmaat.nl" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: galerie-deployment-service + port: + number: 80 + - host: "galerie.asraphiel.dev" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: galerie-deployment-service + port: + number: 80 \ No newline at end of file diff --git a/flux/cluster/apps/family/galerie-main/kustomization.yaml b/flux/cluster/apps/family/galerie-main/kustomization.yaml new file mode 100644 index 0000000..ef7dbba --- /dev/null +++ b/flux/cluster/apps/family/galerie-main/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - ingress.yaml + - service.yaml diff --git a/flux/cluster/apps/family/galerie-main/service.yaml b/flux/cluster/apps/family/galerie-main/service.yaml new file mode 100644 index 0000000..453a4a8 --- /dev/null +++ b/flux/cluster/apps/family/galerie-main/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: galerie-deployment-service + namespace: family +spec: + selector: + app: galerie-deployment + ports: + - protocol: TCP + port: 80 + targetPort: 80 \ No newline at end of file diff --git a/flux/cluster/apps/family/galerie-staging/deployment.yaml b/flux/cluster/apps/family/galerie-staging/deployment.yaml new file mode 100644 index 0000000..430b553 --- /dev/null +++ b/flux/cluster/apps/family/galerie-staging/deployment.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: galerie-staging-deployment + namespace: family + labels: + app: galerie-staging-deployment + keel.sh/policy: force + keel.sh/match-tag: "true" +spec: + replicas: 1 + selector: + matchLabels: + app: galerie-staging-deployment + template: + metadata: + labels: + app: galerie-staging-deployment + spec: + containers: + - name: galerie-staging-deployment + imagePullPolicy: Always + image: registry.asraphiel.dev/library/galerie:staging + ports: + - containerPort: 80 + imagePullSecrets: + - name: registry-creds \ No newline at end of file diff --git a/flux/cluster/apps/family/galerie-staging/ingress.yaml b/flux/cluster/apps/family/galerie-staging/ingress.yaml new file mode 100644 index 0000000..d32bcc3 --- /dev/null +++ b/flux/cluster/apps/family/galerie-staging/ingress.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: galerie-staging-deployment-ingress +spec: + rules: + - host: "staging.galerievanslagmaat.nl" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: galerie-staging-deployment-service + port: + number: 80 + - host: "galerie-staging.asraphiel.dev" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: galerie-staging-deployment-service + port: + number: 80 \ No newline at end of file diff --git a/flux/cluster/apps/family/galerie-staging/kustomization copy.yaml b/flux/cluster/apps/family/galerie-staging/kustomization copy.yaml new file mode 100644 index 0000000..ef7dbba --- /dev/null +++ b/flux/cluster/apps/family/galerie-staging/kustomization copy.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - ingress.yaml + - service.yaml diff --git a/flux/cluster/apps/family/galerie-staging/kustomization.yaml b/flux/cluster/apps/family/galerie-staging/kustomization.yaml new file mode 100644 index 0000000..cd56fb6 --- /dev/null +++ b/flux/cluster/apps/family/galerie-staging/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - galerie-main + - galerie-staging + - registry-creds.yaml diff --git a/flux/cluster/apps/family/galerie-staging/service.yaml b/flux/cluster/apps/family/galerie-staging/service.yaml new file mode 100644 index 0000000..bd05102 --- /dev/null +++ b/flux/cluster/apps/family/galerie-staging/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: galerie-staging-deployment-service + namespace: family +spec: + selector: + app: galerie-staging-deployment + ports: + - protocol: TCP + port: 80 + targetPort: 80 \ No newline at end of file diff --git a/flux/cluster/apps/family/kustomization.yaml b/flux/cluster/apps/family/kustomization.yaml new file mode 100644 index 0000000..cd56fb6 --- /dev/null +++ b/flux/cluster/apps/family/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - galerie-main + - galerie-staging + - registry-creds.yaml diff --git a/flux/cluster/apps/family/registry-creds.yaml b/flux/cluster/apps/family/registry-creds.yaml new file mode 100644 index 0000000..c9a37cb --- /dev/null +++ b/flux/cluster/apps/family/registry-creds.yaml @@ -0,0 +1,19 @@ +apiVersion: external-secrets.io/v1beta1 +kind: ExternalSecret +metadata: + name: registry-creds + namespace: family +spec: + refreshInterval: "5m" + secretStoreRef: + name: vault + kind: ClusterSecretStore + target: + name: registry-creds + template: + type: kubernetes.io/dockerconfigjson + data: + - secretKey: .dockerconfigjson + remoteRef: + key: k8s/registry-creds + property: dockerconfigjson \ No newline at end of file diff --git a/flux/cluster/apps/kustomization.yaml b/flux/cluster/apps/kustomization.yaml index e74e3af..55f4a72 100644 --- a/flux/cluster/apps/kustomization.yaml +++ b/flux/cluster/apps/kustomization.yaml @@ -6,3 +6,4 @@ resources: - networking - drone - keel + - family diff --git a/flux/cluster/core/namespaces/family.yaml b/flux/cluster/core/namespaces/family.yaml new file mode 100644 index 0000000..2954ec2 --- /dev/null +++ b/flux/cluster/core/namespaces/family.yaml @@ -0,0 +1,6 @@ +kind: Namespace +apiVersion: v1 +metadata: + name: family + labels: + name: family \ No newline at end of file