merge-requests/1/merge
jerger 2 years ago
parent bd40461bb3
commit 0fc7bc5f2e

@ -18,6 +18,7 @@
(s/def ::service-port pos-int?)
(s/def ::fqdns (s/coll-of pred/fqdn-string?))
; TODO: Review jem 2022/10/26: Namespace is called ingress but we do more: Ingress & cert -> rename ore mv. certificate to own ns
(def ingress? (s/keys :req-un [::fqdns ::ingress-name ::service-name ::service-port]
:opt-un [::issuer ::cert-name]))
@ -33,6 +34,7 @@
"ingress/https-ingress.yaml" (rc/inline "ingress/https-ingress.yaml")
(throw (js/Error. "Undefined Resource!")))))
; TODO: Review jem 2022/10/26: generalize!
#?(:cljs
(defmethod yaml/load-as-edn :ingress [resource-name]
(yaml/from-string (yaml/load-resource resource-name))))

@ -40,8 +40,10 @@
(def config? (s/keys :req-un [::websites]
:opt-un [::issuer]))
; TODO: Review jem 2022/10/26: move default to core/default
(def volume-size 3)
; TODO: Review jem 2022/10/26: spec the following funktions?
(defn replace-dots-by-minus
[fqdn]
(str/replace fqdn #"\." "-"))
@ -79,16 +81,17 @@
#?(:cljs
(defmethod yaml/load-resource :website [resource-name]
(case resource-name
(case resource-name
"website/nginx-configmap.yaml" (rc/inline "website/nginx-configmap.yaml")
"website/nginx-deployment.yaml" (rc/inline "website/nginx-deployment.yaml")
"website/nginx-service.yaml" (rc/inline "website/nginx-service.yaml")
"website/website-content-volume.yaml" (rc/inline "website/website-content-volume.yaml")
"website/website-build-cron.yaml" (rc/inline "website/website-build-cron.yaml")
"website/website-build-deployment.yaml" (rc/inline "website/website-build-deployment.yaml")
"website/website-build-secret.yaml" (rc/inline "website/website-build-secret.yaml")
"website/website-content-volume.yaml" (rc/inline "website/website-content-volume.yaml")
(throw (js/Error. "Undefined Resource!")))))
; TODO: Review jem 2022/10/26: move this fkt. to a more general place
#?(:cljs
(defmethod yaml/load-as-edn :website [resource-name]
(yaml/from-string (yaml/load-resource resource-name))))

@ -13,7 +13,7 @@ spec:
paths:
- pathType: Prefix
path: "/"
backend:
backend: # TODO: Review jem 2022/10/26: wo backend as we should only do a redirect here ... ?
service:
name: SERVIC_ENAME
port:

@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: NAME-deployment
name: NAME-deployment #TODO: Review jem 2022/10/26: why mixed case? either calculate the whole name in cljc or use UPPERCASE
spec:
replicas: 1
selector:

@ -11,6 +11,6 @@ spec:
ports:
- name: nginx-http
port: 80
- name: nginx-https
- name: nginx-https # TODO: Review jem 2022/10/26: we terminate ssl in ingress, do not pass thru
port: 443

@ -3,9 +3,9 @@ kind: CronJob
metadata:
name: NAME-build-cron
labels:
app.kubernetes.part-of: website # correct name?
app.kubernetes.part-of: website # TODO: Review jem 2022/10/26: adjust name, add part of to all
spec:
schedule: "1,7,14,21,28,35,42,49,54,59 * * * *"
schedule: "1,7,14,21,28,35,42,49,54,59 * * * *" # TODO: Review jem 2022/10/26: */7 ?
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:

Loading…
Cancel
Save