diff --git a/docs/pages/config-reference.mdx b/docs/pages/config-reference.mdx index b6b628a58..6e5ac8055 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. Supports wildcards, e.g --sync-labels=my.company/* will sync all labels that match the given prefix. + --sync-labels strings The specified labels will be synced to physical resources, in addition to their vCluster translated versions. Supported wildcard - '/*'. e.g --sync-labels=my.company/* will sync all labels that match the given prefix 'my.company/'. --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 @@ -60,3 +60,10 @@ syncer: extraArgs: - --set-owner=false ``` + +For flags that accept multiple values, the same can be supplied as a comma-seperated string as shown below +``` +syncer: + extraArgs: + - --sync-labels=loft.sh/label1,loft.sh/label2 +``` \ No newline at end of file diff --git a/pkg/options/flags.go b/pkg/options/flags.go index 435d268f6..f002d6406 100644 --- a/pkg/options/flags.go +++ b/pkg/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. Supports wildcards, e.g --sync-labels=my.company/* will sync all labels that match the given prefix.") + flags.StringSliceVar(&options.SyncLabels, "sync-labels", []string{}, "The specified labels will be synced to physical resources, in addition to their vcluster translated versions. Supported wildcard - '/*'. e.g --sync-labels=my.company/* will sync all labels that match the given prefix 'my.company/'.") 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")