Skip to content

Commit 0eec656

Browse files
authored
fix: reconcilerTemplate metadata spec (#157)
1 parent 274f263 commit 0eec656

File tree

8 files changed

+161
-1914
lines changed

8 files changed

+161
-1914
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
## Release process
22

3-
### Controller release
43
1. Merge all pr's to master which need to be part of the new release
5-
2. Create pr to master and bump the kustomization base
6-
3. Push a tag following semantic versioning prefixed by 'v'. Do not create a github release, this is done automatically.
7-
4. Create a new pr and add the following changes:
8-
1. Bump chart version
9-
2. Bump charts app version
10-
11-
### Helm chart change only
12-
1. Bump the helm chart version in the pr
4+
2. Push a tag following semantic versioning prefixed by 'v'. Do not create a github release, this is done automatically.
5+
3. Wait until all artifacts are published.

PROJECT

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
11
domain: doodle.com
2-
repo: github.com/DoodleScheduling/keycloak-controller
2+
layout:
3+
- go.kubebuilder.io/v3
4+
projectName: keycloak-controller
5+
repo: github.com/doodlescheduling/keycloak-controller
36
resources:
4-
- group: keycloak.infra.doodle.com
7+
- api:
8+
crdVersion: v1
9+
namespaced: true
10+
controller: true
11+
domain: doodle.com
12+
group: keycloak.infra.doodle.com
513
kind: KeycloakRealm
14+
path: github.com/doodlescheduling/keycloak-controller/api/v1beta1
615
version: v1beta1
7-
- group: keycloak.infra.doodle.com
16+
- api:
17+
crdVersion: v1
18+
namespaced: true
19+
controller: true
20+
domain: doodle.com
21+
group: keycloak.infra.doodle.com
822
kind: KeycloakClient
23+
path: github.com/doodlescheduling/keycloak-controller/api/v1beta1
924
version: v1beta1
10-
- group: keycloak.infra.doodle.com
25+
- api:
26+
crdVersion: v1
27+
namespaced: true
28+
controller: true
29+
domain: doodle.com
30+
group: keycloak.infra.doodle.com
1131
kind: KeycloakUser
32+
path: github.com/doodlescheduling/keycloak-controller/api/v1beta1
1233
version: v1beta1
13-
version: "2"
34+
version: "3"

api/v1beta1/keycloakrealm_types.go

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type KeycloakRealmSpec struct {
6868

6969
// Reconciler defines the pod spec for the reconciler
7070
// +optional
71-
ReconcilerTemplate *corev1.Pod `json:"reconcilerTemplate,omitempty"`
71+
ReconcilerTemplate *ReconcilerTemplate `json:"reconcilerTemplate,omitempty"`
7272

7373
// Version is the keycloak version
7474
// +optional
@@ -82,6 +82,34 @@ type KeycloakRealmSpec struct {
8282
ResourceSelector *metav1.LabelSelector `json:"resourceSelector,omitempty"`
8383
}
8484

85+
type ReconcilerTemplate struct {
86+
// Standard object's metadata.
87+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
88+
// +optional
89+
ObjectMetadata `json:"metadata,omitempty"`
90+
91+
// Specification of the desired behavior of the pod.
92+
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
93+
// +optional
94+
Spec corev1.PodSpec `json:"spec,omitempty"`
95+
}
96+
97+
type ObjectMetadata struct {
98+
// Map of string keys and values that can be used to organize and categorize
99+
// (scope and select) objects. May match selectors of replication controllers
100+
// and services.
101+
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
102+
// +optional
103+
Labels map[string]string `json:"labels,omitempty"`
104+
105+
// Annotations is an unstructured key value map stored with a resource that may be
106+
// set by external tools to store and retrieve arbitrary metadata. They are not
107+
// queryable and should be preserved when modifying objects.
108+
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
109+
// +optional
110+
Annotations map[string]string `json:"annotations,omitempty"`
111+
}
112+
85113
// SecretReference is a named reference to a secret which contains user credentials
86114
type SecretReference struct {
87115
// Name referrs to the name of the secret, must be located whithin the same namespace

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 47 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)