Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Allow excluding IoT CRDs during Ansible installation (fixes #5046) #5054

Closed
Closed
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
1 change: 1 addition & 0 deletions ansible/inventory/with-standard-authservice.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ localhost ansible_connection=local
[enmasse:vars]
namespace=enmasse-infra
enable_rbac=True
enable_iot=True
service_catalog=False
keycloak_admin_password=admin
authentication_services=["standard"]
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/cluster_admin/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
monitoring_operator: False
monitoring: False
enable_iot: False
enable_iot: True
8 changes: 7 additions & 1 deletion ansible/roles/crds/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
- name: Install the CRDs
- name: Install the core CRDs (excluding IoT)
shell: |
for i in $(find "{{ playbook_dir }}/install/crds" -type f ! -name "010-iot*"); do oc apply -f "$i"; done
when: not enable_iot

- name: Install the CRDs (including IoT)
shell: oc apply -n {{ namespace }} -f {{ playbook_dir }}/install/crds
when: enable_iot
2 changes: 1 addition & 1 deletion ansible/roles/defaults/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
enmasse_serviceaccount: enmasse-admin
enmasse_environment: development
enable_rbac: true
enable_iot: false
enable_iot: true
keycloak_admin_user: admin
service_catalog: false
standard_authservice_resources: standard_authservice_keycloak
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/enmasse_operator/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
- name: Apply the EnMasse Operator
shell: oc apply -n {{ namespace }} -f {{ playbook_dir }}/install/enmasse-operator
- name: Disable IoT modules
shell: oc set env deployment/enmasse-operator CONTROLLER_ENABLE_IOT_CONFIG=false CONTROLLER_ENABLE_IOT_PROJECT=false
when: not enable_iot
2 changes: 1 addition & 1 deletion ansible/roles/iot/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Apply the IoT CRD
- name: Apply the IoT API Roles
shell: oc apply -n {{ namespace }} -f {{ playbook_dir }}/install/iot/api
- name: Apply the IoT Common
shell: oc apply -n {{ namespace }} -f {{ playbook_dir }}/install/iot/common
Expand Down
25 changes: 15 additions & 10 deletions cmd/controller-manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,21 @@ func main() {
Version: "v1beta1",
Kind: "AddressList",
},
schema.GroupVersionKind{
Group: "iot.enmasse.io",
Version: "v1alpha1",
Kind: "IoTProject",
},
schema.GroupVersionKind{
Group: "iot.enmasse.io",
Version: "v1alpha1",
Kind: "IoTProjectList",
},
}

if util.IsModuleEnabled("IOT_PROJECT") {
globalGvks = append(globalGvks,
schema.GroupVersionKind{
Group: "iot.enmasse.io",
Version: "v1alpha1",
Kind: "IoTProject",
},
schema.GroupVersionKind{
Group: "iot.enmasse.io",
Version: "v1alpha1",
Kind: "IoTProjectList",
},
)
}

if util.IsModuleEnabled("MESSAGING_INFRASTRUCTURE") {
Expand Down