Skip to content

Commit

Permalink
update validation according to tektoncd#5053
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeJu committed Jul 4, 2022
1 parent 3e9e4c6 commit dc35e0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apis/pipeline/v1beta1/workspace_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"

"github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/version"
"k8s.io/apimachinery/pkg/api/equality"
"knative.dev/pkg/apis"
)
Expand Down Expand Up @@ -70,7 +71,7 @@ func (b *WorkspaceBinding) Validate(ctx context.Context) (errs *apis.FieldError)
// The csi workspace is only supported when the alpha feature gate is enabled.
// For a CSI to work, you must provide and have installed the driver to use.
if b.CSI != nil {
errs := ValidateEnabledAPIFields(ctx, "csi workspace type", config.AlphaAPIFields).ViaField("workspaces")
errs := version.ValidateEnabledAPIFields(ctx, "csi workspace type", config.AlphaAPIFields).ViaField("workspaces")
if errs != nil {
return errs
}
Expand Down

0 comments on commit dc35e0b

Please sign in to comment.