Skip to content

Commit

Permalink
Introduce conversion
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Godding Boye <[email protected]>
  • Loading branch information
erikgb committed Dec 18, 2024
1 parent 3c4de11 commit 2fa5c70
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
name: v1alpha2
schema:
openAPIV3Schema:
properties:
Expand Down
2 changes: 1 addition & 1 deletion deploy/crds/trust-manager.io_clusterbundles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
name: v1alpha2
schema:
openAPIV3Schema:
properties:
Expand Down
11 changes: 11 additions & 0 deletions make/02_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,14 @@ release-debian-trust-package:
@echo "RELEASE_OCI_PACKAGE_DEBIAN_TAG=$(oci_package_debian_image_tag)" >> "$(GITHUB_OUTPUT)"

@echo "Release complete!"

.PHONY: generate-conversion
## Generate code for converting between Bundle and ClusterBundle API
## @category Generate/ Verify
generate-conversion: | $(NEEDS_CONVERSION-GEN)
rm -rf ./pkg/apis/trust/v1alpha1/zz_generated.conversion.go

$(CONVERSION-GEN) \
--go-header-file=$(go_header_file) \
--output-file=zz_generated.conversion.go \
./pkg/apis/trust/v1alpha1
2 changes: 1 addition & 1 deletion pkg/api/v1alpha1/doc.go → pkg/api/v1alpha2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ limitations under the License.

// +kubebuilder:object:generate=true
// +groupName=trust-manager.io
package v1alpha1
package v1alpha2
4 changes: 2 additions & 2 deletions pkg/api/v1alpha1/register.go → pkg/api/v1alpha2/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
"fmt"
Expand All @@ -28,7 +28,7 @@ import (
)

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: api.GroupName, Version: "v1alpha1"}
var SchemeGroupVersion = schema.GroupVersion{Group: api.GroupName, Version: "v1alpha2"}

// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1
package v1alpha2

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

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

2 changes: 1 addition & 1 deletion pkg/apis/trust/v1alpha1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ limitations under the License.

// +kubebuilder:object:generate=true
// +groupName=trust.cert-manager.io
// +k8s:conversion-gen=github.com/cert-manager/trust-manager/pkg/api/v1alpha1
// +k8s:conversion-gen=github.com/cert-manager/trust-manager/pkg/api/v1alpha2
package v1alpha1
390 changes: 390 additions & 0 deletions pkg/apis/trust/v1alpha1/zz_generated.conversion.go

Large diffs are not rendered by default.

0 comments on commit 2fa5c70

Please sign in to comment.