 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func Register(ctx context.Context, workload *config.UserOnlyContext)
- type CommonController
- func (c CommonController) EnqueueAllWorkloads(namespace string) error
- func (c CommonController) EnqueueWorkload(w *Workload)
- func (c CommonController) GetAllWorkloads(namespace string) ([]*Workload, error)
- func (c CommonController) GetByWorkloadID(key string) (*Workload, error)
- func (c CommonController) GetWorkloadsMatchingLabels(namespace string, targetLabels map[string]string) ([]*Workload, error)
- func (c CommonController) GetWorkloadsMatchingSelector(namespace string, selectorLabels map[string]string) ([]*Workload, error)
- func (c CommonController) UpdateWorkload(w *Workload, annotations map[string]string) error
 
- type ContainerPort
- type Controller
- type Service
- type Status
- type Workload
Constants ¶
      View Source
      
  
const ( AppVersion = "apps/v1beta2" BatchBetaVersion = "batch/v1beta1" BatchVersion = "batch/v1" WorkloadAnnotation = "field.cattle.io/targetWorkloadIds" PortsAnnotation = "field.cattle.io/ports" ClusterIPServiceType = "ClusterIP" DeploymentType = "deployment" ReplicationControllerType = "replicationcontroller" ReplicaSetType = "replicaset" DaemonSetType = "daemonset" StatefulSetType = "statefulset" JobType = "job" CronJobType = "cronjob" WorkloadAnnotatioNoop = "workload.cattle.io/targetWorkloadIdNoop" WorkloaAnnotationdPortBasedService = "workload.cattle.io/workloadPortBased" )
Variables ¶
Functions ¶
Types ¶
type CommonController ¶
type CommonController struct {
	DeploymentLister            v1beta2.DeploymentLister
	ReplicationControllerLister v1.ReplicationControllerLister
	ReplicaSetLister            v1beta2.ReplicaSetLister
	DaemonSetLister             v1beta2.DaemonSetLister
	StatefulSetLister           v1beta2.StatefulSetLister
	JobLister                   batchv1.JobLister
	CronJobLister               v1beta1.CronJobLister
	Deployments                 v1beta2.DeploymentInterface
	ReplicationControllers      v1.ReplicationControllerInterface
	ReplicaSes                  v1beta2.ReplicaSetInterface
	DaemonSets                  v1beta2.DaemonSetInterface
	StatefulSets                v1beta2.StatefulSetInterface
	Jobs                        batchv1.JobInterface
	CronJobs                    v1beta1.CronJobInterface
	Sync                        func(key string, w *Workload) error
}
    func NewWorkloadController ¶
func NewWorkloadController(workload *config.UserOnlyContext, f func(key string, w *Workload) error) CommonController
func (CommonController) EnqueueAllWorkloads ¶
func (c CommonController) EnqueueAllWorkloads(namespace string) error
func (CommonController) EnqueueWorkload ¶
func (c CommonController) EnqueueWorkload(w *Workload)
func (CommonController) GetAllWorkloads ¶
func (c CommonController) GetAllWorkloads(namespace string) ([]*Workload, error)
func (CommonController) GetByWorkloadID ¶
func (c CommonController) GetByWorkloadID(key string) (*Workload, error)
func (CommonController) GetWorkloadsMatchingLabels ¶
func (CommonController) GetWorkloadsMatchingSelector ¶
func (CommonController) UpdateWorkload ¶
func (c CommonController) UpdateWorkload(w *Workload, annotations map[string]string) error
type ContainerPort ¶
type Controller ¶
type Controller struct {
	// contains filtered or unexported fields
}
    func (*Controller) CreateService ¶
func (c *Controller) CreateService(key string, w *Workload) error
func (*Controller) CreateServiceForWorkload ¶
func (c *Controller) CreateServiceForWorkload(workload *Workload) error
type Service ¶
type Service struct {
	Type         corev1.ServiceType
	ClusterIP    string
	ServicePorts []corev1.ServicePort
	Name         string
}
     Click to show internal directories. 
   Click to hide internal directories.