Documentation ¶
Overview ¶
Package workflowcontext contains utility functions for populating workflow context specific data in a context.Context.
Data appropriate for the context includes anything that cannot be determined at time of object construction. For example, a bootstrap cluster does not exist when executing management workflows, therefore a Kubeconfig isn't available to communicate with the cluster so must be passed as contextual data.
Index ¶
- func BootstrapCluster(ctx context.Context) *types.Cluster
- func ManagementCluster(ctx context.Context) *types.Cluster
- func WithBootstrapAsManagementCluster(ctx context.Context, cluster *types.Cluster) context.Context
- func WithBootstrapCluster(ctx context.Context, cluster *types.Cluster) context.Context
- func WithManagementCluster(ctx context.Context, cluster *types.Cluster) context.Context
- func WithWorkloadCluster(ctx context.Context, cluster *types.Cluster) context.Context
- func WorkloadCluster(ctx context.Context) *types.Cluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapCluster ¶
BootstrapCluster retrieves the bootstrap cluster configured in ctx or returns a nil pointer.
func ManagementCluster ¶ added in v0.13.0
ManagementCluster retrieves the management cluster configured in ctx or returns a nil pointer.
func WithBootstrapAsManagementCluster ¶ added in v0.13.0
WithBootstrapAsManagementCluster is shorthand for WithBootstrapCluster followed by WithManagementCluster.
func WithBootstrapCluster ¶
WithBootstrapCluster returns a context based on ctx containing the target cluster kubeconfig.
func WithManagementCluster ¶ added in v0.13.0
WithManagementCluster returns a context based on ctx containing a management cluster.
func WithWorkloadCluster ¶ added in v0.13.0
WithWorkloadCluster returns a context based on ctx containing the target cluster kubeconfig.
Types ¶
This section is empty.