diff --git a/Documentation/ceph-cluster-crd.md b/Documentation/ceph-cluster-crd.md index 431352eee0e10..a4ca7d2534201 100755 --- a/Documentation/ceph-cluster-crd.md +++ b/Documentation/ceph-cluster-crd.md @@ -238,10 +238,10 @@ These are general purpose Ceph container with all necessary daemons and dependen | TAG | MEANING | | -------------------- | --------------------------------------------------------- | -| vRELNUM | Latest release in this series (e.g., *v15* = Octopus) | +| vRELNUM | Latest release in this series (e.g., *v15* = Octopus) | | vRELNUM.Y | Latest stable release in this stable series (e.g., v15.2) | | vRELNUM.Y.Z | A specific release (e.g., v15.2.5) | -| vRELNUM.Y.Z-YYYYMMDD | A specific build (e.g., v15.2.11-20200419) | +| vRELNUM.Y.Z-YYYYMMDD | A specific build (e.g., v15.2.11-20200419) | A specific will contain a specific release of Ceph as well as security fixes from the Operating System. @@ -597,10 +597,11 @@ Priority class names can be specified so that the Rook components will have thos You can set priority class names for Rook components for the list of key value pairs: -* `all`: Set priority class names for MGRs, Mons, OSDs. +* `all`: Set priority class names for MGRs, Mons, OSDs, and crashcollectos. * `mgr`: Set priority class names for MGRs. * `mon`: Set priority class names for Mons. * `osd`: Set priority class names for OSDs. +* `crashcollector`: Set priority class names for crashcollectors. The specific component keys will act as overrides to `all`. diff --git a/deploy/charts/rook-ceph-cluster/values.yaml b/deploy/charts/rook-ceph-cluster/values.yaml index 1ca0664ecb4d1..743de21eac157 100644 --- a/deploy/charts/rook-ceph-cluster/values.yaml +++ b/deploy/charts/rook-ceph-cluster/values.yaml @@ -238,6 +238,7 @@ cephClusterSpec: # mon: rook-ceph-mon-priority-class # osd: rook-ceph-osd-priority-class # mgr: rook-ceph-mgr-priority-class + # crashcollector: rook-ceph-crashcollector-priority-class storage: # cluster level storage configuration and selection useAllNodes: true diff --git a/deploy/examples/cluster.yaml b/deploy/examples/cluster.yaml index a65390cdb1f50..e68110bce7a03 100644 --- a/deploy/examples/cluster.yaml +++ b/deploy/examples/cluster.yaml @@ -207,6 +207,7 @@ spec: # mon: rook-ceph-mon-priority-class # osd: rook-ceph-osd-priority-class # mgr: rook-ceph-mgr-priority-class +# crashcollector: rook-ceph-crashcollector-priority-class storage: # cluster level storage configuration and selection useAllNodes: true useAllDevices: true diff --git a/pkg/apis/ceph.rook.io/v1/priorityclasses.go b/pkg/apis/ceph.rook.io/v1/priorityclasses.go index d60ed1acd8cfd..c984b852cf514 100644 --- a/pkg/apis/ceph.rook.io/v1/priorityclasses.go +++ b/pkg/apis/ceph.rook.io/v1/priorityclasses.go @@ -55,3 +55,11 @@ func GetCleanupPriorityClassName(p PriorityClassNamesSpec) string { } return p[KeyCleanup] } + +// GetCrashCollectorPriorityClassName returns the priority class name for the crashcollector +func GetCrashCollectorPriorityClassName(p PriorityClassNamesSpec) string { + if _, ok := p[KeyCrashCollector]; !ok { + return p.All() + } + return p[KeyCrashCollector] +} diff --git a/pkg/apis/ceph.rook.io/v1/priorityclasses_test.go b/pkg/apis/ceph.rook.io/v1/priorityclasses_test.go index a92e584bcf31c..cc2f018acd2b8 100644 --- a/pkg/apis/ceph.rook.io/v1/priorityclasses_test.go +++ b/pkg/apis/ceph.rook.io/v1/priorityclasses_test.go @@ -30,6 +30,7 @@ all: all-class mgr: mgr-class mon: mon-class osd: osd-class +crashcollector: crashcollector-class `) // convert the raw spec yaml into JSON @@ -43,10 +44,11 @@ osd: osd-class // the unmarshalled priority class names spec should equal the expected spec below expected := PriorityClassNamesSpec{ - "all": "all-class", - "mgr": "mgr-class", - "mon": "mon-class", - "osd": "osd-class", + "all": "all-class", + "mgr": "mgr-class", + "mon": "mon-class", + "osd": "osd-class", + "crashcollector": "crashcollector-class", } assert.Equal(t, expected, priorityClassNames) } diff --git a/pkg/operator/ceph/cluster/crash/crash.go b/pkg/operator/ceph/cluster/crash/crash.go index d5836a02f3697..b0db4acfc5539 100644 --- a/pkg/operator/ceph/cluster/crash/crash.go +++ b/pkg/operator/ceph/cluster/crash/crash.go @@ -113,10 +113,11 @@ func (r *ReconcileNode) createOrUpdateCephCrash(node corev1.Node, tolerations [] Containers: []corev1.Container{ getCrashDaemonContainer(cephCluster, *cephVersion), }, - Tolerations: tolerations, - RestartPolicy: corev1.RestartPolicyAlways, - HostNetwork: cephCluster.Spec.Network.IsHost(), - Volumes: volumes, + Tolerations: tolerations, + RestartPolicy: corev1.RestartPolicyAlways, + HostNetwork: cephCluster.Spec.Network.IsHost(), + Volumes: volumes, + PriorityClassName: cephv1.GetCrashCollectorPriorityClassName(cephCluster.Spec.PriorityClassNames), }, }