From 14e75ce358390a08f1b02b2d596fc814e774242c Mon Sep 17 00:00:00 2001 From: Jonas Juselius Date: Wed, 31 Jan 2024 11:38:32 +0100 Subject: [PATCH] devel: expermenting with ref sources --- busynix/applicationset.yaml | 11 +++++++++-- busynix/prod-values.yaml | 16 ++++++++++++++++ busynix/prod/configmap.yaml | 8 ++++++++ busynix/staging/configmap.yaml | 8 ++++++++ busynix/staging/deployment_patch.yaml | 5 +++++ busynix/staging/kustomization.yaml | 12 ++++++++++++ .../{application.yaml => applicationset.yaml} | 0 .../{application.yaml => applicationset.yaml} | 0 rabbitmq/{manifests => prod}/nodeport.yaml | 0 9 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 busynix/prod-values.yaml create mode 100644 busynix/prod/configmap.yaml create mode 100644 busynix/staging/configmap.yaml create mode 100644 busynix/staging/deployment_patch.yaml create mode 100644 busynix/staging/kustomization.yaml rename geoserver/{application.yaml => applicationset.yaml} (100%) rename rabbitmq/{application.yaml => applicationset.yaml} (100%) rename rabbitmq/{manifests => prod}/nodeport.yaml (100%) diff --git a/busynix/applicationset.yaml b/busynix/applicationset.yaml index e542f305..8d65d5e3 100644 --- a/busynix/applicationset.yaml +++ b/busynix/applicationset.yaml @@ -21,10 +21,13 @@ spec: destination: namespace: oceanbox server: '{{ cluster }}' - source: - path: busynix + sources: + - path: busynix plugin: name: kustomize-helm-with-rewrite + env: + - name: MANIFESTS + value: $values parameters: - name: env string: '{{ env }}' @@ -32,3 +35,7 @@ spec: string: '{{ hostname }}' repoURL: https://gitlab.com/oceanbox/charts.git targetRevision: HEAD + - repoURL: https://gitlab.com/oceanbox/manifests.git + targetRevision: HEAD + path: busynix/{{ env }} + ref: values diff --git a/busynix/prod-values.yaml b/busynix/prod-values.yaml new file mode 100644 index 00000000..e6a541f6 --- /dev/null +++ b/busynix/prod-values.yaml @@ -0,0 +1,16 @@ +fullnameOverride: busynix + +ingress: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-staging + nginx.ingress.kubernetes.io/proxy-buffer-size: 128k + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 + hosts: + - host: busynix.srv.oceanbox.io + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - busynix.srv.oceanbox.io + secretName: prod-busynix-tls diff --git a/busynix/prod/configmap.yaml b/busynix/prod/configmap.yaml new file mode 100644 index 00000000..485d791d --- /dev/null +++ b/busynix/prod/configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +data: + foo: | + dummy +kind: ConfigMap +metadata: + name: prod-busynix-foo + diff --git a/busynix/staging/configmap.yaml b/busynix/staging/configmap.yaml new file mode 100644 index 00000000..35ee2301 --- /dev/null +++ b/busynix/staging/configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +data: + foo: | + dummy +kind: ConfigMap +metadata: + name: staging-busynix-foo + diff --git a/busynix/staging/deployment_patch.yaml b/busynix/staging/deployment_patch.yaml new file mode 100644 index 00000000..7c34250c --- /dev/null +++ b/busynix/staging/deployment_patch.yaml @@ -0,0 +1,5 @@ +- op: replace + path: /spec/template/spec/containers/0/env/0 + value: + name: LOG_LEVEL + value: "4" diff --git a/busynix/staging/kustomization.yaml b/busynix/staging/kustomization.yaml new file mode 100644 index 00000000..4a57e31a --- /dev/null +++ b/busynix/staging/kustomization.yaml @@ -0,0 +1,12 @@ +namePrefix: staging- +generatorOptions: + disableNameSuffixHash: true +patches: + - target: + group: apps + version: v1 + kind: Deployment + name: busynix + path: deployment_patch.yaml +resources: + - ../base diff --git a/geoserver/application.yaml b/geoserver/applicationset.yaml similarity index 100% rename from geoserver/application.yaml rename to geoserver/applicationset.yaml diff --git a/rabbitmq/application.yaml b/rabbitmq/applicationset.yaml similarity index 100% rename from rabbitmq/application.yaml rename to rabbitmq/applicationset.yaml diff --git a/rabbitmq/manifests/nodeport.yaml b/rabbitmq/prod/nodeport.yaml similarity index 100% rename from rabbitmq/manifests/nodeport.yaml rename to rabbitmq/prod/nodeport.yaml