Documentation ¶
Index ¶
- func ApplyObject(ctx context.Context, client k8sclient.Client, obj *uns.Unstructured) error
- func DeleteOwnedObject(ctx context.Context, client k8sclient.Client, obj *uns.Unstructured) error
- func IsObjectSupported(obj *unstructured.Unstructured) error
- func MergeDeploymentForUpdate(current, updated *unstructured.Unstructured) error
- func MergeMetadataForUpdate(current, updated *unstructured.Unstructured) error
- func MergeObjectForUpdate(current, updated *unstructured.Unstructured) error
- func MergeServiceAccountForUpdate(current, updated *unstructured.Unstructured) error
- func MergeServiceForUpdate(current, updated *unstructured.Unstructured) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyObject ¶
ApplyObject applies the desired object against the apiserver, merging it with any existing objects if already present.
func DeleteOwnedObject ¶ added in v0.69.0
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.