diff --git a/daemon/config.go b/daemon/config.go index 8d987ff4..261efb11 100644 --- a/daemon/config.go +++ b/daemon/config.go @@ -49,6 +49,7 @@ func getENIConfig(cfg *daemon.Config) *types.ENIConfig { EniSelectionPolicy: eniSelectionPolicy, ResourceGroupID: cfg.ResourceGroupID, EniTypeAttr: 0, + TagFilter: cfg.ENITagFilter, } if cfg.VSwitches != nil { diff --git a/pkg/factory/aliyun/aliyun.go b/pkg/factory/aliyun/aliyun.go index c1cd0cd1..c3c0027c 100644 --- a/pkg/factory/aliyun/aliyun.go +++ b/pkg/factory/aliyun/aliyun.go @@ -73,6 +73,7 @@ func NewAliyun(ctx context.Context, openAPI *client.OpenAPI, getter eni.ENIInfoG eniTags: cfg.ENITags, eniTypeAttr: cfg.EniTypeAttr, selectionPolicy: cfg.VSwitchSelectionPolicy, + eniTagFilter: cfg.TagFilter, } } diff --git a/types/config.go b/types/config.go index b615b5c9..63f228c5 100644 --- a/types/config.go +++ b/types/config.go @@ -28,6 +28,8 @@ type ENIConfig struct { EnableIPv4 bool EnableIPv6 bool + + TagFilter map[string]string } // PoolConfig configuration of pool and resource factory