- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.7k
gce: configure public SSH rules when using bastions #17697
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
base: master
Are you sure you want to change the base?
Conversation
| [APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. 
Needs approval from an approver in each of these files:
 Approvers can indicate their approval by writing  | 
| /cc @hakman | 
| if err != nil { | ||
| return err | ||
| } | ||
| b.AddFirewallRulesTasks(c, "ssh-external-to-master", &gcetasks.FirewallRule{ | 
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.
So we are creating tasks with the same name in two places, which is normally a sign that we can tweak the if statement to avoid duplication.
But ... I think the same comment as the other PR. This looks like it affects everyone, not just the scalability test. Can we introduce it behind a feature flag or simialr?
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 changed the logic to remove the duplication of rules.
It's fair to assume:
- Spec.SSHAccess has a value and reaching the masters/nodes from that address isn't an issue
- If you are using a bastion and the instances don't have a public IP, the rule sits there doing nothing
b9712d5    to
    7c80564      
    Compare
  
    
Related to #17680
We are using private topology with scale jobs and the control plane instances configured public IP addresses so we cann SSH to the instances. However, we are not applying the public inbound SSH rule because if a bastion is enabled, it assumes you will always connect to the instances using the bastion which is false in clusterloader2 and
ssh-external-to-masterrules are missing.