-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent vcluster crash when network policy syncing is enabled
(cherry picked from commit 52df059)
- Loading branch information
1 parent
f29818a
commit 57afcf4
Showing
5 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package resources | ||
|
||
import ( | ||
"github.com/loft-sh/vcluster/pkg/mappings/generic" | ||
"github.com/loft-sh/vcluster/pkg/syncer/synccontext" | ||
"github.com/loft-sh/vcluster/pkg/util/translate" | ||
networkingv1 "k8s.io/api/networking/v1" | ||
) | ||
|
||
func CreateNetworkPoliciesMapper(ctx *synccontext.RegisterContext) (synccontext.Mapper, error) { | ||
return generic.NewMapper(ctx, &networkingv1.NetworkPolicy{}, translate.Default.HostName) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters