69
vendor/sigs.k8s.io/controller-tools/pkg/crd/gen.go
generated
vendored
69
vendor/sigs.k8s.io/controller-tools/pkg/crd/gen.go
generated
vendored
@@ -84,6 +84,9 @@ type Generator struct {
|
||||
// You'll need to use "v1" to get support for features like defaulting,
|
||||
// along with an API server that supports it (Kubernetes 1.16+).
|
||||
CRDVersions []string `marker:"crdVersions,optional"`
|
||||
|
||||
// GenerateEmbeddedObjectMeta specifies if any embedded ObjectMeta in the CRD should be generated
|
||||
GenerateEmbeddedObjectMeta *bool `marker:",optional"`
|
||||
}
|
||||
|
||||
func (Generator) CheckFilter() loader.NodeFilter {
|
||||
@@ -98,6 +101,8 @@ func (g Generator) Generate(ctx *genall.GenerationContext) error {
|
||||
Checker: ctx.Checker,
|
||||
// Perform defaulting here to avoid ambiguity later
|
||||
AllowDangerousTypes: g.AllowDangerousTypes != nil && *g.AllowDangerousTypes == true,
|
||||
// Indicates the parser on whether to register the ObjectMeta type or not
|
||||
GenerateEmbeddedObjectMeta: g.GenerateEmbeddedObjectMeta != nil && *g.GenerateEmbeddedObjectMeta == true,
|
||||
}
|
||||
|
||||
AddKnownTypes(parser)
|
||||
@@ -129,6 +134,9 @@ func (g Generator) Generate(ctx *genall.GenerationContext) error {
|
||||
crdRaw := parser.CustomResourceDefinitions[groupKind]
|
||||
addAttribution(&crdRaw)
|
||||
|
||||
// Prevent the top level metadata for the CRD to be generate regardless of the intention in the arguments
|
||||
FixTopLevelMetadata(crdRaw)
|
||||
|
||||
versionedCRDs := make([]interface{}, len(crdVersions))
|
||||
for i, ver := range crdVersions {
|
||||
conv, err := AsVersion(crdRaw, schema.GroupVersion{Group: apiext.SchemeGroupVersion.Group, Version: ver})
|
||||
@@ -161,10 +169,14 @@ func (g Generator) Generate(ctx *genall.GenerationContext) error {
|
||||
}
|
||||
|
||||
for i, crd := range versionedCRDs {
|
||||
// defaults are not allowed to be specified in v1beta1 CRDs, so strip them
|
||||
// before writing to a file
|
||||
// defaults are not allowed to be specified in v1beta1 CRDs and
|
||||
// decriptions are not allowed on the metadata regardless of version
|
||||
// strip them before writing to a file
|
||||
if crdVersions[i] == "v1beta1" {
|
||||
removeDefaultsFromSchemas(crd.(*apiextlegacy.CustomResourceDefinition))
|
||||
removeDescriptionFromMetadataLegacy(crd.(*apiextlegacy.CustomResourceDefinition))
|
||||
} else {
|
||||
removeDescriptionFromMetadata(crd.(*apiext.CustomResourceDefinition))
|
||||
}
|
||||
var fileName string
|
||||
if i == 0 {
|
||||
@@ -181,6 +193,47 @@ func (g Generator) Generate(ctx *genall.GenerationContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func removeDescriptionFromMetadata(crd *apiext.CustomResourceDefinition) {
|
||||
for _, versionSpec := range crd.Spec.Versions {
|
||||
if versionSpec.Schema != nil {
|
||||
removeDescriptionFromMetadataProps(versionSpec.Schema.OpenAPIV3Schema)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeDescriptionFromMetadataProps(v *apiext.JSONSchemaProps) {
|
||||
if m, ok := v.Properties["metadata"]; ok {
|
||||
meta := &m
|
||||
if meta.Description != "" {
|
||||
meta.Description = ""
|
||||
v.Properties["metadata"] = m
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeDescriptionFromMetadataLegacy(crd *apiextlegacy.CustomResourceDefinition) {
|
||||
if crd.Spec.Validation != nil {
|
||||
removeDescriptionFromMetadataPropsLegacy(crd.Spec.Validation.OpenAPIV3Schema)
|
||||
}
|
||||
for _, versionSpec := range crd.Spec.Versions {
|
||||
if versionSpec.Schema != nil {
|
||||
removeDescriptionFromMetadataPropsLegacy(versionSpec.Schema.OpenAPIV3Schema)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func removeDescriptionFromMetadataPropsLegacy(v *apiextlegacy.JSONSchemaProps) {
|
||||
if m, ok := v.Properties["metadata"]; ok {
|
||||
meta := &m
|
||||
if meta.Description != "" {
|
||||
meta.Description = ""
|
||||
v.Properties["metadata"] = m
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// removeDefaultsFromSchemas will remove all instances of default values being
|
||||
// specified across all defined API versions
|
||||
func removeDefaultsFromSchemas(crd *apiextlegacy.CustomResourceDefinition) {
|
||||
@@ -224,6 +277,18 @@ func removeDefaultsFromSchemaProps(v *apiextlegacy.JSONSchemaProps) {
|
||||
}
|
||||
}
|
||||
|
||||
// FixTopLevelMetadata resets the schema for the top-level metadata field which is needed for CRD validation
|
||||
func FixTopLevelMetadata(crd apiext.CustomResourceDefinition) {
|
||||
for _, v := range crd.Spec.Versions {
|
||||
if v.Schema != nil && v.Schema.OpenAPIV3Schema != nil && v.Schema.OpenAPIV3Schema.Properties != nil {
|
||||
schemaProperties := v.Schema.OpenAPIV3Schema.Properties
|
||||
if _, ok := schemaProperties["metadata"]; ok {
|
||||
schemaProperties["metadata"] = apiext.JSONSchemaProps{Type: "object"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// toTrivialVersions strips out all schemata except for the storage schema,
|
||||
// and moves that up into the root object. This makes the CRD compatible
|
||||
// with pre 1.13 clusters.
|
||||
|
||||
55
vendor/sigs.k8s.io/controller-tools/pkg/crd/known_types.go
generated
vendored
55
vendor/sigs.k8s.io/controller-tools/pkg/crd/known_types.go
generated
vendored
@@ -34,8 +34,6 @@ var KnownPackages = map[string]PackageOverride{
|
||||
},
|
||||
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1": func(p *Parser, pkg *loader.Package) {
|
||||
// ObjectMeta is managed by the Kubernetes API server, so no need to
|
||||
// generate validation for it.
|
||||
p.Schemata[TypeIdent{Name: "ObjectMeta", Package: pkg}] = apiext.JSONSchemaProps{
|
||||
Type: "object",
|
||||
}
|
||||
@@ -113,6 +111,53 @@ var KnownPackages = map[string]PackageOverride{
|
||||
},
|
||||
}
|
||||
|
||||
// ObjectMetaPackages overrides the ObjectMeta in all types
|
||||
var ObjectMetaPackages = map[string]PackageOverride{
|
||||
"k8s.io/apimachinery/pkg/apis/meta/v1": func(p *Parser, pkg *loader.Package) {
|
||||
// execute the KnowPackages for `k8s.io/apimachinery/pkg/apis/meta/v1` if any
|
||||
if f, ok := KnownPackages["k8s.io/apimachinery/pkg/apis/meta/v1"]; ok {
|
||||
f(p, pkg)
|
||||
}
|
||||
// This is an allow-listed set of properties of ObjectMeta, other runtime properties are not part of this list
|
||||
// See more discussion: https://github.com/kubernetes-sigs/controller-tools/pull/395#issuecomment-691919433
|
||||
p.Schemata[TypeIdent{Name: "ObjectMeta", Package: pkg}] = apiext.JSONSchemaProps{
|
||||
Type: "object",
|
||||
Properties: map[string]apiext.JSONSchemaProps{
|
||||
"name": {
|
||||
Type: "string",
|
||||
},
|
||||
"namespace": {
|
||||
Type: "string",
|
||||
},
|
||||
"annotations": {
|
||||
Type: "object",
|
||||
AdditionalProperties: &apiext.JSONSchemaPropsOrBool{
|
||||
Schema: &apiext.JSONSchemaProps{
|
||||
Type: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
"labels": {
|
||||
Type: "object",
|
||||
AdditionalProperties: &apiext.JSONSchemaPropsOrBool{
|
||||
Schema: &apiext.JSONSchemaProps{
|
||||
Type: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
"finalizers": {
|
||||
Type: "array",
|
||||
Items: &apiext.JSONSchemaPropsOrArray{
|
||||
Schema: &apiext.JSONSchemaProps{
|
||||
Type: "string",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func boolPtr(b bool) *bool {
|
||||
return &b
|
||||
}
|
||||
@@ -125,4 +170,10 @@ func AddKnownTypes(parser *Parser) {
|
||||
for pkgName, override := range KnownPackages {
|
||||
parser.PackageOverrides[pkgName] = override
|
||||
}
|
||||
// if we want to generate the embedded ObjectMeta in the CRD we need to add the ObjectMetaPackages
|
||||
if parser.GenerateEmbeddedObjectMeta {
|
||||
for pkgName, override := range ObjectMetaPackages {
|
||||
parser.PackageOverrides[pkgName] = override
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
29
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/crd.go
generated
vendored
29
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/crd.go
generated
vendored
@@ -48,6 +48,9 @@ var CRDMarkers = []*definitionWithHelp{
|
||||
|
||||
must(markers.MakeDefinition("kubebuilder:unservedversion", markers.DescribesType, UnservedVersion{})).
|
||||
WithHelp(UnservedVersion{}.Help()),
|
||||
|
||||
must(markers.MakeDefinition("kubebuilder:deprecatedversion", markers.DescribesType, DeprecatedVersion{})).
|
||||
WithHelp(DeprecatedVersion{}.Help()),
|
||||
}
|
||||
|
||||
// TODO: categories and singular used to be annotations types
|
||||
@@ -316,3 +319,29 @@ func (s UnservedVersion) ApplyToCRD(crd *apiext.CustomResourceDefinitionSpec, ve
|
||||
}
|
||||
|
||||
// NB(directxman12): singular was historically distinct, so we keep it here for backwards compat
|
||||
|
||||
// +controllertools:marker:generateHelp:category=CRD
|
||||
|
||||
// DeprecatedVersion marks this version as deprecated.
|
||||
type DeprecatedVersion struct {
|
||||
// Warning message to be shown on the deprecated version
|
||||
Warning *string `marker:",optional"`
|
||||
}
|
||||
|
||||
func (s DeprecatedVersion) ApplyToCRD(crd *apiext.CustomResourceDefinitionSpec, version string) error {
|
||||
if version == "" {
|
||||
// single-version, do nothing
|
||||
return nil
|
||||
}
|
||||
// multi-version
|
||||
for i := range crd.Versions {
|
||||
ver := &crd.Versions[i]
|
||||
if ver.Name != version {
|
||||
continue
|
||||
}
|
||||
ver.Deprecated = true
|
||||
ver.DeprecationWarning = s.Warning
|
||||
break
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
17
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go
generated
vendored
17
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/validation.go
generated
vendored
@@ -26,6 +26,10 @@ import (
|
||||
"sigs.k8s.io/controller-tools/pkg/markers"
|
||||
)
|
||||
|
||||
const (
|
||||
SchemalessName = "kubebuilder:validation:Schemaless"
|
||||
)
|
||||
|
||||
// ValidationMarkers lists all available markers that affect CRD schema generation,
|
||||
// except for the few that don't make sense as type-level markers (see FieldOnlyMarkers).
|
||||
// All markers start with `+kubebuilder:validation:`, and continue with their type name.
|
||||
@@ -82,6 +86,9 @@ var FieldOnlyMarkers = []*definitionWithHelp{
|
||||
|
||||
must(markers.MakeDefinition("kubebuilder:validation:EmbeddedResource", markers.DescribesField, XEmbeddedResource{})).
|
||||
WithHelp(XEmbeddedResource{}.Help()),
|
||||
|
||||
must(markers.MakeDefinition(SchemalessName, markers.DescribesField, Schemaless{})).
|
||||
WithHelp(Schemaless{}.Help()),
|
||||
}
|
||||
|
||||
// ValidationIshMarkers are field-and-type markers that don't fall under the
|
||||
@@ -225,6 +232,16 @@ type XPreserveUnknownFields struct{}
|
||||
// field, yet it is possible. This can be combined with PreserveUnknownFields.
|
||||
type XEmbeddedResource struct{}
|
||||
|
||||
// +controllertools:marker:generateHelp:category="CRD validation"
|
||||
// Schemaless marks a field as being a schemaless object.
|
||||
//
|
||||
// Schemaless objects are not introspected, so you must provide
|
||||
// any type and validation information yourself. One use for this
|
||||
// tag is for embedding fields that hold JSONSchema typed objects.
|
||||
// Because this field disables all type checking, it is recommended
|
||||
// to be used only as a last resort.
|
||||
type Schemaless struct{}
|
||||
|
||||
func (m Maximum) ApplyToSchema(schema *apiext.JSONSchemaProps) error {
|
||||
if schema.Type != "integer" {
|
||||
return fmt.Errorf("must apply maximum to an integer")
|
||||
|
||||
57
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go
generated
vendored
57
vendor/sigs.k8s.io/controller-tools/pkg/crd/markers/zz_generated.markerhelp.go
generated
vendored
@@ -32,7 +32,7 @@ func (Default) Help() *markers.DefinitionHelp {
|
||||
Details: "A default value will be accepted as any value valid for the field. Formatting for common types include: boolean: `true`, string: `Cluster`, numerical: `1.24`, array: `{1,2}`, object: `{policy: \"delete\"}`). Defaults should be defined in pruned form, and only best-effort validation will be performed. Full validation of a default requires submission of the containing CRD to an apiserver.",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Value": markers.DetailedHelp{
|
||||
"Value": {
|
||||
Summary: "",
|
||||
Details: "",
|
||||
},
|
||||
@@ -40,6 +40,22 @@ func (Default) Help() *markers.DefinitionHelp {
|
||||
}
|
||||
}
|
||||
|
||||
func (DeprecatedVersion) Help() *markers.DefinitionHelp {
|
||||
return &markers.DefinitionHelp{
|
||||
Category: "CRD",
|
||||
DetailedHelp: markers.DetailedHelp{
|
||||
Summary: "marks this version as deprecated.",
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Warning": markers.DetailedHelp{
|
||||
Summary: "message to be shown on the deprecated version",
|
||||
Details: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (Enum) Help() *markers.DefinitionHelp {
|
||||
return &markers.DefinitionHelp{
|
||||
Category: "CRD validation",
|
||||
@@ -246,27 +262,27 @@ func (PrintColumn) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Name": markers.DetailedHelp{
|
||||
"Name": {
|
||||
Summary: "specifies the name of the column.",
|
||||
Details: "",
|
||||
},
|
||||
"Type": markers.DetailedHelp{
|
||||
"Type": {
|
||||
Summary: "indicates the type of the column. ",
|
||||
Details: "It may be any OpenAPI data type listed at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types.",
|
||||
},
|
||||
"JSONPath": markers.DetailedHelp{
|
||||
"JSONPath": {
|
||||
Summary: "specifies the jsonpath expression used to extract the value of the column.",
|
||||
Details: "",
|
||||
},
|
||||
"Description": markers.DetailedHelp{
|
||||
"Description": {
|
||||
Summary: "specifies the help/description for this column.",
|
||||
Details: "",
|
||||
},
|
||||
"Format": markers.DetailedHelp{
|
||||
"Format": {
|
||||
Summary: "specifies the format of the column. ",
|
||||
Details: "It may be any OpenAPI data format corresponding to the type, listed at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types.",
|
||||
},
|
||||
"Priority": markers.DetailedHelp{
|
||||
"Priority": {
|
||||
Summary: "indicates how important it is that this column be displayed. ",
|
||||
Details: "Lower priority (*higher* numbered) columns will be hidden if the terminal width is too small.",
|
||||
},
|
||||
@@ -282,23 +298,23 @@ func (Resource) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Path": markers.DetailedHelp{
|
||||
"Path": {
|
||||
Summary: "specifies the plural \"resource\" for this CRD. ",
|
||||
Details: "It generally corresponds to a plural, lower-cased version of the Kind. See https://book.kubebuilder.io/cronjob-tutorial/gvks.html.",
|
||||
},
|
||||
"ShortName": markers.DetailedHelp{
|
||||
"ShortName": {
|
||||
Summary: "specifies aliases for this CRD. ",
|
||||
Details: "Short names are often used when people have work with your resource over and over again. For instance, \"rs\" for \"replicaset\" or \"crd\" for customresourcedefinition.",
|
||||
},
|
||||
"Categories": markers.DetailedHelp{
|
||||
"Categories": {
|
||||
Summary: "specifies which group aliases this resource is part of. ",
|
||||
Details: "Group aliases are used to work with groups of resources at once. The most common one is \"all\" which covers about a third of the base resources in Kubernetes, and is generally used for \"user-facing\" resources.",
|
||||
},
|
||||
"Singular": markers.DetailedHelp{
|
||||
"Singular": {
|
||||
Summary: "overrides the singular form of your resource. ",
|
||||
Details: "The singular form is otherwise defaulted off the plural (path).",
|
||||
},
|
||||
"Scope": markers.DetailedHelp{
|
||||
"Scope": {
|
||||
Summary: "overrides the scope of the CRD (Cluster vs Namespaced). ",
|
||||
Details: "Scope defaults to \"Namespaced\". Cluster-scoped (\"Cluster\") resources don't exist in namespaces.",
|
||||
},
|
||||
@@ -306,6 +322,17 @@ func (Resource) Help() *markers.DefinitionHelp {
|
||||
}
|
||||
}
|
||||
|
||||
func (Schemaless) Help() *markers.DefinitionHelp {
|
||||
return &markers.DefinitionHelp{
|
||||
Category: "CRD validation",
|
||||
DetailedHelp: markers.DetailedHelp{
|
||||
Summary: "marks a field as being a schemaless object. ",
|
||||
Details: "Schemaless objects are not introspected, so you must provide any type and validation information yourself. One use for this tag is for embedding fields that hold JSONSchema typed objects. Because this field disables all type checking, it is recommended to be used only as a last resort.",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{},
|
||||
}
|
||||
}
|
||||
|
||||
func (SkipVersion) Help() *markers.DefinitionHelp {
|
||||
return &markers.DefinitionHelp{
|
||||
Category: "CRD",
|
||||
@@ -347,15 +374,15 @@ func (SubresourceScale) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"SpecPath": markers.DetailedHelp{
|
||||
"SpecPath": {
|
||||
Summary: "specifies the jsonpath to the replicas field for the scale's spec.",
|
||||
Details: "",
|
||||
},
|
||||
"StatusPath": markers.DetailedHelp{
|
||||
"StatusPath": {
|
||||
Summary: "specifies the jsonpath to the replicas field for the scale's status.",
|
||||
Details: "",
|
||||
},
|
||||
"SelectorPath": markers.DetailedHelp{
|
||||
"SelectorPath": {
|
||||
Summary: "specifies the jsonpath to the pod label selector field for the scale's status. ",
|
||||
Details: "The selector field must be the *string* form (serialized form) of a selector. Setting a pod label selector is necessary for your type to work with the HorizontalPodAutoscaler.",
|
||||
},
|
||||
|
||||
3
vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go
generated
vendored
3
vendor/sigs.k8s.io/controller-tools/pkg/crd/parser.go
generated
vendored
@@ -86,6 +86,9 @@ type Parser struct {
|
||||
// because the implementation is too difficult/clunky to promote them to category 3.
|
||||
// TODO: Should we have a more formal mechanism for putting "type patterns" in each of the above categories?
|
||||
AllowDangerousTypes bool
|
||||
|
||||
// GenerateEmbeddedObjectMeta specifies if any embedded ObjectMeta should be generated
|
||||
GenerateEmbeddedObjectMeta bool
|
||||
}
|
||||
|
||||
func (p *Parser) init() {
|
||||
|
||||
8
vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go
generated
vendored
8
vendor/sigs.k8s.io/controller-tools/pkg/crd/schema.go
generated
vendored
@@ -23,6 +23,7 @@ import (
|
||||
"strings"
|
||||
|
||||
apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
||||
crdmarkers "sigs.k8s.io/controller-tools/pkg/crd/markers"
|
||||
|
||||
"sigs.k8s.io/controller-tools/pkg/loader"
|
||||
"sigs.k8s.io/controller-tools/pkg/markers"
|
||||
@@ -378,7 +379,12 @@ func structToSchema(ctx *schemaContext, structType *ast.StructType) *apiext.JSON
|
||||
}
|
||||
}
|
||||
|
||||
propSchema := typeToSchema(ctx.ForInfo(&markers.TypeInfo{}), field.RawField.Type)
|
||||
var propSchema *apiext.JSONSchemaProps
|
||||
if field.Markers.Get(crdmarkers.SchemalessName) != nil {
|
||||
propSchema = &apiext.JSONSchemaProps{}
|
||||
} else {
|
||||
propSchema = typeToSchema(ctx.ForInfo(&markers.TypeInfo{}), field.RawField.Type)
|
||||
}
|
||||
propSchema.Description = field.Doc
|
||||
|
||||
applyMarkers(ctx, field.Markers, propSchema, field.RawField)
|
||||
|
||||
2
vendor/sigs.k8s.io/controller-tools/pkg/crd/spec.go
generated
vendored
2
vendor/sigs.k8s.io/controller-tools/pkg/crd/spec.go
generated
vendored
@@ -55,7 +55,7 @@ func (p *Parser) NeedCRDFor(groupKind schema.GroupKind, maxDescLen *int) {
|
||||
packages = append(packages, pkg)
|
||||
}
|
||||
|
||||
defaultPlural := flect.Pluralize(strings.ToLower(groupKind.Kind))
|
||||
defaultPlural := strings.ToLower(flect.Pluralize(groupKind.Kind))
|
||||
crd := apiext.CustomResourceDefinition{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
APIVersion: apiext.SchemeGroupVersion.String(),
|
||||
|
||||
14
vendor/sigs.k8s.io/controller-tools/pkg/crd/zz_generated.markerhelp.go
generated
vendored
14
vendor/sigs.k8s.io/controller-tools/pkg/crd/zz_generated.markerhelp.go
generated
vendored
@@ -32,26 +32,30 @@ func (Generator) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"TrivialVersions": markers.DetailedHelp{
|
||||
"TrivialVersions": {
|
||||
Summary: "indicates that we should produce a single-version CRD. ",
|
||||
Details: "Single \"trivial-version\" CRDs are compatible with older (pre 1.13) Kubernetes API servers. The storage version's schema will be used as the CRD's schema. \n Only works with the v1beta1 CRD version.",
|
||||
},
|
||||
"PreserveUnknownFields": markers.DetailedHelp{
|
||||
"PreserveUnknownFields": {
|
||||
Summary: "indicates whether or not we should turn off pruning. ",
|
||||
Details: "Left unspecified, it'll default to true when only a v1beta1 CRD is generated (to preserve compatibility with older versions of this tool), or false otherwise. \n It's required to be false for v1 CRDs.",
|
||||
},
|
||||
"AllowDangerousTypes": markers.DetailedHelp{
|
||||
"AllowDangerousTypes": {
|
||||
Summary: "allows types which are usually omitted from CRD generation because they are not recommended. ",
|
||||
Details: "Currently the following additional types are allowed when this is true: float32 float64 \n Left unspecified, the default is false",
|
||||
},
|
||||
"MaxDescLen": markers.DetailedHelp{
|
||||
"MaxDescLen": {
|
||||
Summary: "specifies the maximum description length for fields in CRD's OpenAPI schema. ",
|
||||
Details: "0 indicates drop the description for all fields completely. n indicates limit the description to at most n characters and truncate the description to closest sentence boundary if it exceeds n characters.",
|
||||
},
|
||||
"CRDVersions": markers.DetailedHelp{
|
||||
"CRDVersions": {
|
||||
Summary: "specifies the target API versions of the CRD type itself to generate. Defaults to v1. ",
|
||||
Details: "The first version listed will be assumed to be the \"default\" version and will not get a version suffix in the output filename. \n You'll need to use \"v1\" to get support for features like defaulting, along with an API server that supports it (Kubernetes 1.16+).",
|
||||
},
|
||||
"GenerateEmbeddedObjectMeta": {
|
||||
Summary: "specifies if any embedded ObjectMeta in the CRD should be generated",
|
||||
Details: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
4
vendor/sigs.k8s.io/controller-tools/pkg/deepcopy/zz_generated.markerhelp.go
generated
vendored
4
vendor/sigs.k8s.io/controller-tools/pkg/deepcopy/zz_generated.markerhelp.go
generated
vendored
@@ -32,11 +32,11 @@ func (Generator) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"HeaderFile": markers.DetailedHelp{
|
||||
"HeaderFile": {
|
||||
Summary: "specifies the header text (e.g. license) to prepend to generated files.",
|
||||
Details: "",
|
||||
},
|
||||
"Year": markers.DetailedHelp{
|
||||
"Year": {
|
||||
Summary: "specifies the year to substitute for \" YEAR\" in the header file.",
|
||||
Details: "",
|
||||
},
|
||||
|
||||
4
vendor/sigs.k8s.io/controller-tools/pkg/genall/zz_generated.markerhelp.go
generated
vendored
4
vendor/sigs.k8s.io/controller-tools/pkg/genall/zz_generated.markerhelp.go
generated
vendored
@@ -43,11 +43,11 @@ func (OutputArtifacts) Help() *markers.DefinitionHelp {
|
||||
Details: "Non-package associated artifacts are output to the Config directory, while package-associated ones are output to their package's source files' directory, unless an alternate path is specified in Code.",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Config": markers.DetailedHelp{
|
||||
"Config": {
|
||||
Summary: "points to the directory to which to write configuration.",
|
||||
Details: "",
|
||||
},
|
||||
"Code": markers.DetailedHelp{
|
||||
"Code": {
|
||||
Summary: "overrides the directory in which to write new code (defaults to where the existing code lives).",
|
||||
Details: "",
|
||||
},
|
||||
|
||||
2
vendor/sigs.k8s.io/controller-tools/pkg/loader/loader.go
generated
vendored
2
vendor/sigs.k8s.io/controller-tools/pkg/loader/loader.go
generated
vendored
@@ -249,7 +249,7 @@ func (l *loader) typeCheck(pkg *Package) {
|
||||
|
||||
// it's possible to have a call to check in parallel to a call to this
|
||||
// if one package in the package graph gets its dependency filtered out,
|
||||
// but another doesn't (so one wants a "dummy" package here, and another
|
||||
// but another doesn't (so one wants a "placeholder" package here, and another
|
||||
// wants the full check).
|
||||
//
|
||||
// Thus, we need to lock here (at least for the time being) to avoid
|
||||
|
||||
14
vendor/sigs.k8s.io/controller-tools/pkg/rbac/zz_generated.markerhelp.go
generated
vendored
14
vendor/sigs.k8s.io/controller-tools/pkg/rbac/zz_generated.markerhelp.go
generated
vendored
@@ -32,7 +32,7 @@ func (Generator) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"RoleName": markers.DetailedHelp{
|
||||
"RoleName": {
|
||||
Summary: "sets the name of the generated ClusterRole.",
|
||||
Details: "",
|
||||
},
|
||||
@@ -48,27 +48,27 @@ func (Rule) Help() *markers.DefinitionHelp {
|
||||
Details: "",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Groups": markers.DetailedHelp{
|
||||
"Groups": {
|
||||
Summary: "specifies the API groups that this rule encompasses.",
|
||||
Details: "",
|
||||
},
|
||||
"Resources": markers.DetailedHelp{
|
||||
"Resources": {
|
||||
Summary: "specifies the API resources that this rule encompasses.",
|
||||
Details: "",
|
||||
},
|
||||
"ResourceNames": markers.DetailedHelp{
|
||||
"ResourceNames": {
|
||||
Summary: "specifies the names of the API resources that this rule encompasses. ",
|
||||
Details: "Create requests cannot be restricted by resourcename, as the object's name is not known at authorization time.",
|
||||
},
|
||||
"Verbs": markers.DetailedHelp{
|
||||
"Verbs": {
|
||||
Summary: "specifies the (lowercase) kubernetes API verbs that this rule encompasses.",
|
||||
Details: "",
|
||||
},
|
||||
"URLs": markers.DetailedHelp{
|
||||
"URLs": {
|
||||
Summary: "URL specifies the non-resource URLs that this rule encompasses.",
|
||||
Details: "",
|
||||
},
|
||||
"Namespace": markers.DetailedHelp{
|
||||
"Namespace": {
|
||||
Summary: "specifies the scope of the Rule. If not set, the Rule belongs to the generated ClusterRole. If set, the Rule belongs to a Role, whose namespace is specified by this field.",
|
||||
Details: "",
|
||||
},
|
||||
|
||||
13
vendor/sigs.k8s.io/controller-tools/pkg/schemapatcher/gen.go
generated
vendored
13
vendor/sigs.k8s.io/controller-tools/pkg/schemapatcher/gen.go
generated
vendored
@@ -84,6 +84,9 @@ type Generator struct {
|
||||
// n indicates limit the description to at most n characters and truncate the description to
|
||||
// closest sentence boundary if it exceeds n characters.
|
||||
MaxDescLen *int `marker:",optional"`
|
||||
|
||||
// GenerateEmbeddedObjectMeta specifies if any embedded ObjectMeta in the CRD should be generated
|
||||
GenerateEmbeddedObjectMeta *bool `marker:",optional"`
|
||||
}
|
||||
|
||||
var _ genall.Generator = &Generator{}
|
||||
@@ -100,6 +103,8 @@ func (g Generator) Generate(ctx *genall.GenerationContext) (result error) {
|
||||
parser := &crdgen.Parser{
|
||||
Collector: ctx.Collector,
|
||||
Checker: ctx.Checker,
|
||||
// Indicates the parser on whether to register the ObjectMeta type or not
|
||||
GenerateEmbeddedObjectMeta: g.GenerateEmbeddedObjectMeta != nil && *g.GenerateEmbeddedObjectMeta == true,
|
||||
}
|
||||
|
||||
crdgen.AddKnownTypes(parser)
|
||||
@@ -142,6 +147,12 @@ func (g Generator) Generate(ctx *genall.GenerationContext) (result error) {
|
||||
fullSchema = *fullSchema.DeepCopy()
|
||||
crdgen.TruncateDescription(&fullSchema, *g.MaxDescLen)
|
||||
}
|
||||
|
||||
// Fix top level ObjectMeta regardless of the settings.
|
||||
if _, ok := fullSchema.Properties["metadata"]; ok {
|
||||
fullSchema.Properties["metadata"] = apiext.JSONSchemaProps{Type: "object"}
|
||||
}
|
||||
|
||||
existingSet.NewSchemata[gv.Version] = fullSchema
|
||||
}
|
||||
}
|
||||
@@ -434,7 +445,7 @@ func crdsFromDirectory(ctx *genall.GenerationContext, dir string) (map[schema.Gr
|
||||
groupKind := schema.GroupKind{Group: actualCRD.Spec.Group, Kind: actualCRD.Spec.Names.Kind}
|
||||
var versions map[string]struct{}
|
||||
if len(actualCRD.Spec.Versions) == 0 {
|
||||
versions = map[string]struct{}{actualCRD.Spec.Version: struct{}{}}
|
||||
versions = map[string]struct{}{actualCRD.Spec.Version: {}}
|
||||
} else {
|
||||
versions = make(map[string]struct{}, len(actualCRD.Spec.Versions))
|
||||
for _, ver := range actualCRD.Spec.Versions {
|
||||
|
||||
4
vendor/sigs.k8s.io/controller-tools/pkg/schemapatcher/zz_generated.markerhelp.go
generated
vendored
4
vendor/sigs.k8s.io/controller-tools/pkg/schemapatcher/zz_generated.markerhelp.go
generated
vendored
@@ -32,11 +32,11 @@ func (Generator) Help() *markers.DefinitionHelp {
|
||||
Details: "For legacy (v1beta1) single-version CRDs, it will simply replace the global schema. \n For legacy (v1beta1) multi-version CRDs, and any v1 CRDs, it will replace schemata of existing versions and *clear the schema* from any versions not specified in the Go code. It will *not* add new versions, or remove old ones. \n For legacy multi-version CRDs with identical schemata, it will take care of lifting the per-version schema up to the global schema. \n It will generate output for each \"CRD Version\" (API version of the CRD type itself) , e.g. apiextensions/v1beta1 and apiextensions/v1) available.",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"ManifestsPath": markers.DetailedHelp{
|
||||
"ManifestsPath": {
|
||||
Summary: "contains the CustomResourceDefinition YAML files.",
|
||||
Details: "",
|
||||
},
|
||||
"MaxDescLen": markers.DetailedHelp{
|
||||
"MaxDescLen": {
|
||||
Summary: "specifies the maximum description length for fields in CRD's OpenAPI schema. ",
|
||||
Details: "0 indicates drop the description for all fields completely. n indicates limit the description to at most n characters and truncate the description to closest sentence boundary if it exceeds n characters.",
|
||||
},
|
||||
|
||||
44
vendor/sigs.k8s.io/controller-tools/pkg/webhook/conv.go
generated
vendored
44
vendor/sigs.k8s.io/controller-tools/pkg/webhook/conv.go
generated
vendored
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
Copyright 2020 The Kubernetes 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.
|
||||
*/
|
||||
|
||||
package webhook
|
||||
|
||||
import (
|
||||
admissionregv1 "k8s.io/api/admissionregistration/v1"
|
||||
admissionregv1beta1 "k8s.io/api/admissionregistration/v1beta1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var (
|
||||
conversionScheme = runtime.NewScheme()
|
||||
)
|
||||
|
||||
func init() {
|
||||
utilruntime.Must(admissionregv1.AddToScheme(conversionScheme))
|
||||
utilruntime.Must(admissionregv1beta1.AddToScheme(conversionScheme))
|
||||
}
|
||||
|
||||
// MutatingWebhookConfigurationAsVersion converts a MutatingWebhookConfiguration from the canonical internal form (currently v1) to some external form.
|
||||
func MutatingWebhookConfigurationAsVersion(original *admissionregv1.MutatingWebhookConfiguration, gv schema.GroupVersion) (runtime.Object, error) {
|
||||
return conversionScheme.ConvertToVersion(original, gv)
|
||||
}
|
||||
|
||||
// ValidatingWebhookConfigurationAsVersion converts a ValidatingWebhookConfiguration from the canonical internal form (currently v1) to some external form.
|
||||
func ValidatingWebhookConfigurationAsVersion(original *admissionregv1.ValidatingWebhookConfiguration, gv schema.GroupVersion) (runtime.Object, error) {
|
||||
return conversionScheme.ConvertToVersion(original, gv)
|
||||
}
|
||||
73
vendor/sigs.k8s.io/controller-tools/pkg/webhook/parser.go
generated
vendored
73
vendor/sigs.k8s.io/controller-tools/pkg/webhook/parser.go
generated
vendored
@@ -27,7 +27,6 @@ import (
|
||||
"strings"
|
||||
|
||||
admissionregv1 "k8s.io/api/admissionregistration/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
|
||||
@@ -332,71 +331,63 @@ func (Generator) Generate(ctx *genall.GenerationContext) error {
|
||||
versionedWebhooks := make(map[string][]interface{}, len(supportedWebhookVersions))
|
||||
for _, version := range supportedWebhookVersions {
|
||||
if cfgs, ok := mutatingCfgs[version]; ok {
|
||||
objRaw := &admissionregv1.MutatingWebhookConfiguration{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "MutatingWebhookConfiguration",
|
||||
APIVersion: admissionregv1.SchemeGroupVersion.String(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "mutating-webhook-configuration",
|
||||
},
|
||||
Webhooks: cfgs,
|
||||
}
|
||||
if version == defaultWebhookVersion {
|
||||
// All webhook config versions in supportedWebhookVersions have the same general form, with a few
|
||||
// stricter requirements for v1. Since no conversion scheme exists for webhook configs, the v1
|
||||
// type can be used for all versioned types in this context.
|
||||
objRaw := &admissionregv1.MutatingWebhookConfiguration{}
|
||||
objRaw.SetGroupVersionKind(schema.GroupVersionKind{
|
||||
Group: admissionregv1.SchemeGroupVersion.Group,
|
||||
Version: version,
|
||||
Kind: "MutatingWebhookConfiguration",
|
||||
})
|
||||
objRaw.SetName("mutating-webhook-configuration")
|
||||
objRaw.Webhooks = cfgs
|
||||
switch version {
|
||||
case admissionregv1.SchemeGroupVersion.Version:
|
||||
for i := range objRaw.Webhooks {
|
||||
// SideEffects is required in admissionregistration/v1, if this is not set or set to `Some` or `Known`,
|
||||
// we return an error
|
||||
// return an error
|
||||
if err := checkSideEffectsForV1(objRaw.Webhooks[i].SideEffects); err != nil {
|
||||
return err
|
||||
}
|
||||
// AdmissionReviewVersions is required in admissionregistration/v1, if this is not set,
|
||||
// we return an error
|
||||
// return an error
|
||||
if len(objRaw.Webhooks[i].AdmissionReviewVersions) == 0 {
|
||||
return fmt.Errorf("AdmissionReviewVersions is mandatory for v1 {Mutating,Validating}WebhookConfiguration")
|
||||
}
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], objRaw)
|
||||
} else {
|
||||
conv, err := MutatingWebhookConfigurationAsVersion(objRaw, schema.GroupVersion{Group: admissionregv1.SchemeGroupVersion.Group, Version: version})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], conv)
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], objRaw)
|
||||
}
|
||||
|
||||
if cfgs, ok := validatingCfgs[version]; ok {
|
||||
objRaw := &admissionregv1.ValidatingWebhookConfiguration{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
Kind: "ValidatingWebhookConfiguration",
|
||||
APIVersion: admissionregv1.SchemeGroupVersion.String(),
|
||||
},
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "validating-webhook-configuration",
|
||||
},
|
||||
Webhooks: cfgs,
|
||||
}
|
||||
if version == defaultWebhookVersion {
|
||||
// All webhook config versions in supportedWebhookVersions have the same general form, with a few
|
||||
// stricter requirements for v1. Since no conversion scheme exists for webhook configs, the v1
|
||||
// type can be used for all versioned types in this context.
|
||||
objRaw := &admissionregv1.ValidatingWebhookConfiguration{}
|
||||
objRaw.SetGroupVersionKind(schema.GroupVersionKind{
|
||||
Group: admissionregv1.SchemeGroupVersion.Group,
|
||||
Version: version,
|
||||
Kind: "ValidatingWebhookConfiguration",
|
||||
})
|
||||
objRaw.SetName("validating-webhook-configuration")
|
||||
objRaw.Webhooks = cfgs
|
||||
switch version {
|
||||
case admissionregv1.SchemeGroupVersion.Version:
|
||||
for i := range objRaw.Webhooks {
|
||||
// SideEffects is required in admissionregistration/v1, if this is not set or set to `Some` or `Known`,
|
||||
// we return an error
|
||||
// return an error
|
||||
if err := checkSideEffectsForV1(objRaw.Webhooks[i].SideEffects); err != nil {
|
||||
return err
|
||||
}
|
||||
// AdmissionReviewVersions is required in admissionregistration/v1, if this is not set,
|
||||
// we return an error
|
||||
// return an error
|
||||
if len(objRaw.Webhooks[i].AdmissionReviewVersions) == 0 {
|
||||
return fmt.Errorf("AdmissionReviewVersions is mandatory for v1 {Mutating,Validating}WebhookConfiguration")
|
||||
}
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], objRaw)
|
||||
} else {
|
||||
conv, err := ValidatingWebhookConfigurationAsVersion(objRaw, schema.GroupVersion{Group: admissionregv1.SchemeGroupVersion.Group, Version: version})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], conv)
|
||||
}
|
||||
versionedWebhooks[version] = append(versionedWebhooks[version], objRaw)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
24
vendor/sigs.k8s.io/controller-tools/pkg/webhook/zz_generated.markerhelp.go
generated
vendored
24
vendor/sigs.k8s.io/controller-tools/pkg/webhook/zz_generated.markerhelp.go
generated
vendored
@@ -32,51 +32,51 @@ func (Config) Help() *markers.DefinitionHelp {
|
||||
Details: "It specifies only the details that are intrinsic to the application serving it (e.g. the resources it can handle, or the path it serves on).",
|
||||
},
|
||||
FieldHelp: map[string]markers.DetailedHelp{
|
||||
"Mutating": markers.DetailedHelp{
|
||||
"Mutating": {
|
||||
Summary: "marks this as a mutating webhook (it's validating only if false) ",
|
||||
Details: "Mutating webhooks are allowed to change the object in their response, and are called *before* all validating webhooks. Mutating webhooks may choose to reject an object, similarly to a validating webhook.",
|
||||
},
|
||||
"FailurePolicy": markers.DetailedHelp{
|
||||
"FailurePolicy": {
|
||||
Summary: "specifies what should happen if the API server cannot reach the webhook. ",
|
||||
Details: "It may be either \"ignore\" (to skip the webhook and continue on) or \"fail\" (to reject the object in question).",
|
||||
},
|
||||
"MatchPolicy": markers.DetailedHelp{
|
||||
"MatchPolicy": {
|
||||
Summary: "defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" (match only if it exactly matches the specified rule) or \"Equivalent\" (match a request if it modifies a resource listed in rules, even via another API group or version).",
|
||||
Details: "",
|
||||
},
|
||||
"SideEffects": markers.DetailedHelp{
|
||||
"SideEffects": {
|
||||
Summary: "specify whether calling the webhook will have side effects. This has an impact on dry runs and `kubectl diff`: if the sideEffect is \"Unknown\" (the default) or \"Some\", then the API server will not call the webhook on a dry-run request and fails instead. If the value is \"None\", then the webhook has no side effects and the API server will call it on dry-run. If the value is \"NoneOnDryRun\", then the webhook is responsible for inspecting the \"dryRun\" property of the AdmissionReview sent in the request, and avoiding side effects if that value is \"true.\"",
|
||||
Details: "",
|
||||
},
|
||||
"Groups": markers.DetailedHelp{
|
||||
"Groups": {
|
||||
Summary: "specifies the API groups that this webhook receives requests for.",
|
||||
Details: "",
|
||||
},
|
||||
"Resources": markers.DetailedHelp{
|
||||
"Resources": {
|
||||
Summary: "specifies the API resources that this webhook receives requests for.",
|
||||
Details: "",
|
||||
},
|
||||
"Verbs": markers.DetailedHelp{
|
||||
"Verbs": {
|
||||
Summary: "specifies the Kubernetes API verbs that this webhook receives requests for. ",
|
||||
Details: "Only modification-like verbs may be specified. May be \"create\", \"update\", \"delete\", \"connect\", or \"*\" (for all).",
|
||||
},
|
||||
"Versions": markers.DetailedHelp{
|
||||
"Versions": {
|
||||
Summary: "specifies the API versions that this webhook receives requests for.",
|
||||
Details: "",
|
||||
},
|
||||
"Name": markers.DetailedHelp{
|
||||
"Name": {
|
||||
Summary: "indicates the name of this webhook configuration. Should be a domain with at least three segments separated by dots",
|
||||
Details: "",
|
||||
},
|
||||
"Path": markers.DetailedHelp{
|
||||
"Path": {
|
||||
Summary: "specifies that path that the API server should connect to this webhook on. Must be prefixed with a '/validate-' or '/mutate-' depending on the type, and followed by $GROUP-$VERSION-$KIND where all values are lower-cased and the periods in the group are substituted for hyphens. For example, a validating webhook path for type batch.tutorial.kubebuilder.io/v1,Kind=CronJob would be /validate-batch-tutorial-kubebuilder-io-v1-cronjob",
|
||||
Details: "",
|
||||
},
|
||||
"WebhookVersions": markers.DetailedHelp{
|
||||
"WebhookVersions": {
|
||||
Summary: "specifies the target API versions of the {Mutating,Validating}WebhookConfiguration objects itself to generate. Defaults to v1.",
|
||||
Details: "",
|
||||
},
|
||||
"AdmissionReviewVersions": markers.DetailedHelp{
|
||||
"AdmissionReviewVersions": {
|
||||
Summary: "is an ordered list of preferred `AdmissionReview` versions the Webhook expects. For generating v1 {Mutating,Validating}WebhookConfiguration, this is mandatory. For generating v1beta1 {Mutating,Validating}WebhookConfiguration, this is optional, and default to v1beta1.",
|
||||
Details: "",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user