From a008b75d72a8a1f0689018c266e0e71e8738dac0 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Thu, 18 Nov 2021 16:28:28 +0100
Subject: [PATCH] fix cronjob-recreate-clients

---
 helmchart/single-sign-on/Chart.yaml                             | 2 +-
 ...e-oauth-clients.yaml => cronjob-recreate-oauth-clients.yaml} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename helmchart/single-sign-on/templates/{cronjob-create-oauth-clients.yaml => cronjob-recreate-oauth-clients.yaml} (99%)

diff --git a/helmchart/single-sign-on/Chart.yaml b/helmchart/single-sign-on/Chart.yaml
index 7763ccb..cc007d8 100644
--- a/helmchart/single-sign-on/Chart.yaml
+++ b/helmchart/single-sign-on/Chart.yaml
@@ -1,4 +1,4 @@
 apiVersion: v1
 description: A Helm chart for Stackspin's Single sign-on components
 name: single-sign-on
-version: 0.4.2
+version: 0.4.3
diff --git a/helmchart/single-sign-on/templates/cronjob-create-oauth-clients.yaml b/helmchart/single-sign-on/templates/cronjob-recreate-oauth-clients.yaml
similarity index 99%
rename from helmchart/single-sign-on/templates/cronjob-create-oauth-clients.yaml
rename to helmchart/single-sign-on/templates/cronjob-recreate-oauth-clients.yaml
index fc8c5e8..286651b 100644
--- a/helmchart/single-sign-on/templates/cronjob-create-oauth-clients.yaml
+++ b/helmchart/single-sign-on/templates/cronjob-recreate-oauth-clients.yaml
@@ -61,7 +61,7 @@ spec:
                   --silent \
                   --write-out "\nRequesting oauth client $CLIENT_NAME: HTTP %{http_code}\n" \
                   | tail -1  \
-                  | grep 404; \
+                  | grep 401; \
                  if [ $? -eq 0 ]; then \
                    echo "Client doesn't exist. (Re)creating client..."; \
                    curl --header "Content-Type: application/json" \
-- 
GitLab