-
Notifications
You must be signed in to change notification settings - Fork 132
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
Honour the WEBHOOK_TLS_CERT_DIR env. variable for finding the Webhook TLS certificate #1157
Conversation
…bhook TLS certificate - Crosslane versions before v1.14 mount the Webhook TLS certificate and key at a path other than the current default /tls/certs and make the location available via the environment variable WEBHOOK_TLS_CERT_DIR. Signed-off-by: Alper Rifat Ulucinar <[email protected]>
/test-examples="examples/ec2/v1beta1/vpc.yaml" |
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 @ulucinar LGTM! Left a nit comment for documentation.
/test-examples="examples/ec2/v1beta2/route.yaml" |
…s/ec2/v1beta2/route.yaml Add the uptest.upbound.io/disable-import annotation for Route.ec2 due to an uptest limitation. - Document the PreAction usage for the command-line flag "--certs-dir" Signed-off-by: Alper Rifat Ulucinar <[email protected]>
/test-examples="examples/ec2/v1beta2/route.yaml" |
Backport failed for Please cherry-pick the changes locally. git fetch origin release-0.47
git worktree add -d .worktree/backport-1157-to-release-0.47 origin/release-0.47
cd .worktree/backport-1157-to-release-0.47
git checkout -b backport-1157-to-release-0.47
ancref=$(git merge-base 81d43d08e42c7cdc8a3f73199c8707300f3480cb 6279a766d3dce638e5e2d52274f2629d34063843)
git cherry-pick -x $ancref..6279a766d3dce638e5e2d52274f2629d34063843 |
Description of your changes
Fixes #1147
Crosslane versions before v1.14 mount the Webhook TLS certificate and key at a path other than the current default
/tls/certs
and make that location available via the environment variableWEBHOOK_TLS_CERT_DIR
.provider-aws
currently relies on the default path and theCERTS_DIR
environment variable, breaking installations prior tov1.14
. This PR implements the following protocol for configuring the conversion Webhook TLS certificate & key configuration:--certs-dir
command-line option is supplied, it's used.--certs-dir
command-line option is not supplied, the following environment variables are used in the given order:CERTS_DIR
(for backwards-compatibility reasons),TLS_SERVER_CERTS_DIR
(the new environment variable, which has replaced theWEBHOOK_TLS_CERT_DIR
env. variable in Crossplane), andWEBHOOK_TLS_CERT_DIR
(for backwards-compatibility).This PR also fixes the example manifest
examples/ec2/v1beta2/route.yaml
, where a non-existent version ofRouteTable.ec2
is referenced.I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Successfully provisioned a
Route.ec2/v1beta2
resource usingexamples/ec2/v1beta2/route.yaml
with the following setup:v1.13.2-up.3
index.docker.io/ulucinar/provider-aws-ec2:v0.48.0-ecf7ae9ad372b96dad94e52f6e7aae9b6db44063
(built from this PR's feature branch)Also validated using:
v1.14.5-up.1
index.docker.io/ulucinar/provider-aws-ec2:v0.48.0-ecf7ae9ad372b96dad94e52f6e7aae9b6db44063
Uptest run for the modified example manifest
examples/ec2/v1beta2/route.yaml
: https://github.com/upbound/provider-aws/actions/runs/7917023305/