Skip to content

Commit

Permalink
Add signatureFormat in the conversion so that alpha1 and beta1 can be…
Browse files Browse the repository at this point in the history
… used (#175)
  • Loading branch information
GregoireW authored and codysoyland committed Jul 9, 2024
1 parent f0493d3 commit c294fd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/policy/v1alpha1/clusterimagepolicy_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func (matchResource *MatchResource) ConvertTo(_ context.Context, sink *v1beta1.M

func (authority *Authority) ConvertTo(ctx context.Context, sink *v1beta1.Authority) error {
sink.Name = authority.Name
sink.SignatureFormat = authority.SignatureFormat
if authority.CTLog != nil && authority.CTLog.URL != nil {
sink.CTLog = &v1beta1.TLog{
URL: authority.CTLog.URL.DeepCopy(),
Expand Down Expand Up @@ -244,6 +245,7 @@ func (spec *ClusterImagePolicySpec) ConvertFrom(ctx context.Context, source *v1b

func (authority *Authority) ConvertFrom(ctx context.Context, source *v1beta1.Authority) error {
authority.Name = source.Name
authority.SignatureFormat = source.SignatureFormat
if source.CTLog != nil && source.CTLog.URL != nil {
authority.CTLog = &TLog{
URL: source.CTLog.URL.DeepCopy(),
Expand Down

0 comments on commit c294fd1

Please sign in to comment.