Skip to content

Commit

Permalink
update with new codegen (#794)
Browse files Browse the repository at this point in the history
Signed-off-by: Di Xu <stephenhsu90@gmail.com>
  • Loading branch information
dixudx committed Mar 6, 2024
1 parent a533540 commit bd8fce7
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 185 deletions.
29 changes: 0 additions & 29 deletions apps/v1alpha1/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,6 @@ limitations under the License.

package v1alpha1

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

// Important: Run "make generated" to regenerate code after modifying this file

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Namespaced",categories=clusternet
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// Base represents the referenced resources/templates before rendering.
type Base struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec BaseSpec `json:"spec"`
}

// BaseSpec defines the desired state of Base
type BaseSpec struct {
// Feeds
Expand All @@ -43,13 +24,3 @@ type BaseSpec struct {
// +kubebuilder:validation:Required
Feeds []Feed `json:"feeds"`
}

// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// BaseList contains a list of Base
type BaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Base `json:"items"`
}
46 changes: 46 additions & 0 deletions apps/v1alpha1/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
Copyright 2024 The Clusternet Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

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

// Important: Run "make generated" to regenerate code after modifying this file

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:scope="Namespaced",categories=clusternet
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

// Base represents the referenced resources/templates before rendering.
type Base struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec BaseSpec `json:"spec"`
}

// +kubebuilder:object:root=true
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// BaseList contains a list of Base
type BaseList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Base `json:"items"`
}
31 changes: 0 additions & 31 deletions proxies/install/roundtrip_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion proxies/v1alpha1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ import (
)

func addDefaultingFuncs(scheme *runtime.Scheme) error {
return RegisterDefaults(scheme)
return nil
}
92 changes: 0 additions & 92 deletions proxies/v1alpha1/zz_generated.conversion.go

This file was deleted.

32 changes: 0 additions & 32 deletions proxies/v1alpha1/zz_generated.defaults.go

This file was deleted.

0 comments on commit bd8fce7

Please sign in to comment.