Enable prevent-volume-mode-conversion by default following k8s 1.28 release

This is beta since 1.27 so we can safely default to true, to get this new validation logic.
https://github.com/kubernetes/enhancements/blob/master/keps/sig-storage/3141-prevent-volume-mode-conversion/kep.yaml#L30

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
This commit is contained in:
Alex Kalenyuk
2023-10-02 18:35:37 +03:00
parent feca95e803
commit 895dc73977
3 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ func init() {
// 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.")
true, "Prevents an unauthorised user from modifying the volume mode when creating a PVC from an existing VolumeSnapshot.")
CmdWebhook.Flags().BoolVar(&enableVolumeGroupSnapshotWebhook, "enable-volume-group-snapshot-webhook",
false, "Enables webhook for VolumeGroupSnapshot, VolumeGroupSnapshotContent and VolumeGroupSnapshotClass.")
}