Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds params to customize TektonAddon component on OpenShift #328

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

sm43
Copy link
Member

@sm43 sm43 commented Jun 11, 2021

  • This adds params in TektonConfig which would be copied to Tekton Addon
    CR to customize installation of different components of Addons.
  • If the params are not passed in TektonConfig CR, controller will add them
    with default values.
  • User can change values in TektonConfig to change the component installation
    of Addon.
  • If Addon is created through TektonConfig CR, and if later values are changed in
    Addon CR, it will get overwritten by TektonConfig CR values.

Signed-off-by: Shivam Mukhade smukhade@redhat.com

TektonConfig CR

apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  profile: all
  targetNamespace: openshift-pipelines
  addon:
    params:
    - name: clusterTasks
      value: "true"
    - name: pipelineTemplates
      value: "true"

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

User can customize installation of TektonAddon Component by passing params in TektonConfig CR if addon is created through it
or directly in TektonAddon.

If params are not passed, controller will add params with default values.

Addons params:

- `clusterTask` (Default: true) Installs ClusterTask
- `pipelinesTemplates` (Default: true) Installs PipelinesTemplates

*This is only for OpenShift Platform

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jun 11, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 11, 2021
@sm43
Copy link
Member Author

sm43 commented Jun 11, 2021

/cc @nikhil-thomas @vdemeester @savitaashture
Tests are yet to be added. but can be reviewed :)
/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 11, 2021
@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/validate.go Do not exist 0.0%
pkg/reconciler/openshift/tektonconfig/extension/addon.go 75.6% 66.7% -8.9

@nikhil-thomas
Copy link
Member

/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2021
@sm43 sm43 force-pushed the addon-customization branch from 4258fff to 535447b Compare June 14, 2021 03:50
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 14, 2021
@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/validate.go Do not exist 96.6%
pkg/reconciler/openshift/tektonconfig/extension/addon.go 75.6% 66.7% -8.9

@sm43
Copy link
Member Author

sm43 commented Jun 14, 2021

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 14, 2021
Copy link
Contributor

@savitaashture savitaashture left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 14, 2021
@savitaashture
Copy link
Contributor

@sm43 could you rebase ?

/hold

@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 14, 2021
Copy link
Contributor

@pradeepitm12 pradeepitm12 left a comment

Choose a reason for hiding this comment

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

/lgtm

- This adds params in TektonConfig which would be copied to Tekton Addon
CR to customize installation of different components of Addons.
- If the params are not passed in TektonConfig CR, controller will add them
with default values.
- User can change values in TektonConfig to change the component installation
of Addon.
- If Addon is created through TektonConfig CR, and if later values are changed in
Addon CR, it will get overwritten by TektonConfig CR values.

Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
@sm43 sm43 force-pushed the addon-customization branch from 535447b to 4cc70fb Compare June 14, 2021 15:51
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 14, 2021
@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/validate.go Do not exist 96.6%
pkg/reconciler/openshift/tektonconfig/extension/addon.go 75.6% 66.7% -8.9

@sm43 sm43 requested a review from savitaashture June 14, 2021 16:12
@sm43 sm43 requested a review from pradeepitm12 June 14, 2021 16:12
@nikhil-thomas
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@pradeepitm12
Copy link
Contributor

/lgtm

Copy link
Contributor

@savitaashture savitaashture left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nikhil-thomas, savitaashture

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 [nikhil-thomas,savitaashture]

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

@savitaashture
Copy link
Contributor

/hold cancel

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 15, 2021
@tekton-robot tekton-robot merged commit e657bbb into tektoncd:main Jun 15, 2021
@sm43 sm43 deleted the addon-customization branch June 15, 2021 07:00
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants