ManageIQ / manageiq-pods

ManageIQ on Kubernetes and OpenShift
Apache License 2.0
50 stars 100 forks source link

Operator is looking for openshift crds in non-openshift cluster #1043

Closed tariksimsek closed 7 months ago

tariksimsek commented 7 months ago

Hello,

I have installed strimzi and manageiq in a k8s cluster and operator is not install manageiq . I get below error. CRD is not exist becuase it is not an openshift cluster. Can you guid me here please? Thanks

2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling ManageIQ    {"Request.Namespace": "default", "Request.Name": "manageiq-gh"}
2024-01-29T15:57:43.879891239+03:00 2024-01-29T12:57:43Z    INFO    controller_manageiq Migrating the CR...
2024-01-29T15:57:43.880057039+03:00 2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the CR...
2024-01-29T12:57:43Z    INFO    controller_manageiq Validating the CR...
2024-01-29T15:57:43.880570557+03:00 2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the operator pod...
2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the NetworkPolicies...
2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the Secrets...
2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the default Service Account...
2024-01-29T15:57:43.882781022+03:00 2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the Postgresql resources...
2024-01-29T12:57:43Z    INFO    controller_manageiq Deployment has been reconciled  {"component": "postgresql", "result": "updated"}
2024-01-29T15:57:43.889243180+03:00 2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the HTTPD resources...
2024-01-29T12:57:43Z    INFO    controller_manageiq Deployment has been reconciled  {"component": "httpd", "result": "updated"}
2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the Memcached resources...
2024-01-29T12:57:43Z    INFO    controller_manageiq Deployment has been reconciled  {"component": "memcached", "result": "updated"}
2024-01-29T12:57:43Z    INFO    controller_manageiq Reconciling the Kafka resources...
2024-01-29T12:57:43Z    ERROR   Reconciler error    {"controller": "manageiq", "controllerGroup": "manageiq.org", "controllerKind": "ManageIQ", "ManageIQ": {"name":"manageiq-gh","namespace":"default"}, "namespace": "default", "name": "manageiq-gh", "reconcileID": "dfaa2953-3817-4517-a7d6-d114bb1f2448", "error": "failed to get restmapping: no matches for kind \"OperatorGroup\" in group \"operators.coreos.com\""}
2024-01-29T15:57:43.903199767+03:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
2024-01-29T15:57:43.903203239+03:00     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:329
2024-01-29T15:57:43.903205958+03:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
    /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:266
2024-01-29T15:57:43.903210486+03:00 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
2024-01-29T15:57:43.903212807+03:00     /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.0/pkg/internal/controller/controller.go:227
Fryguy commented 7 months ago

@tariksimsek Which version and what enviroment (what k8s version)?

Fryguy commented 7 months ago

cc @nasark @bdunne

tariksimsek commented 7 months ago

@tariksimsek Which version and what enviroment (what k8s version)?

Hi, I am using Rancher , k8s version 1.26

Fryguy commented 7 months ago

and which version of manageiq?

tariksimsek commented 7 months ago

and which version of manageiq?

Actually i don't know which version is trying to install operator. I am using below manifest.

apiVersion: manageiq.org/v1alpha1 kind: ManageIQ metadata: name: manageiq-demo spec: applicationDomain: xxx.com

bdunne commented 7 months ago

Which operator image did you deploy? (This should only be on Quinteros or master)

tariksimsek commented 7 months ago

Which operator image did you deploy? (This should only be on Quinteros or master)

I followed the documentation. It is using latest one

apiVersion: apps/v1
kind: Deployment
metadata:
  name: manageiq-operator
spec:
  replicas: 1
  selector:
    matchLabels:
      name: manageiq-operator
  template:
    metadata:
      labels:
        name: manageiq-operator
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/arch
                operator: In
                values:
                - amd64
      serviceAccountName: manageiq-operator
      containers:
        - name: manageiq-operator
          image: docker.io/manageiq/manageiq-operator:latest
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          resources:
            requests:
              memory: 60Mi
              cpu: 10m
            limits:
              memory: 500Mi
              cpu: 100m
nasark commented 7 months ago

@tariksimsek What version of strimzi are you using?

tariksimsek commented 7 months ago

@tariksimsek What version of strimzi are you using?

I believe i need only operator. They are in same namespace quay.io/strimzi/operator:0.39.0

nasark commented 7 months ago

@tariksimsek Okay thanks, I'll try to reproduce and get back to you

tariksimsek commented 7 months ago

:

Thank you @nasark . Also I had to add securitycontext runAsUser ids to run httpd, memcached and postgesql pods. Maybe you can check that also

nasark commented 7 months ago

@tariksimsek I have reproduced the issue, there was a bug in the operator and this will be fixed with https://github.com/ManageIQ/manageiq-pods/pull/1044. Once the PR is merged and the latest image is updated, please try again. Thanks for reporting this issue

Fryguy commented 7 months ago

Fixed in #1044