Commit Graph
125 Commits
Author SHA1 Message Date
Satoru Takeuchi e22bedbd9b ceph: reduce the number of provisioner pods in small K8s cluster
The default number of provisioner pods are 2. When there is only one node,
for example the CI environment, one of these becomes Pending state.
Although it's harmless, it's better to reduce this value to 1.

Closes: https://github.com/rook/rook/issues/6294

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-10-15 18:25:27 +00:00
Madhu Rajanna 2fa3e71733 ceph: update cephcsi to v3.1.1
as cephcsi v3.1.1 is released today
with many bug fixes and enhancements,
more details can be found at
https://github.com/ceph/ceph-csi/releases/tag/v3.1.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-29 14:03:44 +05:30
Mudit Agarwal c547b36aa0 ceph: update csi sidecar images
This PR makes the changes in csi templates and
upgrade documentation required for updating
csi sidecar images.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-09-28 18:58:52 +05:30
Travis Nielsen 02fa0eb921 Merge pull request #6228 from Madhu-1/fix-ownerref
ceph: remove owner reference set by rook on csidriver
2020-09-18 10:09:36 -06:00
subhamkrai 1e9bb8e6e2 ceph: handle golangci-lint linter deadcode
this commit will enable one more linter `deadcode`
in golangci-lint .

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-18 16:53:49 +05:30
subhamkrai 25c116a4bd ceph: handle golangci-lint linter gosimple
this commit handles all the errors  check for
golangci-lint linter gosimple.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-09-17 15:10:27 +05:30
Madhu Rajanna a1024ebc75 ceph: remove owner reference set by rook on csidriver
currently, we are setting the rook operator as owner
on the csidriver objects,  as csidriver is cluster
scoped object we should not set namespaced object as
owner on cluster scoped object

fixes #6162

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-15 11:39:27 +05:30
Madhu Rajanna b88373f9f3 ceph: dont set ownerRef when creating csidriver object
currently, we are setting the rook operator as the
owner on the csidriver objects, as csidriver is cluster
the scoped object we should not set a namespaced object
as owner on cluster scoped object.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-11 11:59:44 +05:30
Sébastien Han 8668e1f69c ceph: correctly return if multus was applied
We must only return if multus got configured successfully.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-25 09:54:18 +02:00
rohan47 8c4ede1edc ceph: added support for multus for csi
CSI pods now utilize multus networking and connect to public
network specified in the CephCluster CR.

Closes: https://github.com/rook/rook/issues/5356
Signed-off-by: rohan47 <rohgupta@redhat.com>
2020-08-20 18:25:09 +05:30
Humble Chirammal 97a3283099 ceph: add snapshot create/delete and restore doc for cephfs
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-13 22:17:01 +05:30
Humble Chirammal 903fcdb778 ceph: update csi image version to 3.1.0 in spec.go
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2020-08-12 22:39:48 +05:30
Madhu Rajanna 1989e0d8c5 ceph: remove csi support for kubernetes 1.13
as the kubernetes 1.13 is EOL and there is no major
functionalities available in 1.13 (resize,snapshot,clone
metrics etc) we are removing the support for kubernetes
for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-05 21:19:59 +05:30
Madhu Rajanna 943f402216 ceph: create csidriver if kube version is >1.14
create csidriver object  if the kubernetes version
is greater than 1.14 modified the check to allow
Csidriver object creation if kubernetes major version
is greater than 1.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-04 20:46:28 +05:30
Madhu Rajanna dfce2b67d5 ceph: compare with major and minor kubernetes version
instead of skipping the checks based on the kubernetes
major version we need to check both major and minor
version of it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 22:56:25 +05:30
Madhu Rajanna 4595f42bf5 ceph: remove unused file from csi
removed unused file from the csi folder

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 22:06:26 +05:30
Madhu Rajanna 29312743e1 ceph: remove unused variable
remove unused variable in spec.go

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 22:06:26 +05:30
Madhu Rajanna bf77614b66 ceph: log kubernetes version in spec
logging kubernetes version helps for
debugging the issue related to version miss
match.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 22:06:22 +05:30
Madhu Rajanna bb5bc927e0 ceph: correct the kubernetes version comparision
fixed the kubernetes version comparsion to
deploy provisioner as the statefulset.

