service-account data source¶
Description¶
ServiceAccountDataSource reads one ServiceAccount and its Secret references.
Source: internal/api/core/v1/service_account_dsrc.go:23
Example usage:
imports: {
kubernetes-core-v1: 'github.com/cloudboss/unobin-library-kubernetes//api/core/v1'
}
data-sources: {
example: kubernetes-core-v1.service-account {
# Set input fields here.
}
}
Inputs¶
metadata
object
object({
name: optional(string)
namespace: optional(string)
annotations: optional(map(optional(string)))
labels: optional(map(optional(string)))
})
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
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
namespace: string
annotations: map(string)
labels: map(string)
generation: integer
resource-version: string
uid: string
})
image-pull-secrets
list(object)
list(
object({
name: string
})
)
secrets
list(object)
list(
object({
name: string
})
)
automount-service-account-token
boolean
default-secret-name
string