-
Notifications
You must be signed in to change notification settings - Fork 57
/
zz.generated.crd.go
118 lines (109 loc) · 4.52 KB
/
zz.generated.crd.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright 2022 The KubeZoo 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.
*/
// Code generated by crd-gen. DO NOT EDIT.
package tenant
import (
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
//nolint
func NewTenantCRD() *apiextensionsv1.CustomResourceDefinition {
return &apiextensionsv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{Name: "tenants.tenant.kubezoo.io"},
Spec: apiextensionsv1.CustomResourceDefinitionSpec{
Group: "tenant.kubezoo.io",
Names: apiextensionsv1.CustomResourceDefinitionNames{
Kind: "Tenant",
ListKind: "TenantList",
Plural: "tenants",
Singular: "tenant",
},
Scope: apiextensionsv1.ResourceScope("Namespaced"),
Versions: []apiextensionsv1.CustomResourceDefinitionVersion{
{
Name: "v1alpha1",
Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"apiVersion": {
Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
Type: "string",
},
"kind": {
Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
Type: "string",
},
"metadata": {Type: "object"},
"spec": {
Description: "`spec` is the specification of the desired behavior of a flow-schema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
Properties: map[string]apiextensionsv1.JSONSchemaProps{
"id": {
Format: "int32",
Type: "integer",
},
"quota": {
Properties: map[string]apiextensionsv1.JSONSchemaProps{"hard": {
AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
Allows: true,
Schema: &apiextensionsv1.JSONSchemaProps{
AnyOf: []apiextensionsv1.JSONSchemaProps{
{Type: "integer"},
{Type: "string"},
},
Pattern: "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
XIntOrString: true,
},
},
Description: "hard is the set of desired hard limits for each named resource. More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/",
Type: "object",
}},
Type: "object",
},
},
Required: []string{
"id",
"quota",
},
Type: "object",
},
"status": {
Description: "`status` is the current status of a flow-schema. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status",
Properties: map[string]apiextensionsv1.JSONSchemaProps{"online": {
Description: "Current state of tenant.",
Type: "boolean",
}},
Type: "object",
},
},
Type: "object",
}},
Served: true,
Storage: true,
},
},
},
Status: apiextensionsv1.CustomResourceDefinitionStatus{
Conditions: []apiextensionsv1.CustomResourceDefinitionCondition{},
StoredVersions: []string{},
},
TypeMeta: metav1.TypeMeta{
APIVersion: "apiextensions.k8s.io/v1",
Kind: "CustomResourceDefinition",
},
}
}
//nolint
func NewCustomResourceDefinitions() []*apiextensionsv1.CustomResourceDefinition {
return []*apiextensionsv1.CustomResourceDefinition{NewTenantCRD()}
}