apply

package
v0.0.0-...-d40bc1f Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyObject

func ApplyObject(ctx context.Context, client k8sclient.Client, obj *uns.Unstructured) error

ApplyObject applies the desired object against the apiserver, merging it with any existing objects if already present.

func IsObjectSupported

func IsObjectSupported(obj *uns.Unstructured) error

IsObjectSupported rejects objects with configurations we don't support. This catches ServiceAccounts with secrets, which is valid but we don't support reconciling them.

func MergeDeploymentForUpdate

func MergeDeploymentForUpdate(current, updated *uns.Unstructured) error

MergeDeploymentForUpdate updates Deployment objects. We merge annotations, keeping ours except the Deployment Revision annotation.

func MergeMetadataForUpdate

func MergeMetadataForUpdate(current, updated *uns.Unstructured) error

MergeMetadataForUpdate merges the read-only fields of metadata. This is to be able to do a a meaningful comparison in apply, since objects created on runtime do not have these fields populated.

func MergeObjectForUpdate

func MergeObjectForUpdate(current, updated *uns.Unstructured) error

MergeObjectForUpdate prepares a "desired" object to be updated. Some objects, such as Deployments and Services require some semantic-aware updates

func MergeServiceAccountForUpdate

func MergeServiceAccountForUpdate(current, updated *uns.Unstructured) error

MergeServiceAccountForUpdate copies secrets from current to updated. This is intended to preserve the auto-generated token. Right now, we just copy current to updated and don't support supplying any secrets ourselves.

func MergeServiceForUpdate

func MergeServiceForUpdate(current, updated *uns.Unstructured) error

MergeServiceForUpdate ensures the clusterip is never written to

Types

This section is empty.

Jump to

Keyboard shortcuts

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