diff --git a/cmd/flux/create_image_policy.go b/cmd/flux/create_image_policy.go index 13fd35d0..fdb1b42d 100644 --- a/cmd/flux/create_image_policy.go +++ b/cmd/flux/create_image_policy.go @@ -102,7 +102,9 @@ func createImagePolicyRun(cmd *cobra.Command, args []string) error { switch { case imagePolicyArgs.semver != "" && imagePolicyArgs.alpha != "": - return fmt.Errorf("policy cannot be specified with both --select-semver and --select-alpha") + case imagePolicyArgs.semver != "" && imagePolicyArgs.numeric != "": + case imagePolicyArgs.alpha != "" && imagePolicyArgs.numeric != "": + return fmt.Errorf("only one of --select-semver, --select-alpha or --select-numeric can be specified") case imagePolicyArgs.semver != "": policy.Spec.Policy.SemVer = &imagev1.SemVerPolicy{ Range: imagePolicyArgs.semver,