-
Notifications
You must be signed in to change notification settings - Fork 431
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
✨ cloud/services: add bastion host service #708
✨ cloud/services: add bastion host service #708
Conversation
/cc @devigned @CecileRobertMichon |
everything looks good, but how will this be used by controllers? |
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.
PR looks pretty solid. We do need to discuss behavior around the public IP.
} | ||
|
||
// Delete deletes the bastion host with the provided scope. | ||
func (s *Service) Delete(ctx context.Context, spec interface{}) error { |
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.
Delete
will only delete the bastion service. If a public IP address was created in the Reconcile
func, then it seems like it should be cleaned up here too.
Here is a similar scenario where a public IP is provided by the user. We should decided on a way to represent ownership of the Azure resource to help us to understand how to act during provisioning and deprovisioning.
/cc @alexeldeib and @CecileRobertMichon
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.
Yes, I was thinking if the user needs to provide the IP or CAPZ will create it and I'm not sure the path to follow, that's is why I implemented in that way, if we decide the user need to provide the IP then I can remove the creation part.
I was following a similar approach that the VMs do as well to create the IP.
I don't have strong opinions on that, i think that should follow what the team wants for this.
I agree the IP should be created if it doesn't exist in a similar manor as VMs. Where this implementation differs is that it does not delete the IP when the bastion host is deleted. That means, the IP which is created in the Create
func may not get deleted, but should be deleted if it was created in the Create
func.
If created in Create
, the IP should be deleted in Delete
(imo).
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.
FYI #716 will impact this change... We might want to use the same Reconcile/Delete for Bastion IPs as other public IPs (see how Reconcile() is used for VM public IPs in #716) and use tags (similar to resource group and vnet tags) to mark the IP as "owned"/managed by CAPZ. When deleting IPs, it should only delete the ones that are owned by that CAPZ cluster.
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.
#716 merged so you should be able to reuse it now.
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.
@CecileRobertMichon updated this PR to use the new way for services
@devigned: GitHub didn't allow me to request PR reviews from the following users: and. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
@nader-ziada sorry for the delay to reply, we discussed this in this thread the idea was add the service first and in other followups add the controller code, to make a bit easier to review and for doing baby steps 😄 Also i can deliver small things a bit faster |
@devigned thanks for your review. |
f1c84c8
to
a2094fc
Compare
/test pull-cluster-api-provider-azure-e2e |
a2094fc
to
801d896
Compare
/test pull-cluster-api-provider-azure-test |
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.
/lgtm
/approve
I think we should consider adding the initial bastion types into experimental for a couple release to allow some settling when they are introduced.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: devigned 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 |
@cpanato I think this is good once its rebased |
801d896
to
c139925
Compare
c139925
to
05f5211
Compare
05f5211
to
99f90b1
Compare
@nader-ziada rebased sorry for the delay |
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.
I might not have had enough coffee yet, but looks like cloud/services/bastionhosts/bastionhosts_test.go
could use a go fmt
.
it might be github somehow, looked fine when I pulled down the pr |
@devigned @nader-ziada applied here and did not get any differences, but also can be i had too much coffee for today :) |
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.
lgtm
@nader-ziada or @CecileRobertMichon any comments?
lgtm but will let @devigned take another look if he wants to |
/lgtm |
What this PR does / why we need it:
Add initial implementation for a new cloud service to be able to create Azure Bastion Hosts
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes partially #165
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: