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

Move replicas to KubernetesResource from eventlistener spec #1021

Merged
merged 1 commit into from
Apr 1, 2021

Conversation

savitaashture
Copy link
Contributor

@savitaashture savitaashture commented Mar 27, 2021

Changes

replicas field will be useful incase of KubernetesResource resource not CustomResource so keeping replicas at eventlistener spec level creating confusion while creating CustomResource object.
In order to avoid such confusions moving replicas field from eventlistener spec to KubernetesResource. Deprecating replicas from eventlistener spec and will be removed in future.

Fixes: #1019

Submitter Checklist

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

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Release Notes

Deprecated replicas from EventListener spec level and added replicas to KubernetesResource.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Mar 27, 2021
@tekton-robot tekton-robot requested review from khrm and vtereso March 27, 2021 13:07
@savitaashture savitaashture removed the request for review from vtereso March 27, 2021 13:07
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 27, 2021
@savitaashture savitaashture requested a review from dibyom March 27, 2021 13:07
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_defaults.go 100.0% 83.8% -16.2
pkg/apis/triggers/v1alpha1/event_listener_validation.go 97.7% 97.0% -0.7
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 79.7% 79.8% 0.1

@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 97.7% 97.7% 0.1
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 79.7% 79.8% 0.1

@@ -191,6 +192,8 @@ check out the guide on [exposing EventListeners](./exposing-eventlisteners.md).

### Replicas

The `replicas` field is deprecated as part of eventlistener spec instead its moved to `resources.kubernetesResource`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `replicas` field is deprecated as part of eventlistener spec instead its moved to `resources.kubernetesResource`.
The `spec.replicas` field has been moved to `spec.resources.kubernetesResource.replicas`.

Copy link
Member

Choose a reason for hiding this comment

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

We should also get rid of the following lines in this section.

@dibyom
Copy link
Member

dibyom commented Mar 29, 2021

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2021
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2021
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 97.7% 97.7% 0.1
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 79.7% 79.8% 0.1

Copy link
Contributor

@mpetason mpetason left a comment

Choose a reason for hiding this comment

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

small edits that may read better.

docs/eventlisteners.md Outdated Show resolved Hide resolved
docs/eventlisteners.md Outdated Show resolved Hide resolved
docs/eventlisteners.md Outdated Show resolved Hide resolved
@tekton-robot
Copy link

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

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 97.7% 97.7% 0.1
pkg/reconciler/v1alpha1/eventlistener/eventlistener.go 79.5% 79.5% 0.1

@savitaashture
Copy link
Contributor Author

@dibyom @mpetason Thank you for reviewing
Addressed review comment

Copy link
Member

@dibyom dibyom 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 Apr 1, 2021
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

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 Apr 1, 2021
@tekton-robot tekton-robot merged commit 25ad473 into tektoncd:main Apr 1, 2021
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.

Replicas field is misleading while using customresource(knative)
4 participants