Documentation ¶
Index ¶
- Constants
- func NewTransportController(ctx context.Context, ...) (*genericTransportController, error)
- func NewTransportControllerForWrappedObjectGVR(ctx context.Context, ...) *genericTransportController
- func TransformObject(ctx context.Context, ctc customTransformCollection, ...) *unstructured.Unstructured
- type Transport
Constants ¶
const (
ControllerName = "transport-controller"
)
Variables ¶
This section is empty.
Functions ¶
func NewTransportController ¶
func NewTransportController(ctx context.Context, inventoryPreInformer clusterinformers.ManagedClusterInformer, bindingClient controlclient.BindingInterface, bindingInformer controlv1alpha1informers.BindingInformer, customTransformInformer controlv1alpha1informers.CustomTransformInformer, transport Transport, wdsClientset ksclientset.Interface, wdsDynamicClient dynamic.Interface, itsNSClient corev1client.NamespaceInterface, propCfgMapPreInformer corev1informers.ConfigMapInformer, transportClientset kubernetes.Interface, transportDynamicClient dynamic.Interface, wdsName string) (*genericTransportController, error)
NewTransportController returns a new transport controller. This func is like NewTransportControllerForWrappedObjectGVR but first uses the given transport and transportClientset to discover the GVR of wrapped objects. The given transportDynamicClient is used to access the ITS.
func NewTransportControllerForWrappedObjectGVR ¶ added in v0.21.0
func NewTransportControllerForWrappedObjectGVR(ctx context.Context, inventoryPreInformer clusterinformers.ManagedClusterInformer, bindingClient controlclient.BindingInterface, bindingInformer controlv1alpha1informers.BindingInformer, customTransformInformer controlv1alpha1informers.CustomTransformInformer, transport Transport, wdsClientset ksclientset.Interface, wdsDynamicClient dynamic.Interface, itsNSClient corev1client.NamespaceInterface, propCfgMapPreInformer corev1informers.ConfigMapInformer, transportDynamicClient dynamic.Interface, wdsName string, wrappedObjectGVR schema.GroupVersionResource) *genericTransportController
NewTransportControllerForWrappedObjectGVR returns a new transport controller. The given transportDynamicClient is used to access the ITS.
func TransformObject ¶ added in v0.22.0
func TransformObject(ctx context.Context, ctc customTransformCollection, groupResource metav1.GroupResource, object *unstructured.Unstructured, bindingName string) *unstructured.Unstructured
TransformObject does the WEC-independent transformation of a workload object. This is done before customization and wrapping. Currently the only transformations are removing content. There are three sorts of content removal done here: 1. Removal that is common for all API objects; 2. Removal that is specific to a Kind of object and fixed in KubeStellar code; 3. Removal that is specific to a Kind of object and configured by API object(s).
Types ¶
type Transport ¶
type Transport interface { // WrapObjects gets slice of objects and wraps them into a single wrapped object. // In case slice is empty, the function should return an empty wrapped object. WrapObjects(objects []*unstructured.Unstructured) runtime.Object }