From 1823c7203fb52e04e1361a1eaf6d4ab7afbb287e Mon Sep 17 00:00:00 2001 From: Francesco Romani Date: Tue, 7 Jan 2025 14:10:17 +0100 Subject: [PATCH] manifests: drop configmap support controller-runtime supports ComponentConfig (see: https://github.com/kubernetes-sigs/controller-runtime/blob/main/designs/component-config.md) which is an interesting way to feed configuration data into projects using controller-runtime. Thing is: we don't use, nor plan to do, this feature, so let's remove unnecessary noise in our tree and manifests we carry on for no reason. +++ In hindsight, this could have been interesting to solve the RTE configuration problem, but upstream re-implemented and solved that problem on its own already anyway. More than that, to date the bottleneck was not using configuration files per se, but untangling the existing option spaghetti and do a orderly transition to config files. So, somehow the silver lining is the problem would probably have looked the same even if we consumed a `ComponentConfig` (assuming is a good fit for the RTE specific problem, which is not proven yet). A better approach for the RTE problem would have been to stop using commandline past the first 3 flags (or any other tiny amount), but that ship long sailed (and it's a non trivial take anyway: config files make sense when config proper is complex enough, but stopping when reaching the 3 flags is not complex by any relevant metric, so it's still a different bet on the future). Signed-off-by: Francesco Romani --- ...resources-manager-config_v1_configmap.yaml | 17 ---------------- ...ources-operator.clusterserviceversion.yaml | 2 +- config/default/kustomization.yaml | 4 ---- config/default/manager_config_patch.yaml | 20 ------------------- config/manager/controller_manager_config.yaml | 11 ---------- config/manager/kustomization.yaml | 4 ---- 6 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 bundle/manifests/numaresources-manager-config_v1_configmap.yaml delete mode 100644 config/default/manager_config_patch.yaml delete mode 100644 config/manager/controller_manager_config.yaml diff --git a/bundle/manifests/numaresources-manager-config_v1_configmap.yaml b/bundle/manifests/numaresources-manager-config_v1_configmap.yaml deleted file mode 100644 index 3ca698e9d..000000000 --- a/bundle/manifests/numaresources-manager-config_v1_configmap.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -data: - controller_manager_config.yaml: | - apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 - kind: ControllerManagerConfig - health: - healthProbeBindAddress: :8081 - metrics: - bindAddress: 127.0.0.1:8080 - webhook: - port: 9443 - leaderElection: - leaderElect: true - resourceName: 034fe0a3.openshift.io -kind: ConfigMap -metadata: - name: numaresources-manager-config diff --git a/bundle/manifests/numaresources-operator.clusterserviceversion.yaml b/bundle/manifests/numaresources-operator.clusterserviceversion.yaml index e888c37d5..97f0372b4 100644 --- a/bundle/manifests/numaresources-operator.clusterserviceversion.yaml +++ b/bundle/manifests/numaresources-operator.clusterserviceversion.yaml @@ -62,7 +62,7 @@ metadata: } ] capabilities: Basic Install - createdAt: "2025-01-01T17:56:52Z" + createdAt: "2025-01-07T13:18:55Z" olm.skipRange: '>=4.18.0 <4.19.0' operatorframework.io/cluster-monitoring: "true" operators.operatorframework.io/builder: operator-sdk-v1.36.1 diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 946c19af5..76affa47a 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -30,10 +30,6 @@ patchesStrategicMerge: # endpoint w/o any authn/z, please comment the following line. #- manager_auth_proxy_patch.yaml -# Mount the controller config file for loading manager configurations -# through a ComponentConfig type -#- manager_config_patch.yaml - # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in # crd/kustomization.yaml #- manager_webhook_patch.yaml diff --git a/config/default/manager_config_patch.yaml b/config/default/manager_config_patch.yaml deleted file mode 100644 index 6c400155c..000000000 --- a/config/default/manager_config_patch.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - args: - - "--config=controller_manager_config.yaml" - volumeMounts: - - name: manager-config - mountPath: /controller_manager_config.yaml - subPath: controller_manager_config.yaml - volumes: - - name: manager-config - configMap: - name: manager-config diff --git a/config/manager/controller_manager_config.yaml b/config/manager/controller_manager_config.yaml deleted file mode 100644 index 15993b674..000000000 --- a/config/manager/controller_manager_config.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 -kind: ControllerManagerConfig -health: - healthProbeBindAddress: :8081 -metrics: - bindAddress: 127.0.0.1:8080 -webhook: - port: 9443 -leaderElection: - leaderElect: true - resourceName: 034fe0a3.openshift.io diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 3ea8391e0..dcdd046b3 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,10 +4,6 @@ resources: generatorOptions: disableNameSuffixHash: true -configMapGenerator: -- files: - - controller_manager_config.yaml - name: manager-config apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: