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 missing spec.output.insecure flag to beta API #1378

Merged
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
11 changes: 11 additions & 0 deletions deploy/crds/shipwright.io_buildruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6380,6 +6380,10 @@ spec:
image:
description: Image is the reference of the image.
type: string
insecure:
description: Insecure defines whether the registry is
not secure
type: boolean
labels:
additionalProperties:
type: string
Expand Down Expand Up @@ -8452,6 +8456,9 @@ spec:
image:
description: Image is the reference of the image.
type: string
insecure:
description: Insecure defines whether the registry is not secure
type: boolean
labels:
additionalProperties:
type: string
Expand Down Expand Up @@ -10242,6 +10249,10 @@ spec:
image:
description: Image is the reference of the image.
type: string
insecure:
description: Insecure defines whether the registry is not
secure
type: boolean
labels:
additionalProperties:
type: string
Expand Down
3 changes: 3 additions & 0 deletions deploy/crds/shipwright.io_builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,9 @@ spec:
image:
description: Image is the reference of the image.
type: string
insecure:
description: Insecure defines whether the registry is not secure
type: boolean
labels:
additionalProperties:
type: string
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/build/v1beta1/build_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func (dest *BuildSpec) ConvertFrom(orig *v1alpha1.BuildSpec) error {

// Handle BuildSpec Output
dest.Output.Image = orig.Output.Image
dest.Output.Insecure = orig.Output.Insecure
if orig.Output.Credentials != nil {
dest.Output.PushSecret = &orig.Output.Credentials.Name
}
Expand Down Expand Up @@ -205,9 +206,8 @@ func (dest *BuildSpec) ConvertTo(bs *v1alpha1.BuildSpec) error {
}

// Handle BuildSpec Output
// insecure := false
// bs.Output.Insecure = &insecure
bs.Output.Image = dest.Output.Image
bs.Output.Insecure = dest.Output.Insecure
if dest.Output.PushSecret != nil {
bs.Output.Credentials = &corev1.LocalObjectReference{}
bs.Output.Credentials.Name = *dest.Output.PushSecret
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/build/v1beta1/build_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ type Image struct {
// Image is the reference of the image.
Image string `json:"image"`

// Insecure defines whether the registry is not secure
//
// +optional
Insecure *bool `json:"insecure,omitempty"`

// Describes the secret name for pushing a container image.
//
// +optional
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/build/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.