Skip to content

Commit 61e64fd

Browse files
authored
cherry-pick: fix node init failure, add sgpp test in script (#3277) (#3278)
* fix node init failure, add sgpp test in script (#3277) * remove redundant cninode cache filter
1 parent 5d2e98c commit 61e64fd

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

pkg/ipamd/ipamd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ func (c *IPAMContext) nodeInit() error {
538538
// if apiserver is connected, get the maxPods from node
539539
var node corev1.Node
540540
if c.withApiServer {
541-
node, err := k8sapi.GetNode(ctx, c.k8sClient)
541+
node, err = k8sapi.GetNode(ctx, c.k8sClient)
542542
if err != nil {
543543
log.Errorf("Failed to get node, %s", err)
544544
podENIErrInc("nodeInit")

pkg/k8sapi/k8sutils.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ func getIPAMDCacheFilters() map[client.Object]cache.ByObject {
4545
&corev1.Node{}: {
4646
Field: fields.Set{"metadata.name": nodeName}.AsSelector(),
4747
},
48-
&rcscheme.CNINode{}: {
49-
Field: fields.Set{"metadata.name": nodeName}.AsSelector(),
50-
},
5148
}
5249
// only cache CNINode when SGP is in use
5350
enabledPodENI := utils.GetBoolAsStringEnvVar(envEnablePodENI, false)

scripts/run-integration-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ if [[ $RUN_CNI_INTEGRATION_TESTS == true ]]; then
235235
echo "Running ginkgo tests with focus: $focus"
236236
(cd "$INTEGRATION_TEST_DIR/cni" && CGO_ENABLED=0 ginkgo --focus="$focus" --skip="$skip" -v --timeout 60m --no-color --fail-on-pending -- --cluster-kubeconfig="$KUBECONFIG" --cluster-name="$CLUSTER_NAME" --aws-region="$AWS_DEFAULT_REGION" --aws-vpc-id="$VPC_ID" --ng-name-label-key="kubernetes.io/os" --ng-name-label-val="linux")
237237
(cd "$INTEGRATION_TEST_DIR/ipamd" && CGO_ENABLED=0 ginkgo --focus="$focus" -v --timeout 60m --no-color --fail-on-pending -- --cluster-kubeconfig="$KUBECONFIG" --cluster-name="$CLUSTER_NAME" --aws-region="$AWS_DEFAULT_REGION" --aws-vpc-id="$VPC_ID" --ng-name-label-key="kubernetes.io/os" --ng-name-label-val="linux")
238+
(cd "$INTEGRATION_TEST_DIR/custom-networking-sgpp" && CGO_ENABLED=0 ginkgo -v --timeout 60m --no-color --fail-on-pending -- --cluster-kubeconfig="$KUBECONFIG" --cluster-name="$CLUSTER_NAME" --aws-region="$AWS_DEFAULT_REGION" --aws-vpc-id="$VPC_ID" --ng-name-label-key="kubernetes.io/os" --ng-name-label-val="linux")
238239
TEST_PASS=$?
239240
CURRENT_IMAGE_INTEGRATION_DURATION=$((SECONDS - START))
240241
echo "TIMELINE: Current image integration tests took $CURRENT_IMAGE_INTEGRATION_DURATION seconds."

0 commit comments

Comments
 (0)