The Deckhouse Kubernetes Platform installs CRDs but does not remove them when a module is disabled. If you no longer need the created CRDs, delete them.
The module lifecycle stage: General Availability
ConversionWebhook
Scope: Cluster
Version: v1alpha1
ConversionWebhook is the Schema for the conversionwebhooks API
- stringapiVersion
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
- array of objectscontext
Run a hook on a Kubernetes object changes.
- objectcontext.kubernetes
- booleancontext.kubernetes.allowFailure
If
true, Shell-operator skips the hook execution errors. Iffalseor the parameter is not set, the hook is restarted after a 5 seconds delay in case of an error. - stringcontext.kubernetes.apiVersion
Is an optional group and version of object API. For example, it is
v1for core objects (Pod, etc.),rbac.authorization.k8s.io/v1beta1for ClusterRole andmonitoring.coreos.com/v1for prometheus-operator. - objectcontext.kubernetes.fieldSelector
- array of objectscontext.kubernetes.fieldSelector.matchExpressions
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.field
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.operator
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.value
- array of stringscontext.kubernetes.includeSnapshotsFrom
An array of names of kubernetes bindings in a hook. When specified, a list of monitored objects from that bindings will be added to the binding context in a snapshots field. Self-include is also possible.
- stringcontext.kubernetes.jqFilter
An optional parameter that specifies event filtering using jq syntax. The hook will be triggered on the “Modified” event only if the filter result is changed after the last event.
- stringcontext.kubernetes.kind
Required value
Is the type of a monitored Kubernetes resource. This field is required.
- objectcontext.kubernetes.labelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- array of objectscontext.kubernetes.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringcontext.kubernetes.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringcontext.kubernetes.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringscontext.kubernetes.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectcontext.kubernetes.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- objectcontext.kubernetes.nameSelector
- array of stringscontext.kubernetes.nameSelector.matchNames
Required value
- objectcontext.kubernetes.namespace
Filters to choose namespaces.
- objectcontext.kubernetes.namespace.labelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- array of objectscontext.kubernetes.namespace.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringcontext.kubernetes.namespace.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringcontext.kubernetes.namespace.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringscontext.kubernetes.namespace.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectcontext.kubernetes.namespace.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- objectcontext.kubernetes.namespace.nameSelector
- array of stringscontext.kubernetes.namespace.nameSelector.matchNames
Required value
- stringcontext.kubernetes.queue
A name of a separate queue. It can be used to execute long-running hooks in parallel with hooks in the “main” queue.
- stringcontext.name
Required value
It is used to distinguish different bindings during runtime.
- array of objectsconversions
Required value
This binding transforms a hook into a handler for conversions defined in CustomResourceDefinition. The Shell-operator updates a CRD with
.spec.conversion, starts HTTPS server, and runs hooks to handle ConversionReview requests.- stringconversions.from
Required value
A version of a custom resource that hook can convert.
- objectconversions.handler
Required value
Code of the conversion handler.
- stringconversions.handler.python
Python script handler for object.
- array of stringsconversions.includeSnapshotsFrom
An array of names of Kubernetes bindings in a hook. When specified, a list of monitored objects from these bindings will be added to the binding context in the snapshots field.
- stringconversions.to
Required value
A version of a custom resource that hook can produce.
- stringkind
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
- objectmetadata
ValidationWebhook
Scope: Cluster
Version: v1alpha1
ValidationWebhook is the Schema for the validationwebhooks API
- stringapiVersion
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
- array of objectscontext
Run a hook on a Kubernetes object changes.
- objectcontext.kubernetes
- booleancontext.kubernetes.allowFailure
If
true, Shell-operator skips the hook execution errors. Iffalseor the parameter is not set, the hook is restarted after a 5 seconds delay in case of an error. - stringcontext.kubernetes.apiVersion
Is an optional group and version of object API. For example, it is
v1for core objects (Pod, etc.),rbac.authorization.k8s.io/v1beta1for ClusterRole andmonitoring.coreos.com/v1for prometheus-operator. - objectcontext.kubernetes.fieldSelector
- array of objectscontext.kubernetes.fieldSelector.matchExpressions
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.field
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.operator
Required value
- stringcontext.kubernetes.fieldSelector.matchExpressions.value
- array of stringscontext.kubernetes.includeSnapshotsFrom
An array of names of kubernetes bindings in a hook. When specified, a list of monitored objects from that bindings will be added to the binding context in a snapshots field. Self-include is also possible.
- stringcontext.kubernetes.jqFilter
An optional parameter that specifies event filtering using jq syntax. The hook will be triggered on the “Modified” event only if the filter result is changed after the last event.
- stringcontext.kubernetes.kind
Required value
Is the type of a monitored Kubernetes resource. This field is required.
- objectcontext.kubernetes.labelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- array of objectscontext.kubernetes.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringcontext.kubernetes.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringcontext.kubernetes.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringscontext.kubernetes.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectcontext.kubernetes.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- objectcontext.kubernetes.nameSelector
- array of stringscontext.kubernetes.nameSelector.matchNames
Required value
- objectcontext.kubernetes.namespace
Filters to choose namespaces.
- objectcontext.kubernetes.namespace.labelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- array of objectscontext.kubernetes.namespace.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringcontext.kubernetes.namespace.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringcontext.kubernetes.namespace.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringscontext.kubernetes.namespace.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectcontext.kubernetes.namespace.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- objectcontext.kubernetes.namespace.nameSelector
- array of stringscontext.kubernetes.namespace.nameSelector.matchNames
Required value
- stringcontext.kubernetes.queue
A name of a separate queue. It can be used to execute long-running hooks in parallel with hooks in the “main” queue.
- stringcontext.name
Required value
It is used to distinguish different bindings during runtime.
- objecthandler
Required value
Code of the ValidatingWebhook handler
- stringhandler.cel
CEL rules handler for object.
- stringhandler.python
Python script handler for object.
- stringkind
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
- objectmetadata
- objectvalidationObject
Required value
ValidatingWebhook describes an webhook and the resources and operations it applies to.
- stringvalidationObject.failurePolicy
Defines how errors from the hook are handled.
- stringvalidationObject.group
A key to include snapshots from a group of schedule and Kubernetes bindings. See grouping.
- objectvalidationObject.labelSelector
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
- array of objectsvalidationObject.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringvalidationObject.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringvalidationObject.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringsvalidationObject.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectvalidationObject.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- array of objectsvalidationObject.matchConditions
An optional list of match conditions for fine-grained request filtering. Available only since v1.27 of Kubernetes.
MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
- stringvalidationObject.matchConditions.expression
Required value
Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
‘object’ - The object from the incoming request. The value is null for DELETE requests. ‘oldObject’ - The existing object. The value is null for CREATE requests. ‘request’ - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
- stringvalidationObject.matchConditions.name
Required value
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, ‘-‘, ‘’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyName’, or ‘my.name’, or ‘123-abc’, regex used for validation is ‘([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]’) with an optional DNS subdomain prefix and ‘/’ (e.g. ‘example.com/MyName’)
Required.
- stringvalidationObject.name
Required value
Name should be a domain with at least three segments separated by dots.
- objectvalidationObject.namespace
Namespace filtering. Only labelSelector is supported (not nameSelector). To filter by namespace name, use labelSelector with kubernetes.io/metadata.name label.
- objectvalidationObject.namespace.labelSelector
labelSelector is a selector to filter namespaces by labels. Use kubernetes.io/metadata.name label to filter by namespace name.
- array of objectsvalidationObject.namespace.labelSelector.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
- stringvalidationObject.namespace.labelSelector.matchExpressions.key
Required value
key is the label key that the selector applies to.
- stringvalidationObject.namespace.labelSelector.matchExpressions.operator
Required value
operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
- array of stringsvalidationObject.namespace.labelSelector.matchExpressions.values
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
- objectvalidationObject.namespace.labelSelector.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
- array of objectsvalidationObject.rules
A required list of rules used to determine if a request to the Kubernetes API server should be sent to the hook.
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
- array of stringsvalidationObject.rules.apiGroups
APIGroups is the API groups the resources belong to. ‘’ is all groups. If ‘’ is present, the length of the slice must be one. Required.
- array of stringsvalidationObject.rules.apiVersions
APIVersions is the API versions the resources belong to. ‘’ is all versions. If ‘’ is present, the length of the slice must be one. Required.
- array of stringsvalidationObject.rules.operations
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If ‘*’ is present, the length of the slice must be one. Required.
- stringElement of the array
OperationType specifies an operation for a request.
- array of stringsvalidationObject.rules.resources
Resources is a list of resources this rule applies to.
For example: ‘pods’ means pods. ‘pods/log’ means the log subresource of pods. ‘’ means all resources, but not subresources. ‘pods/’ means all subresources of pods. ‘/scale’ means all scale subresources. ‘/*’ means all resources and their subresources.
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
- stringvalidationObject.rules.scope
scope specifies the scope of this rule. Valid values are “Cluster”, “Namespaced”, and “” “Cluster” means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. “Namespaced” means that only namespaced resources will match this rule. “” means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is “*”.
- stringvalidationObject.sideEffects
Determines whether the hook is dryRun-aware.
- integervalidationObject.timeoutSeconds
Seconds API server should wait for a hook to respond before treating the call as a failure. Default is 10 (seconds).