Documentation
¶
Index ¶
- type DeploymentPatch
- func (d *DeploymentPatch) AppendToAnnotations(config map[string]string)
- func (d *DeploymentPatch) AppendToLabels(config map[string]string)
- func (d *DeploymentPatch) AppendToPodAnnotations(config map[string]string)
- func (d *DeploymentPatch) AppendToPodEnvironment(config map[string]string)
- func (d *DeploymentPatch) AppendToPodLabels(config map[string]string)
- func (d *DeploymentPatch) GetPatch() []PatchOperation
- func (d *DeploymentPatch) GetPatchBytes() ([]byte, error)
- func (d *DeploymentPatch) PrependToPodInitContainers(container corev1.Container)
- type PatchOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeploymentPatch ¶
type DeploymentPatch struct {
// contains filtered or unexported fields
}
DeploymentPatch is used to modify a Deployment resource using jsonpatch
func New ¶
func New(deployment appsv1.Deployment) *DeploymentPatch
New creates a new DeploymentPatch object
func (*DeploymentPatch) AppendToAnnotations ¶
func (d *DeploymentPatch) AppendToAnnotations(config map[string]string)
AppendToAnnotations adds given map of annotations to the deployment
func (*DeploymentPatch) AppendToLabels ¶
func (d *DeploymentPatch) AppendToLabels(config map[string]string)
AppendToLabels appends the given map of labels to the deployment
func (*DeploymentPatch) AppendToPodAnnotations ¶
func (d *DeploymentPatch) AppendToPodAnnotations(config map[string]string)
AppendToPodAnnotations adds given map of annotations to the pod template
func (*DeploymentPatch) AppendToPodEnvironment ¶
func (d *DeploymentPatch) AppendToPodEnvironment(config map[string]string)
AppendToPodEnvironment adds the map of environment variables to all containers and initContainers that are in the original podspec
func (*DeploymentPatch) AppendToPodLabels ¶
func (d *DeploymentPatch) AppendToPodLabels(config map[string]string)
AppendToPodLabels appends the given map of labels to the pod template
func (*DeploymentPatch) GetPatch ¶
func (d *DeploymentPatch) GetPatch() []PatchOperation
GetPatch returns the resulting array of PatchOperation objects
func (*DeploymentPatch) GetPatchBytes ¶
func (d *DeploymentPatch) GetPatchBytes() ([]byte, error)
GetPatchBytes returns the resulting jsonPatch
func (*DeploymentPatch) PrependToPodInitContainers ¶
func (d *DeploymentPatch) PrependToPodInitContainers(container corev1.Container)
PrependToPodInitContainers prepends an init container to the template
type PatchOperation ¶
type PatchOperation struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
PatchOperation represents a single jsonpatch operation.