Skip to content

Enable console plugins via an annotation #126

@stephennimmo

Description

@stephennimmo

Enabling console plugins via gitops is a real pain. Would an annotation be great?

When a Subscription is added with the annotation.

annotations:
  console.openshift.io/enable-plugins: ""

Then the controller would parse the packagemanifest for the operator and if there are any plugins, then it would patch the cluster console.

console.openshift.io/plugins: ["the-plugin"]
oc patch consoles.operator.openshift.io cluster --type=json --patch '[{"op": "add", "path": "/spec/plugins/-", "value": "the-plugin"}]'

and then if the Subscription is deleted, the finalizer would remove it from the plugins array.

full Subscription example.

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: odf-operator-subscription
  namespace: openshift-storage
  annotations:
    console.openshift.io/enable-plugins: ""
spec:
  channel: stable-4.18
  installPlanApproval: Automatic
  name: odf-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions