ansible / galaxy-operator

Galaxy-Operator
GNU General Public License v2.0
9 stars 15 forks source link

Cannot add GALAXY_FEATURE_FLAGS to galaxy CR #139

Open neevnuv opened 2 months ago

neevnuv commented 2 months ago

Version galaxy-operator: 2024.5.8

Describe the bug When creating a galaxy CR, you cannot set the GALAXY_FEATURE_FLAGS, because the CR only specifies execution_environments. Plus, the execution_environments can only be boolean, which makes the "True" values become "true". This also causes an error, because the pulp_settings can only understand "True". https://github.com/ansible/galaxy-operator/blob/5eef56db4a5f8388f69de0d17d160e91692717b9/config/crd/bases/galaxy_v1beta1_galaxy_crd.yaml#L64C15-L74C33

To Reproduce Create Galaxy CR as following:

---
apiVersion: galaxy.ansible.com/v1beta1
kind: Galaxy
metadata:
  name: galaxy
  namespace: galaxy
spec:
  hostname: localhost
  ingress_type: ingress
  storage_type: File
  file_storage_access_mode: ReadWriteOnce
  file_storage_size: 8Gi
  no_log: false
  pulp_settings:
    GALAXY_FEATURE_FLAGS:
      execution_environments: True
      signatures_enabled: True

Expected behavior The signatures_enabled will remain in the Galaxy CR, and the execution_environments will allow string.

neevnuv commented 2 months ago

I suggest we change in the CSV the GALAXY_FEATURE_FLAGS to have x-kubernetes-preserve-unknown-fields and remove execution_environments from being only boolean in the properties.