github.com/SamarSidharth/kpt@v0.0.0-20231122062228-c7d747ae3ace/pkg/api/resourcegroup/v1alpha1/types.go (about) 1 // Copyright 2021 The kpt 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 // Package defines ResourceGroup schema. 16 // Version: v1alpha1 17 // swagger:meta 18 package v1alpha1 19 20 import ( 21 "k8s.io/apimachinery/pkg/runtime/schema" 22 "sigs.k8s.io/cli-utils/pkg/common" 23 "sigs.k8s.io/kustomize/kyaml/yaml" 24 ) 25 26 const ( 27 RGFileName = "resourcegroup.yaml" 28 // RGInventoryIDLabel is the label name used for storing an inventory ID. 29 RGInventoryIDLabel = common.InventoryLabel 30 31 // Deprecated: prefer ResourceGroupGVK 32 RGFileKind = "ResourceGroup" 33 // Deprecated: prefer ResourceGroupGVK 34 RGFileGroup = "kpt.dev" 35 // Deprecated: prefer ResourceGroupGVK 36 RGFileVersion = "v1alpha1" 37 // Deprecated: prefer ResourceGroupGVK 38 RGFileAPIVersion = RGFileGroup + "/" + RGFileVersion 39 ) 40 41 // ResourceGroupGVK is the GroupVersionKind of ResourceGroup objects 42 func ResourceGroupGVK() schema.GroupVersionKind { 43 return schema.GroupVersionKind{ 44 Group: "kpt.dev", 45 Version: "v1alpha1", 46 Kind: "ResourceGroup", 47 } 48 } 49 50 // DefaultMeta is the ResourceMeta for ResourceGroup instances. 51 var DefaultMeta = yaml.ResourceMeta{ 52 TypeMeta: yaml.TypeMeta{ 53 APIVersion: RGFileAPIVersion, 54 Kind: RGFileKind, 55 }, 56 } 57 58 // ResourceGroup contains the inventory information about a package managed with kpt. 59 // swagger:model resourcegroup 60 type ResourceGroup struct { 61 yaml.ResourceMeta `yaml:",inline" json:",inline"` 62 }