Add feature flag
This commit is contained in:
@@ -39,10 +39,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
certFile string
|
||||
keyFile string
|
||||
kubeconfigFile string
|
||||
port int
|
||||
certFile string
|
||||
keyFile string
|
||||
kubeconfigFile string
|
||||
port int
|
||||
preventVolumeModeConversion bool
|
||||
)
|
||||
|
||||
// CmdWebhook is used by Cobra.
|
||||
@@ -67,6 +68,8 @@ func init() {
|
||||
CmdWebhook.MarkFlagRequired("tls-private-key-file")
|
||||
// Add optional flag for kubeconfig
|
||||
CmdWebhook.Flags().StringVar(&kubeconfigFile, "kubeconfig", "", "kubeconfig file to use for volumesnapshotclasses")
|
||||
CmdWebhook.Flags().BoolVar(&preventVolumeModeConversion, "prevent-volume-mode-conversion",
|
||||
false, "Prevents an unauthorised user from modifying the volume mode when creating a PVC from an existing VolumeSnapshot.")
|
||||
}
|
||||
|
||||
// admitv1beta1Func handles a v1beta1 admission
|
||||
|
Reference in New Issue
Block a user