From b0f04d925a24489232ecac471175041e11428540 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Thu, 26 Oct 2017 15:35:26 +0100 Subject: [PATCH] Update network policy setting for Kubernetes 1.8 (#1879) It is now enabled by default in 1.8 with the api changed to networking.k8s.io/v1 instead of extensions/v1beta1. --- .../master/templates/manifests/kube-apiserver.manifest.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 b/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 index 8de5fb66c..24889a74c 100644 --- a/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 +++ b/roles/kubernetes/master/templates/manifests/kube-apiserver.manifest.j2 @@ -78,7 +78,9 @@ spec: {% endfor %} {% endif %} {% if enable_network_policy %} + {% if kube_version | version_compare('v1.8', '<') %} - --runtime-config=extensions/v1beta1/networkpolicies=true + {% endif %} {% endif %} - --v={{ kube_log_level }} - --allow-privileged=true