Skip to content

Commit

Permalink
Merge pull request #52 from red-hat-storage/sync_us--main
Browse files Browse the repository at this point in the history
Syncing latest changes from upstream main for ceph-csi-operator
  • Loading branch information
openshift-merge-bot[bot] authored Nov 11, 2024
2 parents 5930b17 + cb33e40 commit 17898dc
Show file tree
Hide file tree
Showing 20 changed files with 759 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ functionality, but are work items that can be taken up subsequently.

* [ ] **Commit Message Formatting**: Commit titles and messages follow
guidelines in the [developer
guide](https://github.com/ceph/ceph-csi-operator/blob/devel/docs/development-guide.md#commit-messages).
guide](https://github.com/ceph/ceph-csi-operator/blob/main/docs/development-guide.md#commit-messages).
* [ ] Reviewed the developer guide on [Submitting a Pull
Request](https://github.com/ceph/ceph-csi-operator/blob/devel/docs/development-guide.md#development-workflow)
Request](https://github.com/ceph/ceph-csi-operator/blob/main/docs/development-guide.md#development-workflow)
* [ ] [Pending release
notes](https://github.com/ceph/ceph-csi-operator/blob/devel/PendingReleaseNotes.md)
notes](https://github.com/ceph/ceph-csi-operator/blob/main/PendingReleaseNotes.md)
updated with breaking and/or notable changes for the next major release.
* [ ] Documentation has been updated, if necessary.
* [ ] Unit tests have been added, if necessary.
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/driver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ type ControllerPluginSpec struct {
// Embedded common pods spec
PodCommonSpec `json:",inline"`

// DeploymentStrategy describes how to replace existing pods with new ones
// Default value is RollingUpdate with MaxUnavailable and MaxSurege as 25% (kubernetes default)
//+kubebuilder:validation:Optional
DeploymentStrategy *appsv1.DeploymentStrategy `json:"deploymentStrategy,omitempty"`

// Set replicas for controller plugin's deployment. Defaults to 2
//+kubebuilder:validation:Optional
//+kubebuilder:validation:Minimum:=1
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 43 additions & 1 deletion bundle/manifests/cephcsi-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
annotations:
alm-examples: '[]'
capabilities: Basic Install
createdAt: "2024-11-06T08:04:38Z"
createdAt: "2024-11-11T08:04:43Z"
olm.skipRange: ""
operators.operatorframework.io/builder: operator-sdk-v1.34.1
operators.operatorframework.io/operator-type: non-standalone
Expand Down Expand Up @@ -857,7 +857,21 @@ spec:
resources:
- csiaddonsnodes
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
serviceAccountName: ceph-csi-cephfs-ctrlplugin-sa
- rules:
- apiGroups:
Expand Down Expand Up @@ -909,15 +923,43 @@ spec:
resources:
- csiaddonsnodes
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
serviceAccountName: ceph-csi-rbd-ctrlplugin-sa
- rules:
- apiGroups:
- csiaddons.openshift.io
resources:
- csiaddonsnodes
verbs:
- get
- create
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
serviceAccountName: ceph-csi-rbd-nodeplugin-sa
strategy: deployment
installModes:
Expand Down
52 changes: 52 additions & 0 deletions bundle/manifests/csi.ceph.io_drivers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,58 @@ spec:
type: string
description: Pod's annotations
type: object
deploymentStrategy:
description: |-
DeploymentStrategy describes how to replace existing pods with new ones
Default value is RollingUpdate with MaxUnavailable and MaxSurege as 25% (kubernetes default)
properties:
rollingUpdate:
description: |-
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
---
TODO: Update this to follow our convention for oneOf, whatever we decide it
to be.
properties:
maxSurge:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be scheduled above the desired number of
pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
This can not be 0 if MaxUnavailable is 0.
Absolute number is calculated from percentage by rounding up.
Defaults to 25%.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
the rolling update starts, such that the total number of old and new pods do not exceed
130% of desired pods. Once old pods have been killed,
new ReplicaSet can be scaled up further, ensuring that total number of pods running
at any time during the update is at most 130% of desired pods.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if MaxSurge is 0.
Defaults to 25%.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
that the total number of pods available at all times during the update is at
least 70% of desired pods.
x-kubernetes-int-or-string: true
type: object
type:
description: Type of deployment. Can be "Recreate" or "RollingUpdate".
Default is RollingUpdate.
type: string
type: object
imagePullPolicy:
description: To indicate the image pull policy to be applied to
all the containers in the csi driver pods.
Expand Down
52 changes: 52 additions & 0 deletions bundle/manifests/csi.ceph.io_operatorconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,58 @@ spec:
type: string
description: Pod's annotations
type: object
deploymentStrategy:
description: |-
DeploymentStrategy describes how to replace existing pods with new ones
Default value is RollingUpdate with MaxUnavailable and MaxSurege as 25% (kubernetes default)
properties:
rollingUpdate:
description: |-
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
---
TODO: Update this to follow our convention for oneOf, whatever we decide it
to be.
properties:
maxSurge:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be scheduled above the desired number of
pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
This can not be 0 if MaxUnavailable is 0.
Absolute number is calculated from percentage by rounding up.
Defaults to 25%.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
the rolling update starts, such that the total number of old and new pods do not exceed
130% of desired pods. Once old pods have been killed,
new ReplicaSet can be scaled up further, ensuring that total number of pods running
at any time during the update is at most 130% of desired pods.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if MaxSurge is 0.
Defaults to 25%.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
that the total number of pods available at all times during the update is at
least 70% of desired pods.
x-kubernetes-int-or-string: true
type: object
type:
description: Type of deployment. Can be "Recreate" or
"RollingUpdate". Default is RollingUpdate.
type: string
type: object
imagePullPolicy:
description: To indicate the image pull policy to be applied
to all the containers in the csi driver pods.
Expand Down
52 changes: 52 additions & 0 deletions config/crd/bases/csi.ceph.io_drivers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,58 @@ spec:
type: string
description: Pod's annotations
type: object
deploymentStrategy:
description: |-
DeploymentStrategy describes how to replace existing pods with new ones
Default value is RollingUpdate with MaxUnavailable and MaxSurege as 25% (kubernetes default)
properties:
rollingUpdate:
description: |-
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
---
TODO: Update this to follow our convention for oneOf, whatever we decide it
to be.
properties:
maxSurge:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be scheduled above the desired number of
pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
This can not be 0 if MaxUnavailable is 0.
Absolute number is calculated from percentage by rounding up.
Defaults to 25%.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
the rolling update starts, such that the total number of old and new pods do not exceed
130% of desired pods. Once old pods have been killed,
new ReplicaSet can be scaled up further, ensuring that total number of pods running
at any time during the update is at most 130% of desired pods.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if MaxSurge is 0.
Defaults to 25%.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
that the total number of pods available at all times during the update is at
least 70% of desired pods.
x-kubernetes-int-or-string: true
type: object
type:
description: Type of deployment. Can be "Recreate" or "RollingUpdate".
Default is RollingUpdate.
type: string
type: object
imagePullPolicy:
description: To indicate the image pull policy to be applied to
all the containers in the csi driver pods.
Expand Down
52 changes: 52 additions & 0 deletions config/crd/bases/csi.ceph.io_operatorconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,58 @@ spec:
type: string
description: Pod's annotations
type: object
deploymentStrategy:
description: |-
DeploymentStrategy describes how to replace existing pods with new ones
Default value is RollingUpdate with MaxUnavailable and MaxSurege as 25% (kubernetes default)
properties:
rollingUpdate:
description: |-
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
---
TODO: Update this to follow our convention for oneOf, whatever we decide it
to be.
properties:
maxSurge:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be scheduled above the desired number of
pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
This can not be 0 if MaxUnavailable is 0.
Absolute number is calculated from percentage by rounding up.
Defaults to 25%.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when
the rolling update starts, such that the total number of old and new pods do not exceed
130% of desired pods. Once old pods have been killed,
new ReplicaSet can be scaled up further, ensuring that total number of pods running
at any time during the update is at most 130% of desired pods.
x-kubernetes-int-or-string: true
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if MaxSurge is 0.
Defaults to 25%.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods
immediately when the rolling update starts. Once new pods are ready, old ReplicaSet
can be scaled down further, followed by scaling up the new ReplicaSet, ensuring
that the total number of pods available at all times during the update is at
least 70% of desired pods.
x-kubernetes-int-or-string: true
type: object
type:
description: Type of deployment. Can be "Recreate" or
"RollingUpdate". Default is RollingUpdate.
type: string
type: object
imagePullPolicy:
description: To indicate the image pull policy to be applied
to all the containers in the csi driver pods.
Expand Down
8 changes: 7 additions & 1 deletion config/csi-rbac/cephfs_ctrlplugin_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ rules:
verbs: ["get", "watch", "list", "delete", "update", "create"]
- apiGroups: ["csiaddons.openshift.io"]
resources: ["csiaddonsnodes"]
verbs: ["create"]
verbs: ["get", "create", "update"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get"]
Loading

0 comments on commit 17898dc

Please sign in to comment.