Documentation ¶
Index ¶
- func ApplyObject(ctx context.Context, client k8sclient.Client, obj *uns.Unstructured) error
- func DeleteObject(ctx context.Context, client k8sclient.Client, obj *uns.Unstructured) error
- func IsObjectSupported(obj *uns.Unstructured) error
- func MergeDeploymentForUpdate(current, updated *uns.Unstructured) error
- func MergeMetadataForUpdate(current, updated *uns.Unstructured) error
- func MergeObjectForUpdate(current, updated *uns.Unstructured) error
- func MergeServiceAccountForUpdate(current, updated *uns.Unstructured) error
- func MergeServiceForUpdate(current, updated *uns.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 DeleteObject ¶
DeleteObject deletes the desired object against the apiserver,
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.