From f5ce3f674b6e003df8d3e60761724d5d3552f396 Mon Sep 17 00:00:00 2001 From: Reilly Brogan Date: Wed, 15 Jan 2020 15:06:03 -0600 Subject: [PATCH] Change description of NPCExtraArgs in response to PR Feedback. Drop support for K8S 1.7 --- k8s/crds/kops.k8s.io_clusters.yaml | 6 ++++-- pkg/apis/kops/networking.go | 4 ++-- pkg/apis/kops/v1alpha1/networking.go | 4 ++-- pkg/apis/kops/v1alpha2/networking.go | 4 ++-- .../resources/addons/networking.weave/k8s-1.7.yaml.template | 4 ---- .../tests/bootstrapchannelbuilder/weave/manifest.yaml | 2 +- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/k8s/crds/kops.k8s.io_clusters.yaml b/k8s/crds/kops.k8s.io_clusters.yaml index 268b49159f..3ec2c82a74 100644 --- a/k8s/crds/kops.k8s.io_clusters.yaml +++ b/k8s/crds/kops.k8s.io_clusters.yaml @@ -2788,7 +2788,8 @@ spec: format: int32 type: integer netExtraArgs: - description: Extra arguments that are passed to weave-kube + description: NetExtraArgs are extra arguments that are passed + to weave-kube. type: string noMasqLocal: format: int32 @@ -2801,7 +2802,8 @@ spec: Default 50m type: string npcExtraArgs: - description: Extra arguments that are passed to weave-npc + description: NPCExtraArgs are extra arguments that are passed + to weave-npc. type: string npcMemoryLimit: description: NPCMemoryLimit memory limit of weave npc container. diff --git a/pkg/apis/kops/networking.go b/pkg/apis/kops/networking.go index 4c66ef7272..eed7809648 100644 --- a/pkg/apis/kops/networking.go +++ b/pkg/apis/kops/networking.go @@ -75,7 +75,7 @@ type WeaveNetworkingSpec struct { MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"` // CPULimit CPU limit of weave container. CPULimit *resource.Quantity `json:"cpuLimit,omitempty"` - // Extra arguments that are passed to weave-kube + // NetExtraArgs are extra arguments that are passed to weave-kube. NetExtraArgs string `json:"netExtraArgs,omitempty"` // NPCMemoryRequest memory request of weave npc container. Default 200Mi @@ -86,7 +86,7 @@ type WeaveNetworkingSpec struct { NPCMemoryLimit *resource.Quantity `json:"npcMemoryLimit,omitempty"` // NPCCPULimit CPU limit of weave npc container NPCCPULimit *resource.Quantity `json:"npcCPULimit,omitempty"` - // Extra arguments that are passed to weave-npc + // NPCExtraArgs are extra arguments that are passed to weave-npc. NPCExtraArgs string `json:"npcExtraArgs,omitempty"` } diff --git a/pkg/apis/kops/v1alpha1/networking.go b/pkg/apis/kops/v1alpha1/networking.go index fed8a25fdb..9332c48cb9 100644 --- a/pkg/apis/kops/v1alpha1/networking.go +++ b/pkg/apis/kops/v1alpha1/networking.go @@ -75,7 +75,7 @@ type WeaveNetworkingSpec struct { MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"` // CPULimit CPU limit of weave container. CPULimit *resource.Quantity `json:"cpuLimit,omitempty"` - // Extra arguments that are passed to weave-kube + // NetExtraArgs are extra arguments that are passed to weave-kube. NetExtraArgs string `json:"netExtraArgs,omitempty"` // NPCMemoryRequest memory request of weave npc container. Default 200Mi @@ -86,7 +86,7 @@ type WeaveNetworkingSpec struct { NPCMemoryLimit *resource.Quantity `json:"npcMemoryLimit,omitempty"` // NPCCPULimit CPU limit of weave npc container NPCCPULimit *resource.Quantity `json:"npcCPULimit,omitempty"` - // Extra arguments that are passed to weave-npc + // NPCExtraArgs are extra arguments that are passed to weave-npc. NPCExtraArgs string `json:"npcExtraArgs,omitempty"` } diff --git a/pkg/apis/kops/v1alpha2/networking.go b/pkg/apis/kops/v1alpha2/networking.go index 69b27f56d5..d176c5c432 100644 --- a/pkg/apis/kops/v1alpha2/networking.go +++ b/pkg/apis/kops/v1alpha2/networking.go @@ -75,7 +75,7 @@ type WeaveNetworkingSpec struct { MemoryLimit *resource.Quantity `json:"memoryLimit,omitempty"` // CPULimit CPU limit of weave container. CPULimit *resource.Quantity `json:"cpuLimit,omitempty"` - // Extra arguments that are passed to weave-kube + // NetExtraArgs are extra arguments that are passed to weave-kube. NetExtraArgs string `json:"netExtraArgs,omitempty"` // NPCMemoryRequest memory request of weave npc container. Default 200Mi @@ -86,7 +86,7 @@ type WeaveNetworkingSpec struct { NPCMemoryLimit *resource.Quantity `json:"npcMemoryLimit,omitempty"` // NPCCPULimit CPU limit of weave npc container NPCCPULimit *resource.Quantity `json:"npcCPULimit,omitempty"` - // Extra arguments that are passed to weave-npc + // NPCExtraArgs are extra arguments that are passed to weave-npc. NPCExtraArgs string `json:"npcExtraArgs,omitempty"` } diff --git a/upup/models/cloudup/resources/addons/networking.weave/k8s-1.7.yaml.template b/upup/models/cloudup/resources/addons/networking.weave/k8s-1.7.yaml.template index 63615ee986..b55341ffa4 100644 --- a/upup/models/cloudup/resources/addons/networking.weave/k8s-1.7.yaml.template +++ b/upup/models/cloudup/resources/addons/networking.weave/k8s-1.7.yaml.template @@ -203,10 +203,6 @@ spec: fieldRef: apiVersion: v1 fieldPath: spec.nodeName - {{- if .Networking.Weave.NPCExtraArgs }} - - name: EXTRA_ARGS - value: "{{ .Networking.Weave.NPCExtraArgs }}" - {{- end }} image: 'weaveworks/weave-npc:2.6.0' ports: - name: metrics diff --git a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/weave/manifest.yaml b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/weave/manifest.yaml index 65b4b867f1..11a96d2ca0 100644 --- a/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/weave/manifest.yaml +++ b/upup/pkg/fi/cloudup/tests/bootstrapchannelbuilder/weave/manifest.yaml @@ -131,7 +131,7 @@ spec: - id: k8s-1.7 kubernetesVersion: '>=1.7.0 <1.8.0' manifest: networking.weave/k8s-1.7.yaml - manifestHash: 0725cf9a9f3651209a0b726ed00a078d7fb2e7f6 + manifestHash: 990772f9809ffb0cff4ea9341a9ab7e9094d7587 name: networking.weave selector: role.kubernetes.io/networking: "1"