podpatcher

package
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualImages

func EqualImages(a, b *corev1.Pod) bool

func Patch

func Patch(ctx context.Context, cl client.Client, pod client.Object, patch client.Patch, opts ...client.PatchOption) error

Patch patches a Pod.

The differences to the normal client.Patch method are:

  • We recreate the Pod if the patch failed to apply, as Pods generally can't be altered dynamically.
  • We also recreate for image changes. Normally, these would be applied by kubelet eventually, but will cause a "restarted container" event, which many users will have alerts for. It also can't be nicely controlled by the operator. So we just have to make sure to detect any changes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL