diff --git a/operator/molecule/default/converge.yml b/operator/molecule/default/converge.yml index 9e65e378f..6296136cb 100644 --- a/operator/molecule/default/converge.yml +++ b/operator/molecule/default/converge.yml @@ -8,7 +8,7 @@ tasks: - name: Create Namespace - k8s: + kubernetes.core.k8s: api_version: v1 kind: Namespace name: '{{ namespace }}' diff --git a/operator/molecule/default/destroy.yml b/operator/molecule/default/destroy.yml index 9a41e7dec..094c70d4c 100644 --- a/operator/molecule/default/destroy.yml +++ b/operator/molecule/default/destroy.yml @@ -12,7 +12,7 @@ state: absent - name: Destroy Namespace - k8s: + kubernetes.core.k8s: api_version: v1 kind: Namespace name: '{{ namespace }}' diff --git a/operator/molecule/default/kustomize.yml b/operator/molecule/default/kustomize.yml index 587164877..1b73a488b 100644 --- a/operator/molecule/default/kustomize.yml +++ b/operator/molecule/default/kustomize.yml @@ -8,14 +8,14 @@ changed_when: false - name: Set resources to {{ state }} - k8s: + kubernetes.core.k8s: definition: '{{ item }}' state: '{{ state }}' wait: no loop: '{{ resources.stdout | from_yaml_all | list }}' - name: Wait for resources to get to {{ state }} - k8s: + kubernetes.core.k8s: definition: '{{ item }}' state: '{{ state }}' wait: yes diff --git a/operator/molecule/default/tasks/forkliftcontroller_test.yml b/operator/molecule/default/tasks/forkliftcontroller_test.yml index c3f8cd983..a426253e9 100644 --- a/operator/molecule/default/tasks/forkliftcontroller_test.yml +++ b/operator/molecule/default/tasks/forkliftcontroller_test.yml @@ -1,6 +1,6 @@ --- - name: Create the forklift.konveyor.io/v1beta1.ForkliftController - k8s: + kubernetes.core.k8s: state: present namespace: '{{ namespace }}' definition: "{{ lookup('template', '/'.join([samples_dir, cr_file])) | from_yaml }}" diff --git a/operator/requirements.yml b/operator/requirements.yml index b64a6f7a2..71b36faf1 100644 --- a/operator/requirements.yml +++ b/operator/requirements.yml @@ -1,10 +1,8 @@ --- collections: - - name: community.kubernetes - version: "2.0.1" - name: operator_sdk.util - version: "0.4.0" + version: "0.5.0" - name: kubernetes.core - version: "2.3.1" + version: "2.4.0" - name: cloud.common - version: "2.1.1" + version: "2.1.4" diff --git a/operator/roles/forkliftcontroller/meta/main.yml b/operator/roles/forkliftcontroller/meta/main.yml index c979c5daf..7006ba00f 100644 --- a/operator/roles/forkliftcontroller/meta/main.yml +++ b/operator/roles/forkliftcontroller/meta/main.yml @@ -14,7 +14,7 @@ galaxy_info: platforms: - name: EL versions: - - 8 + - 9 galaxy_tags: - forklift @@ -28,4 +28,4 @@ galaxy_info: dependencies: [] collections: - operator_sdk.util -- community.kubernetes +- kubernetes.core diff --git a/operator/roles/forkliftcontroller/tasks/cleanup.yml b/operator/roles/forkliftcontroller/tasks/cleanup.yml index 74d8abd4b..8fd17e61b 100644 --- a/operator/roles/forkliftcontroller/tasks/cleanup.yml +++ b/operator/roles/forkliftcontroller/tasks/cleanup.yml @@ -2,7 +2,7 @@ - block: - name: "Get {{ resource_kind }} resources labeled {{ feature_label }}" - k8s_info: + kubernetes.core.k8s_info: namespace: "{{ app_namespace }}" kind: "{{ resource_kind }}" label_selectors: @@ -10,7 +10,7 @@ register: results - name: "Clean up {{ resource_kind }} resources labeled {{ feature_label }}" - k8s: + kubernetes.core.k8s: namespace: "{{ app_namespace }}" kind: "{{ results.resources[0].kind }}" name: "{{ results.resources[0].metadata.name }}" diff --git a/operator/roles/forkliftcontroller/tasks/main.yml b/operator/roles/forkliftcontroller/tasks/main.yml index d823f6485..f650b59fe 100644 --- a/operator/roles/forkliftcontroller/tasks/main.yml +++ b/operator/roles/forkliftcontroller/tasks/main.yml @@ -48,39 +48,39 @@ trusted_ca_enabled: true - name: "Create an empty ConfigMap that will hold the trusted CA" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'configmap-trusted-ca.yml.j2') }}" - name: "Setup the webhook secret" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'secret-webhook-server-secret.yml.j2') }}" - name: "Setup controller config map" - k8s: + kubernetes.core.k8s: state : present definition: "{{ lookup('template', 'controller/configmap-controller.yml.j2') }}" - name: "Setup inventory service" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'controller/service-inventory.yml.j2') }}" - name: "Setup controller deployment" - k8s: + kubernetes.core.k8s: state : present definition: "{{ lookup('template', 'controller/deployment-controller.yml.j2') }}" merge_type: "merge" - name: "Setup inventory route" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'controller/route-inventory.yml.j2') }}" when: not k8s_cluster|bool - name: "Setup forklift-controller security context constraints" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'controller/controller-scc.yml.j2') }}" when: not k8s_cluster|bool @@ -88,80 +88,80 @@ - when: feature_volume_populator|bool block: - name: "Setup populator controller deployment" - k8s: + kubernetes.core.k8s: state: "{{ volume_populator_state }}" definition: "{{ lookup('template', 'populator/deployment-populator-controller.yml.j2') }}" - when: k8s_cluster|bool block: - name: "Create a trusted CA issuer" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'cert-manager-trusted-ca.yml.j2') }}" - name: "Configure webhook certificate on K8s" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/ca.yml.j2') }}" - name: "Configure validation certificate on K8s" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'validation/ca.yml.j2') }}" - name: "Configure inventory certificate on K8s" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'controller/ca.yml.j2') }}" - name: "Configure must-gather certificate on K8s" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'must-gather-api/ca.yml.j2') }}" - name: "Setup api service" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/service-forklift-api.yml.j2') }}" - name: "Setup api deployment" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/deployment-forklift-api.yml.j2') }}" - name: "Delete aggregated validation webhook configurations" - k8s: + kubernetes.core.k8s: state: absent definition: "{{ lookup('template', 'api/validatingwebhookconfiguration-forklift-api.yml.j2') }}" - name: "Setup secrets validating webhook configuration" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/validatingwebhookconfiguration-secrets.yml.j2') }}" - name: "Setup plans validating webhook configuration" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/validatingwebhookconfiguration-plans.yml.j2') }}" - name: "Setup providers validating webhook configuration" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/validatingwebhookconfiguration-providers.yml.j2') }}" - name: "Delete aggregated mutating webhook configurations" - k8s: + kubernetes.core.k8s: state: absent definition: "{{ lookup('template', 'api/mutatingwebhookconfiguration-forklift-api.yml.j2') }}" - name: "Setup secrets mutating webhook configuration" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/mutatingwebhookconfiguration-secrets.yml.j2') }}" - name: "Setup plans mutating webhook configuration" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'api/mutatingwebhookconfiguration-plans.yml.j2') }}" - name: "Setup default provider" - k8s: + kubernetes.core.k8s: state: present definition: "{{ lookup('template', 'controller/provider-host.yml.j2') }}" when: "'kubevirt.io' in api_groups" @@ -169,29 +169,29 @@ - when: feature_validation|bool block: - name: "Setup validation service" - k8s: + kubernetes.core.k8s: state: "{{ validation_state }}" definition: "{{ lookup('template', 'validation/service-validation.yml.j2') }}" - name: "Setup validation config map" - k8s: + kubernetes.core.k8s: state: "{{ validation_state }}" definition: "{{ lookup('template', 'validation/configmap-validation.yml.j2') }}" - name: "Setup validation deployment" - k8s: + kubernetes.core.k8s: state: "{{ validation_state }}" definition: "{{ lookup('template', 'validation/deployment-validation.yml.j2') }}" - when: feature_must_gather_api|bool block: - name: "Setup must-gather-api service" - k8s: + kubernetes.core.k8s: state: "{{ must_gather_api_state }}" definition: "{{ lookup('template', 'must-gather-api/service-must-gather-api.yml.j2') }}" - name: "Setup must-gather-api deployment" - k8s: + kubernetes.core.k8s: state: "{{ must_gather_api_state }}" definition: "{{ lookup('template', 'must-gather-api/deployment-must-gather-api.yml.j2') }}" @@ -199,27 +199,27 @@ block: - name: "Setup UI plugin configmap" - k8s: + kubernetes.core.k8s: state: "{{ ui_plugin_state }}" definition: "{{ lookup('template', 'ui-plugin/configmap-ui-plugin.yml.j2') }}" - name: "Setup UI plugin service" - k8s: + kubernetes.core.k8s: state: "{{ ui_plugin_state }}" definition: "{{ lookup('template', 'ui-plugin/service-ui-plugin.yml.j2') }}" - name: "Setup UI plugin deployment" - k8s: + kubernetes.core.k8s: state: "{{ ui_plugin_state }}" definition: "{{ lookup('template', 'ui-plugin/deployment-ui-plugin.yml.j2') }}" - name: "Setup console plugin" - k8s: + kubernetes.core.k8s: state: "{{ ui_plugin_state }}" definition: "{{ lookup('template', 'ui-plugin/console-plugin.yml.j2') }}" - name: "Get cluster console information" - k8s_info: + kubernetes.core.k8s_info: api_version: operator.openshift.io/v1 kind: console name: cluster @@ -230,7 +230,7 @@ console_plugins: "{{ console_operator['resources'][0]['spec']['plugins'] | default([]) }}" - name: "Enable console plugin" - k8s: + kubernetes.core.k8s: api_version: operator.openshift.io/v1 kind: console name: cluster