Documentation
¶
Overview ¶
Package object provides a set of functions to work with the kubernetes objects
Index ¶
- Variables
- func CreatePatch(newObject, oldObject runtime.Object) ([]byte, error)
- func GetKind(definition []byte) (string, error)
- func InjectPluginSidecar(pod *corev1.Pod, sidecar *corev1.Container, injectPostgresVolumeMounts bool) error
- func InjectPluginSidecarSpec(spec *corev1.PodSpec, sidecar *corev1.Container, ...) error
- func InjectPluginVolume(pod *corev1.Pod)
- func InjectPluginVolumeSpec(spec *corev1.PodSpec)
Constants ¶
This section is empty.
Variables ¶
var ErrNoPostgresContainerFound = errors.New("no postgres container into instance Pod")
ErrNoPostgresContainerFound is raised when there's no PostgreSQL container in the passed instance Pod.
Functions ¶
func CreatePatch ¶
CreatePatch creates a JSON patch from the diff between the old and new object.
func InjectPluginSidecar ¶
func InjectPluginSidecar(pod *corev1.Pod, sidecar *corev1.Container, injectPostgresVolumeMounts bool) error
InjectPluginSidecar refer to InjectPluginSidecarSpec.
func InjectPluginSidecarSpec ¶
func InjectPluginSidecarSpec(spec *corev1.PodSpec, sidecar *corev1.Container, injectPostgresVolumeMounts bool) error
InjectPluginSidecarSpec injects a plugin sidecar into a CNPG Pod spec.
If the "injectPostgresVolumeMount" flag is true, this will append all the volume mounts that are used in the instance manager Pod to the passed sidecar container, granting it superuser access to the PostgreSQL instance.
Besides the value of "injectPostgresVolumeMount", the plugin volume will always be injected in the PostgreSQL container.
func InjectPluginVolume ¶
InjectPluginVolume injects the plugin volume into a CNPG Pod.
func InjectPluginVolumeSpec ¶
InjectPluginVolumeSpec injects the plugin volume into a CNPG Pod spec.
Types ¶
This section is empty.