Skip to content

Commit

Permalink
make generate
Browse files Browse the repository at this point in the history
  • Loading branch information
jbartosik committed Jan 27, 2025
1 parent 713b354 commit c0e8fcd
Show file tree
Hide file tree
Showing 7 changed files with 1,355 additions and 606 deletions.
4 changes: 1 addition & 3 deletions api/datadoghq/v1alpha2/datadogpodautoscaler_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/DataDog/datadog-operator/api/datadoghq/v2alpha1"
)

// spec:
Expand Down Expand Up @@ -557,5 +555,5 @@ type DatadogPodAutoscalerList struct {
}

func init() {
v2alpha1.SchemeBuilder.Register(&DatadogPodAutoscaler{}, &DatadogPodAutoscalerList{})
SchemeBuilder.Register(&DatadogPodAutoscaler{}, &DatadogPodAutoscalerList{})
}
16 changes: 3 additions & 13 deletions api/datadoghq/v1alpha2/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

// Package v1alpha1 contains API Schema definitions for the datadoghq v1alpha1 API group
// Package v2alpha1 contains API Schema definitions for the datadoghq v2alpha1 API group
// +kubebuilder:object:generate=true
// +groupName=datadoghq.com
package v1alpha1
package v1alpha2

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -15,21 +15,11 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "datadoghq.com", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "datadoghq.com", Version: "v2alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)

// Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
return GroupVersion.WithKind(kind).GroupKind()
}

// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return GroupVersion.WithResource(resource).GroupResource()
}
Loading

0 comments on commit c0e8fcd

Please sign in to comment.