-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This modify how `TaskRunSpec` looks from v1alpha1: - params is now directly under spec - no more inputs and outputs, get replaced by resources - resource has input and output resource declaration fields, similar to how it is used in Pipeline The next step are : - Add more types (Pipeline, PipelineRun, Condition) - Refactor v1alpha1 to embedded v1alpha2 (for storage purpose) - Auto-conversion from v1alpha1 Signed-off-by: Vincent Demeester <[email protected]>
- Loading branch information
1 parent
0f20c35
commit f12eea0
Showing
28 changed files
with
2,637 additions
and
121 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,58 @@ | ||
/* | ||
Copyright 2019 The Tekton 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 v1alpha2 | ||
|
||
import ( | ||
corev1 "k8s.io/api/core/v1" | ||
) | ||
|
||
// PodTemplate holds pod specific configuration | ||
type PodTemplate struct { | ||
// NodeSelector is a selector which must be true for the pod to fit on a node. | ||
// Selector which must match a node's labels for the pod to be scheduled on that node. | ||
// More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | ||
// +optional | ||
NodeSelector map[string]string `json:"nodeSelector,omitempty"` | ||
|
||
// If specified, the pod's tolerations. | ||
// +optional | ||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"` | ||
|
||
// If specified, the pod's scheduling constraints | ||
// +optional | ||
Affinity *corev1.Affinity `json:"affinity,omitempty"` | ||
|
||
// SecurityContext holds pod-level security attributes and common container settings. | ||
// Optional: Defaults to empty. See type description for default values of each field. | ||
// +optional | ||
SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty"` | ||
|
||
// List of volumes that can be mounted by containers belonging to the pod. | ||
// More info: https://kubernetes.io/docs/concepts/storage/volumes | ||
// +optional | ||
Volumes []corev1.Volume `json:"volumes,omitempty" patchStrategy:"merge,retainKeys" patchMergeKey:"name" protobuf:"bytes,1,rep,name=volumes"` | ||
|
||
// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io | ||
// group, which should be used to run this pod. If no RuntimeClass resource | ||
// matches the named class, the pod will not be run. If unset or empty, the | ||
// "legacy" RuntimeClass will be used, which is an implicit class with an | ||
// empty definition that uses the default runtime handler. | ||
// More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md | ||
// This is a beta feature as of Kubernetes v1.14. | ||
// +optional | ||
RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,2,opt,name=runtimeClassName"` | ||
} |
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,17 @@ | ||
/* | ||
Copyright 2019 The Tekton 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 v1alpha2_test |
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
Oops, something went wrong.