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

Renaming the webhook deployment from webhook-server to webhook. #957

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

ybettan
Copy link
Contributor

@ybettan ybettan commented Dec 22, 2024

  • When we generate files with controller-gen it generates a service called webhook-service and it is not configurable.

  • When we deploy KMM with OLM, OLM deploys a service for the webhook called <webhook-deployment-name>-service.

Therefore, before this change, we were getting 2 services for the same deployment. One generated by controller-gen and added to the bundle manifests and the other one created "on the fly" by OLM.

This change will make OLM find an already existing service called webhook-service in the cluster because the deployment is called webhook, therefore, it won't create a second service as before.

Services in KMM's namespace before the changes:

kmm-operator-controller-metrics-service   ClusterIP   10.129.169.25   <none>  8443/TCP   2d2h
kmm-operator-webhook-server-service       ClusterIP   10.130.107.158  <none>  443/TCP    2d2h
kmm-operator-webhook-service              ClusterIP   10.128.244.171  <none>  443/TCP    2d2h

Services in KMM's namespace after the changes:

kmm-operator-controller-metrics-service   ClusterIP   10.99.75.82     <none>  8443/TCP   88m
kmm-operator-webhook-service              ClusterIP   10.105.163.241  <none>  443/TCP    88m

/assign @yevgeny-shnaidman
/cc @TomerNewman

@k8s-ci-robot
Copy link
Contributor

@ybettan: GitHub didn't allow me to request PR reviews from the following users: TomerNewman.

Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

  • When we generate files with controller-gen it generates a service called webhook-service and it is not configurable.

  • When we deploy KMM with OLM, OLM deploys a service for the webhook called `-service.

Therefore, before this change, we were getting 2 services for the same deployment. One generated by controller-gen and added to the bundle manifests and the other one created "on the fly" by OLM.

This change will make OLM find an already existing service called webhook-service in the cluster because the deployment is called webhook, therefore, it won't create a second service as before.

Services in KMM's namespace before the changes:

kmm-operator-controller-metrics-service   ClusterIP   10.129.169.25   <none>  8443/TCP   2d2h
kmm-operator-webhook-server-service       ClusterIP   10.130.107.158  <none>  443/TCP    2d2h
kmm-operator-webhook-service              ClusterIP   10.128.244.171  <none>  443/TCP    2d2h

Services in KMM's namespace after the changes:

kmm-operator-controller-metrics-service   ClusterIP   10.99.75.82     <none>  8443/TCP   88m
kmm-operator-webhook-service              ClusterIP   10.105.163.241  <none>  443/TCP    88m

/assign @yevgeny-shnaidman
/cc @TomerNewman

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ybettan

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

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 22, 2024
Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for kubernetes-sigs-kmm ready!

Name Link
🔨 Latest commit b6f8178
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kmm/deploys/67687aecfa24680008085476
😎 Deploy Preview https://deploy-preview-957--kubernetes-sigs-kmm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.68%. Comparing base (fa23a9b) to head (b6f8178).
Report is 160 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #957      +/-   ##
==========================================
- Coverage   79.09%   72.68%   -6.42%     
==========================================
  Files          51       65      +14     
  Lines        5109     5762     +653     
==========================================
+ Hits         4041     4188     +147     
- Misses        882     1395     +513     
+ Partials      186      179       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ybettan ybettan force-pushed the webhook-server-service branch 2 times, most recently from e6be591 to f7102a6 Compare December 22, 2024 11:28
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 22, 2024
@ybettan ybettan force-pushed the webhook-server-service branch 5 times, most recently from 46ce349 to 5e47ec3 Compare December 22, 2024 20:38
* When we generate files with `controller-gen` it generates a service
  called `webhook-service` and it is not configurable.

* When we deploy KMM with OLM, OLM deploys a service for the webhook
  called `<webhook-deployment-name>-service.

Therefore, before this change, we were getting 2 services for the same
deployment. One generated by `controller-gen` and added to the bundle
manifests and the other one created "on the fly" by OLM.

This change will make OLM find an already existing service called
`webhook-service` in the cluster because the deployment is called
`webhook`, therefore, it won't create a second service as before.

Services in KMM's namespace before the changes:
```
kmm-operator-controller-metrics-service   ClusterIP   10.129.169.25   <none>  8443/TCP   2d2h
kmm-operator-webhook-server-service       ClusterIP   10.130.107.158  <none>  443/TCP    2d2h
kmm-operator-webhook-service              ClusterIP   10.128.244.171  <none>  443/TCP    2d2h
```

Services in KMM's namespace after the changes:
```
kmm-operator-controller-metrics-service   ClusterIP   10.99.75.82     <none>  8443/TCP   88m
kmm-operator-webhook-service              ClusterIP   10.105.163.241  <none>  443/TCP    88m
```

Signed-off-by: Yoni Bettan <[email protected]>
@ybettan ybettan force-pushed the webhook-server-service branch from 5e47ec3 to b6f8178 Compare December 22, 2024 20:47
@yevgeny-shnaidman
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 23, 2024
@k8s-ci-robot k8s-ci-robot merged commit b65b4e0 into kubernetes-sigs:main Dec 23, 2024
22 checks passed
@ybettan ybettan deleted the webhook-server-service branch December 23, 2024 08: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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants