Documentation
¶
Overview ¶
Package deploymentconfig applies the Console's service configuration edits to an SDL without changing its resource or endpoint declarations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply changes only explicitly named mutable service fields. Deployment names and concurrency versions belong to Console metadata, not the SDL.
func HasReferences ¶
HasReferences detects Console references anywhere in the parsed SDL. It returns a parse error rather than allowing invalid data past a rail guard.
Types ¶
type ExposePatch ¶
type ExposePatch struct {
Port *uint32 `json:"port,omitempty"`
As *uint32 `json:"as,omitempty"`
Accept *[]string `json:"accept,omitempty"`
HTTPOptions *HTTPOptionsPatch `json:"httpOptions,omitempty"`
}
ExposePatch addresses an existing container port.
type HTTPOptionsPatch ¶
type HTTPOptionsPatch struct {
MaxBodySize *uint32 `json:"maxBodySize,omitempty"`
ReadTimeout *uint32 `json:"readTimeout,omitempty"`
SendTimeout *uint32 `json:"sendTimeout,omitempty"`
NextTries *uint32 `json:"nextTries,omitempty"`
NextTimeout *uint32 `json:"nextTimeout,omitempty"`
NextCases *[]string `json:"nextCases,omitempty"`
}
HTTPOptionsPatch uses Console JSON names; Apply maps them to SDL names.
type Patch ¶
type Patch struct {
Services map[string]ServicePatch `json:"services,omitempty"`
Name *string `json:"name,omitempty"`
IfManifestVersion string `json:"ifManifestVersion,omitempty"`
}
Patch matches the editable fields of a Console deployment. Ciphertext is added by the Console client, never accepted from a patch document.
func Diff ¶
Diff derives only supported configuration edits, then proves the result by applying them and comparing the entire requested document. Resource, routing, and other unrepresentable changes therefore cannot disappear silently.
func ParsePatch ¶
ParsePatch accepts one strict YAML or JSON object. Errors omit user values.
func (Patch) HasChanges ¶
HasChanges reports whether a patch writes configuration or a deployment name. A secret-only rotation has no changes here; its secrets are a separate input.
type ServicePatch ¶
type ServicePatch struct {
Image *string `json:"image,omitempty"`
Command json.RawMessage `json:"command,omitempty"`
Args json.RawMessage `json:"args,omitempty"`
Env map[string]*string `json:"env,omitempty"`
Credentials json.RawMessage `json:"credentials,omitempty"`
Expose map[string]ExposePatch `json:"expose,omitempty"`
Storage map[string]StoragePatch `json:"storage,omitempty"`
}
ServicePatch preserves absent, null, and empty arrays for clearable fields.
type StoragePatch ¶
type StoragePatch struct {
Mount *string `json:"mount,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty"`
}
StoragePatch edits a declared volume's mount options, never its size.