istio.io/istio@v0.0.0-20240520182934-d79c90f27776/operator/pkg/apis/istio/v1alpha1/register.go (about)

     1  // Copyright Istio Authors
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // NOTE: Boilerplate only.  Ignore this file.
    16  
    17  // Package v1alpha1 contains API Schema definitions for the istio v1alpha1 API group
    18  // +k8s:deepcopy-gen=package,register
    19  // +groupName=install.istio.io
    20  package v1alpha1
    21  
    22  import (
    23  	"k8s.io/apimachinery/pkg/runtime/schema"
    24  	"sigs.k8s.io/controller-runtime/pkg/scheme"
    25  )
    26  
    27  var (
    28  	// IstioOperatorGVK is GVK for IstioOperator
    29  	IstioOperatorGVK = schema.GroupVersionKind{
    30  		Version: "v1alpha1",
    31  		Group:   "install.istio.io",
    32  		Kind:    "IstioOperator",
    33  	}
    34  
    35  	// SchemeGroupVersion is group version used to register these objects
    36  	SchemeGroupVersion = IstioOperatorGVK.GroupVersion()
    37  
    38  	IstioOperatorGVR = schema.GroupVersionResource{
    39  		Group:    SchemeGroupVersion.Group,
    40  		Version:  SchemeGroupVersion.Version,
    41  		Resource: "istiooperators",
    42  	}
    43  
    44  	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
    45  	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
    46  )
    47  
    48  // Register the IstioOperator and IstioOperatorList API kind
    49  func init() {
    50  	SchemeBuilder.Register(&IstioOperator{}, &IstioOperatorList{})
    51  }