@@ -28,14 +28,14 @@ import (
2828 "github.com/AliyunContainerService/terway/pkg/utils"
2929 "github.com/AliyunContainerService/terway/types"
3030 "github.com/AliyunContainerService/terway/types/controlplane"
31- "k8s.io/apimachinery/pkg/util/sets"
3231
3332 "gomodules.xyz/jsonpatch/v2"
3433 corev1 "k8s.io/api/core/v1"
3534 "k8s.io/apimachinery/pkg/api/errors"
3635 "k8s.io/apimachinery/pkg/api/resource"
3736 k8stypes "k8s.io/apimachinery/pkg/types"
3837 "k8s.io/apimachinery/pkg/util/json"
38+ "k8s.io/apimachinery/pkg/util/sets"
3939 ctrl "sigs.k8s.io/controller-runtime"
4040 "sigs.k8s.io/controller-runtime/pkg/client"
4141 "sigs.k8s.io/controller-runtime/pkg/webhook"
@@ -119,7 +119,7 @@ func podWebhook(ctx context.Context, req *webhook.AdmissionRequest, client clien
119119 pna := & controlplane.PodNetworksAnnotation {
120120 PodNetworks : []controlplane.PodNetworks {
121121 {
122- VSwitchIDs : vsws ,
122+ VSwitchOptions : vsws ,
123123 SecurityGroupIDs : sgs ,
124124 },
125125 },
@@ -133,7 +133,7 @@ func podWebhook(ctx context.Context, req *webhook.AdmissionRequest, client clien
133133 memberCount = 1
134134 } else {
135135 for _ , n := range networks .PodNetworks {
136- if len (n .VSwitchIDs ) == 0 {
136+ if len (n .VSwitchOptions ) == 0 {
137137 return admission .Denied ("vSwitchID is not set" )
138138 }
139139 if len (n .SecurityGroupIDs ) == 0 {
0 commit comments