-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Keycloak provisioning #126
Conversation
4669e00
to
c527b2d
Compare
47f9cac
to
42217dd
Compare
With this commit it's now possible to provision a fairly default Keycloak instance backed by our PostgreSQL implementation.
e1ef271
to
17ea5cf
Compare
17ea5cf
to
418fde9
Compare
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.
quite big MR, I have just few notes here, it must be well tested in lab
# curl ${STACKGRES_CRD_URL}/SGPoolingConfig.yaml?inline=false -o apis/stackgres/v1/sgpoolconfigs_crd.yaml | ||
# yq -i e apis/stackgres/v1/sgpoolconfigs.yaml --expression ".components.schemas.SGPoolingConfigSpec=load(\"apis/stackgres/v1/sgpoolconfigs_crd.yaml\").spec.versions[0].schema.openAPIV3Schema.properties.spec" | ||
# yq -i e apis/stackgres/v1/sgpoolconfigs.yaml --expression ".components.schemas.SGPoolingConfigStatus=load(\"apis/stackgres/v1/sgpoolconfigs_crd.yaml\").spec.versions[0].schema.openAPIV3Schema.properties.status" | ||
# go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen --package=v1 -generate=types -o apis/stackgres/v1/sgpoolconfigs.gen.go apis/stackgres/v1/sgpoolconfigs.yaml | ||
# perl -i -0pe 's/\*struct\s\{\n\s\sAdditionalProperties\smap\[string\]string\s`json:"-"`\n\s}/map\[string\]string/gms' apis/stackgres/v1/sgpoolconfigs.gen.go | ||
|
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.
is it still necessary? or just left for future us?
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.
For future us. It probably makes sense if I add a comment though.
tl;dr: the generator for the pool configs doesn't work very well, as it relies on map[string]string
which the go tooling can't handle. I guess it works with java though. So I had to replace parts of the generated code.
apis/stackgres/v1/sgpoolconfigs.go
Outdated
// Spec defines the desired state of a VSHNPostgreSQL. | ||
Spec SGPoolingConfigSpec `json:"spec"` | ||
|
||
// Status reflects the observed state of a VSHNPostgreSQL. | ||
Status SGPoolingConfigStatus `json:"status,omitempty"` |
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.
looks like copy-paste issue in comments
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.
Good catch, I'll change the postgresql references.
Summary
With this commit it's now possible to provision a fairly default Keycloak instance backed by our PostgreSQL implementation.
There are currently no TLS configurations for Keycloak itself or its ingress. Also it currently only provisions in dev mode which has some things disabled like strict hostname checking and tls.
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog