Commit Graph
7961 Commits
Author SHA1 Message Date
parth-gr 77ba1ef11b core: convert util.NewSet() to sets.NewString()
Converting util.NewSet() instance to use sets.NewString() instance

Closes: https://github.com/rook/rook/issues/8479
Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-25 13:13:05 +05:30
Sébastien Han 41e915d411 Merge pull request #8493 from leseb/admission-controller
ceph: move the admission webhook to the operator
2021-08-25 09:30:54 +02:00
Sébastien Han 88048cc4e8 ceph: do not check ok-to-stop when OSDs are in CLBO
This handles the scenario where the OSDs have been created but not yet
started due to a wrong CR configuration.
For instance, when OSDs are encrypted and Vault is used to store
encryption keys, if the KV version is incorrect during the cluster
initialization the OSDs will fail to start and stay in CLBO until the
CR is updated again with the correct KV version so that it can start.

For this scenario, if the CRUSH map has no host registered yet it's fair
to assume the initialization broke and we need to fix it. So when don't
need to call ok-to-stop since it will always fail and eventually force
pass but let's not wait for nothing.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-25 09:30:38 +02:00
Travis Nielsen cdfe1982d1 ceph: consolidate the calls to set mon config
The mon config had two different implementations that have evolved
over the lifetime of the project. This is a simple refactor to remove
the SetConfig() option and stick with the MonStore as a single
implementation for updating the mon store.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-08-24 14:38:26 -06:00
Travis Nielsen 7af10af781 Merge pull request #8514 from thotz/obcupdateapi
ceph: add support for update() from lib-bucket-provisioner
2021-08-24 13:28:46 -06:00
Sébastien Han 764633216b Merge pull request #8587 from leseb/find-path
core: parse go files only subdirs
2021-08-24 19:11:53 +02:00
Sébastien Han 656dd0f334 ceph: move the admission webhook to the operator
Our admission webhooks will now run as part of the Operator container
and not an additional deployment. This has the advantage of consuming
fewer resources in the cluster and not having to manage affinities and
tolerations. This only drawback is that the Secret containing the
certificates is not mounted anymore and the content needs to be written
inside the Operator. This is not practical since we also need to watch
for the Secret content to change. Meaning that the certificates have
been renewed and the webhook server needs to use them.
A new approach is on its way to hopefully simplify this last issue and
implement a watcher for the Secret.
In the meantime, users need to use the cert-manager or renew
certificates manually. Additionally, they must update the
ValidatingWebhookConfiguration object with the new CA bundle.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 19:07:04 +02:00
Sébastien Han 06a5571149 core: parse go files only subdirs
Instead of using the root let's only lookup our packages. Otherwise we
will format files from ./.work.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 18:52:39 +02:00
Travis Nielsen 9a96afab05 Merge pull request #8582 from Madhu-1/fix-csidriver-panic
ceph: fix panic when recreating the csidriver object
2021-08-24 09:05:31 -06:00
Travis Nielsen 764abc66f0 Merge pull request #8418 from leseb/fix-7609
ceph: embed ceph-csi templates in rook binary
2021-08-24 08:55:41 -06:00
Sébastien Han 579fc27783 ceph: embed ceph-csi templates in rook binary
Thanks to Golang 1.16, we can now embed files in the Go binary. This
means we don't need to add the CSI templates files to the container
image. They are added in the Go binary at build time.

The existing location of the template must be in the package calling it.
So they moved to pkg/operator/ceph/csi/template. All the files have been
symlinked back to cluster/examples/kubernetes/ceph/csi/template.

Closes: https://github.com/rook/rook/issues/7609
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 16:22:20 +02:00
Madhu Rajanna d246dde443 ceph: remove variable declaration
remove csiDriver and csiClient variables
creation and reuse them from the method
receivers.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-24 19:43:18 +05:30
Madhu Rajanna e2dc418371 ceph: fix logging of csidriver
log the successful message about
starting CSIDriver after creating
the daemonset and deployment objects.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-24 19:41:04 +05:30
Sébastien Han 62f06f2d5d Merge pull request #8394 from leseb/build-go-matrix
ci: build on golang 1.16 and 1.17
2021-08-24 16:09:53 +02:00
Sébastien Han cd9754e2f1 core: do not format deepcopy-gen files
deepcopy-gen appends a header starting with `// +build` which makes
gofmt to complain in Go 1.17 so until this is fixed in
https://github.com/kubernetes/gengo/pull/210 let's skip those files for
formatting.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 12:03:17 +02:00
Sébastien Han 7c14b32435 ci: build on golang 1.16 and 1.17
The CI now runs the build test against Golang 1.16 and 1.17.
So 1.17 is been added as a supported version.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 11:18:51 +02:00
Madhu Rajanna d48f67a82c ceph: fix panic in reCreateCSIDriverInfo
Initialize the client and the csidriver object
before calling the reCreateCSIDriverInfo
function.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-24 12:15:48 +05:30
Satoru Takeuchi 6582bac8e7 Merge pull request #8441 from leseb/signal
ceph: signal signals handling with context
2021-08-24 14:01:29 +09:00
Travis Nielsen 0e106f7a70 Merge pull request #8571 from parth-gr/legacy-PDB
ceph: Remove legacy PDBs methods
2021-08-20 10:27:35 -06:00
parth-gr 72e4bb8099 ceph: remove legacy PDBs methods
Removing the deleteLegacyPDBForOSD method
because we don't support legacyPDBs

Closes: https://github.com/rook/rook/issues/8360
Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-20 21:24:52 +05:30
Travis Nielsen 32bdf76c7b Merge pull request #8565 from subhamkrai/validate-create-tag
ci: validate user before creating tag
2021-08-20 09:29:04 -06:00
Travis Nielsen b3567f34a7 Merge pull request #8562 from parth-gr/string-instance
core: convert util.NewSet() to sets.NewString()
2021-08-20 08:24:26 -06:00
parth-gr 1601ba1c1c core: convert util.NewSet() to sets.NewString()
Converting util.NewSet() instance to use sets.NewString() instance

Closes: https://github.com/rook/rook/issues/8479
Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-20 18:56:25 +05:30
Travis Nielsen 8565627484 Merge pull request #8568 from josephsawaya/rook-ceph-mgr-removal-role
ceph: add permissions to rook-ceph-mgr role for osd removal in rook orchestator
2021-08-19 16:29:41 -06:00
Joseph Sawaya 331e06659e ceph: add permissions to rook-ceph-mgr role for osd removal
This commit adds permissions to the rook-ceph-mgr role
to delete PVCs and deployments and patch deployment scale
to remove OSDs using `ceph orch osd rm` in the rook orchestrator.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
2021-08-19 16:43:01 -04:00
Jiffin Tony Thottan f4bb47e440 ceph: add support for update() from lib-bucket-provisioner
Recently lib-bucket-provisioner add support for update() API.
Include that on the obc implementation since it can be used to
update quota for OBC.

Fixes: #7146

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-08-19 23:57:11 +05:30
subhamkrai 029ab61348 ci: validate user before creating tag
we need to validate create tag action
so that only authorized users can trigger
that action.

[skip-ci]

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-19 20:47:05 +05:30
Travis Nielsen 67acab94dd Merge pull request #8561 from subhamkrai/helm-k8s-check
ceph: add `-0` for helm k8s version check
2021-08-18 09:23:38 -06:00
Travis Nielsen c00b290041 Merge pull request #8364 from parth-gr/update-certificates.k8s.io
ceph: update CSR from v1beta1 to v1
2021-08-18 08:00:01 -06:00
Travis Nielsen 50004da5bf Merge pull request #8557 from subhamkrai/integration-test-tmate-timeout
ci: reduce tmate timeout to 60
2021-08-18 07:46:45 -06:00
subhamkrai 1681cfe89d ceph: add -0 for helm k8s version check
to use prerelease of kubernetes it requires
to have `-0` added in kubernetes version check
ex:
```{{- if semverCompare ">=1.16.0-0" .Capabilities.KubeVersion.GitVersion }}```

