apply

package
v0.97.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 10 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 DeleteOwnedObject added in v0.69.0

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

DeleteOwnedObject deletes an object in the apiserver

func IsObjectSupported

func IsObjectSupported(obj *unstructured.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 *unstructured.Unstructured) error

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

func MergeMetadataForUpdate added in v0.41.0

func MergeMetadataForUpdate(current, updated *unstructured.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 *unstructured.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 *unstructured.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 *unstructured.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