Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "skipVerify" attribute to version #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/apis/operator/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ type Version struct {

// URL specifies a version as a URL of a package tarball.
URL *string `yaml:"url,omitempty"`

// SkipVerify can be used to skip the KUDO package verification step to publish
// old versions of an operator that would fail the package verification
SkipVerify *bool `yaml:"url,omitempty"`
}

// Git references a specific tag of a Git repository of a KUDO operator.
Expand Down
3 changes: 3 additions & 0 deletions pkg/internal/apis/operator/encode/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ func convertV1Alpha1Version(in v1alpha1.Version) operator.Version {
out.Git = &git
}

if in.SkipVerify != nil {
out.SkipVerify = *in.SkipVerify
}
return out
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/internal/apis/operator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ type Version struct {

// URL specifies a version as a URL of a package tarball.
URL *string

// SkipVerify can be used to skip the KUDO package verification step to publish
// old versions of an operator that would fail the package verification
SkipVerify bool
}

// Version prints the version as a combination of appVersion and operatorVersion
Expand Down
4 changes: 3 additions & 1 deletion pkg/internal/validation/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ func Validate(operator operator.Operator, version operator.Version, pkg repo.Pac
result := Result{}

validateVersion(version, pkg, &result)
validateVerify(pkg, &result)
if !version.SkipVerify {
validateVerify(pkg, &result)
}

return result
}
Expand Down