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:
Sam Weston 2022-06-28 00:45:19 +01:00 committed by GitHub
parent e2c8163b8c
commit bc7a3cab1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 20 additions and 0 deletions

View File

@ -1142,6 +1142,7 @@ spec:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
spec:
priorityClassName: "high"
nodeSelector:
node-role.kubernetes.io/test: ""

View File

@ -135,6 +135,9 @@ type RunnerPodSpec struct {
// +optional
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// +optional
PriorityClassName string `json:"priorityClassName,omitempty"`
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`

View File

@ -3233,6 +3233,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -3230,6 +3230,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -3171,6 +3171,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -3233,6 +3233,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -3230,6 +3230,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -3171,6 +3171,8 @@ spec:
organization:
pattern: ^[^/]+$
type: string
priorityClassName:
type: string
repository:
pattern: ^[^/]+/[^/]+$
type: string

View File

@ -476,6 +476,10 @@ func (r *RunnerReconciler) newPod(runner v1alpha1.Runner) (corev1.Pod, error) {
pod.Spec.Tolerations = runnerSpec.Tolerations
}
if runnerSpec.PriorityClassName != "" {
pod.Spec.PriorityClassName = runnerSpec.PriorityClassName
}
if len(runnerSpec.TopologySpreadConstraints) != 0 {
pod.Spec.TopologySpreadConstraints = runnerSpec.TopologySpreadConstraints
}