Add priorityClassName to CRDs (#1513)
* Add pod priorityClassName to controller and crds * Add missing bits in bases directory * Regenerate crds
This commit is contained in:
parent
e2c8163b8c
commit
bc7a3cab1b
|
|
@ -1142,6 +1142,7 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
|
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
|
||||||
spec:
|
spec:
|
||||||
|
priorityClassName: "high"
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/test: ""
|
node-role.kubernetes.io/test: ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,9 @@ type RunnerPodSpec struct {
|
||||||
// +optional
|
// +optional
|
||||||
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
|
||||||
|
|
||||||
|
// +optional
|
||||||
|
PriorityClassName string `json:"priorityClassName,omitempty"`
|
||||||
|
|
||||||
// +optional
|
// +optional
|
||||||
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
|
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3233,6 +3233,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -3230,6 +3230,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -3171,6 +3171,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -3233,6 +3233,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -3230,6 +3230,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -3171,6 +3171,8 @@ spec:
|
||||||
organization:
|
organization:
|
||||||
pattern: ^[^/]+$
|
pattern: ^[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
priorityClassName:
|
||||||
|
type: string
|
||||||
repository:
|
repository:
|
||||||
pattern: ^[^/]+/[^/]+$
|
pattern: ^[^/]+/[^/]+$
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -476,6 +476,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
|
||||||
pod.Spec.Tolerations = runnerSpec.Tolerations
|
pod.Spec.Tolerations = runnerSpec.Tolerations
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if runnerSpec.PriorityClassName != "" {
|
||||||
|
pod.Spec.PriorityClassName = runnerSpec.PriorityClassName
|
||||||
|
}
|
||||||
|
|
||||||
if len(runnerSpec.TopologySpreadConstraints) != 0 {
|
if len(runnerSpec.TopologySpreadConstraints) != 0 {
|
||||||
pod.Spec.TopologySpreadConstraints = runnerSpec.TopologySpreadConstraints
|
pod.Spec.TopologySpreadConstraints = runnerSpec.TopologySpreadConstraints
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue