From 5f1883477c250f4fb425877b44632842217f6d42 Mon Sep 17 00:00:00 2001 From: Rahmat Hidayat Date: Tue, 1 Aug 2023 10:37:43 +0700 Subject: [PATCH 1/5] feat(guardian): introduce new guardian jobs --- stable/guardian/Chart.yaml | 4 ++-- stable/guardian/values.yaml | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/stable/guardian/Chart.yaml b/stable/guardian/Chart.yaml index e64a15e7..97dd5ac3 100644 --- a/stable/guardian/Chart.yaml +++ b/stable/guardian/Chart.yaml @@ -15,13 +15,13 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.3.0" +appVersion: "0.3.0" # TODO: update with latest version dependencies: - name: app diff --git a/stable/guardian/values.yaml b/stable/guardian/values.yaml index 4e3faec5..fa03c62a 100644 --- a/stable/guardian/values.yaml +++ b/stable/guardian/values.yaml @@ -59,6 +59,22 @@ app: - job - run - appeal_expiration_revocation + - name: "inactive-user-revocation" + schedule: "0 7 * * *" + restartPolicy: Never + command: [] + args: + - job + - run + - revoke_grants_by_user_criteria + - name: "grant-dormancy-check" + schedule: "0 8 * * *" + restartPolicy: Never + command: [] + args: + - job + - run + - grant_dormancy_check ingress: enabled: true @@ -85,6 +101,8 @@ app: JOBS_REVOKE_EXPIRED_ACCESS_INTERVAL: "*/20 * * * *" JOBS_EXPIRING_ACCESS_NOTIFICATION_ENABLED: false JOBS_EXPIRING_ACCESS_NOTIFICATION_INTERVAL: "0 9 * * *" + JOBS_REVOKE_GRANTS_BY_USER_CRITERIA_CONFIG_DRY_RUN: true + JOBS_GRANT_DORMANCY_CHECK_CONFIG_DRY_RUN: true secretConfig: From fe4800ba1d26da5d5e6604d49092d35a30913a36 Mon Sep 17 00:00:00 2001 From: Rahmat Hidayat Date: Wed, 2 Aug 2023 10:29:37 +0700 Subject: [PATCH 2/5] chore: update existing jobs name --- stable/guardian/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stable/guardian/values.yaml b/stable/guardian/values.yaml index fa03c62a..c4e3e574 100644 --- a/stable/guardian/values.yaml +++ b/stable/guardian/values.yaml @@ -43,22 +43,22 @@ app: - job - run - fetch_resources - - name: "appeal-expiration-reminder" + - name: "expiring-grant-notification" schedule: "0 9 * * *" restartPolicy: Never command: [] args: - job - run - - appeal_expiration_reminder - - name: "appeal-expiration-revocation" + - expiring_grant_notification + - name: "revoke-expired-grants" schedule: "*/20 * * * *" restartPolicy: Never command: [] args: - job - run - - appeal_expiration_revocation + - revoke_expired_grants - name: "inactive-user-revocation" schedule: "0 7 * * *" restartPolicy: Never From b5fd98710c6794db1884db176f129d93abd86e24 Mon Sep 17 00:00:00 2001 From: Rahmat Hidayat Date: Wed, 30 Aug 2023 11:12:29 +0700 Subject: [PATCH 3/5] fix: update job config env --- stable/guardian/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/guardian/values.yaml b/stable/guardian/values.yaml index c4e3e574..7176dab0 100644 --- a/stable/guardian/values.yaml +++ b/stable/guardian/values.yaml @@ -101,8 +101,8 @@ app: JOBS_REVOKE_EXPIRED_ACCESS_INTERVAL: "*/20 * * * *" JOBS_EXPIRING_ACCESS_NOTIFICATION_ENABLED: false JOBS_EXPIRING_ACCESS_NOTIFICATION_INTERVAL: "0 9 * * *" - JOBS_REVOKE_GRANTS_BY_USER_CRITERIA_CONFIG_DRY_RUN: true - JOBS_GRANT_DORMANCY_CHECK_CONFIG_DRY_RUN: true + JOBS_REVOKE_GRANTS_BY_USER_CRITERIA_CONFIG: '{"dry_run":true}' + JOBS_GRANT_DORMANCY_CHECK_CONFIG: '{"dry_run":true}' secretConfig: From f9e6e517242f1f638043f3921b8558b2e35c708c Mon Sep 17 00:00:00 2001 From: Rahmat Hidayat Date: Wed, 30 Aug 2023 11:12:51 +0700 Subject: [PATCH 4/5] chore: add minimal guardian version that support the new jobs --- stable/guardian/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/guardian/Chart.yaml b/stable/guardian/Chart.yaml index 97dd5ac3..84ddd6df 100644 --- a/stable/guardian/Chart.yaml +++ b/stable/guardian/Chart.yaml @@ -21,7 +21,7 @@ version: 0.2.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.3.0" # TODO: update with latest version +appVersion: "0.7.5-beta.2" dependencies: - name: app From e29eddfe1b79698c809fc8b851ff5f5165c77db5 Mon Sep 17 00:00:00 2001 From: Rahmat Hidayat Date: Wed, 30 Aug 2023 11:13:36 +0700 Subject: [PATCH 5/5] fix: shorten job name to avoid max 52 characters job name error --- stable/guardian/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/guardian/values.yaml b/stable/guardian/values.yaml index 7176dab0..23e7a6f1 100644 --- a/stable/guardian/values.yaml +++ b/stable/guardian/values.yaml @@ -59,7 +59,7 @@ app: - job - run - revoke_expired_grants - - name: "inactive-user-revocation" + - name: "inactive-revocation" schedule: "0 7 * * *" restartPolicy: Never command: [] @@ -67,7 +67,7 @@ app: - job - run - revoke_grants_by_user_criteria - - name: "grant-dormancy-check" + - name: "dormancy-check" schedule: "0 8 * * *" restartPolicy: Never command: []