Closes: https://github.com/rook/rook/issues/8548
Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-18 19:15:48 +05:30
Travis Nielsen 39b859e159 Merge pull request #8549 from jmolmo/issue_8530
ceph: fix error in <ceph orch device ls> test
2021-08-18 07:38:36 -06:00
Juan Miguel Olmo Martínez 6ff5a5b86c ceph: fix error in <ceph orch device ls> test
Rook orchestrator is going to use PVs as <devices> for OSDs.
These PVs must use one storage class present in the cluster and
configured properly in the manager.
With this change we include this new requirement in the Rook manager module test

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
2021-08-18 14:19:23 +02:00
subhamkrai 94d8b9b2e6 ci: reduce tmate timeout to 60
reduce tmate timeout to 60 for the pull_request event.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-18 10:29:03 +05:30
Travis Nielsen cf81799c77 Merge pull request #8546 from humblec/sa
ceph: use serviceAccountName as the key in ceph csi templates
2021-08-17 22:41:44 -06:00
Travis Nielsen 0f4c111f6d Merge pull request #8552 from BlaineEXE/make-device-config-nullable
ceph: make storage device config nullable
2021-08-17 15:20:36 -06:00
Travis Nielsen df36270e33 Merge pull request #8534 from kam1kaze/upgrade_nfs_ganesha
nfs: upgrade nfs-ganesha to 3.5 version
2021-08-17 12:40:29 -06:00
Blaine Gardner 36c53fe6f3 ceph: make storage device config nullable
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-17 12:21:32 -06:00
Oleksii Kravchenko 62463dc61d nfs: bump nfs-ganesha to 3.5 version
Signed-off-by: Oleksii Kravchenko <kamikaze.ua@gmail.com>
2021-08-17 13:14:47 +04:00
Humble Chirammal dff0513750 ceph: use serviceAccountName as the key in ceph csi templates
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-08-17 09:40:12 +05:30
Blaine Gardner f907e09b8e Merge pull request #8540 from BlaineEXE/fix-golang-related-cves
build: use latest golang v1.16.7 (Go CVE-2021-34558)
2021-08-16 13:04:29 -06:00
Blaine Gardner e51c078050 Merge pull request #8541 from BlaineEXE/print-go-version-on-build
build: print go version when building
2021-08-16 12:41:50 -06:00
Blaine Gardner a83745cbcd build: print go version when building
Print the Go version when running any Go build target. This can be
helpful in making sure that we are building with the Go version we want
and expect.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-16 12:16:07 -06:00
Blaine Gardner 1592c9b9da build: use latest golang v1.16.7 (Go CVE-2021-34558)
Rook CephObjectStore S3 connections may be affected by CVE-2021-34558.
This is fixed in Go v1.16.6, so we update to the latest Go version
available to ensure this is fixed in future builds.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-16 11:43:44 -06:00
Travis Nielsen e2ea7e45e3 Merge pull request #8532 from travisn/reset-release-notes
docs: Reset the release notes for v1.8
2021-08-12 13:19:01 -06:00
Travis Nielsen 4dc15893f4 docs: reset the release notes for v1.8
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-08-12 12:19:48 -06:00
Travis Nielsen 49d645c863 Merge pull request #8528 from subhamkrai/validate-actor
ci: validate user before creating tag
2021-08-12 10:48:23 -06:00
subhamkrai 4233bb681e ci: validate user before creating tag
we need to validate create tag action
so that only authorized users can trigger
that action.

[skip-ci]

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-12 20:56:31 +05:30
parth-gr 88d907d9f6 ci: cephSmokeSuite test run on kubernetes 1.22
the CSR certificates k8s is updated to v1 version
so uprading the somkesuite test to run on 1.22 version

Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-12 20:27:17 +05:30
parth-gr 33bf21ba69 ceph: update CSR from v1beta1 to v1
This commit update the certificates.k8s.io to use version v1
Updated to v1 as v1beta1 certificates.k8s.io is deprecated in v1.19+

Closes: https://github.com/rook/rook/issues/8308
Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-12 20:27:05 +05:30