Documentation
¶
Overview ¶
Copyright 2017 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2019, 2021 The Multi-Cluster App Dispatcher Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GeneratePodFailedCondition(podName string, podCondition []v1.PodCondition) arbv1.PendingPodSpec
- func NewQueueJobResPod(config *rest.Config) queuejobresources.Interface
- func Register(regs *queuejobresources.RegisteredResources)
- type QueueJobResPod
- func (qjrPod *QueueJobResPod) Cleanup(queuejob *arbv1.AppWrapper, qjobRes *arbv1.AppWrapperResource) error
- func (qjrPod *QueueJobResPod) GetAggregatedResources(job *arbv1.AppWrapper) *clusterstateapi.Resource
- func (qjrPod *QueueJobResPod) GetAggregatedResourcesByPriority(priority float64, job *arbv1.AppWrapper) *clusterstateapi.Resource
- func (qjrPod *QueueJobResPod) GetPodTemplate(qjobRes *arbv1.AppWrapperResource) (*v1.PodTemplateSpec, error)
- func (qjrPod *QueueJobResPod) Run(stopCh <-chan struct{})
- func (qjrPod *QueueJobResPod) SyncQueueJob(queuejob *arbv1.AppWrapper, qjobRes *arbv1.AppWrapperResource) error
- func (qjrPod *QueueJobResPod) UpdateQueueJobStatus(queuejob *arbv1.AppWrapper) error
Constants ¶
const ( // QueueJobNameLabel label string for queuejob name QueueJobNameLabel string = "appwrapper-name" // ControllerUIDLabel label string for queuejob controller uid ControllerUIDLabel string = "controller-uid" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePodFailedCondition ¶
func GeneratePodFailedCondition(podName string, podCondition []v1.PodCondition) arbv1.PendingPodSpec
AppWrapperCondition returns condition of a AppWrapper condition.
func NewQueueJobResPod ¶
func NewQueueJobResPod(config *rest.Config) queuejobresources.Interface
NewQueueJobResPod Creates a new controller for QueueJob pods
func Register ¶
func Register(regs *queuejobresources.RegisteredResources)
Register registers a queue job resource type
Types ¶
type QueueJobResPod ¶
type QueueJobResPod struct {
// contains filtered or unexported fields
}
QueueJobResPod Controller for QueueJob pods
func (*QueueJobResPod) Cleanup ¶
func (qjrPod *QueueJobResPod) Cleanup(queuejob *arbv1.AppWrapper, qjobRes *arbv1.AppWrapperResource) error
Cleanup : deletes all resources from the queuejob
func (*QueueJobResPod) GetAggregatedResources ¶
func (qjrPod *QueueJobResPod) GetAggregatedResources(job *arbv1.AppWrapper) *clusterstateapi.Resource
func (*QueueJobResPod) GetAggregatedResourcesByPriority ¶
func (qjrPod *QueueJobResPod) GetAggregatedResourcesByPriority(priority float64, job *arbv1.AppWrapper) *clusterstateapi.Resource
func (*QueueJobResPod) GetPodTemplate ¶
func (qjrPod *QueueJobResPod) GetPodTemplate(qjobRes *arbv1.AppWrapperResource) (*v1.PodTemplateSpec, error)
GetPodTemplate Parse queue job api object to get Pod template
func (*QueueJobResPod) Run ¶
func (qjrPod *QueueJobResPod) Run(stopCh <-chan struct{})
Run the main goroutine responsible for watching and pods.
func (*QueueJobResPod) SyncQueueJob ¶
func (qjrPod *QueueJobResPod) SyncQueueJob(queuejob *arbv1.AppWrapper, qjobRes *arbv1.AppWrapperResource) error
SyncQueueJob : method to sync the resources of this job
func (*QueueJobResPod) UpdateQueueJobStatus ¶
func (qjrPod *QueueJobResPod) UpdateQueueJobStatus(queuejob *arbv1.AppWrapper) error