From e2fe5c4d269d6be2d626c1f9efb3161082901814 Mon Sep 17 00:00:00 2001 From: Arik Hadas Date: Tue, 30 Apr 2024 16:45:17 +0300 Subject: [PATCH] drop trusted-ca config map apparently, recent versions of OpenShift doesn't set the 'trustedCA' property in the cluster's Proxy, leading to our operator failing on checking "proxy_cluster.spec.trustedCA.name|length > 0". we no longer need the config map as we dropped the old, standadlone, UI. Signed-off-by: Arik Hadas --- .../roles/forkliftcontroller/tasks/main.yml | 17 ----------------- .../templates/configmap-trusted-ca.yml.j2 | 9 --------- 2 files changed, 26 deletions(-) delete mode 100644 operator/roles/forkliftcontroller/templates/configmap-trusted-ca.yml.j2 diff --git a/operator/roles/forkliftcontroller/tasks/main.yml b/operator/roles/forkliftcontroller/tasks/main.yml index 2492b5039..7ea557bbf 100644 --- a/operator/roles/forkliftcontroller/tasks/main.yml +++ b/operator/roles/forkliftcontroller/tasks/main.yml @@ -30,23 +30,6 @@ set_fact: k8s_cluster_version: "{{ lookup('k8s', cluster_info='version').kubernetes.gitVersion }}" - - when: not k8s_cluster|bool - block: - - name: "Get cluster proxy object" - set_fact: - proxy_cluster: "{{ lookup('k8s', api_version='config.openshift.io/v1', kind='Proxy', resource_name='cluster') }}" - - - when: proxy_cluster.spec.trustedCA.name|length > 0 - block: - - name: "Enable trusted CA environment" - set_fact: - trusted_ca_enabled: true - - - name: "Create an empty ConfigMap that will hold the trusted CA" - k8s: - state: present - definition: "{{ lookup('template', 'configmap-trusted-ca.yml.j2') }}" - - name: "Setup controller config map" k8s: state : present diff --git a/operator/roles/forkliftcontroller/templates/configmap-trusted-ca.yml.j2 b/operator/roles/forkliftcontroller/templates/configmap-trusted-ca.yml.j2 deleted file mode 100644 index daaeaea22..000000000 --- a/operator/roles/forkliftcontroller/templates/configmap-trusted-ca.yml.j2 +++ /dev/null @@ -1,9 +0,0 @@ ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: trusted-ca - namespace: {{ app_namespace }} - labels: - app: {{ app_name }} - config.openshift.io/inject-trusted-cabundle: "true"