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

Use of Azure IPAM in non-default Azure clouds #16003

Closed
joshmue opened this issue May 4, 2021 · 4 comments · Fixed by #16043
Closed

Use of Azure IPAM in non-default Azure clouds #16003

joshmue opened this issue May 4, 2021 · 4 comments · Fixed by #16043
Labels
integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.

Comments

@joshmue
Copy link

joshmue commented May 4, 2021

General Information

  • Cilium version 1.9.6
  • AKS with Kubernetes 1.19.9

I attempted to deploy Cilium with Azure IPAM onto an AKS cluster in the AzureChinaCloud which differs from the public Azure cloud in some details.
Ref: https://docs.microsoft.com/en-us/azure/active-directory/develop/authentication-national-cloud
Ref: https://docs.microsoft.com/en-us/azure/china/resources-developer-guide

When using Azure CNI and Cilium in chaining mode, these differences do not matter, but with Cilium Azure IPAM, they do.

When preparing, I found that the Cilium Helm chart does not allow passing azure.cloudName yet, even though this is a valid flag for the operator already.

In the operator itself, the cloudName is used to configure the Azure client authorizer to acquire tokens from the correct AAD.
However, when creating the resource clients themselves, NewSomethingClient(subscriptionId) is called which defaults to the public Azure endpoints. Using NewSomethingClientWithBaseURI(baseURI, subscriptionId) should also allow calls to other Azure clouds. The respective endpoints can be loaded from here.

If you want, I could take a look into generalizing the code.

@joshmue joshmue added the kind/bug This is a bug in the Cilium logic. label May 4, 2021
@pchaigno pchaigno added kind/community-report This was reported by a user in the Cilium community, eg via Slack. integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. labels May 4, 2021
@ungureanuvladvictor
Copy link
Member

@joshmue -- I've put a draft PR to add support for custom clouds but I do not have any way to test it at the moment. Can you give it a spin?

@joshmue
Copy link
Author

joshmue commented May 7, 2021

Sure! I'll provide feedback ASAP.

@joshmue
Copy link
Author

joshmue commented May 10, 2021

The operator certainly does not fail anymore. Also, .status.azure.interfaces of the CiliumNode resources is populated and the IP's of scheduled Pods seem to match CiliumEndpoints etc.
Connecting to destinations outside of the cluster does not work yet, but I am not sure whether this is related to this issue. I will investigate further.

@ungureanuvladvictor
Copy link
Member

@joshmue -- in this case I think the Azure API interactions are g2g, that was the main thing blocking supporting custom endpoint clouds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants