Skip to content

Commit

Permalink
Merge pull request #133 from bcgov/task/Rh1KcuJL
Browse files Browse the repository at this point in the history
feat: oc global deployer for each cluster
  • Loading branch information
junmin-bcgov authored Jun 29, 2022
2 parents 0d4bea2 + 2f9d074 commit 6971e9c
Show file tree
Hide file tree
Showing 15 changed files with 54 additions and 178 deletions.
4 changes: 4 additions & 0 deletions helm/kc-cron-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ apiVersion: v1
name: kc-cron-job
description: "Helm chart for CronJob to collect Keycloak active sessions"
version: 0.1.1
dependencies:
- name: patroni
version: 1.5.1
repository: https://bcgov.github.io/sso-helm-charts
6 changes: 6 additions & 0 deletions helm/kc-cron-job/requirements.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: patroni
repository: https://bcgov.github.io/sso-helm-charts
version: 1.5.1
digest: sha256:df1184647e069e0affc7f3bf829dc305b335f43f627c4e2bf93c78360423b876
generated: "2022-06-24T10:29:04.9225904-07:00"
2 changes: 1 addition & 1 deletion helm/kc-cron-job/templates/cron-active-sessions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "..fullname" . }}-active-sessions
Expand Down
2 changes: 1 addition & 1 deletion helm/kc-cron-job/templates/cron-event-logs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "..fullname" . }}-event-logs
Expand Down
12 changes: 12 additions & 0 deletions helm/kc-cron-job/values-6d70e7-tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,15 @@ resources:
requests:
cpu: 0.25
memory: 256M

patroni:
replicaCount: 2

nameOverride: kc-cron-patroni
fullnameOverride: kc-cron-patroni

persistentVolume:
size: 50Gi

podDisruptionBudget:
enabled: true
6 changes: 0 additions & 6 deletions helm/keycloak/deploy-gold-c6af30-test.sh

This file was deleted.

14 changes: 0 additions & 14 deletions helm/keycloak/deploy-golddr-c6af30-test.sh

This file was deleted.

1 change: 0 additions & 1 deletion helm/keycloak/transition-scripts/deploy-gold-active.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ cd ./keycloak/
helm upgrade --install sso-keycloak sso-charts/sso-keycloak \
-n ${NAMESPACE} -f ./values-gold-${NAMESPACE}.yaml \
--version v1.7.1

1 change: 0 additions & 1 deletion helm/keycloak/transition-scripts/set-patroni-active.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ fi
OUTPUT=$(kubectl -n ${NAMESPACE} exec sso-patroni-0 -- curl -s -o /dev/null -w "%{http_code}" -XPATCH -d '{"standby_cluster":null}' http://localhost:8008/config)

echo "::set-output name=patroniconfig::${OUTPUT}"

31 changes: 0 additions & 31 deletions helm/keycloak/values-c6af30-dev.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions helm/keycloak/values-c6af30-prod.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions helm/keycloak/values-gold-c6af30-test.yaml

This file was deleted.

47 changes: 0 additions & 47 deletions helm/keycloak/values-golddr-c6af30-test.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions terraform/gold/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,18 @@ output "deployer_secrets" {
description = "Default secret names"
value = { for n in sort(local.namespaces) : n => module.deployers[n].default_secret_name }
}

module "admin_deployer" {
source = "bcgov/openshift/deployer"
version = "0.10.0"

name = "oc-sso-deployer"
namespace = "eb75ad-prod"
privileged_namespaces = local.namespaces
ops_bcgov = true
}

output "admin_deployer_secret" {
description = "Admin deployer secret name"
value = module.admin_deployer.default_secret_name
}
15 changes: 15 additions & 0 deletions terraform/golddr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,18 @@ output "deployer_secrets" {
description = "Default secret names"
value = { for n in sort(local.namespaces) : n => module.deployers[n].default_secret_name }
}

module "admin_deployer" {
source = "bcgov/openshift/deployer"
version = "0.10.0"

name = "oc-sso-deployer"
namespace = "eb75ad-prod"
privileged_namespaces = local.namespaces
ops_bcgov = true
}

output "admin_deployer_secret" {
description = "Admin deployer secret name"
value = module.admin_deployer.default_secret_name
}

0 comments on commit 6971e9c

Please sign in to comment.