Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart for Keycloak deployment #99

Merged
merged 2 commits into from
Dec 28, 2021
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
9 changes: 9 additions & 0 deletions solutions/security_authentication/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v3
name: Keycloak Helm template
version: 1.0.0
description: Helm chart template for Keycloak Kubernetes deployment
appVersion: 1.0.0
keywords:
- template
maintainers:
- name: devon4j Developer
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- host: {{ .Values.ingress.keycloak.host }}
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: {{ .Values.keycloak.service.name }}
port:
number: {{ .Values.ingress.keycloak.port }}
54 changes: 54 additions & 0 deletions solutions/security_authentication/helm/templates/keycloak.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: keycloak
labels:
app: keycloak
spec:
replicas: 1
selector:
matchLabels:
app: keycloak
template:
metadata:
labels:
app: keycloak
spec:
containers:
- name: keycloak
image: {{ .Values.keycloak.image.name }}:{{ .Values.keycloak.image.version }}
env:
- name: KEYCLOAK_USER
value: "admin"
- name: KEYCLOAK_PASSWORD
value: "admin"
- name: KEYCLOAK_LOGLEVEL
value: DEBUG
- name: WILDFLY_LOGLEVEL
value: DEBUG
ports:
- name: http
containerPort: {{ .Values.keycloak.ports.http }}
- name: https
containerPort: {{ .Values.keycloak.ports.https }}
readinessProbe:
httpGet:
path: /auth/realms/master
port: {{ .Values.keycloak.ports.http }}

---

apiVersion: v1
kind: Service
metadata:
name: keycloak
labels:
app: keycloak
spec:
ports:
- name: http
port: {{ .Values.keycloak.service.port }}
targetPort: {{ .Values.keycloak.service.targetport }}
selector:
app: keycloak
type: ClusterIP
20 changes: 20 additions & 0 deletions solutions/security_authentication/helm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Keycloak configuration
keycloak:
image:
name: "jboss/keycloak"
version: "latest"

ports:
http: 8080
https: 8443

service:
name: "keycloak"
port: 8080
targetport: 8080

# Ingress configuration
ingress:
keycloak:
host: "keycloak.localhost"
port: 8080
5 changes: 5 additions & 0 deletions solutions/security_authentication/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ We recommend the following conventions:
* this way you do not need any configuration or business knowledge inside your gateway as the routing can be implemented fully generic
* use `app-id.` as a prefix to all permission groups/roles specific to your service to avoid name clashing in your central IAM

=== Implementation hints
* A Helm chart for the deployment of Keycloak in your Kubernetes environment can be found in the https://github.com/devonfw/solutions/blob/master/solutions/security_authentication/helm[GitHub repository of the devonfw solutions browser]
* The https://github.com/devonfw-sample/devon4quarkus-reference/tree/master/documentation[devon4quarkus-product reference application] provides a documentation on how to integrate Keycloak into your Quarkus application to implement security mechanisms

=== Related documentations

* https://github.com/devonfw/devon4j/blob/master/documentation/guide-access-control.asciidoc#authentication[devon4j authentication guide]
Expand All @@ -57,6 +61,7 @@ We recommend the following conventions:
* https://www.keycloak.org/docs/latest/securing_apps/[Keycloak's securing apps guide]



=== IAM solutions

* https://www.keycloak.org/[Keycloak]
Expand Down