Skip to content
Draft
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
6 changes: 6 additions & 0 deletions fleet/lib/keycloak-pg/cluster-keycloak-pg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ spec:
max_connections: "500"
shared_buffers: 256MB
idle_session_timeout: 4h
"pgaudit.log": all, -misc
"pgaudit.log_catalog": "off"
"pgaudit.log_parameter": "on"
"pgaudit.log_relation": "on"
pg_hba:
- host replication postgres all md5
- host all all 139.229.134.0/23 md5
Expand All @@ -38,6 +42,8 @@ spec:

monitoring:
enablePodMonitor: true
podMonitorAdditionalLabels:
lsst.io/monitor: "true"

resources:
limits:
Expand Down
11 changes: 11 additions & 0 deletions fleet/lib/keycloak-pg/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ dependsOn:
matchLabels:
bundle: cnpg-system
targetCustomizations:
- name: luan
clusterSelector:
matchExpressions:
- key: management.cattle.io/cluster-display-name
operator: In
values:
- ayekan
yaml:
overlays:
- generic
- ayekan
- name: luan
clusterSelector:
matchExpressions:
Expand Down
18 changes: 18 additions & 0 deletions fleet/lib/keycloak-pg/overlays/ayekan/service-keycloak-pg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
apiVersion: v1
kind: Service
metadata:
name: keycloak-pg
labels:
cnpg.io/cluster: keycloak-pg
annotations:
metallb.universe.tf/loadBalancerIPs: 139.229.144.45
spec:
ports:
- name: postgres
port: 5432
protocol: TCP
selector:
cnpg.io/cluster: keycloak-pg
role: primary
type: LoadBalancer
14 changes: 14 additions & 0 deletions fleet/lib/keycloak-pre/externalsecret-keycloak-realm-master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: keycloak-realm-master
namespace: keycloak
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword
data:
- secretKey: realm-master.json
remoteRef:
key: realm-master.json
property: notesPlain
10 changes: 10 additions & 0 deletions fleet/lib/keycloak/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ dependsOn:
matchLabels:
bundle: keycloak-pg
targetCustomizations:
- name: ayekan
clusterSelector:
matchExpressions:
- key: management.cattle.io/cluster-display-name
operator: In
values:
- ayekan
helm:
valuesFiles:
- overlays/ayekan/values.yaml
- name: luan
clusterSelector:
matchExpressions:
Expand Down
57 changes: 57 additions & 0 deletions fleet/lib/keycloak/overlays/ayekan/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
replicaCount: 3

resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi

extraEnvVars:
- name: KC_HEALTH_ENABLED
value: "true"
- name: KEYCLOAK_LOGLEVEL
value: INFO
- name: KEYCLOAK_PRODUCTION
value: "true"
- name: KEYCLOAK_PROXY
value: edge
- name: KC_HOSTNAME
value: keycloak.${ get .ClusterLabels "management.cattle.io/cluster-display-name" }.${ .ClusterLabels.site }.lsst.org
- name: KC_HOSTNAME_STRICT
value: "true"
- name: KC_HOSTNAME_STRICT_HTTPS
value: "true"
- name: KC_HTTP_ENABLED
value: "false"
- name: KEYCLOAK_REGISTRATION
value: "false"

ingress:
enabled: true
ingressClassName: nginx
servicePort: http
tls: true
hostname: keycloak.${ get .ClusterLabels "management.cattle.io/cluster-display-name" }.${ .ClusterLabels.site }.lsst.org
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"

auth:
adminUser: rubinobs
existingSecret: keycloak-admin
passwordSecretKey: password

postgresql:
enabled: false

externalDatabase:
host: keycloak-pg.keycloak-pg.svc.cluster.local
port: 5432
user: keycloak
database: keycloak
existingSecret: keycloak-pg
existingSecretPasswordKey: password
1 change: 1 addition & 0 deletions fleet/s/dev/c/ayekan/cnpg-system
1 change: 1 addition & 0 deletions fleet/s/dev/c/ayekan/keycloak
1 change: 1 addition & 0 deletions fleet/s/dev/c/ayekan/keycloak-pg
1 change: 1 addition & 0 deletions fleet/s/dev/c/ayekan/keycloak-pre
Loading