-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make the webhook port number configurable #5696
Make the webhook port number configurable #5696
Conversation
Hi @sel. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
/kind features |
@sel: The label(s) In response to this:
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/test-infra repository. |
/kind feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! You may also want to add an ENV
variable here:
Lines 88 to 109 in db4c05c
env: | |
- name: SYSTEM_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
# If you are changing these names, you will also need to update | |
# the webhook's Role in 200-role.yaml to include the new | |
# values in the "configmaps" "get" rule. | |
- name: CONFIG_LOGGING_NAME | |
value: config-logging | |
- name: CONFIG_OBSERVABILITY_NAME | |
value: config-observability | |
- name: CONFIG_LEADERELECTION_NAME | |
value: config-leader-election | |
- name: CONFIG_FEATURE_FLAGS_NAME | |
value: feature-flags | |
- name: WEBHOOK_SERVICE_NAME | |
value: tekton-pipelines-webhook | |
- name: WEBHOOK_SECRET_NAME | |
value: webhook-certs | |
- name: METRICS_DOMAIN | |
value: tekton.dev/pipeline |
And add comments here telling users to keep this the same as the ENV variable WEBHOOK_PORT
Line 127 in db4c05c
containerPort: 8443 |
As well as this line, can simply replace 8443
with https-webhook
(the name of the container port):
Line 174 in db4c05c
targetPort: 8443 |
Thanks Steve! Do you mind merging the two commits into one? BTW I don't have the permission to approve the PR request yet, so need to assign the previous reviewers back :) /assign @dibyom |
Previously the webhook listened on a fixed port, 8443, which is likely to clash with other services when the webhook is run on the host network in Kubernetes, which is required when using some CNI implementations, notably Calico on EKS [1]. Enable configuration of the webhook listen port through the environment variable WEBHOOK_PORT by using the existing API from the KNative SDK. [1] https://projectcalico.docs.tigera.io/getting-started/kubernetes/managed-public-cloud/eks#install-eks-with-calico-networking
ea55352
to
a621bdd
Compare
Thank-you for your review, @XinruZhang! I have squashed the commits. And apologies for removing the other reviewers, I think that happened when I hit the "Request re-review" button here on GitHub. |
/assign LGTM from a reviewer that has no LGTM permission XD |
/ok-to-test |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, 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 |
/lgtm |
Changes
Previously the webhook listened on a fixed port, 8443, which is
likely to clash with other services when the webhook is run on the
host network in Kubernetes, which is required when using some CNI
implementations, notably Calico on EKS [1].
Enable configuration of the webhook listen port through the environment
variable WEBHOOK_PORT by using the existing API from the KNative SDK.
[1] https://projectcalico.docs.tigera.io/getting-started/kubernetes/managed-public-cloud/eks#install-eks-with-calico-networking
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes