aboutsummaryrefslogtreecommitdiff
path: root/grumpy/static-files
diff options
context:
space:
mode:
Diffstat (limited to 'grumpy/static-files')
-rw-r--r--grumpy/static-files/base/kustomization.yaml21
-rw-r--r--grumpy/static-files/base/static-files-deploy.yaml14
-rw-r--r--grumpy/static-files/base/static-files-ing.yaml17
-rw-r--r--grumpy/static-files/base/static-files-svc.yaml6
-rw-r--r--grumpy/static-files/blog/ingress.yaml8
-rw-r--r--grumpy/static-files/blog/kustomization.yaml23
-rw-r--r--grumpy/static-files/photos/kustomization.yaml20
7 files changed, 76 insertions, 33 deletions
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