This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[incubator/keycloak] Add miscellaneous improvements
* Update Keycloak to 3.4.3.Final * Use nc to check for PostgreSQL availability in order to avoid RBAC configurations * Allow additional volumes and mounts to be configured * Allow custom pre-start script to be configured * Improve affinity configuration * Add security context * Update _helpers.tpl * Only add environment variables for Keycloak credentials on install. They are only needed for creating the intial user. This avoids an error in the logs * Add pod disruption budget * Make test more robust
- Loading branch information
1 parent
9667722
commit 453fdb9
Showing
18 changed files
with
174 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,52 @@ | ||
|
||
1. Keycloak can be accessed: | ||
Keycloak can be accessed: | ||
|
||
* Within your cluster, at the following DNS name at port {{ .Values.keycloak.service.port }}: | ||
* Within your cluster, at the following DNS name at port {{ .Values.keycloak.service.port }}: | ||
|
||
{{ template "keycloak.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local | ||
{{ template "keycloak.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local | ||
|
||
{{- if .Values.keycloak.ingress.enabled }} | ||
|
||
* From outside the cluster: | ||
* From outside the cluster: | ||
|
||
{{- range .Values.keycloak.ingress.hosts }} | ||
- http{{ if $.Values.keycloak.ingress.tls.enabled }}s{{ end }}://{{ . }} | ||
{{- end }} | ||
{{- range .Values.keycloak.ingress.hosts }} | ||
- http{{ if $.Values.keycloak.ingress.tls.enabled }}s{{ end }}://{{ . }} | ||
{{- end }} | ||
|
||
{{- else }} | ||
|
||
* From outside the cluster, run these commands in the same shell: | ||
* From outside the cluster, run these commands in the same shell: | ||
|
||
{{- if contains "NodePort" .Values.keycloak.service.type }} | ||
{{- if contains "NodePort" .Values.keycloak.service.type }} | ||
|
||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "keycloak.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "keycloak.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
|
||
{{- else if contains "LoadBalancer" .Values.keycloak.service.type }} | ||
{{- else if contains "LoadBalancer" .Values.keycloak.service.type }} | ||
|
||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc -w {{ template "keycloak.fullname" . }}' | ||
NOTE: | ||
It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get svc -w {{ template "keycloak.fullname" . }}' | ||
|
||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "keycloak.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.keycloak.service.port }} | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "keycloak.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.keycloak.service.port }} | ||
|
||
{{- else if contains "ClusterIP" .Values.keycloak.service.type }} | ||
{{- else if contains "ClusterIP" .Values.keycloak.service.type }} | ||
|
||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "keycloak.name" . }},release={{ .Release.Name }} -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use Keycloak" | ||
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080 | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ template "keycloak.name" . }},release={{ .Release.Name }} -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8080 to use Keycloak" | ||
kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 8080 | ||
|
||
{{- end }} | ||
{{- end }} | ||
|
||
{{- end }} | ||
|
||
2. Login with the following credentials: | ||
{{- if .Release.IsInstall -}} | ||
Login with the following credentials: | ||
|
||
Username: {{ .Values.keycloak.username }} | ||
Username: {{ .Values.keycloak.username }} | ||
|
||
To retrieve the initial user password run: | ||
kubectl get secret --namespace {{ .Release.Namespace }} {{ template "keycloak.fullname" . }}-http -o jsonpath="{.data.password}" | base64 --decode; echo | ||
To retrieve the initial user password run: | ||
kubectl get secret --namespace {{ .Release.Namespace }} {{ template "keycloak.fullname" . }}-http -o jsonpath="{.data.password}" | base64 --decode; echo | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
|
||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "keycloak.fullname" . }}-http | ||
labels: | ||
app: {{ template "keycloak.name" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
chart: {{ template "keycloak.chart" . }} | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
type: Opaque | ||
data: | ||
{{- if .Values.keycloak.password }} | ||
password: {{ .Values.keycloak.password | b64enc | quote }} | ||
{{- with .Values.keycloak.password }} | ||
password: {{ . | b64enc | quote }} | ||
{{- else }} | ||
password: {{ randAlphaNum 10 | b64enc | quote }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{- if .Values.keycloak.podDisruptionBudget -}} | ||
apiVersion: policy/v1beta1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
labels: | ||
app: {{ template "keycloak.name" . }} | ||
chart: {{ template "keycloak.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "keycloak.fullname" . }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ template "keycloak.name" . }} | ||
release: {{ .Release.Name }} | ||
{{ toYaml .Values.keycloak.podDisruptionBudget | indent 2 }} | ||
{{- end -}} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.