Skip to content

Commit

Permalink
Add yurthub service env updater filter (#2165)
Browse files Browse the repository at this point in the history
Co-authored-by: Jessie Wang <[email protected]>
  • Loading branch information
techworldhello and Jessie Wang authored Oct 16, 2024
1 parent 9072600 commit 4ee88a5
Show file tree
Hide file tree
Showing 6 changed files with 775 additions and 4 deletions.
5 changes: 4 additions & 1 deletion cmd/yurthub/app/options/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ import (
"github.com/openyurtio/openyurt/pkg/yurthub/filter/inclusterconfig"
"github.com/openyurtio/openyurt/pkg/yurthub/filter/masterservice"
"github.com/openyurtio/openyurt/pkg/yurthub/filter/nodeportisolation"
"github.com/openyurtio/openyurt/pkg/yurthub/filter/serviceenvupdater"
"github.com/openyurtio/openyurt/pkg/yurthub/filter/servicetopology"
)

var (
// DisabledInCloudMode contains the filters that should be disabled when yurthub is working in cloud mode.
DisabledInCloudMode = []string{discardcloudservice.FilterName, forwardkubesvctraffic.FilterName}
DisabledInCloudMode = []string{discardcloudservice.FilterName, forwardkubesvctraffic.FilterName, serviceenvupdater.FilterName}

// SupportedComponentsForFilter is used for specifying which components are supported by filters as default setting.
SupportedComponentsForFilter = map[string]string{
Expand All @@ -38,6 +39,7 @@ var (
inclusterconfig.FilterName: "kubelet",
nodeportisolation.FilterName: "kube-proxy",
forwardkubesvctraffic.FilterName: "kube-proxy",
serviceenvupdater.FilterName: "kubelet",
}
)

Expand All @@ -52,4 +54,5 @@ func RegisterAllFilters(filters *base.Filters) {
inclusterconfig.Register(filters)
nodeportisolation.Register(filters)
forwardkubesvctraffic.Register(filters)
serviceenvupdater.Register(filters)
}
1 change: 0 additions & 1 deletion pkg/yurthub/filter/masterservice/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (msf *masterServiceFilter) SupportedResourceAndVerbs() map[string]sets.Set[
func (msf *masterServiceFilter) SetMasterServiceHost(host string) error {
msf.host = host
return nil

}

func (msf *masterServiceFilter) SetMasterServicePort(portStr string) error {
Expand Down
Loading

0 comments on commit 4ee88a5

Please sign in to comment.