Documentation ¶
Index ¶
- func ServiceInjector(_ context.Context, w *v1alpha2.ContainerizedWorkload, obj runtime.Object) (*corev1.Service, error)
- func Setup(mgr ctrl.Manager, args controller.Args) error
- func TranslateConfigMaps(_ context.Context, cw *v1alpha2.ContainerizedWorkload) (map[string]*corev1.ConfigMap, error)
- func TranslateContainerWorkload(w oam.Workload) (oam.Object, error)
- type ChildWorkload
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ServiceInjector ¶
func ServiceInjector(_ context.Context, w *v1alpha2.ContainerizedWorkload, obj runtime.Object) (*corev1.Service, error)
ServiceInjector adds a Service object for the first Port on the first Container for the first Deployment observed in a workload translation.
func Setup ¶
func Setup(mgr ctrl.Manager, args controller.Args) error
Setup adds a controller that reconciles ContainerizedWorkload.
func TranslateConfigMaps ¶
func TranslateConfigMaps(_ context.Context, cw *v1alpha2.ContainerizedWorkload) (map[string]*corev1.ConfigMap, error)
TranslateConfigMaps translate non-secret ContainerConfigFile into ConfigMaps
Types ¶
type ChildWorkload ¶
type ChildWorkload struct { Type string runtime.TypeMeta metav1.ObjectMeta StsSpec appsv1.StatefulSetSpec DepSpec appsv1.DeploymentSpec }
ChildWorkload containerized workload can transform to sts or deployment if firstCreate has VolumeTrait,ChildWorkload is sts else deployment
type Reconciler ¶
type Reconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
Reconciler reconciles a ContainerizedWorkload object
func (*Reconciler) Reconcile ¶
Reconcile reconciles a ContainerizedWorkload object +kubebuilder:rbac:groups=core.oam.dev,resources=containerizedworkloads,verbs=get;list;watch +kubebuilder:rbac:groups=core.oam.dev,resources=containerizedworkloads/status,verbs=get;update;patch +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setups up k8s controller.