Documentation ¶
Index ¶
Constants ¶
View Source
const ( LabelApplied = "objectset.rio.cattle.io/applied" LabelID = "objectset.rio.cattle.io/id" LabelGVK = "objectset.rio.cattle.io/owner-gvk" LabelName = "objectset.rio.cattle.io/owner-name" LabelNamespace = "objectset.rio.cattle.io/owner-namespace" LabelHash = "objectset.rio.cattle.io/hash" LabelPrefix = "objectset.rio.cattle.io/" LabelPrune = "objectset.rio.cattle.io/prune" )
Variables ¶
This section is empty.
Functions ¶
func GetLabelsAndAnnotations ¶
GetLabelsAndAnnotations returns the labels and annotations, like "objectset.rio.cattle.io/hash" and owners, to be able to use apply.DryRun
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Plan ¶
func (a *Client) Plan(ctx context.Context, defaultNS string, setID string, objs ...runtime.Object) (Plan, error)
Plan does a dry run of the apply to get the difference between the desired and live state. It needs a client. This adds the "objectset.rio.cattle.io/applied" annotation, which is used for tracking changes.
type ClientFactory ¶
type ClientFactory func(gvr schema.GroupVersionResource) (dynamic.NamespaceableResourceInterface, error)
type InformerFactory ¶
type InformerFactory interface {
Get(gvk schema.GroupVersionKind, gvr schema.GroupVersionResource) (cache.SharedIndexInformer, error)
}
type InformerGetter ¶
type InformerGetter interface { Informer() cache.SharedIndexInformer GroupVersionKind() schema.GroupVersionKind }
type PatchByGVK ¶
type PatchByGVK map[schema.GroupVersionKind]map[objectset.ObjectKey]string
func (PatchByGVK) Set ¶
func (p PatchByGVK) Set(gvk schema.GroupVersionKind, namespace, name, patch string)
type Plan ¶
type Plan struct { Create objectset.ObjectKeyByGVK // Delete contains existing objects that are not in the desired state, // unless their prune label is set to "false". Delete objectset.ObjectKeyByGVK // Update contains objects, already existing in the cluster, that have // changes. The patch would restore their desired state, as represented // in the helm manifest's resources passed into Plan(..., objs). Update PatchByGVK // Objects contains objects, already existing in the cluster, that have // valid metadata Objects []runtime.Object }
Click to show internal directories.
Click to hide internal directories.