Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cspc): add support to pass priority class to the pool pods #1566

Merged
merged 1 commit into from
Dec 26, 2019

Conversation

sonasingh46
Copy link
Contributor

@sonasingh46 sonasingh46 commented Dec 24, 2019

This PR adds support to pass priority class to the pool pod.

Following is an example CSPC to pass pod priority class name to the pool pods :

apiVersion: openebs.io/v1alpha1
kind: CStorPoolCluster
metadata:
  name: cspc-mirror
  namespace: openebs
spec:
  # This priorityClassName will be applied to all the pool pods 
  # if priorityClassName is not specified at the poolconfig level.
  priorityClassName: high-priority 
  pools:
  - nodeSelector:
      kubernetes.io/hostname: "gke-cstor-demo-default-pool-3385ab41-pjc2"
    raidGroups:
    - type: "mirror"
      isWriteCache: false
      isSpare: false
      isReadCache: false
      blockDevices:
      - blockDeviceName: "sparse-10236852f152126baf87c56f6e853805"
      - blockDeviceName: "sparse-ac1a50c4185f55cdfffed3a3c0d4a7b1"
  - nodeSelector:
      kubernetes.io/hostname: "gke-cstor-demo-default-pool-3385ab41-w1ht"
    raidGroups:
    - type: "mirror"
      isWriteCache: false
      isSpare: false
      isReadCache: false
      blockDevices:
      - blockDeviceName: "sparse-30ecaea3771633437feb79500fa75830"
      - blockDeviceName: "sparse-7b95a49e6e8b7db33dfae47a3ab2d5d7"
    poolConfig:
      cacheFile: ""
      defaultRaidGroupType: "mirror"
      overProvisioning: false
      # Here, the priorityClassName is specified the the pool config level
      # So, this class name will be applied to the pool pods.
      priorityClassName: low-priority 
      compression: "off"

  - nodeSelector:
      kubernetes.io/hostname: "gke-cstor-demo-default-pool-3385ab41-hzn8"
    raidGroups:
    - type: "mirror"
      isWriteCache: false
      isSpare: false
      isReadCache: false
      blockDevices:
      - blockDeviceName: "sparse-643973aac3b0ee934623c2a69ccc4a7c"
      - blockDeviceName: "sparse-ee6584d04a8843a27bc265cc97cc109b"

    poolConfig:
      cacheFile: ""
      defaultRaidGroupType: "mirror"
      overProvisioning: false
      compression: "off"

NOTES: The priorityClassName on CSPC is not reconciled.

Signed-off-by: Ashutosh Kumar [email protected]

@sonasingh46 sonasingh46 requested a review from kmova December 24, 2019 09:11
@sonasingh46 sonasingh46 changed the title [WIP]feat(cspc): add support to pass priority class to the pool pods feat(cspc): add support to pass priority class to the pool pods Dec 24, 2019
@@ -80,6 +80,11 @@ type CStorPoolClusterSpec struct {
// If tolerations at PoolConfig is empty, this is written to
// CSPI PoolConfig.
Tolerations []v1.Toleration `json:"tolerations"`
Copy link
Contributor

@mynktl mynktl Dec 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not relevant to this PR. We are using Tolerations from poolConfig. This can be misleading. Can you verify the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes are good

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vishnuitta vishnuitta merged commit 0083495 into openebs-archive:master Dec 26, 2019
shubham14bajpai pushed a commit to shubham14bajpai/maya that referenced this pull request Dec 27, 2019
@kmova kmova added this to the 1.6.0 milestone Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants