Skip to content

CSV owned deployment does not controller true reference #2584

@esara

Description

@esara

Bug Report

What did you do?
I am deploying operators from an operator catalog using OLM (in openshift or upsteam)

What did you expect to see?
I see the operator deployment created and it is owned/controlled by the CSV, specifically the "controller: true" attribute under ownerReferences

What did you see instead? Under which circumstances?
but the controller is false (it does not matter which csv/operator I am using - this is just an example)

$ oc get csv -n openshift-operators
NAME DISPLAY VERSION REPLACES PHASE
redhat-openshift-pipelines.v1.5.2 Red Hat OpenShift Pipelines 1.5.2 redhat-openshift-pipelines.v1.4.1 Succeeded

$ oc get deployment -n openshift-operators openshift-pipelines-operator -o=jsonpath='{.metadata.ownerReferences[]}'
{"apiVersion":"operators.coreos.com/v1alpha1","blockOwnerDeletion":false,"controller":false,"kind":"ClusterServiceVersion","name":"redhat-openshift-pipelines.v1.5.2","uid":"c7071a78-4dd6-45d7-8cc1-9cb80dfae4dd"}

Environment

  • operator-lifecycle-manager version:
    https://github.com/operator-framework/operator-lifecycle-manager/releases/tag/v0.20.0
    same behaviour in OCP 4.8

  • Kubernetes version information:
    $ kubectl version
    Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.6+bb8d50a", GitCommit:"cefce093e4e5bc9a1916eb5a489ed37c7d467f6f", GitTreeState:"clean", BuildDate:"2021-12-21T06:22:19Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind:
    $ oc version
    Server Version: 4.8.26
    Kubernetes Version: v1.21.6+bb8d50a

Possible Solution
can we use true when setting in the ownerreference for CSV created resources?

Controller: &NotController,

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triagedIssue has been considered by a member of the OLM community

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions