Skip to content

Commit

Permalink
Add Keycloak SLI Prober
Browse files Browse the repository at this point in the history
  • Loading branch information
Kidswiss committed Apr 9, 2024
1 parent f73d73f commit 2748bd0
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 13 deletions.
2 changes: 1 addition & 1 deletion component/class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ parameters:
appcat:
registry: ghcr.io
repository: vshn/appcat
tag: v4.62.1
tag: fix/netpol
apiserver:
registry: ghcr.io
repository: vshn/appcat-apiserver
Expand Down
4 changes: 4 additions & 0 deletions component/component/appcat_sli_exporter.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ local deployment_patch = kube._Object('apps/v1', 'Deployment', 'controller-manag
name: 'APPCAT_SLI_VSHNMINIO',
value: std.manifestJson(params.services.vshn.enabled && params.services.vshn.minio.enabled),
},
{
name: 'APPCAT_SLI_VSHNKEYCLOAK',
value: std.manifestJson(params.services.vshn.enabled && params.services.vshn.keycloak.enabled),
},
],
},
],
Expand Down
5 changes: 3 additions & 2 deletions component/component/vshn_appcat_services.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ local vshn_appcat_service(name, serviceParams) =

local restoreClusterRoleBinding = kube.ClusterRoleBinding('appcat:job:' + name + ':restorejob') + {
roleRef_: restoreRole,
subjects_: [ restoreServiceAccount ],
subjects_: [restoreServiceAccount],
};

local xrd = xrds.XRDFromCRD(
Expand Down Expand Up @@ -91,6 +91,7 @@ local vshn_appcat_service(name, serviceParams) =
restoreSA: serviceParams.restoreSA,
quotasEnabled: std.toString(params.services.vshn.quotasEnabled),
isOpenshift: std.toString(isOpenshift),
sliNamespace: params.slos.namespace,
}
+ std.get(serviceParams, 'additionalInputs', default={}, inc_hidden=true)
+ if serviceParams.proxyFunction then {
Expand Down Expand Up @@ -163,7 +164,7 @@ local vshn_appcat_service(name, serviceParams) =
['20_xrd_vshn_%s' % name]: xrd,
['20_rbac_vshn_%s' % name]: xrds.CompositeClusterRoles(xrd),
['21_composition_vshn_%s' % name]: composition,
['20_role_vshn_%s_restore' % name]: [ restoreRole, restoreServiceAccount, restoreClusterRoleBinding ],
['20_role_vshn_%s_restore' % name]: [restoreRole, restoreServiceAccount, restoreClusterRoleBinding],
['20_plans_vshn_%s' % name]: plansCM,
['22_prom_rule_sla_%s' % name]: promRuleSLA,
[if isOpenshift then '21_openshift_template_%s_vshn' % name]: osTemplate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ kind: Function
metadata:
name: function-appcat
spec:
package: ghcr.io/vshn/appcat:v4.62.1-func
package: ghcr.io/vshn/appcat:fix_netpol-func
runtimeConfigRef:
name: function-appcat
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ spec:
(\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$
type: string
type: object
instances:
default: 1
description: |-
Instances configures the number of Keycloak instances for the cluster.
Each instance contains one Keycloak server.
maximum: 3
minimum: 1
type: integer
maintenance:
description: Maintenance contains settings to control the maintenance
of an instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
chartRepository: https://codecentric.github.io/helm-charts
chartVersion: 2.3.0
controlNamespace: syn-appcat-control
imageTag: v4.62.1
imageTag: fix_netpol
ingress_annotations: |
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
cert-manager.io/cluster-issuer: letsencrypt-staging
Expand All @@ -46,6 +46,7 @@ spec:
registry_username: ''
restoreSA: mariadbrestoreserviceaccount
serviceName: keycloak
sliNamespace: appcat-slos
kind: ConfigMap
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
chartRepository: https://charts.bitnami.com/bitnami
chartVersion: 11.6.2
controlNamespace: syn-appcat-control
imageTag: v4.62.1
imageTag: fix_netpol
isOpenshift: 'false'
maintenanceSA: helm-based-service-maintenance
plans: '{"standard-1": {"size": {"cpu": "250m", "disk": "16Gi", "enabled":
Expand All @@ -44,6 +44,7 @@ spec:
quotasEnabled: 'false'
restoreSA: mariadbrestoreserviceaccount
serviceName: mariadb
sliNamespace: appcat-slos
kind: ConfigMap
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ spec:
emailAlertingSmtpHost: smtp.eu.mailgun.org:465
emailAlertingSmtpUsername: [email protected]
externalDatabaseConnectionsEnabled: 'true'
imageTag: v4.62.1
imageTag: fix_netpol
quotasEnabled: 'false'
serviceName: postgresql
sgNamespace: stackgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ spec:
emailAlertingSmtpHost: smtp.eu.mailgun.org:465
emailAlertingSmtpUsername: [email protected]
externalDatabaseConnectionsEnabled: 'true'
imageTag: v4.62.1
imageTag: fix_netpol
quotasEnabled: 'false'
serviceName: postgresql
sgNamespace: stackgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ spec:
emailAlertingSmtpFromAddress: [email protected]
emailAlertingSmtpHost: smtp.eu.mailgun.org:465
emailAlertingSmtpUsername: [email protected]
imageTag: v4.62.1
imageTag: fix_netpol
maintenanceSA: helm-based-service-maintenance
quotasEnabled: 'false'
restoreSA: redisrestoreserviceaccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
env:
- name: PLANS_NAMESPACE
value: syn-appcat
image: ghcr.io/vshn/appcat:v4.62.1
image: ghcr.io/vshn/appcat:fix_netpol
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
envFrom:
- secretRef:
name: appcat-sla-reports-creds
image: ghcr.io/vshn/appcat:v4.62.1
image: ghcr.io/vshn/appcat:fix_netpol
name: sla-reporter
resources:
limits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ spec:
value: "false"
- name: APPCAT_SLI_VSHNMINIO
value: "false"
image: ghcr.io/vshn/appcat:v4.62.1
- name: APPCAT_SLI_VSHNKEYCLOAK
value: "true"
image: ghcr.io/vshn/appcat:fix_netpol
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,17 @@ rules:
- xvshnredis/status
verbs:
- get
- apiGroups:
- vshn.appcat.vshn.io
resources:
- xvsnkeycloaks
verbs:
- get
- list
- watch
- apiGroups:
- vshn.appcat.vshn.io
resources:
- xvsnkeycloaks/status
verbs:
- get
2 changes: 1 addition & 1 deletion package/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parameters:
image:
registry: ghcr.io
repository: vshn/appcat
tag: v4.62.1
tag: fix/netpol
components:
appcat:
url: https://github.com/vshn/component-appcat.git
Expand Down

0 comments on commit 2748bd0

Please sign in to comment.