if the kubernetes Major version is less than
1 or major  is 1 and minor is less than 14
deploy provisioner as statefulset

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 19:08:47 +05:30
Madhu Rajanna 1a5e9cb5dd ceph: rename resizer image variable
renamed resizer image variable as per
other variable names.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 19:07:45 +05:30
Madhu Rajanna 58b4c2d74d ceph: re-arrange import order in spec.go
re-arrange import order as per standard
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 19:04:46 +05:30
Travis Nielsen 22ba4591f3 Merge pull request #5888 from Madhu-1/csi-v3.0.0
ceph: update ceph-csi to v3.0.0 release
2020-07-27 14:05:29 -06:00
Madhu Rajanna cc3b4e6906 ceph: remove check for kubernetes version
as we are going to deploy snapshotter by
default we are going to remove the kubernetes
version check.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-27 13:45:56 +05:30
Madhu Rajanna 026c5ac28a ceph: update version check for v3.0.0 release
added v3.0.0 as supported release of cephcsi.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-27 13:30:44 +05:30
Travis Nielsen e1f296e34a Merge pull request #5880 from Madhu-1/fix-csi-ver
ceph: skip csi version detect if allowunsupported is set
2020-07-23 23:18:57 -06:00
Madhu Rajanna 031e3145a5 ceph: update cephcsi to v3.0.0
update cephcsi to latest available release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-24 10:21:59 +05:30
Madhu Rajanna d6b2ad142d ceph: add provisioner toleration for csi version check job
Added a provisioner toleration to the csi version
check job, so that we can schedule the csi version
check on the node where the nodes are tainted.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-23 08:49:18 +05:30
Madhu Rajanna 51d3a52c80 ceph: skip csi version detect if allowunsupported is set
If the AllowUnsupported flag is set to true we should
not check the csi version as it will be kind of no-op
as even incase of failure we continue. if we disable
the version check in this case,the deployment will
be little faster as we dont wait for version check
to complete to start CSI pods.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-23 08:30:14 +05:30
Travis Nielsen e74c7eaef8 ceph: refactor context and clusterInfo passed to the ceph commands
To provide more context for executing commands in a ceph cluster,
the full clusterInfo is now passed to the ceph execution commands.
All information about the cluster will now be available throughout
all the areas of the operator. The namespace, ceph credentials,
mon endpoints, and other info is a core part of that cluster info.

Arguments passed through the controllers are also simplified for
mons, mgr, osds, and other daemons where the parameters had
become too complex.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:54 -06:00
Travis Nielsen 4681f9e73d ceph: consolidate ceph config and client packages
The ceph config and client packages are conceptually the same.
To avoid circular dependencies in some cases, we simplify by combining
the packages into the client package.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-16 15:54:43 -06:00
subhamkrai 7f9f1690d2 ceph: remove csi drivers when disable
remove csi drivers and delete k8s
services that drivers create,when
the default setting of drivers changed
to false.

