secret data source¶
Description¶
SecretDataSource reads one named Secret and partitions its payload by key.
Source: internal/api/core/v1/secret_dsrc.go:22
Example usage:
imports: {
kubernetes-core-v1: 'github.com/cloudboss/unobin-library-kubernetes//api/core/v1'
}
data-sources: {
example: kubernetes-core-v1.secret {
# Set input fields here.
}
}
Inputs¶
metadata
object
object({
name: optional(string)
generate-name: optional(string)
namespace: optional(string)
annotations: optional(map(optional(string)))
labels: optional(map(optional(string)))
})
binary-data
optional(map(optional(string)))
BinaryData selects live keys by presence of a non-null value.
Input Constraints¶
Metadata rules
Requirement.
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
If set, metadata.generate-name must match the specified pattern.
Rule logic
- Require
@core.is-match(input.metadata.generate-name, '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?|([a-z0-9][-a-z0-9]{0,61})?[\\x00-\\x7F]-)$')
Conditional requirement.
Rule logic
- For each
input.metadata.labels ?? {}- When
@each.value != null- 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_.]*[A-Za-z0-9])?$')
&& @core.is-match(@each.key, '^([^/]{1,253}/)?[^/]{1,63}$')
Conditional requirement.
Rule logic
- For each
input.metadata.labels ?? {}- When
@each.value != null- Require
@core.is-match(@each.value, '^([A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?)?$')
Conditional requirement.
Rule logic
- For each
input.metadata.annotations ?? {}- When
@each.value != null- 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]*[A-Za-z0-9İK])?$')
&& @core.is-match(@each.key, '^([^/]{1,253}/)?[^/]{1,63}$')
Outputs¶
metadata
object
object({
name: string
generate-name: string
namespace: string
annotations: map(string)
labels: map(string)
generation: integer
resource-version: string
uid: string
})
data
map(string)
binary-data
map(string)
type
string
immutable
boolean