Skip to content

Commit

Permalink
Make otel work with Openshift and add Grafana dashboard for Client cr…
Browse files Browse the repository at this point in the history
…edentials scenario (#384)

Relates to #372
  • Loading branch information
mhajas authored Jun 27, 2023
1 parent 32339f9 commit d71e094
Show file tree
Hide file tree
Showing 7 changed files with 463 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .github/actions/keycloak-create-deployment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ inputs:
description: 'Keycloak pod CPU limit'
heapMaxSizeMB:
description: 'Keycloak server maximum Java heap size (in MB)'
otel:
description: 'Enable OpenTelemetry'
default: 'true'

runs:
using: "composite"
Expand All @@ -45,3 +48,4 @@ runs:
KC_CPU_REQUESTS: ${{ inputs.podCpuRequests }}
KC_CPU_LIMITS: ${{ inputs.podCpuLimit }}
KC_HEAP_MAX_MB: ${{ inputs.heapMaxSizeMB }}
KC_OTEL: ${{ inputs.otel }}
1 change: 1 addition & 0 deletions provision/common/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ tasks:
- test "{{.KC_METASPACE_INIT_MB}}" == "$(cat .task/var-KC_METASPACE_INIT_MB)"
- test "{{.KC_METASPACE_MAX_MB}}" == "$(cat .task/var-KC_METASPACE_MAX_MB)"
- test "{{.KC_CUSTOM_INFINISPAN_CONFIG}}" == "$(cat .task/var-KC_CUSTOM_INFINISPAN_CONFIG)"
- test "{{.KC_DISABLE_STICKY_SESSION}}" == "$(cat .task/var-KC_DISABLE_STICKY_SESSION)"

mvnw:
dir: ../..
Expand Down
2 changes: 2 additions & 0 deletions provision/minikube/keycloak/templates/keycloak.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ spec:
# https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.name=keycloak
{{ if ne .Values.environment "openshift" }}
- name: OTEL_TRACES_EXPORTER
# with otel+tempo 1.4.1 forwarding of traces works, but searching is not returning all values for now, for example delete users was missing
value: jaeger
Expand All @@ -145,6 +146,7 @@ spec:
value: parentbased_traceidratio # always_on, parentbased_traceidratio, ...
- name: OTEL_TRACES_SAMPLER_ARG
value: {{ .Values.otelSamplingPercentage | quote }}
{{ end }}
- name: OTEL_METRICS_EXPORTER
value: prometheus
{{ end }}
Expand Down
4 changes: 4 additions & 0 deletions provision/minikube/keycloak/templates/otel-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ spec:
resources:
requests:
storage: 100Mi
{{ if eq .Values.environment "openshift" }}
storageClassName: efs-sc
{{ else }}
storageClassName: standard
{{ end }}
volumeMode: Filesystem
{{end}}
Loading

0 comments on commit d71e094

Please sign in to comment.