Signed-off-by: subhamkrai <subhamkumarrai03@gmail.com>
2020-07-06 13:33:52 +05:30
Madhu Rajanna 3f46b437c6 ceph: remove CSI_ENABLE_SNAPSHOTTER from CSI config
removed CSI_ENABLE_SNAPSHOTTER from the configuration
to enable or disable csi-snapshotter as snapshot
is moved to beta and enabled by default in kubernetes
1.17+

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Madhu Rajanna 54f396ca0e ceph: add check for snapshotter deployment
as we need kubernetes v1.17+ for snapshotter
to work,Added code changes to disable snapshotter
sidecar deployment by default if the kubernetes version
is less than v1.17+

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Madhu Rajanna 6699dba25a ceph: update sidecar images version
updated snapshotter from v1.x to v2.x
as its supports snapshot beta, the required
provisioner version to support snapshot beta
is v1.5.x+.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-07-01 07:20:04 +05:30
Vineet Badrinath ce1003aef8 ceph: adds scripts and components to support admission controllers
adds deploy.sh script to deploy validatingwebhookconfiguration and create secrets.
adds new command ceph admission-controller to start webhook servers.
adds validation for various rook custom resources

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-06-24 14:59:00 +05:30
Madhu Rajanna 09ccf55453 ceph: update cephcsi to v2.1.2
Cephcsi v2.1.2 is released with bug fixes,
refer https://github.com/ceph/ceph-csi/releases/tag/v2.1.2
for release details.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-06-05 14:43:05 +05:30
Travis Nielsen 6c249e751b ceph: start csi driver in parallel of cluster
The csi driver does not need to be started before the cluster
is created. When the csi driver fails to load, neither should
it prevent the cluster from being created. Therefore, we
initialize the basic constructs in the csi driver that are required
for cluster creation, then start the csi driver in a goroutine
so the cluster creation can continue. If the csi driver fails
or takes a long time to load, it will no longer affect cluster
creation.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-05-29 16:42:22 -06:00
Travis Nielsen ffe12a8ba2 ceph: remove obsolete csi driver cleanup code
The csi driver is no longer removed based on the deletion
of a configmap. Removing obsolete code.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-05-29 15:14:19 -06:00
Madhu Rajanna 747865283a CSI: set deployment strategy to Recreate
updated deployment strategy of provisioner
deployment to Recreate to avoid issue during
update, Recreate strategy will Kill all existing
pods before creating new ones.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-14 11:05:54 +05:30
Madhu Rajanna a16d3bd422 k8sutil: Make client as the first argument
To have parity with other functions and
also client should be the first argument to
the function.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-14 11:02:14 +05:30
Madhu Rajanna 4febbb09b8 CSI: set pod anti affinity to provisioner pod
sometimes the kube schedular will schedule the
provisioner pod on the same node. it doesnot make
sense to have both provisioner pod running on the same
node, we need to set the pod anti affinity to make
sure that no provisioner pods runnings on the same
node.

Fixes: #5271

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-14 11:01:11 +05:30
Travis Nielsen b375e81c37 ceph: allow csi driver version to be undetected
If ROOK_CSI_ALLOW_UNSUPPORTED_VERSION=false and the csi canary image
is set to quay.io/cephcsi/cephcsi:canary, the csi driver fails
to load as expected since it is not supported. But if the
flag is set to true, it is expected to allow the canary image
which isn't versioned. The supported version check was requiring
that the version be detected in the image.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-05-06 12:36:10 -06:00
Travis Nielsen f82a07d441 Merge pull request #5394 from Madhu-1/csi-prio
CSI: Set PriorityClassName for CSI pods
2020-05-06 07:08:54 -06:00
Madhu Rajanna ec3ab55d94 CSI: Set PriorityClassName for CSI provisioner pods
provide an option to set PriorityclassName on the
CSI provisioner pods to avoid pod eviction, as the CSI provisioner
pods a critical in system for storage. the default value
for the CSI provisioner pods is set to system-cluster-critical.

provisioner pods are less priority than plugin pods.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-06 15:45:06 +05:30
Madhu Rajanna cc6ec58891 CSI: Set PriorityClassName for CSI plugin pods
provide an option to set Priorityclassname on the
CSI plugin pods to avoid pod eviction, as the CSI plugin pods are
critical in system for storage. the default value
for the CSI plugin pods is set to system-node-critical.
more info can be found at
https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-06 15:45:01 +05:30
Madhu Rajanna 73c74d8a42 CSI: Update CSI version to v2.1.1
cephcsi v2.1.1 is released with fix for xfs formatting
issue. This PR updates the cephcsi image version to
v2.1.1

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-05-05 13:08:23 +05:30
Sébastien Han 1ea73ce123 Merge pull request #5364 from Madhu-1/err-cleaup
cleanup: use err.Wrap when the formatting is not required
2020-04-30 15:57:27 +02:00
Madhu Rajanna 81688398f2 cleanup: use err.Wrap when the formatting is not required
Replaced err.Wrapf with err.Wrap when the formatting
is not required.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 17:42:59 +05:30
Madhu Rajanna 4065217913 CSI: use warning if the formatting is not required
If the formatting is not required use warning
instead of warningf

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 10:26:56 +05:30
Madhu Rajanna 050fb2c616 CSI: code changes to apply resource to container
Update CSI spec code to fetch the resources from the
configmap or ENV and apply the specific resources
to the cephfs,rbd and kubernetes sidecar containers.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 10:26:51 +05:30