Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloud/services/container/nodepools/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func (s *Service) checkDiffAndPrepareUpdateConfig(existingNodePool *containerpb.
}
}
// Kubernetes taints
if !cmp.Equal(desiredNodePool.GetConfig().GetTaints(), existingNodePool.GetConfig().GetTaints()) {
if !cmp.Equal(desiredNodePool.GetConfig().GetTaints(), existingNodePool.GetConfig().GetTaints(), cmpopts.IgnoreUnexported(containerpb.NodeTaint{})) {
needUpdate = true
updateNodePoolRequest.Taints = &containerpb.NodeTaints{
Taints: desiredNodePool.GetConfig().GetTaints(),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/config/gcp-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ variables:
EXP_MACHINE_POOL: "true"
GKE_MACHINE_POOL_MIN: "1"
GKE_MACHINE_POOL_MAX: "2"
GKE_MACHINE_POOL_MIN_CRITICAL_ADDONS_ONLY: "0"
GKE_MACHINE_POOL_MAX_CRITICAL_ADDONS_ONLY: "1"
CAPG_LOGLEVEL: "4"

intervals:
Expand Down
31 changes: 30 additions & 1 deletion test/e2e/data/infrastructure-gcp/cluster-template-ci-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,33 @@ spec:
scaling:
minCount: ${GKE_MACHINE_POOL_MIN}
maxCount: ${GKE_MACHINE_POOL_MAX}

---
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachinePool
metadata:
name: ${CLUSTER_NAME}-critical-addons-only
spec:
clusterName: ${CLUSTER_NAME}
replicas: ${WORKER_MACHINE_COUNT}
template:
spec:
bootstrap:
dataSecretName: ""
clusterName: ${CLUSTER_NAME}
infrastructureRef:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPManagedMachinePool
name: ${CLUSTER_NAME}-critical-addons-only
---
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: GCPManagedMachinePool
metadata:
name: ${CLUSTER_NAME}-critical-addons-only
spec:
scaling:
minCount: ${GKE_MACHINE_POOL_MIN_CRITICAL_ADDONS_ONLY}
maxCount: ${GKE_MACHINE_POOL_MAX_CRITICAL_ADDONS_ONLY}
kubernetesTaints:
- effect: NoSchedule
key: CriticalAddonsOnly
value: "true"
10 changes: 8 additions & 2 deletions test/e2e/e2e_gke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ var _ = Describe("GKE workload cluster creation", func() {
Expect(ok).To(BeTrue(), "must have min pool size set via the GKE_MACHINE_POOL_MIN variable")
maxPoolSize, ok := e2eConfig.Variables["GKE_MACHINE_POOL_MAX"]
Expect(ok).To(BeTrue(), "must have max pool size set via the GKE_MACHINE_POOL_MAX variable")
minCriticalAddonsOnlyPoolSize, ok := e2eConfig.Variables["GKE_MACHINE_POOL_MIN_CRITICAL_ADDONS_ONLY"]
Expect(ok).To(BeTrue(), "must have min critical addons only pool size set via the GKE_MACHINE_POOL_MIN_CRITICAL_ADDONS_ONLY variable")
maxCriticalAddonsOnlyPoolSize, ok := e2eConfig.Variables["GKE_MACHINE_POOL_MAX_CRITICAL_ADDONS_ONLY"]
Expect(ok).To(BeTrue(), "must have max critical addons only pool size set via the GKE_MACHINE_POOL_MAX_CRITICAL_ADDONS_ONLY variable")

ApplyManagedClusterTemplateAndWait(ctx, ApplyManagedClusterTemplateAndWaitInput{
ClusterProxy: bootstrapClusterProxy,
Expand All @@ -107,8 +111,10 @@ var _ = Describe("GKE workload cluster creation", func() {
ControlPlaneMachineCount: ptr.To[int64](1),
WorkerMachineCount: ptr.To[int64](3),
ClusterctlVariables: map[string]string{
"GKE_MACHINE_POOL_MIN": minPoolSize,
"GKE_MACHINE_POOL_MAX": maxPoolSize,
"GKE_MACHINE_POOL_MIN": minPoolSize,
"GKE_MACHINE_POOL_MAX": maxPoolSize,
"GKE_MACHINE_POOL_MIN_CRITICAL_ADDONS_ONLY": minCriticalAddonsOnlyPoolSize,
"GKE_MACHINE_POOL_MAX_CRITICAL_ADDONS_ONLY": maxCriticalAddonsOnlyPoolSize,
},
},
WaitForClusterIntervals: e2eConfig.GetIntervals(specName, "wait-cluster"),
Expand Down