Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*) generate DeepCopy interfaces #2222

Merged
merged 1 commit into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mk/generate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ clean/proto: ## Dev: Remove auto-generated Protobuf files

.PHONY: generate
generate: ## Dev: Run code generators
generate: clean/proto protoc/pkg/config/app/kumactl/v1alpha1 protoc/pkg/test/apis/sample/v1alpha1 protoc/plugins resources/mesh
generate: clean/proto protoc/pkg/config/app/kumactl/v1alpha1 protoc/pkg/test/apis/sample/v1alpha1 protoc/plugins resources/mesh generate/deepcopy

.PHONY: resources/mesh
resources/mesh:
Expand Down Expand Up @@ -63,3 +63,7 @@ generate/envoy-imports:
echo 'import (' >> ${ENVOY_IMPORTS}
go list github.com/envoyproxy/go-control-plane/... | grep "github.com/envoyproxy/go-control-plane/envoy/" | awk '{printf "\t_ \"%s\"\n", $$1}' >> ${ENVOY_IMPORTS}
echo ')' >> ${ENVOY_IMPORTS}

.PHONY: generate/deepcopy
generate/deepcopy:
$(MAKE) -C pkg/plugins/resources/k8s/native generate
2 changes: 1 addition & 1 deletion pkg/plugins/resources/k8s/native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ vet:

# Generate code
generate: controller-gen
$(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt paths=./api/...
$(CONTROLLER_GEN) object:headerFile=./hack/boilerplate.go.txt,year=$$(date +%Y) paths=./api/...

# Build the docker image
docker-build: test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@ package v1alpha1

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

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// CircuitBreaker defines the desired state of CircuitBreaker
type CircuitBreakerSpec = map[string]interface{}
"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/model"
)

// CircuitBreaker is the Schema for the circuitbreaker API
// CircuitBreaker is the Schema for the circuitbreaker API.
//
// +kubebuilder:object:root=true
type CircuitBreaker struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Mesh string `json:"mesh,omitempty"`

Spec CircuitBreakerSpec `json:"spec,omitempty"`
Spec model.RawMessage `json:"spec,omitempty"`
}

// CircuitBreakerList contains a list of CircuitBreaker
// CircuitBreakerList contains a list of CircuitBreaker.
//
// +kubebuilder:object:root=true
type CircuitBreakerList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ package v1alpha1

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

// DataplaneInsightStatus defines the observed state of Dataplane
type DataplaneInsightStatus = map[string]interface{}
"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/model"
)

// DataplaneInsight is the Schema for the Dataplane Insights API
// DataplaneInsight is the Schema for the Dataplane Insights API.
//
// +kubebuilder:object:root=true
type DataplaneInsight struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Mesh string `json:"mesh,omitempty"`
Status DataplaneInsightStatus `json:"status,omitempty"`
Mesh string `json:"mesh,omitempty"`
Status model.RawMessage `json:"status,omitempty"`
}

// DataplaneInsightList contains a list of Dataplane
// DataplaneInsightList contains a list of Dataplane.
//
// +kubebuilder:object:root=true
type DataplaneInsightList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ package v1alpha1

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

// DataplaneSpec defines the desired state of Dataplane
type DataplaneSpec = map[string]interface{}
"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/model"
)

// Dataplane is the Schema for the Dataplane API
// Dataplane is the Schema for the Dataplane API.
//
// +kubebuilder:object:root=true
type Dataplane struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Mesh string `json:"mesh,omitempty"`
Spec DataplaneSpec `json:"spec,omitempty"`
Mesh string `json:"mesh,omitempty"`
Spec model.RawMessage `json:"spec,omitempty"`
}

// DataplaneList contains a list of Dataplane
// DataplaneList contains a list of Dataplane.
//
// +kubebuilder:object:root=true
type DataplaneList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ package v1alpha1

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

// ExternalServiceSpec defines the desired state of ExternalService
type ExternalServiceSpec = map[string]interface{}
"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/model"
)

// ExternalService is the Schema for the Dataplane API
// ExternalService is the Schema for the ExternalService API.
//
// +kubebuilder:object:root=true
type ExternalService struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Mesh string `json:"mesh,omitempty"`
Spec ExternalServiceSpec `json:"spec,omitempty"`
Mesh string `json:"mesh,omitempty"`
Spec model.RawMessage `json:"spec,omitempty"`
}

// ExternalServiceList contains a list of Dataplane
// ExternalServiceList contains a list of ExternalServices.
//
// +kubebuilder:object:root=true
type ExternalServiceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Expand Down
Loading