diff --git a/apis/workloads/v1alpha1/console_authorisation_types.go b/apis/workloads/v1alpha1/console_authorisation_types.go index d4517a87..79209013 100644 --- a/apis/workloads/v1alpha1/console_authorisation_types.go +++ b/apis/workloads/v1alpha1/console_authorisation_types.go @@ -6,6 +6,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ConsoleAuthorisationSpec defines the desired state of ConsoleAuthorisation type ConsoleAuthorisationSpec struct { // The reference to the console by name that this console authorisation belongs to. @@ -21,6 +23,8 @@ type ConsoleAuthorisationStatus struct{} // +kubebuilder:object:root=true // +kubebuilder:storageversion +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // ConsoleAuthorisation is the Schema for the consoleauthorisations API type ConsoleAuthorisation struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/workloads/v1alpha1/doc.go b/apis/workloads/v1alpha1/doc.go new file mode 100644 index 00000000..8ff51114 --- /dev/null +++ b/apis/workloads/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// workloads v1alpha1 is the v1alpha1 version of the API. +// +k8s:deepcopy-gen=package,register +// +groupName=workloads.crd.gocardless.io +package v1alpha1 diff --git a/client_codegen.sh b/client_codegen.sh new file mode 100755 index 00000000..a06a43f2 --- /dev/null +++ b/client_codegen.sh @@ -0,0 +1,10 @@ +ROOT_PACKAGE="github.com/gocardless/theatre" +CUSTOM_RESOURCE_NAME="workloads" +CUSTOM_RESOURCE_VERSION="v1alpha1" + +//go get -u k8s.io/code-generator/... +cd $GOPATH/src/k8s.io/code-generator + +./generate-groups.sh all "$ROOT_PACKAGE/pkg/client" "$ROOT_PACKAGE/apis/workloads" "$CUSTOM_RESOURCE_NAME:$CUSTOM_RESOURCE_VERSION" + +tree $GOPATH/src/$ROOT_PACKAGE/pkg/client