csi-driver resource¶
Description¶
CSIDriverResource manages a cluster-scoped CSIDriver.
Source: internal/api/storage/v1/csi_driver_rsrc.go:30
Example usage:
imports: {
kubernetes-storage-v1: 'github.com/cloudboss/unobin-library-kubernetes//api/storage/v1'
}
resources: {
example: kubernetes-storage-v1.csi-driver {
# Set input fields here.
}
}
Inputs¶
metadata
object
object({
name: optional(string)
generate-name: optional(string)
labels: optional(map(string))
annotations: optional(map(string))
})
spec
optional(object)
optional(
object({
attach-required: boolean
pod-info-on-mount: optional(boolean)
volume-lifecycle-modes: optional(list(string))
})
)
ignore-annotations
optional(list(string))
ignore-labels
optional(list(string))
Input Constraints¶
Metadata rules
Exactly one of metadata.name or metadata.generate-name.
metadata.name must be a DNS subdomain of at most 253 bytes.
Rule logic
- Require
@core.is-match(input.metadata.name, '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$')
&& @core.length(input.metadata.name ?? '') <= 253
metadata.generate-name must be a valid DNS label prefix.
Rule logic
- Require
@core.is-match(input.metadata.generate-name, '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?|[\\x00-\\x7f]-|[a-z0-9][-a-z0-9]{0,61}[\\x00-\\x7f]-)$')
metadata.labels keys must be Kubernetes qualified names.
Rule logic
- For each
input.metadata.labels ?? {}- Require
@core.is-match(@each.key, '^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$')
&& @core.is-match(@each.key, '^([^/]{1,253}/)?[^/]+$')
metadata.labels values must be valid Kubernetes label values.
Rule logic
- For each
input.metadata.labels ?? {}- Require
@core.is-match(@each.value, '^([A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?)?$')
metadata.annotations keys must be qualified names after lowercasing.
Rule logic
- For each
input.metadata.annotations ?? {}- Require
@core.is-match(@each.key, '^([A-Za-z0-9İK]([-A-Za-z0-9İK]*[A-Za-z0-9İK])?(\\.[A-Za-z0-9İK]([-A-Za-z0-9İK]*[A-Za-z0-9İK])?)*/)?[A-Za-z0-9İK]([-A-Za-z0-9_.İK]{0,61}[A-Za-z0-9İK])?$')
&& @core.is-match(@each.key, '^([^/]{1,253}/)?[^/]+$')
Spec rules
spec.volume-lifecycle-modes entries must be Persistent or Ephemeral.
Rule logic
- For each
input.spec.volume-lifecycle-modes ?? []- Require
@each.value == 'Persistent'
|| @each.value == 'Ephemeral'
Ignore annotations rules
ignore-annotations entries must be valid regular expressions.
Rule logic
- For each
input.ignore-annotations ?? []- Require
@core.is-format(@each.value, 'regex')
Ignore labels rules
ignore-labels entries must be valid regular expressions.
Rule logic
- For each
input.ignore-labels ?? []- Require
@core.is-format(@each.value, 'regex')
Outputs¶
server
string
api-version
string
kind
string
metadata
object
object({
name: string
generate-name: optional(string)
uid: string
labels: map(string)
annotations: map(string)
})
spec
object
object({
attach-required: optional(boolean)
pod-info-on-mount: optional(boolean)
volume-lifecycle-modes: optional(list(string))
})