Terraform-provider-kubernetes: Feature request: add kubernetes_network_policy resource

Created on 1 Feb 2018  路  4Comments  路  Source: hashicorp/terraform-provider-kubernetes

Please add support for Kubernetes NetworkPolicy resource.

Affected Resource

  • kubernetes_network_policy

Terraform Configuration Files

resource "kubernetes_namespace" "example" {
  metadata {
    name = "terraform-example-namespace"
  }
}

# NOT IMPLEMENTED YET
resource "kubernetes_network_policy" "allow_all" {
  metadata {
    name = "allow-all"
    namespace = "${kubernetes_namespace.example.metadata.0.name}"
  }

  spec {
    pod_selector = {}
    ingress = [{}]
    egress = [{}]
  }
}

References

kubernete1.8

Most helpful comment

Hi @pdecat,

Any news on this? We really wish to use it!

Thanks!

Sincerely,

lainra

All 4 comments

Started work on this.

Note: supporting egress and policyTypes would require updating kubernetes/client-go and kubernetes/api dependencies to 1.8+ compatible versions.

Hi @pdecat,

Any news on this? We really wish to use it!

Thanks!

Sincerely,

lainra

https://github.com/terraform-providers/terraform-provider-kubernetes/pull/118

Looks like this introduces the new network policy resources and was merged today.

Indeed!

Was this page helpful?
0 / 5 - 0 ratings