Closed Neferites closed 7 months ago
Yes this indeed looks like a bug, thanks for reporting.
I think the issue was not completly fixed. When running the new version 2.2.0 and using groups: string[], I am correctly getting this error:
cannot unmarshal string into Go struct field KeycloakAPIRealm.items.spec.realm.groups of type v1beta1.KeycloakAPIGroup\n"}
Nonetheless, when I use the proper object structure
groups:
- name: group1
path: /group1
clientRoles:
role1:
- impersonation
- view-users
role2:
- impersonation
- view-users
I get:
strict decoding error: unknown field "spec.realm.groups[0].clientRoles", unknown field "spec.realm.groups[0].name", unknown field "spec.realm.groups[0].path"
I can't reproduce this. Are you certain you are running the latest version as well as updated crds? How did you deploy the release?
Please try with a new realm also.
The issue was with upgrading the CRDs, I did not know that Helm does not reinstall CRDs if it already existed 😓 Helm doc: https://helm.sh/docs/topics/charts/#limitations-on-crds
Thanks for the help 👍
Hello First of all, i'm grateful for this well-designed controller :). I'm facing an issue with groups not being imported.
Group structure :
Describe the change
For now, groups are defined by :
Groups []string `json:"groups,omitempty"`
From Keycloak api doc, group representation consist of maps, strings, array and subgroups. https://www.keycloak.org/docs-api/21.0.1/rest-api/index.html#_grouprepresentationCurrent situation
Groups are :
Groups []string `json:"groups,omitempty"`
Should
Groups should be :
Groups []GroupRepresentation `json:"groups,omitempty"`
Additional context
Add any other context about the problem here.