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

Installation of rhbk-operator is failing with AllNamespaces InstallModeType not supported, cannot configure to watch all namespaces #457

Open
asshutossh opened this issue Feb 11, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@asshutossh
Copy link

asshutossh commented Feb 11, 2025

Invoking the installation with a hardcoded values file to not install openshift-pipelines and openshift-gitops.

rhtap-cli deploy --values-template installer/charts/values.yaml.tpl --embedded=false

Currently the operator is being installed with these values:

 openshiftKeycloak:
    enabled: false
    description: Red Hat Keycloak Operator
    apiResource: keycloaks.k8s.keycloak.org
    namespace: rhbk-operator
    name: rhbk-operator
    channel: stable-v22
    source: redhat-operators
    sourceNamespace: openshift-marketplace
    operatorGroup:
      upgradeStrategy: Default
      **targetNamespaces: []**

After the installation following error appears for the operator

status:
  cleanup: {}
  conditions:
    - lastTransitionTime: '2025-02-11T09:54:01Z'
      lastUpdateTime: '2025-02-11T09:54:01Z'
      message: 'AllNamespaces InstallModeType not supported, cannot configure to watch all namespaces'
      phase: Failed
      reason: UnsupportedOperatorGroup
  lastTransitionTime: '2025-02-11T09:54:01Z'
  lastUpdateTime: '2025-02-11T09:54:01Z'
  message: 'AllNamespaces InstallModeType not supported, cannot configure to watch all namespaces'
  phase: Failed
  reason: UnsupportedOperatorGroup
@Roming22
Copy link
Member

Can you share the manifest for the subscription please?

@asshutossh
Copy link
Author

I added the following manually for the operator to get into a successful state.

  targetNamespaces:
  - rhtap-keycloak

apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  annotations:
    helm.sh/resource-policy: keep
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"operators.coreos.com/v1","kind":"OperatorGroup","metadata":{"annotations":{"helm.sh/resource-policy":"keep"},"labels":{"app.kubernetes.io/instance":"rhtap-subscriptions"},"name":"rhbk-operator","namespace":"rhbk-operator"},"spec":{"targetNamespaces":[],"upgradeStrategy":"Default"}}
    meta.helm.sh/release-name: rhtap-subscriptions
    meta.helm.sh/release-namespace: rhtap
    olm.providedAPIs: Keycloak.v2alpha1.k8s.keycloak.org,KeycloakRealmImport.v2alpha1.k8s.keycloak.org
  creationTimestamp: "2025-02-04T10:57:50Z"
  generation: 4
  labels:
    app.kubernetes.io/instance: rhtap-subscriptions
    app.kubernetes.io/managed-by: Helm
  name: rhbk-operator
  namespace: rhbk-operator
  resourceVersion: "751774189"
  uid: 4d4f8014-ec53-4ea0-8ee2-56708ad149e3
spec:
  targetNamespaces:
  - rhtap-keycloak
  upgradeStrategy: Default

@Roming22
Copy link
Member

Does that mean you cleared that hurdle and we can close this issue?

@asshutossh
Copy link
Author

Well it needs to be fixed in the helm chart so that the operator gets installed successfully.

@Roming22 Roming22 added the bug Something isn't working label Feb 19, 2025
@Roming22
Copy link
Member

Can you specify which version you are using?

I can't reproduce on main.

16:35:01 - RARNAUD:~/Code/rhtap/cli [main]
> make; ./bin/rhtap-cli template charts/rhtap-subscriptions | grep -A5 "name: rhbk-operator"
# Building './bin/rhtap-cli'
go build -o ./bin/rhtap-cli ./cmd/... 
  name: rhbk-operator
spec:
  targetNamespaces:
  - rhtap-keycloak
  upgradeStrategy: Default
---
--
  name: rhbk-operator
spec:
  name: rhbk-operator
  channel: stable-v24
  installPlanApproval: Automatic
  source: redhat-operators
  sourceNamespace: openshift-marketplace
---

I see you are not using the default values.yaml.tpl nor the embedded charts. Could it be that you inadvertently removed something you shouldn't have. The behavior is controlled by those lines in values.yaml.tpl and subscriptions.yaml, and this value in config.yaml.

It would be great if you could provide an archive with enough config to reproduce the issue.

@asshutossh
Copy link
Author

asshutossh commented Feb 21, 2025 via email

@Roming22
Copy link
Member

@asshutossh I don't see the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants