Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONPatchOperation ¶
type JSONPatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value,omitempty"` }
A JSON Patch operation as defined in https://tools.ietf.org/html/rfc6902
func BuildSidecarPatch ¶
func BuildSidecarPatch(pod *corev1.Pod, configMap *corev1.ConfigMap, templateData interface{}) ([]JSONPatchOperation, error)
This function expects the given config map to contain one entry under it's data element. The entry is expected to contain raw YAML representing a PodSpec. The YAML will be rendered as a template using the given data and used to build a slice of JSONPatch operations to be applied to the given pod.
Currently only the 'containers' and 'initContainers' elements in the configMap are considered. The patch operations that are returned will append them to the correspondent elements in the target pod.
Click to show internal directories.
Click to hide internal directories.