From 4ca48d6488f8b1a97813b10620de21d1a76deead Mon Sep 17 00:00:00 2001 From: neogopher Date: Thu, 18 Jan 2024 00:31:06 +0530 Subject: [PATCH] Add hint about wildcard support for sync-labels field in docs --- docs/pages/config-reference.mdx | 2 +- pkg/setup/options/flags.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/config-reference.mdx b/docs/pages/config-reference.mdx index 865d1aeb9..b6b628a58 100644 --- a/docs/pages/config-reference.mdx +++ b/docs/pages/config-reference.mdx @@ -46,7 +46,7 @@ Before using any particular flag mentioned below, we recommend making yourself f --set-owner If true, will set the same owner the currently running syncer pod has on the synced resources (default true) --sync strings A list of sync controllers to enable. 'foo' enables the sync controller named 'foo', '-foo' disables the sync controller named 'foo' --sync-all-nodes If enabled and --fake-nodes is false, the virtual cluster will sync all nodes instead of only the needed ones - --sync-labels strings The specified labels will be synced to physical resources, in addition to their vCluster translated versions. + --sync-labels strings The specified labels will be synced to physical resources, in addition to their vCluster translated versions. Supports wildcards, e.g --sync-labels=my.company/* will sync all labels that match the given prefix. --sync-node-changes If enabled and --fake-nodes is false, the virtual cluster will proxy node updates from the virtual cluster to the host cluster. This is not recommended and should only be used if you know what you are doing. --target-namespace string The namespace to run the virtual cluster in (defaults to current namespace) --tls-san strings Add additional hostname or IP as a Subject Alternative Name in the TLS cert diff --git a/pkg/setup/options/flags.go b/pkg/setup/options/flags.go index 1d1395af3..435d268f6 100644 --- a/pkg/setup/options/flags.go +++ b/pkg/setup/options/flags.go @@ -54,7 +54,7 @@ func AddFlags(flags *pflag.FlagSet, options *VirtualClusterOptions) { flags.StringVar(&options.DefaultImageRegistry, "default-image-registry", "", "This address will be prepended to all deployed system images by vcluster") flags.StringVar(&options.EnforcePodSecurityStandard, "enforce-pod-security-standard", "", "This can be set to 'privileged', 'baseline', or 'restricted' to make vcluster enforce these policies during translation.") - flags.StringSliceVar(&options.SyncLabels, "sync-labels", []string{}, "The specified labels will be synced to physical resources, in addition to their vcluster translated versions.") + flags.StringSliceVar(&options.SyncLabels, "sync-labels", []string{}, "The specified labels will be synced to physical resources, in addition to their vcluster translated versions. Supports wildcards, e.g --sync-labels=my.company/* will sync all labels that match the given prefix.") flags.StringSliceVar(&options.Plugins, "plugins", []string{}, "The plugins to wait for during startup") flags.StringSliceVar(&options.MapVirtualServices, "map-virtual-service", []string{}, "Maps a given service inside the virtual cluster to a service inside the host cluster. E.g. default/test=physical-service")