Skip to content

Commit

Permalink
update crd changes
Browse files Browse the repository at this point in the history
Signed-off-by: crombus <pkundra@redhat.com>
(cherry picked from commit 2e8b7aa)
  • Loading branch information
crombus committed Jan 29, 2021
1 parent de98938 commit 7edc5a2
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 396 deletions.
129 changes: 129 additions & 0 deletions deploy/crds/ocs.openshift.io_storageclusters_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,135 @@ spec:
on a node whose value of the label with key <topologyKey>
matches that of any node on which a pod of the set of
pods is running
maxSkew:
description: 'MaxSkew describes the degree to which pods
may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
it is the maximum permitted difference between the number
of matching pods in the target topology and the global
minimum. For example, in a 3-zone cluster, MaxSkew is
set to 1, and pods with the same labelSelector spread
as 1/1/0: | zone1 | zone2 | zone3 | | P | P | |
- if MaxSkew is 1, incoming pod can only be scheduled
to zone3 to become 1/1/1; scheduling it onto zone1(zone2)
would make the ActualSkew(2-0) on zone1(zone2) violate
MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled
onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
it is used to give higher precedence to topologies that
satisfy it. It''s a required field. Default value is
1 and 0 is not allowed.'
type: integer
format: int32
topologyKey:
description: TopologyKey is the key of node labels. Nodes
that have a label with this key and identical values
are considered to be in the same topology. We consider
each <key, value> as a "bucket", and try to put balanced
number of pods into each bucket. It's a required field.
type: string
whenUnsatisfiable:
description: 'WhenUnsatisfiable indicates how to deal
with a pod if it doesn''t satisfy the spread constraint.
- DoNotSchedule (default) tells the scheduler not to
schedule it. - ScheduleAnyway tells the scheduler to
schedule the pod in any location, but giving higher
precedence to topologies that would help reduce the skew.
A constraint is considered "Unsatisfiable" for an incoming
pod if and only if every possible node assigment for
that pod would violate "MaxSkew" on some topology. For
example, in a 3-zone cluster, MaxSkew is set to 1, and
pods with the same labelSelector spread as 3/1/1: |
zone1 | zone2 | zone3 | | P P P | P | P | If
WhenUnsatisfiable is set to DoNotSchedule, incoming
pod can only be scheduled to zone2(zone3) to become
3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies
MaxSkew(1). In other words, the cluster can still be
imbalanced, but scheduler won''t make it *more* imbalanced.
It''s a required field.'
type: string
resources:
description: Resources follows the conventions of and is mapped to
CephCluster.Spec.Resources
type: object
additionalProperties:
description: ResourceRequirements describes the compute resource
requirements.
type: object
properties:
limits:
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
requests:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
storageDeviceSets:
type: array
items:
description: StorageDeviceSet defines a set of storage devices.
It configures the StorageClassDeviceSets field in Rook-Ceph.
type: object
required:
- count
- dataPVCTemplate
- name
properties:
config:
description: 'StorageDeviceSetConfig defines Ceph OSD specific
config options for the StorageDeviceSet TODO: Fill in the
members when the actual configurable options are defined in
rook-ceph'
type: object
properties:
tuneFastDeviceClass:
description: TuneFastDeviceClass tunes the OSD when running
on a fast Device Class
type: boolean
tuneSlowDeviceClass:
description: TuneSlowDeviceClass tunes the OSD when running
on a slow Device Class
type: boolean
count:
description: Count is the number of devices in each StorageClassDeviceSet
type: integer
minimum: 1
dataPVCTemplate:
description: PersistentVolumeClaim is a user's request for and
claim to a persistent volume
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of
this representation of an object. Servers should convert
recognized schemas to the latest internal value, and may
reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST
resource this object represents. Servers may infer this
from the endpoint the client submits requests to. Cannot
be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
type: object
spec:
description: 'Spec defines the desired characteristics of
a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
type: object
required:
- topologyKey
Expand Down
129 changes: 129 additions & 0 deletions deploy/csv-templates/crds/ocs.openshift.io_storageclusters_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,135 @@ spec:
on a node whose value of the label with key <topologyKey>
matches that of any node on which a pod of the set of
pods is running
maxSkew:
description: 'MaxSkew describes the degree to which pods
may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
it is the maximum permitted difference between the number
of matching pods in the target topology and the global
minimum. For example, in a 3-zone cluster, MaxSkew is
set to 1, and pods with the same labelSelector spread
as 1/1/0: | zone1 | zone2 | zone3 | | P | P | |
- if MaxSkew is 1, incoming pod can only be scheduled
to zone3 to become 1/1/1; scheduling it onto zone1(zone2)
would make the ActualSkew(2-0) on zone1(zone2) violate
MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled
onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
it is used to give higher precedence to topologies that
satisfy it. It''s a required field. Default value is
1 and 0 is not allowed.'
type: integer
format: int32
topologyKey:
description: TopologyKey is the key of node labels. Nodes
that have a label with this key and identical values
are considered to be in the same topology. We consider
each <key, value> as a "bucket", and try to put balanced
number of pods into each bucket. It's a required field.
type: string
whenUnsatisfiable:
description: 'WhenUnsatisfiable indicates how to deal
with a pod if it doesn''t satisfy the spread constraint.
- DoNotSchedule (default) tells the scheduler not to
schedule it. - ScheduleAnyway tells the scheduler to
schedule the pod in any location, but giving higher
precedence to topologies that would help reduce the skew.
A constraint is considered "Unsatisfiable" for an incoming
pod if and only if every possible node assigment for
that pod would violate "MaxSkew" on some topology. For
example, in a 3-zone cluster, MaxSkew is set to 1, and
pods with the same labelSelector spread as 3/1/1: |
zone1 | zone2 | zone3 | | P P P | P | P | If
WhenUnsatisfiable is set to DoNotSchedule, incoming
pod can only be scheduled to zone2(zone3) to become
3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies
MaxSkew(1). In other words, the cluster can still be
imbalanced, but scheduler won''t make it *more* imbalanced.
It''s a required field.'
type: string
resources:
description: Resources follows the conventions of and is mapped to
CephCluster.Spec.Resources
type: object
additionalProperties:
description: ResourceRequirements describes the compute resource
requirements.
type: object
properties:
limits:
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
requests:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified, otherwise
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
additionalProperties:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
anyOf:
- type: integer
- type: string
x-kubernetes-int-or-string: true
storageDeviceSets:
type: array
items:
description: StorageDeviceSet defines a set of storage devices.
It configures the StorageClassDeviceSets field in Rook-Ceph.
type: object
required:
- count
- dataPVCTemplate
- name
properties:
config:
description: 'StorageDeviceSetConfig defines Ceph OSD specific
config options for the StorageDeviceSet TODO: Fill in the
members when the actual configurable options are defined in
rook-ceph'
type: object
properties:
tuneFastDeviceClass:
description: TuneFastDeviceClass tunes the OSD when running
on a fast Device Class
type: boolean
tuneSlowDeviceClass:
description: TuneSlowDeviceClass tunes the OSD when running
on a slow Device Class
type: boolean
count:
description: Count is the number of devices in each StorageClassDeviceSet
type: integer
minimum: 1
dataPVCTemplate:
description: PersistentVolumeClaim is a user's request for and
claim to a persistent volume
type: object
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of
this representation of an object. Servers should convert
recognized schemas to the latest internal value, and may
reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST
resource this object represents. Servers may infer this
from the endpoint the client submits requests to. Cannot
be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
type: object
spec:
description: 'Spec defines the desired characteristics of
a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims'
type: object
required:
- topologyKey
Expand Down

0 comments on commit 7edc5a2

Please sign in to comment.