Documentation ¶
Overview ¶
Copyright 2014 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.
Copyright 2014 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.
Copyright 2014 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.
Copyright 2019 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 ¶
- func FilterPods(pods []*v1.Pod, phase v1.PodPhase) int
- func GetPodResources(template *v1.PodTemplateSpec) *clusterstateapi.Resource
- func GetPodResourcesByPhase(phase v1.PodPhase, pods []*v1.Pod) *clusterstateapi.Resource
- func PendingPodsFailedSchd(pods []*v1.Pod) map[string][]v1.PodCondition
- type Factory
- type Interface
- type RefByLabel
- type RefManager
- type RegisteredResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterPods ¶
filterPods returns pods based on their phase.
func GetPodResources ¶
func GetPodResources(template *v1.PodTemplateSpec) *clusterstateapi.Resource
func GetPodResourcesByPhase ¶
filterPods returns pods based on their phase.
func PendingPodsFailedSchd ¶
func PendingPodsFailedSchd(pods []*v1.Pod) map[string][]v1.PodCondition
check if pods pending are failed scheduling
Types ¶
type Interface ¶
type Interface interface { SyncQueueJob(queuejob *qjobv1.AppWrapper, qjobRes *qjobv1.AppWrapperResource) error UpdateQueueJobStatus(queuejob *qjobv1.AppWrapper) error GetAggregatedResources(queuejob *qjobv1.AppWrapper) *clusterstateapi.Resource GetAggregatedResourcesByPriority(priority float64, queuejob *qjobv1.AppWrapper) *clusterstateapi.Resource //TODO: Add to calculate more accurate partial deployments while job is being realized // GetAggregatedResourcesByPhase(phase v1.PodPhase, queuejob *qjobv1.AppWrapper) *clusterstateapi.Resource Cleanup(queuejob *qjobv1.AppWrapper, qjobRes *qjobv1.AppWrapperResource) error Run(stopCh <-chan struct{}) }
Interface is an abstract interface for queue job resource management.
type RefByLabel ¶
type RefByLabel struct {
// contains filtered or unexported fields
}
RefByLabel : A reference manager by resource vector index
func (*RefByLabel) AddReference ¶
func (rm *RefByLabel) AddReference(owner *qjobv1.AppWrapperResource, ownee runtime.Object) error
AddReference : add ref
func (*RefByLabel) AddTag ¶
func (rm *RefByLabel) AddTag(owner *qjobv1.AppWrapperResource, getTag func() string) error
AddTag : add tag
func (*RefByLabel) BelongTo ¶
func (rm *RefByLabel) BelongTo(owner *qjobv1.AppWrapperResource, ownee runtime.Object) bool
BelongTo : belong to QJ
type RefManager ¶
type RefManager interface { //Tag the owner AddTag(owner *qjobv1.AppWrapperResource, getTag func() string) error //check whether ownee is a member of owner BelongTo(owner *qjobv1.AppWrapperResource, ownee runtime.Object) bool //mark the ownee to be a member of owner AddReference(owner *qjobv1.AppWrapperResource, ownee runtime.Object) error }
RefManager : Define reference manager commont interface
type RegisteredResources ¶
type RegisteredResources struct {
// contains filtered or unexported fields
}
RegisteredResources : registered resources
func (*RegisteredResources) InitQueueJobResource ¶
func (rres *RegisteredResources) InitQueueJobResource(t qjobv1.ResourceType, config *rest.Config) (Interface, bool, error)
InitQueueJobResource creates an instance of the type queue job resource. It returns `false` if the type is not known.
func (*RegisteredResources) Register ¶
func (rres *RegisteredResources) Register(t qjobv1.ResourceType, factory Factory)
Register registers a Factory by type. This is expected to happen during app startup.
func (*RegisteredResources) Registered ¶
func (rres *RegisteredResources) Registered() []qjobv1.ResourceType
Registered enumerates the names of all registered plugins.