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

Add missing topologySpreadConstraints options in kubernetes_deployment #2292

Closed
andreme opened this issue Sep 17, 2023 · 2 comments · Fixed by #2429
Closed

Add missing topologySpreadConstraints options in kubernetes_deployment #2292

andreme opened this issue Sep 17, 2023 · 2 comments · Fixed by #2429
Assignees

Comments

@andreme
Copy link

andreme commented Sep 17, 2023

Description

The following options from topologySpreadConstraints are missing in the spec template for kubernetes_deployment:

  • nodeAffinityPolicy
  • nodeTaintsPolicy
  • matchLabelKeys
  • minDomains

Potential Terraform Configuration

resource "kubernetes_deployment" "test" {
  spec {
    template {
      spec {
        container {
          // ...
        }

        topology_spread_constraint {
          // ...

          node_affinity_policy = "Honor"
          node_taints_policy = "Honor"
          match_label_keys = ["pod-template-hash"]
          min_domains = 1
        }
      }
    }
  }
}

References

Kubernetes: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/#spread-constraint-definition
Blog: https://kubernetes.io/blog/2023/04/17/fine-grained-pod-topology-spread-features-beta/

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@starlightromero
Copy link

This is also needed for the kubernetes_deployment_v1 resource

@alexlokshin-czi
Copy link

#2327 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants