-
Notifications
You must be signed in to change notification settings - Fork 5
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
Horreum realm import for keycloak and improved app init script #21
base: master
Are you sure you want to change the base?
Conversation
Can you squash these commits ? |
1caa8ed
to
d915dc0
Compare
I use |
I still have some work to do, and then I will clean things up before opening this PR. |
2a0cb00
to
c2a8bbf
Compare
controllers/keycloak.go
Outdated
|
||
return &corev1.ConfigMap{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Name: cr.Name + "-keycloak-horreum", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this name non-descriptive / confusing. I suggest cr.Name + "-keycloak-horreum-realm"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
c2a8bbf
to
63d886a
Compare
Remember to squash |
864cdc8
to
1b24657
Compare
remove unnecessary env keycloak init and realm import app init container into a loop import realm file from url rename configmaps and volumes for horreum realms for better clarity add sa, cr, and crb to app spec tweaking and testing rbac
df6557e
to
b8e5fef
Compare
Changes included
Fixes still needed
To finalize these changes, we still need to correct a problem related to CA certificates with the app. PR #17 from @barreiro includes the basic changes, which are reported to work correctly with vanilla k8s. However, with OpenShift, the
keytool
command run in the app startup to add the CA cert fails because there is no write access to the root filesystem.Correcting this involves running the pod, or at least the init container, with a ServiceAccount that has been granted the
anyuid
privileges in its ClusterRole. Since the ClusterRole and the ClusterRole binding are cluster-level resources, they cannot be created by the operator itself, so these need to be included when deploying the operator in order to make the privilege available to the ServiceAccount that can then be assigned to the container.