Skip to content
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

feat: remove crds and switch from clusterrole to role #43

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ app:
db:
enabled: true
operator: false

env:
# See watchNamespaces
"QUARKUS_OPERATOR_SDK_CONTROLLERS_DATABASECONTROLLER_NAMESPACES": "JOSDK_WATCH_CURRENT"
envCustom:
- name: KUBERNETES_NAMESPACE
valueFrom:
Expand All @@ -58,6 +54,15 @@ app:
serviceAccount:
enabled: true

----

MESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
serviceAccount:
enabled: true

# Values: JOSDK_WATCH_CURRENT, JOSDK_ALL_NAMESPACES or comma separated list of namespaces
watchNamespaces: "JOSDK_WATCH_CURRENT"
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,87 +11,87 @@ h| Version
| tkit-quarkus-log-cdi

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-cdi.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.28.0
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-cdi.adoc[Link]
| 2.31.0

| tkit-quarkus-log-rs

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-rs.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.28.0
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-rs.adoc[Link]
| 2.31.0

| tkit-quarkus-log-json

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-log-json.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.28.0
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-log-json.adoc[Link]
| 2.31.0

| quarkus-arc

| https://quarkus.io/guides/cdi-reference[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-arc.adoc[Link]
| 3.12.2
| 3.13.2

| quarkus-micrometer-registry-prometheus

| https://quarkus.io/guides/telemetry-micrometer[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-micrometer-registry-prometheus.adoc[Link]
| 3.12.2
| 3.13.2

| quarkus-opentelemetry

| https://quarkus.io/guides/opentelemetry[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-opentelemetry.adoc[Link]
| 3.12.2
| 3.13.2

| quarkus-jdbc-postgresql

| https://quarkus.io/guides/datasource[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-jdbc-postgresql.adoc[Link]
| 3.12.2
| 3.13.2

| tkit-quarkus-security

| https://1000kit.github.io/tkit-quarkus/current/tkit-quarkus/tkit-quarkus-security.html[Link]
| https://github.com/1000kit/tkit-quarkus/blob/2.28.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.28.0
| https://github.com/1000kit/tkit-quarkus/blob/2.31.0/docs/modules/tkit-quarkus/pages/includes/tkit-quarkus-security.adoc[Link]
| 2.31.0

| onecx-core

| https://onecx.github.io/docs/onecx-quarkus/current/onecx-quarkus/onecx-core.html[Link]
|
| 0.24.0
| 0.26.0

| quarkus-smallrye-health

| https://quarkus.io/guides/smallrye-health[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-smallrye-health.adoc[Link]
| 3.12.2
| 3.13.2

| quarkus-container-image-docker

| https://quarkus.io/guides/container-image[Link]
| https://github.com/quarkusio/quarkusio.github.io/blob/develop/_generated-doc/latest/config/quarkus-container-image-docker.adoc[Link]
| 3.12.2
| 3.13.2


| quarkus-operator-sdk-bundle-generator

|
|
| 6.7.1
| 6.7.3

| quarkus-operator-sdk

|
|
| 6.7.1
| 6.7.3

| quarkus-agroal

|
|
| 3.12.2
| 3.13.2


|===
63 changes: 0 additions & 63 deletions src/main/helm/crds/databases.onecx.tkit.org-v1.yml

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/helm/templates/operator-cluster-role-binding.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/helm/templates/operator-cluster-role.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions src/main/helm/templates/product-cluster-role-binding.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions src/main/helm/templates/role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Release.Name }}-{{ .Values.app.name }}-role-binding
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: {{ .Release.Name }}-{{ .Values.app.name }}-role
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-{{ .Values.app.name }}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
name: {{ .Release.Name }}-{{ .Values.app.name }}-cluster-role
name: {{ .Release.Name }}-{{ .Values.app.name }}-role
rules:
- apiGroups:
- onecx.tkit.org
Expand Down
7 changes: 0 additions & 7 deletions src/main/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ app:
db:
enabled: true
operator: false

env:
# See watchNamespaces
"QUARKUS_OPERATOR_SDK_CONTROLLERS_DATABASECONTROLLER_NAMESPACES": "JOSDK_WATCH_CURRENT"
envCustom:
- name: KUBERNETES_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
serviceAccount:
enabled: true

# Values: JOSDK_WATCH_CURRENT, JOSDK_ALL_NAMESPACES or comma separated list of namespaces
watchNamespaces: "JOSDK_WATCH_CURRENT"
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import io.javaoperatorsdk.operator.processing.event.source.filter.OnUpdateFilter;
import io.javaoperatorsdk.operator.processing.event.source.informer.InformerEventSource;

@ControllerConfiguration(onAddFilter = DatabaseController.AddFilter.class, onUpdateFilter = DatabaseController.UpdateFilter.class)
@ControllerConfiguration(onAddFilter = DatabaseController.AddFilter.class, onUpdateFilter = DatabaseController.UpdateFilter.class, namespaces = Constants.WATCH_CURRENT_NAMESPACE)
public class DatabaseController implements Reconciler<Database>, ErrorStatusHandler<Database>,
EventSourceInitializer<Database> {

Expand Down
Loading