Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix problem with OperatorGroup invalid spec (when using gitops) #534

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

trevorbox
Copy link
Contributor

What is this PR About?

Describe the contents of the PR

The chart produces an invalid spec for OperatorGroups in some scenarios. This becomes a problem when using the chart with ArgoCD.

Example error from ArgoCD

one or more objects failed to apply, reason: OperatorGroup.operators.coreos.com "whatever" is invalid: spec.targetNamespaces: Invalid value: "null": spec.targetNamespaces in body must be of type array: "null".

How do we test this?

Provide commands/steps to test this PR

Apply this application to an ArgoCD instance...

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: test-operators-installer
  namespace: openshift-gitops
spec:
  destination:
    namespace: openshift-gitops
    server: 'https://kubernetes.default.svc'
  project: default
  source:
    chart: operators-installer
    repoURL: https://redhat-cop.github.io/helm-charts
    helm: 
      valuesObject:
        approveManualInstallPlanViaHook: true
        installPlanApproverAndVerifyJobsImage: quay.io/openshift/origin-cli:4.14
        operatorGroups:
        - name: whatever
          targetOwnNamespace: false
          createNamespace: true
    targetRevision: 2.4.3
  syncPolicy:
    automated:
      selfHeal: true
    syncOptions:
      - ApplyOutOfSyncOnly=true
      - PrunePropagationPolicy=foreground
      - PruneLast=true
      - ServerSideApply=true
      - FailOnSharedResource=true
      - RespectIgnoreDifferences=true
      - CreateNamespace=false

cc: @redhat-cop/day-in-the-life

@ckavili
Copy link
Contributor

ckavili commented Jun 19, 2024

hey @trevorbox , thanks for the PR! would you mind to bump up the Chart version to make the linter happy please? 💚 thanks!

@trevorbox
Copy link
Contributor Author

hey @trevorbox , thanks for the PR! would you mind to bump up the Chart version to make the linter happy please? 💚 thanks!

done

@ckavili
Copy link
Contributor

ckavili commented Jun 24, 2024

thanks @trevorbox 🙌

@ckavili ckavili merged commit c463591 into redhat-cop:main Jun 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants