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

enhance(CAST): Adds Target and Replica Toleration policies #921

Merged
merged 1 commit into from Jan 31, 2019

Conversation

Projects
None yet
2 participants
@ashishranjan738
Copy link
Contributor

ashishranjan738 commented Jan 31, 2019

Signed-off-by: Ashish Ranjan ashishranjan738@gmail.com

This commit adds:
1/ Target and Replica Toleration policies to jiva and
2/ Target Toleration policy to cstor volumes

Above policies can be used in storageclass.

Example of jiva storage class for using the above policies:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-jiva-default
  annotations:
    openebs.io/cas-type: jiva
    cas.openebs.io/config: |
      - name: ReplicaCount
        value: "1"
      - name: StoragePool
        value: default
      - name: TargetTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"
      - name: ReplicaTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"

Example of cstor storageclass for using the above policies:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-cstor-sparse
  annotations:
    openebs.io/cas-type: cstor
    cas.openebs.io/config: |
      - name: StoragePoolClaim
        value: "cstor-sparse-pool"
      - name: ReplicaCount
        value: "1"
      - name: TargetTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"

@ashishranjan738 ashishranjan738 force-pushed the ashishranjan738:v0.8.x-toleration branch from 1b8282f to 4fed78b Jan 31, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 31, 2019

Codecov Report

Merging #921 into v0.8.x will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           v0.8.x     #921      +/-   ##
==========================================
+ Coverage   42.46%   42.48%   +0.02%     
==========================================
  Files         143      143              
  Lines        9462     9462              
==========================================
+ Hits         4018     4020       +2     
+ Misses       5168     5167       -1     
+ Partials      276      275       -1
Impacted Files Coverage Δ
pkg/install/v1alpha1/cstor_volume.go 0% <ø> (ø) ⬆️
pkg/install/v1alpha1/jiva_volume.go 0% <ø> (ø) ⬆️
pkg/task/v1alpha1/store_command.go 83.5% <0%> (+2.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9a2e42...2c8af5f. Read the comment docs.

@AmitKumarDas AmitKumarDas requested review from AmitKumarDas and kmova Jan 31, 2019

@ashishranjan738 ashishranjan738 force-pushed the ashishranjan738:v0.8.x-toleration branch from 4fed78b to 39246b5 Jan 31, 2019

enhance(CAST): Adds Target and Replica Toleration policies
Signed-off-by: Ashish Ranjan <ashishranjan738@gmail.com>

This commit adds Target and Replica Toleration policies to jiva and Target
Toleration policy to cstor volumes which can be used for adding tolerations to
jiva and cstor volumes. The above policies can be used by
providing the policy values in storageclass.

Example of jiva storage class for using the above policies:

```
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-jiva-default
  annotations:
    openebs.io/cas-type: jiva
    cas.openebs.io/config: |
      - name: ReplicaCount
        value: "1"
      - name: StoragePool
        value: default
      - name: TargetTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"
      - name: ReplicaTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"

```
Example of cstor storageclass for using the above policies:

```
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-cstor-sparse
  annotations:
    openebs.io/cas-type: cstor
    cas.openebs.io/config: |
      - name: StoragePoolClaim
        value: "cstor-sparse-pool"
      - name: ReplicaCount
        value: "1"
      - name: TargetTolerations
        value: |
          t1:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoSchedule"
          t2:
            key: "key1"
            operator: "Equal"
            value: "value1"
            effect: "NoExecute"

```

@ashishranjan738 ashishranjan738 force-pushed the ashishranjan738:v0.8.x-toleration branch from 39246b5 to 2c8af5f Jan 31, 2019

@AmitKumarDas
Copy link
Member

AmitKumarDas left a comment

/lgtm
/approve

@AmitKumarDas AmitKumarDas merged commit 6f1176e into openebs:v0.8.x Jan 31, 2019

4 of 5 checks passed

Better Code Hub ✋ This code needs to be refactored
Details
code-analysis/fixmie The Fixmie analysis has finished
codecov/patch Coverage not affected when comparing e9a2e42...2c8af5f
Details
codecov/project 42.48% (+0.02%) compared to e9a2e42
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.