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

[OpenShift] Add param to enable/disable servicemonitor #403

Merged
merged 2 commits into from
Sep 13, 2021

Conversation

sm43
Copy link
Member

@sm43 sm43 commented Sep 6, 2021

This adds a param in TektonConfig & TektonPipeline to disable service monitor
which is a part of TektonPipelines for OpenShift.
Param will be added by default, user can change the value in TektonConfig
to false to disable.

Value is added in openshift extension and not in webhook as this is
platform specific param.

If invalid value is passed then default value is set for param to avoid
installation failure. Users can pass valid values and change the param.

Signed-off-by: Shivam Mukhade [email protected]


Also,

Handle upgrade from older version which has pruner defaults

Before webhook we had default value for pruner's keep as 1
but we expect user to define all values now so if a user has
installed prev version and has not enabled pruner then keep
will have a value 1 and after upgrading to newer version,
webhook will fail if keep has a value and other fields are not defined
this handles that case by removing the default for keep if
other pruner fields are not defined

Signed-off-by: Shivam Mukhade [email protected]

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

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Sep 6, 2021
@tekton-robot tekton-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 6, 2021
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 6, 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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 66.7% -33.3

@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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 66.7% -33.3

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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:

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 6, 2021
@nikhil-thomas
Copy link
Member

@sm43 hi, let us get some clarity on "who" (extension prereconciler or main reconciler) creates the targetname space in builds for OpenShift. The answer could affect #385.

@nikhil-thomas
Copy link
Member

/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 Sep 6, 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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 66.7% -33.3

@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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 66.7% -33.3

@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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 66.7% -33.3

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2021
Shivam Mukhade added 2 commits September 13, 2021 12:01
Before webhook we had default value for pruner's keep as 1
but we expect user to define all values now so if a user has
installed prev version and has not enabled pruner then `keep`
will have a value 1 and after upgrading to newer version,
webhook will fail if keep has a value and other fields are not defined
this handles that case by removing the default for keep if
other pruner fields are not defined

Signed-off-by: Shivam Mukhade <[email protected]>
This adds a param in TektonConfig & TektonPipeline  to disable service monitor
which is a part of TektonPipelines for OpenShift.
Param will be added by default, user can change the value in TektonConfig
to false to disable.

Value is added in openshift extension and not in webhook as this is
platform specific param.

If invalid value is passed then	default	value is set for param to avoid
installation failure. Users can	pass valid values and change the param.

Signed-off-by: Shivam Mukhade <[email protected]>
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 13, 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/apis/operator/v1alpha1/tektonconfig_defaults.go 100.0% 70.0% -30.0

@nikhil-thomas
Copy link
Member

/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 Sep 13, 2021
@nikhil-thomas
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 13, 2021
@tekton-robot tekton-robot merged commit 0467af4 into tektoncd:main Sep 13, 2021
@sm43 sm43 deleted the service-monitor branch October 10, 2021 15:06
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. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants