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

feat: add outbound check variable #4531

Merged
merged 11 commits into from
Jul 11, 2024
Merged

feat: add outbound check variable #4531

merged 11 commits into from
Jul 11, 2024

Conversation

AlisonB319
Copy link
Collaborator

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@coveralls
Copy link

coveralls commented Jun 17, 2024

Pull Request Test Coverage Report for Build 9556178509

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 76.098%

Totals Coverage Status
Change from base Build 9554640287: 0.09%
Covered Lines: 2633
Relevant Lines: 3460

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 18, 2024

Pull Request Test Coverage Report for Build 9556627598

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 76.098%

Totals Coverage Status
Change from base Build 9554640287: 0.09%
Covered Lines: 2633
Relevant Lines: 3460

💛 - Coveralls

@@ -906,6 +906,12 @@ func getContainerServiceFuncMap(config *datamodel.NodeBootstrappingConfiguration
"GetOutboundCommand": func() string {
return getOutBoundCmd(config, config.CloudSpecConfig)
},
"BlockOutboundNetwork": func() bool {
if config.OutboundType == datamodel.OutboundTypeBlock || config.OutboundType == datamodel.OutboundTypeNone {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we sure we want OutboundTypeNone to indicate the same behavior as OutboundTypeBlock?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they both mean the same to us - I've double checked this a handful of times since I think its a bit convoluted but it is what I've been told

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add comments to the respective definitions of these outbound types to indicate they mean the same thing?

maybe worth following up and seeing if we can eliminate one or the other altogether

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a reply from Coco in one of the various NIC chats. I'll leave some commends as well but I'll drop the response in the comment for legacy sake

What’s the difference between outboundtype=none and outboundtype=block?
–outbound-type=none: AKS doesn't set up an outbound for users, but users can set the outbound rules. If there is an Azure Route Server announcing a default route via an NVA for egress to the internet. In this scenario, outboundType==none would still allow internet egress via the NVA

–outbound-type=block: AKS doesn't set up an outbound for users and AKS actively adds an NSG rule to all cluster nodes to prevent egress to the internet. So users cannot set the outbound rules. With –outbound-type=block and ArtifactSource=Cache, it’s the ‘zero egree cluster’. There are no outbound rules allowed on the cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the finny part is that the datamodel only contains those two attribute, so it's unclear what other value there could be

logs_to_events "AKS.CSE.installNetworkPlugin" installNetworkPlugin
# Network plugin should not install if outbound is not allowed.
if [ "${BLOCK_OUTBOUND_NETWORK}" == "false" ]; then
logs_to_events "AKS.CSE.installNetworkPlugin" installNetworkPlugin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we re-done things to make sure we still get a valid CNI plugin even if RP wants a different version than what's cached, and we want to block outbound network?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to take this portion out of the PR for now, since I would like to get the BLOCK_OUTBOUND_NETWORK var in. But I think I made a mistake here, I'll need to double check, but we should just be getting an alternative URL to download CNI

@coveralls
Copy link

coveralls commented Jul 10, 2024

Pull Request Test Coverage Report for Build 9898232093

Details

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 71.021%

Totals Coverage Status
Change from base Build 9896464983: 0.1%
Covered Lines: 2566
Relevant Lines: 3613

💛 - Coveralls

@AlisonB319 AlisonB319 changed the title feat: add outbound check before cni install feat: add outbound check variable Jul 11, 2024
@@ -88,6 +88,7 @@ GPU_NEEDS_FABRIC_MANAGER="{{GPUNeedsFabricManager}}"
NEEDS_DOCKER_LOGIN="{{and IsDockerContainerRuntime HasPrivateAzureRegistryServer}}"
IPV6_DUAL_STACK_ENABLED="{{IsIPv6DualStackFeatureEnabled}}"
OUTBOUND_COMMAND="{{GetOutboundCommand}}"
BLOCK_OUTBOUND_NETWORK="{{BlockOutboundNetwork}}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not critical yet since we aren't actually using it, though we will want to let the karpenter folks know this is a new parameter they'll also need to set on their side

@AlisonB319 AlisonB319 enabled auto-merge (squash) July 11, 2024 21:01
@AlisonB319 AlisonB319 merged commit 3f7a58e into master Jul 11, 2024
21 checks passed
@AlisonB319 AlisonB319 deleted the alburgess/block-nic-cni branch July 11, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants