-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: lucming <[email protected]>
- Loading branch information
Showing
147 changed files
with
6,030 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
Copyright 2022 The Volcano 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. | ||
*/ | ||
|
||
// Package v1 contains API Schema definitions for the batch v1 API group | ||
// +kubebuilder:object:generate=true | ||
// +groupName=batch.volcano.sh | ||
// +k8s:deepcopy-gen=package | ||
package v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright 2022 The Volcano 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. | ||
*/ | ||
|
||
package v1 | ||
|
||
const ( | ||
// TaskSpecKey task spec key used in pod annotation | ||
TaskSpecKey = "volcano.sh/task-spec" | ||
// JobNameKey job name key used in pod annotation / labels | ||
JobNameKey = "volcano.sh/job-name" | ||
// QueueNameKey queue name key used in pod annotation / labels | ||
QueueNameKey = "volcano.sh/queue-name" | ||
// JobNamespaceKey job namespace key | ||
JobNamespaceKey = "volcano.sh/job-namespace" | ||
// DefaultTaskSpec default task spec value | ||
DefaultTaskSpec = "default" | ||
// JobVersion job version key used in pod annotation | ||
JobVersion = "volcano.sh/job-version" | ||
// JobTypeKey job type key used in labels | ||
JobTypeKey = "volcano.sh/job-type" | ||
// PodgroupNamePrefix podgroup name prefix | ||
PodgroupNamePrefix = "podgroup-" | ||
// PodTemplateKey type specify a equivalence pod class | ||
PodTemplateKey = "volcano.sh/template-uid" | ||
// JobForwardingKey job forwarding key used in job annotation | ||
JobForwardingKey = "volcano.sh/job-forwarding" | ||
// ForwardClusterKey cluster key used in pod annotation | ||
ForwardClusterKey = "volcano.sh/forward-cluster" | ||
// OrginalNameKey annotation key for resource name | ||
OrginalNameKey = "volcano.sh/burst-name" | ||
// BurstToSiloClusterAnnotation labels key for resource only in silo cluster | ||
BurstToSiloClusterAnnotation = "volcano.sh/silo-resource" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
Copyright 2022 The Volcano 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. | ||
*/ | ||
|
||
package v1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
) | ||
|
||
var ( | ||
// SchemeBuilder points to a list of functions added to Scheme. | ||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) | ||
// AddToScheme applies all the stored functions to the scheme. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) | ||
|
||
// GroupName is the group name used in this package. | ||
const GroupName = "batch.volcano.sh" | ||
|
||
// SchemeGroupVersion is the group version used to register these objects. | ||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} | ||
|
||
// Resource takes an unqualified resource and returns a Group-qualified GroupResource. | ||
func Resource(resource string) schema.GroupResource { | ||
return SchemeGroupVersion.WithResource(resource).GroupResource() | ||
} | ||
|
||
// addKnownTypes adds the set of types defined in this package to the supplied scheme. | ||
func addKnownTypes(scheme *runtime.Scheme) error { | ||
scheme.AddKnownTypes(SchemeGroupVersion, | ||
&Job{}, | ||
&JobList{}, | ||
) | ||
|
||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion) | ||
return nil | ||
} |
Oops, something went wrong.