From 537bc1cb3819eefb4f40a66acceb2546aa9327b4 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Fri, 17 Nov 2023 14:12:08 -0500 Subject: [PATCH 1/3] start-dependencies.sh: make cert-manager optional, add ingress-nginx --- .github/workflows/lint-test.yml | 8 +------- scripts/k8s_on_docker_desktop.sh | 11 ----------- scripts/start-dependencies.sh | 20 ++++++++++++++++---- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 39d49dd..ca036ae 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -47,13 +47,7 @@ jobs: - name: Setup dependencies if: steps.list-changed.outputs.changed == 'true' - run: | - helm upgrade --install ingress-nginx ingress-nginx \ - --repo https://kubernetes.github.io/ingress-nginx \ - --namespace ingress-nginx --create-namespace - cd scripts - ./start-dependencies.sh - cd .. + run: scripts/start-dependencies.sh - name: Run chart-testing (install) if: steps.list-changed.outputs.changed == 'true' diff --git a/scripts/k8s_on_docker_desktop.sh b/scripts/k8s_on_docker_desktop.sh index 633ee80..b1a609c 100755 --- a/scripts/k8s_on_docker_desktop.sh +++ b/scripts/k8s_on_docker_desktop.sh @@ -82,17 +82,6 @@ printf "\033[36m%s\033[0m:\033[0m\033[33m %s\n\033[0m" "Step 1" "Modifying depen sed -rie 's/(host: kafka(-0)?).*/\1'$our_kafka_domain'/g' "${root_path}dependencies/kafka.yaml" echo "" -# Ingress is not really active/installed, lets install it -printf "\033[36m%s\033[0m:\033[0m\033[33m %s\n\033[0m" "Step 2" "Check/Install Ingress" -helm upgrade --install ingress-nginx ingress-nginx \ - --repo https://kubernetes.github.io/ingress-nginx \ - --namespace ingress-nginx --create-namespace >> $log_file 2>&1 -checkRC - -sleep 10 - -echo "" - # Start the dependencies printf "\033[36m%s\033[0m:\033[0m\033[33m %s\n\033[0m" "Step 3" "Starting Dependencies" ${root_path}scripts/start-dependencies.sh >> $log_file 2>&1 diff --git a/scripts/start-dependencies.sh b/scripts/start-dependencies.sh index aede790..3c600ac 100755 --- a/scripts/start-dependencies.sh +++ b/scripts/start-dependencies.sh @@ -22,6 +22,8 @@ INSTALL_MIMIR=${INSTALL_MIMIR:-false} # needed for Cortex testing INSTALL_LOKI=${INSTALL_LOKI:-false} # needed for log aggregation together with promtail in containers; make sure dependencies.loki.hostname='' for the helm chart if this is disabled # Required dependencies (if you don't install them here, they need to be running somewhere else) +INSTALL_CERT_MANAGER=${INSTALL_CERT_MANAGER:-true} +INSTALL_INGRESS_NGINX=${INSTALL_INGRESS_NGINX:-true} INSTALL_POSTGRESQL=${INSTALL_POSTGRESQL:-true} NAMESPACE="shared" @@ -49,11 +51,21 @@ helm repo add grafana https://grafana.github.io/helm-charts helm repo update # Install Cert-Manager -helm upgrade --install cert-manager jetstack/cert-manager --version v1.10.1 \ - --namespace cert-manager --create-namespace --set installCRDs=true --wait -kubectl apply -f ca -n cert-manager +if [ "$INSTALL_CERT_MANAGER" == "true" ]; then + helm upgrade --install cert-manager jetstack/cert-manager --version v1.10.1 \ + --namespace cert-manager --create-namespace --set installCRDs=true --wait + kubectl apply -f ca -n cert-manager +fi + +# Install ingress-nginx +if [ "$INSTALL_INGRESS_NGINX" == "true" ]; then + helm upgrade --install ingress-nginx ingress-nginx \ + --repo https://kubernetes.github.io/ingress-nginx \ + --version 4.8.3 \ + --namespace ingress-nginx --create-namespace +fi -# Create a namespace for most of the dependencies except for cert-manager (above), and the postgres and elastic operators (added below). +# Create a namespace for most of the dependencies except for cert-manager and ingress-nginx (above), and the postgres and elastic operators (added below). kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f - # Install Grafana Loki From e0720c01bcbfd8e9c69b40369ae7f925a32b5a44 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Fri, 17 Nov 2023 15:29:05 -0500 Subject: [PATCH 2/3] Revert "Don't always require version bump: we don't always release when merging" We have decided it's okay to release more often so we are now back to requiring a version bump. This reverts commit 8c8ac433016d68aa578abce71affb5347230206e. --- .github/workflows/lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index ca036ae..90b48a8 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -39,7 +39,7 @@ jobs: - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' - run: ct lint --chart-dirs . --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} --check-version-increment=false + run: ct lint --chart-dirs . --validate-maintainers=false --target-branch ${{ github.event.repository.default_branch }} - name: Create kind cluster if: steps.list-changed.outputs.changed == 'true' From 833f4d1ed090cfe9eb6684f8b0f39061b4d2dbe7 Mon Sep 17 00:00:00 2001 From: DJ Gregor Date: Fri, 17 Nov 2023 15:31:27 -0500 Subject: [PATCH 3/3] Make sure only one copy of the release workflow can run at a time --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1402c8f..5617a4b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ on: branches: - main +# Make sure only one copy of this workflow can run at a time. +concurrency: ${{ github.workflow }} + jobs: release: runs-on: ubuntu-latest