From 02ad42a186a38fb858b8c0437cd133ad5aab52fa Mon Sep 17 00:00:00 2001 From: "Guillaume B.B. Van Hemmen" Date: Fri, 27 Dec 2024 14:50:43 +0100 Subject: [PATCH] #0000 - Refactor cert-manager setup and add Helm values file Rename and reorganize scripts and configuration files for clarity. Updated `02_install_cert_manager.sh` to reference a new Helm values file for better configurability. Introduced nodeSelector and tolerations in `helm-values/cert-manager.yaml` for targeted deployment. --- helm-values/cert-manager.yaml | 43 +++++++++++++++++++ .../cert-manager.yaml | 0 ..._manager.sh => 02_install_cert_manager.sh} | 6 +-- 3 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 helm-values/cert-manager.yaml rename cert-manager.yaml => ressources/cert-manager.yaml (100%) rename scripts/{03_install_cert_manager.sh => 02_install_cert_manager.sh} (63%) mode change 100644 => 100755 diff --git a/helm-values/cert-manager.yaml b/helm-values/cert-manager.yaml new file mode 100644 index 0000000..5307778 --- /dev/null +++ b/helm-values/cert-manager.yaml @@ -0,0 +1,43 @@ +# Global settings for nodeSelector and tolerations +nodeSelector: + com.van-hemmen.role: gateway + com.van-hemmen.hosting: ovh + +tolerations: + - key: "com.van-hemmen.role" + operator: "Equal" + value: "gateway" + effect: "NoSchedule" + +# startupapicheck specific settings +startupapicheck: + nodeSelector: + com.van-hemmen.role: gateway + com.van-hemmen.hosting: ovh + tolerations: + - key: "com.van-hemmen.role" + operator: "Equal" + value: "gateway" + effect: "NoSchedule" + +# Cainjector specific settings +cainjector: + nodeSelector: + com.van-hemmen.role: gateway + com.van-hemmen.hosting: ovh + tolerations: + - key: "com.van-hemmen.role" + operator: "Equal" + value: "gateway" + effect: "NoSchedule" + +# Webhook specific settings +webhook: + nodeSelector: + com.van-hemmen.role: gateway + com.van-hemmen.hosting: ovh + tolerations: + - key: "com.van-hemmen.role" + operator: "Equal" + value: "gateway" + effect: "NoSchedule" diff --git a/cert-manager.yaml b/ressources/cert-manager.yaml similarity index 100% rename from cert-manager.yaml rename to ressources/cert-manager.yaml diff --git a/scripts/03_install_cert_manager.sh b/scripts/02_install_cert_manager.sh old mode 100644 new mode 100755 similarity index 63% rename from scripts/03_install_cert_manager.sh rename to scripts/02_install_cert_manager.sh index 8b1a3af..61aed4e --- a/scripts/03_install_cert_manager.sh +++ b/scripts/02_install_cert_manager.sh @@ -1,11 +1,11 @@ #!/bin/bash -set -ex +set -e helm repo add jetstack https://charts.jetstack.io helm repo update -kubectl create namespace cert-manager +kubectl create namespace cert-manager || true -helm install cert-manager jetstack/cert-manager --namespace cert-manager \ +helm install cert-manager jetstack/cert-manager --namespace cert-manager -f helm-values/cert-manager.yaml \ --set installCRDs=true