Skip to content

Surface information about installed version in Operator CR #270

Closed
@anik120

Description

@anik120

When an operator is installed, there is no information about which version of the operator was installed:

$ $  kubectl get operator argocd-operator -o yaml 
apiVersion: operators.operatorframework.io/v1alpha1
kind: Operator
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"operators.operatorframework.io/v1alpha1","kind":"Operator","metadata":{"annotations":{},"name":"argocd-operator"},"spec":{"packageName":"argocd-operator"}}
  creationTimestamp: "2023-06-21T14:57:50Z"
  generation: 1
  name: argocd-operator
  resourceVersion: "10690"
  uid: 6e0c67a5-eb9c-41c6-a455-140b28714d34
spec:
  packageName: argocd-operator
status:
  conditions:
  - lastTransitionTime: "2023-06-21T14:57:51Z"
    message: resolved to "quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6"
    observedGeneration: 1
    reason: Success
    status: "True"
    type: Resolved
  - lastTransitionTime: "2023-06-21T14:57:57Z"
    message: installed from "quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6"
    observedGeneration: 1
    reason: Success
    status: "True"
    type: Installed
  installedBundleResource: quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6
  resolvedBundleResource: quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6

One has to confirm the version installed by cross referencing the image reference in the installedBundleResource field with a matching image reference for a BundleMetadata

$  kubectl get bundlemetadata operatorhubio-argocd-operator.v0.6.0 -o yaml | grep image 
  image: quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6
  - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
  - image: quay.io/argoprojlabs/argocd-operator@sha256:99aeec24cc406d06d18822347d9ac3ed053a702d8419191e4e681075fed7b9bb
  - image: quay.io/operatorhubio/argocd-operator@sha256:1a9b3c8072f2d7f4d6528fa32905634d97b7b4c239ef9887e3fb821ff033fef6

The output above confirms that the latest version of the argocd operator, v0.6.0, was installed, but one can land on that information only if one is aware of the the fact that deppy currently chooses the latest version of the operator regardless of any other constraints. This information about which version is installed should be surfaced in the Operator status, instead of requiring the user to hunt down information to confirm the installed version, which in turns requires knowledge of the inner workings of sub-components that operator-controller relies on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions