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

[main] manage pipeline console plugin deployment on openshift #1895

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

jkandasa
Copy link
Member

@jkandasa jkandasa commented Dec 13, 2023

Changes

NOTE: This feature is applicable only to OpenShift environment

Implementation description:

  • Added all the required resources as static manifest on cmd/openshift/operator/kodata/static/tekton-config/00-postreconcile/pipeline_console_plugin.yaml
  • implemented a post reconciler on tekton-config under openshift
  • Added console.openshift.io permission to manage ConsolePlugin
  • annotation console.openshift.io/plugins: '["pipeline-console-plugin"]' added on openshift csv, this will manage entry on Console resource, when we deploy the operator via Operator Hub.

After deployed, To enable the pipeline console plugin manually, add an entry on Console resource.

apiVersion: operator.openshift.io/v1
kind: Console
metadata:
  name: cluster
spec:
  plugins:
  - pipeline-console-plugin

To know more about console plugin visit: https://github.com/openshift/enhancements/blob/master/enhancements/console/dynamic-plugins.md

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

NONE

@jkandasa jkandasa added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 13, 2023
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Dec 13, 2023
@jkandasa jkandasa requested a review from vdemeester December 13, 2023 07:20
@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from deb31e6 to 6620a45 Compare December 13, 2023 07:44
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from 6620a45 to e1fb197 Compare December 13, 2023 08:20
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from e1fb197 to bdc8501 Compare December 13, 2023 08:45
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from bdc8501 to 57664b9 Compare December 13, 2023 08:59
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from 57664b9 to 7b86aa9 Compare December 13, 2023 10:15
@vdemeester
Copy link
Member

* Added all the required resources as static manifest on `cmd/openshift/operator/kodata/static/tekton-results/00-postreconcile/pipeline_console_plugin.yaml`

* implemented a post reconciler on `result` under openshift

* If user deployed the `result`, pipleine console plugin will be deployed.

* If user removes the `result`, pipeline console plugin will be removed.

I understand that today the plugin depends on results, but long term, it will have more view that do not necessarily depend on results. Ultimately it's gonna have to stand on its own, with or without results. So ideally, I would think we should make it its own component (and hopefully have the component able to handle the precense or not of results)

@tektoncd tektoncd deleted a comment from tekton-robot Dec 13, 2023
@jkandasa jkandasa marked this pull request as draft December 13, 2023 11:31
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 13, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from 7b86aa9 to 03aec95 Compare December 14, 2023 01:44
@jkandasa
Copy link
Member Author

* Added all the required resources as static manifest on `cmd/openshift/operator/kodata/static/tekton-results/00-postreconcile/pipeline_console_plugin.yaml`

* implemented a post reconciler on `result` under openshift

* If user deployed the `result`, pipleine console plugin will be deployed.

* If user removes the `result`, pipeline console plugin will be removed.

I understand that today the plugin depends on results, but long term, it will have more view that do not necessarily depend on results. Ultimately it's gonna have to stand on its own, with or without results. So ideally, I would think we should make it its own component (and hopefully have the component able to handle the precense or not of results)

moved the code base to tekton-config post reconcile (on OpenShift)

@jkandasa jkandasa marked this pull request as ready for review December 14, 2023 01:47
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 14, 2023
@tektoncd tektoncd deleted a comment from tekton-robot Dec 14, 2023
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from 03aec95 to ab9166f Compare December 14, 2023 02:04
@tektoncd tektoncd deleted a comment from tekton-robot Dec 14, 2023
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 11, 2024
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from ab9166f to f5a3859 Compare January 14, 2024 06:48
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 14, 2024
@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from f5a3859 to 5ae875c Compare January 14, 2024 10:12
return func(u *unstructured.Unstructured) error {
// update metadata.namespace for all the resources
// this change will be updated in cluster wide resource too
// there is no effect on updating namespace on cluster wide resource
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is the right thing, but ok

@jkandasa jkandasa force-pushed the pipeline-console-plugin branch 2 times, most recently from ee0b5b5 to 1693b8f Compare January 17, 2024 23:39
@tektoncd tektoncd deleted a comment from tekton-robot Jan 17, 2024
@tektoncd tektoncd deleted a comment from tekton-robot Jan 17, 2024
@tektoncd tektoncd deleted a comment from tekton-robot Jan 17, 2024
@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/common/transformers.go 72.0% 72.5% 0.4
pkg/reconciler/openshift/tektonconfig/console_plugin_reconciler.go Do not exist 84.1%
pkg/reconciler/openshift/tektonconfig/extension.go Do not exist 0.0%

@@ -236,6 +236,15 @@ image-substitutions:
envKeys:
- IMAGE_ADDONS_PARAM_MAVEN_IMAGE

# pipelines console plugin image
- image: ghcr.io/openshift-pipelines/console-plugin:main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets create an issue, this image needs to be renamed with redhat offical image url

@piyush-garg
Copy link
Contributor

/approve

cc @vdemeester @concaf

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: piyush-garg, vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [piyush-garg,vdemeester]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@khrm khrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vdemeester Let's give it an lgtm and get it merge.

@jkandasa jkandasa force-pushed the pipeline-console-plugin branch from 1693b8f to 247e458 Compare January 19, 2024 07:11
@tekton-robot
Copy link
Contributor

The following is the coverage report on the affected files.
Say /test pull-tekton-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/common/transformers.go 72.0% 72.5% 0.4
pkg/reconciler/openshift/tektonconfig/console_plugin_reconciler.go Do not exist 84.1%
pkg/reconciler/openshift/tektonconfig/extension.go Do not exist 0.0%

@savitaashture
Copy link
Contributor

/lgtm 👍

@savitaashture
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 19, 2024
@tekton-robot tekton-robot merged commit 4e280db into tektoncd:main Jan 19, 2024
8 checks passed
@jkandasa jkandasa deleted the pipeline-console-plugin branch January 19, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants