Repository navigation
Support reconciling infrastructure without ssh key - #319
Conversation
Gardener deletes the ssh key for a shoot when disabling ssh access via `Shoot.spec.provider.workersSettings.sshAccess.enabled=false`. Thus, reconciling the infrastructure object must work without an ssh key being present.
cf75103 to
6c7b4d5
Compare
|
Tested the whole 2x2 matrix of openstack/stackit infrastructure and mcm provider. Using this PR and gardener/machine-controller-manager-provider-openstack#419 .
|
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: a1e9eeaf600555b740463b27b08f86003ce79b87 |
|
Yes, the stackit mcm part already works. But it's probably a good idea to wait for the mcm-openstack PR. |
|
/unhold |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dergeberl The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
How to categorize this PR?
What this PR does / why we need it:
Gardener supports disabling sshAccess for nodes. This results in Gardener deleting the ssh keypair. As a consequence the
gardener-extension-provider-...andmachine-controller-manager-provider-...need to work even if no keypair is present.The flow in
ensureStackitSSHKeyPairandensureSSHKeyPairis already able to delete a changed keypair. If the keypair is removed from the infrastructure object, this already causes the above code path to trigger and therefore ensure a cleanup of the keypair. However, currently the validation inCreateKeypairresults in an error for an empty keypair. Thus, skip that create call if no keypair should exist and set the keypairname in the state to an empty string.The
machine-controller-manager-provider-...will take that as a signal to create machines without ssh key.machine-controller-manager-provider-stackitalready supports this, whereasmachine-controller-manager-provider-openstackneeds a fix, see gardener/machine-controller-manager-provider-openstack#419.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
/hold depends on gardener/machine-controller-manager-provider-openstack#419 to fully work.
I'm somewhat undecided whether we want to integration test the full route including testing that the old keypair gets deleted.