Skip to content

Commit

Permalink
Add missing spec.output.insecure flag to beta API
Browse files Browse the repository at this point in the history
  • Loading branch information
SaschaSchwarze0 committed Sep 6, 2023
1 parent 97fbc68 commit 5d6510c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
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.

0 comments on commit 5d6510c

Please sign in to comment.