From d8a0b223dfbe86e88866174082028701b23ab2d4 Mon Sep 17 00:00:00 2001 From: Max Resnick Date: Sat, 17 Sep 2022 08:02:23 -0700 Subject: updated manifests so they actually work --- grumpy/static-files/base/kustomization.yaml | 21 +++++---------------- grumpy/static-files/base/static-files-deploy.yaml | 14 ++++++++------ grumpy/static-files/base/static-files-ing.yaml | 17 ++++++++--------- grumpy/static-files/base/static-files-svc.yaml | 6 ++++-- grumpy/static-files/blog/ingress.yaml | 8 ++++++++ grumpy/static-files/blog/kustomization.yaml | 23 +++++++++++++++++++++++ grumpy/static-files/photos/kustomization.yaml | 20 ++++++++++++++++++++ 7 files changed, 76 insertions(+), 33 deletions(-) create mode 100644 grumpy/static-files/blog/ingress.yaml create mode 100644 grumpy/static-files/blog/kustomization.yaml create mode 100644 grumpy/static-files/photos/kustomization.yaml (limited to 'grumpy/static-files') diff --git a/grumpy/static-files/base/kustomization.yaml b/grumpy/static-files/base/kustomization.yaml index 6d1eee5..8884ed5 100644 --- a/grumpy/static-files/base/kustomization.yaml +++ b/grumpy/static-files/base/kustomization.yaml @@ -1,19 +1,3 @@ -# Labels to add to all resources and selectors. -commonLabels: - app.kubernetes.io/instance: static-files - app.kubernetes.io/name: static-files - app.kubernetes.io/version: "1.0" - -# Images modify the tags for images without -# creating patches. -images: -- name: static-files - newName: registry.gitlab.com/grumps/ofmax/prod - newTag: latest - -# Value of this field is prepended to the -# names of all resources -namePrefix: static-files # List of resource files that kustomize reads, modifies # and emits as a YAML string @@ -21,5 +5,10 @@ resources: - static-files-deploy.yaml - static-files-ing.yaml - static-files-svc.yaml + # - middleware.yaml + + # configurations: + # - nameReference.yaml + apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/grumpy/static-files/base/static-files-deploy.yaml b/grumpy/static-files/base/static-files-deploy.yaml index f89e7d7..993c6e4 100644 --- a/grumpy/static-files/base/static-files-deploy.yaml +++ b/grumpy/static-files/base/static-files-deploy.yaml @@ -2,25 +2,27 @@ apiVersion: apps/v1 kind: Deployment metadata: name: static-files + labels: + app.kubernetes.io/part-of: static-files + app.kubernetes.io/version: "1.0" spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/instance: static-files - app.kubernetes.io/name: static-files + app.kubernetes.io/part-of: static-files template: metadata: labels: - app.kubernetes.io/instance: static-files - app.kubernetes.io/name: static-files + app.kubernetes.io/part-of: static-files + app.kubernetes.io/version: "1.0" spec: containers: - - image: static-files + - image: web livenessProbe: httpGet: path: / port: http - name: static-files + name: web ports: - containerPort: 8080 name: http diff --git a/grumpy/static-files/base/static-files-ing.yaml b/grumpy/static-files/base/static-files-ing.yaml index f0f05eb..9dee43b 100644 --- a/grumpy/static-files/base/static-files-ing.yaml +++ b/grumpy/static-files/base/static-files-ing.yaml @@ -5,24 +5,23 @@ metadata: certmanager.k8s.io/cluseterissuer: letsencrypt-prod ingress.kubernetes.io/ssl-redirect: "true" kubernetes.io/ingress.class: traefik - traefik.ingress.kubernetes.io/frontend-entry-points: http,https - traefik.ingress.kubernetes.io/redirect-entry-point: https - traefik.ingress.kubernetes.io/redirect-permanent: "true" - name: blog + name: static-files + labels: + app.kubernetes.io/part-of: static-files + app.kubernetes.io/version: "1.0" spec: rules: - - host: ofmax.li + - host: host http: paths: - backend: service: - name: blog + name: static-files port: number: 8080 pathType: Prefix path: / tls: - hosts: - - www.ofmax.li - - ofmax.li - secretName: ofmax-li-sec + - host + secretName: prod-ofmax-li-sec diff --git a/grumpy/static-files/base/static-files-svc.yaml b/grumpy/static-files/base/static-files-svc.yaml index 8096a60..f169a75 100644 --- a/grumpy/static-files/base/static-files-svc.yaml +++ b/grumpy/static-files/base/static-files-svc.yaml @@ -2,6 +2,9 @@ apiVersion: v1 kind: Service metadata: name: static-files + labels: + app.kubernetes.io/part-of: static-files + app.kubernetes.io/version: "1.0" spec: ports: - name: http @@ -9,6 +12,5 @@ spec: protocol: TCP targetPort: http selector: - app.kubernetes.io/instance: static-files - app.kubernetes.io/name: static-files + app.kubernetes.io/part-of: static-files type: ClusterIP diff --git a/grumpy/static-files/blog/ingress.yaml b/grumpy/static-files/blog/ingress.yaml new file mode 100644 index 0000000..fc60d92 --- /dev/null +++ b/grumpy/static-files/blog/ingress.yaml @@ -0,0 +1,8 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: static-files +spec: + rules: + - $patch: merge + host: stuff diff --git a/grumpy/static-files/blog/kustomization.yaml b/grumpy/static-files/blog/kustomization.yaml new file mode 100644 index 0000000..44f580e --- /dev/null +++ b/grumpy/static-files/blog/kustomization.yaml @@ -0,0 +1,23 @@ +resources: + - ../base +namePrefix: blog- +commonLabels: + app.kubernetes.io/name: blog +patches: + - target: + kind: Ingress + name: static-files + patch: |- + - op: replace + path: /spec/rules/0/host + value: ofmax.li + - op: replace + path: /spec/tls/0/hosts/0 + value: ofmax.li + - op: add + path: /spec/tls/0/hosts/- + value: www.ofmax.li +images: +- name: web + newName: registry.gitlab.com/grumps/ofmax/prod + newTag: v0.0.1 diff --git a/grumpy/static-files/photos/kustomization.yaml b/grumpy/static-files/photos/kustomization.yaml new file mode 100644 index 0000000..a9b88aa --- /dev/null +++ b/grumpy/static-files/photos/kustomization.yaml @@ -0,0 +1,20 @@ +resources: +- ../base +namePrefix: photos- +commonLabels: + app.kubernetes.io/name: photos +patches: +- target: + kind: Ingress + name: static-files + patch: |- + - op: replace + path: /spec/rules/0/host + value: photos.ofmax.li + - op: replace + path: /spec/tls/0/hosts/0 + value: photos.ofmax.li +images: +- name: web + newName: registry.gitlab.com/grumps/photos.ofmax.li/prod + newTag: v0.0.2 -- cgit v1.2.3