-
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
Changes from 4 commits
f02a735
720bcbe
e5f0405
418fde9
13ddab1
98e8ed9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package v1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
// SGPoolingConfig is the API for creating pgbouncer configs clusters. | ||
type SGPoolingConfig struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
// 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, I'll change the postgresql references. |
||
} | ||
|
||
// +kubebuilder:object:root=true | ||
|
||
type SGPoolingConfigList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
|
||
Items []SGPoolingConfig `json:"items"` | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
openapi: "3.0.2" | ||
paths: | ||
"/spec": | ||
get: | ||
responses: | ||
"200": | ||
content: | ||
"application/json": | ||
schema: | ||
"$ref": "#/components/schemas/SGPoolingConfigSpec" | ||
"/status": | ||
get: | ||
responses: | ||
"200": | ||
content: | ||
"application/json": | ||
schema: | ||
"$ref": "#/components/schemas/SGPoolingConfigStatus" | ||
components: | ||
schemas: | ||
SGPoolingConfigSpec: | ||
type: object | ||
properties: | ||
pgBouncer: | ||
type: object | ||
description: | | ||
Connection pooling configuration based on PgBouncer. | ||
properties: | ||
pgbouncer.ini: | ||
type: object | ||
description: | | ||
The `pgbouncer.ini` parameters the configuration contains, represented as an object where the keys are valid names for the `pgbouncer.ini` configuration file parameters. | ||
|
||
Check [pgbouncer configuration](https://www.pgbouncer.org/config.html#generic-settings) for more information about supported parameters. | ||
properties: | ||
pgbouncer: | ||
type: object | ||
additionalProperties: true | ||
description: | | ||
The `pgbouncer.ini` (Section [pgbouncer]) parameters the configuration contains, represented as an object where the keys are valid names for the `pgbouncer.ini` configuration file parameters. | ||
|
||
Check [pgbouncer configuration](https://www.pgbouncer.org/config.html#generic-settings) for more information about supported parameters | ||
databases: | ||
type: object | ||
additionalProperties: | ||
type: object | ||
additionalProperties: true | ||
description: | | ||
The `pgbouncer.ini` (Section [databases]) parameters the configuration contains, represented as an object where the keys are valid names for the `pgbouncer.ini` configuration file parameters. | ||
|
||
Check [pgbouncer configuration](https://www.pgbouncer.org/config.html#section-databases) for more information about supported parameters. | ||
users: | ||
type: object | ||
additionalProperties: | ||
type: object | ||
additionalProperties: true | ||
description: | | ||
The `pgbouncer.ini` (Section [users]) parameters the configuration contains, represented as an object where the keys are valid names for the `pgbouncer.ini` configuration file parameters. | ||
|
||
Check [pgbouncer configuration](https://www.pgbouncer.org/config.html#section-users) for more information about supported parameters. | ||
SGPoolingConfigStatus: | ||
type: object | ||
properties: | ||
pgBouncer: | ||
type: object | ||
description: | | ||
Connection pooling configuration status based on PgBouncer. | ||
properties: | ||
defaultParameters: | ||
type: object | ||
additionalProperties: | ||
type: string | ||
description: | | ||
The `pgbouncer.ini` default parameters parameters which are used if not set. | ||
required: ["defaultParameters"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.