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

More sensible defaults for webhook environment variables #93

Merged
merged 5 commits into from
Aug 29, 2024

Conversation

kispaljr
Copy link
Collaborator

@kispaljr kispaljr commented Aug 22, 2024

Remove hardwired string literals as the default values of WEBHOOK_SERVICE_NAME and WEBHOOK_SERVICE_NAMESPACE environment variables.

This PR introduces the following changes in behavior:

The value of WEBHOOK_SERVICE_NAME is determined by one of the followings (in precedence order):

  • the WEBHOOK_SERVICE_NAME environment variable
  • the name of the service specified in the APIService object named v1alpha1.porch.kpt.dev

The value of WEBHOOK_SERVICE_NAMESPACE is determined by one of the followings (in precedence order):

  • the WEBHOOK_SERVICE_NAMESPACE environment variable
  • the CERT_NAMESPACE environment variable (deprecated, please don't use this!!!)
  • the namespace of the service specified in the APIService object named v1alpha1.porch.kpt.dev
  • namespace of the current process (if running in a pod)

@nephio-prow nephio-prow bot requested review from henderiw and s3wong August 22, 2024 16:56
@kispaljr kispaljr changed the title More sensible default for webhook environment variables More sensible defaults for webhook environment variables Aug 22, 2024
@kispaljr
Copy link
Collaborator Author

/retest

@kispaljr
Copy link
Collaborator Author

/retest

@kispaljr kispaljr requested review from liamfallon and efiacor and removed request for s3wong August 23, 2024 06:01
deployments/porch/5-rbac.yaml Outdated Show resolved Hide resolved
pkg/apiserver/webhooks.go Outdated Show resolved Hide resolved
pkg/apiserver/webhooks.go Outdated Show resolved Hide resolved
pkg/apiserver/webhooks.go Outdated Show resolved Hide resolved
@kispaljr
Copy link
Collaborator Author

/retest

2 similar comments
@kispaljr
Copy link
Collaborator Author

/retest

@kispaljr
Copy link
Collaborator Author

/retest

@efiacor
Copy link
Collaborator

efiacor commented Aug 29, 2024

/approve
/lgtm

Copy link
Contributor

nephio-prow bot commented Aug 29, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: efiacor, kispaljr

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

@nephio-prow nephio-prow bot added the approved label Aug 29, 2024
@nephio-prow nephio-prow bot merged commit d19fb82 into nephio-project:main Aug 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants