Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvCollection ¶
type EnvCollection []EnvVar
func (EnvCollection) ValidationRule ¶
func (EnvCollection) ValidationRule() *validate.Rule
ValidationRule ports EnvCollection (env.ts:44-60): `Joi.array().items(EnvVar).sort({by:'name'}).custom(duplicate-name check)`.
The sort was missing, so an env list persisted in submitted order here and in name order there — a difference in the STORED document, since the array is stored sorted. Order matters: TS sorts BEFORE the duplicate scan.
type EnvFromCollection ¶ added in v1.1.25
type EnvFromCollection []EnvFromSource
type EnvFromSource ¶ added in v1.1.25
type EnvFromSource struct {
SecretRef EnvFromSourceSecretRef `json:"secretRef" validate:"required"`
}
EnvFromSource references a dictionary (opaque key/value) secret whose keys are injected as environment variables (env.ts EnvFromSource/EnvFromCollection).
type EnvFromSourceSecretRef ¶ added in v1.1.25
type EnvName ¶
type EnvName string //ts:export
EnvName is the env-var name value. Its Validator (validate.go) ports EnvName's custom (CPLN_ reserved + name regex) plus the field-level disallow of the reserved knative names. trim/max/required stay declarative on the field tag.
func (EnvName) ValidationRule ¶
ValidationRule ports EnvName = Joi.string().trim().max(120).custom(...) plus the EnvVar.name field-level .disallow('K_SERVICE','K_CONFIGURATION','K_REVISION'). trim/max/required are declarative on the EnvVar.Name field tag; the two customs live here in tag order (envName, then the reserved-name disallow).
type EnvValue ¶
type EnvValue string
EnvValue is the env-var value. Its Validator (validate.go) chains the three internal-reference customs (value ref, manifest ref, secret ref). max/allow stay declarative on the field tag.
func (EnvValue) ValidationRule ¶
ValidationRule ports EnvVar.value's custom chain: internal reference, manifest reference, secret reference — in that order. max(4096)/allow(”) are declarative on the EnvVar.Value field tag.