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

Apply applicable ASM_OPTS in config_map #1183

Merged
merged 1 commit into from
Mar 21, 2022

Conversation

frits-v
Copy link
Contributor

@frits-v frits-v commented Mar 17, 2022

[In autopilot clusters,] subsequent terraform runs overwrite the ASM_OPTS: "CNI=on" value in the asm_option config map. This prevents new or restating workloads from being scheduled as the proxy tries to cap add NET_ADMIN on start. This PR conditionally adds the expected setting.

@frits-v frits-v requested review from a team, Jberlinsky and bharathkkb as code owners March 17, 2022 21:11
@morgante
Copy link
Contributor

@Monkeyanator PTAL

@comment-bot-dev
Copy link

comment-bot-dev commented Mar 17, 2022

Thanks for the PR! 🚀
✅ Lint checks have passed.

@@ -45,6 +45,7 @@ resource "kubernetes_config_map" "asm_options" {

data = {
multicluster_mode = var.multicluster_mode
ASM_OPTS = var.enable_cni ? "CNI=on" : null
Copy link
Contributor

@Monkeyanator Monkeyanator Mar 17, 2022

Choose a reason for hiding this comment

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

nit: should this be

Suggested change
ASM_OPTS = var.enable_cni ? "CNI=on" : null
ASM_OPTS = var.enable_cni ? "CNI=on" : ""

?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want it to be set to "" or excluded entirely? Usually I think excluding is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When set to null the value is not applied to the configMap. Empty value could trigger unintended behavior.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, let's stick to null.

@morgante morgante merged commit 79d604a into terraform-google-modules:master Mar 21, 2022
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
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