Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/hook: PostSync
Expand All @@ -12,7 +12,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/hook: PostSync
Expand All @@ -25,24 +25,24 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
subjects:
- kind: ServiceAccount
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
namespace: {{ .Release.Namespace }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: cleanup-keycloak-users
name: cleanup-keycloak-setup
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/hook: PostSync
Expand All @@ -53,9 +53,9 @@ spec:
template:
metadata:
labels:
app: cleanup-keycloak-users
app: cleanup-keycloak-setup
spec:
serviceAccountName: cleanup-keycloak-users
serviceAccountName: cleanup-keycloak-setup
restartPolicy: Never
containers:
- name: cleanup
Expand Down
4 changes: 2 additions & 2 deletions charts/rh-keycloak/templates/cleanup-network-policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: cleanup-keycloak-users-netpol
name: cleanup-keycloak-setup-netpol
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec:
podSelector:
matchLabels:
app: cleanup-keycloak-users
app: cleanup-keycloak-setup
policyTypes:
- Egress
egress:
Expand Down
5 changes: 5 additions & 0 deletions charts/rh-keycloak/templates/qtodo-client-id-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ metadata:
namespace: {{ .Release.Namespace }}
annotations:
argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/hook: Sync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
argocd.argoproj.io/sync-options: PrunePropagationPolicy=orphan
labels:
validatedpatterns.io/cleanup: delete
type: Opaque
stringData:
client-id: "{{ include "rh-keycloak.qtodo.oidc.clientId" . }}"
22 changes: 22 additions & 0 deletions charts/rh-keycloak/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,17 @@ rhbk:

# ACS Central OIDC client secret
- name: acs-oidc-client-secret
creationPolicy: "Orphan"
deletionPolicy: "Retain"
refreshPolicy: "OnChange"
metadata:
annotations:
argocd.argoproj.io/hook: Sync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
argocd.argoproj.io/sync-options: PrunePropagationPolicy=orphan
targetMetadata:
labels:
validatedpatterns.io/cleanup: delete
data:
- secretKey: client_secret
remoteRef:
Expand All @@ -584,6 +595,17 @@ rhbk:

# RHTPA CLI OIDC client secret
- name: rhtpa-oidc-cli-secret
creationPolicy: "Orphan"
deletionPolicy: "Retain"
refreshPolicy: "OnChange"
metadata:
annotations:
argocd.argoproj.io/hook: Sync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
argocd.argoproj.io/sync-options: PrunePropagationPolicy=orphan
targetMetadata:
labels:
validatedpatterns.io/cleanup: delete
data:
- secretKey: client_secret
remoteRef:
Expand Down
Loading