Skip to content

Commit

Permalink
Update code generators (#54)
Browse files Browse the repository at this point in the history
* Update code generators

* Fix infinite loop in case of initial credentials error
  • Loading branch information
Gchbg authored May 14, 2024
1 parent bd5431c commit 85a19d6
Show file tree
Hide file tree
Showing 21 changed files with 1,629 additions and 395 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ manifests: ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefin
@go run sigs.k8s.io/controller-tools/cmd/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: manifests fmt vet ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@go run sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=".reuse/boilerplate.go.txt" paths="./..."
generate: ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@internal/tools/generate.sh
@go run sigs.k8s.io/controller-tools/cmd/controller-gen object:headerFile=".reuse/boilerplate.go.txt" paths="./..."

.PHONY: fmt
fmt: ## Run go fmt against code.
Expand Down Expand Up @@ -67,7 +67,7 @@ checklicense: ## Check that every file has a license header present.
##@ Build

.PHONY: build
build: generate ## Build manager binary.
build: generate manifests fmt vet ## Build manager binary.
@go build -o metal cmd/main.go

.PHONY: docker-build
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/machine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const (
// +kubebuilder:printcolumn:name="Power",type=string,JSONPath=`.status.power`
// +kubebuilder:printcolumn:name="LocatorLED",type=string,JSONPath=`.status.locatorLED`,priority=100
// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimeStamp`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +genclient

// Machine is the Schema for the machines API
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/machineclaim_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const (
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimeStamp`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +genclient

// MachineClaim is the Schema for the machineclaims API
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/oob_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const (
// +kubebuilder:printcolumn:name="SerialNumber",type=string,JSONPath=`.status.serialNumber`,priority=100
// +kubebuilder:printcolumn:name="FirmwareVersion",type=string,JSONPath=`.status.firmwareVersion`,priority=100
// +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimeStamp`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +genclient

// OOB is the Schema for the oobs API
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/oobsecret_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type OOBSecretStatus struct {
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:printcolumn:name="MACAddress",type=string,JSONPath=`.spec.macAddress`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimeStamp`
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
// +genclient

// OOBSecret is the Schema for the oobsecrets API
Expand Down
8 changes: 4 additions & 4 deletions client/applyconfiguration/api/v1alpha1/machineclaimspec.go

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

10 changes: 7 additions & 3 deletions client/applyconfiguration/api/v1alpha1/machinestatus.go

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

32 changes: 0 additions & 32 deletions client/applyconfiguration/api/v1alpha1/oobsecretstatus.go

This file was deleted.

21 changes: 12 additions & 9 deletions client/applyconfiguration/api/v1alpha1/oobstatus.go

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

Loading

0 comments on commit 85a19d6

Please sign in to comment.