Commit Graph
153 Commits
Author SHA1 Message Date
subhamkrai 3c591ff7a1 ci: update make crds-gen to make crds
this commit update make crds-gen to make crds

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-26 15:48:18 +05:30
Sébastien Han c43058a98c Merge pull request #7355 from leseb/more-disks-ci
ceph: add more osds to the ci
2021-03-18 10:56:19 +01:00
Travis Nielsen c23238cddb ceph: refactor integration tests for simplification
The integration tests have long been painful to maintain with
settings in various places and copied to multiple types,
inconsistent variable names, and otherwise difficult to maintain
code. Now the settings for a test suite are all in one place and
they remain in the same settings type throughout the test.
The multi-cluster suite is also refactored to use the same install
and uninstall helpers as the other suites.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-03-17 11:26:10 -06:00
Sébastien Han 31db03fece ceph: auto-gen crds
Finally! We can now stop editing manually our crds definition. Simply
run `make crds-gen`. These two files:

* `cluster/examples/kubernetes/ceph/crds.yaml`
* `cluster/charts/rook-ceph/templates/resources.yaml`

will be autogenerated for us.

We rely on the controller-gen tool, it reads our API definitions from
`pkg/apis/` and produces the CRD files accordingly.

It uses "markers" to add extra yaml fields to the CRD, for instance we
have a lot fields with:

```
nullable: true
x-kubernetes-preserve-unknown-fields: true
```

The corresponding API type markers are:

```
// +kubebuilder:pruning:PreserveUnknownFields
// +nullable
```

For more API convention see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required
and for the markers see: https://book.kubebuilder.io/reference/markers/crd-validation.html

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-16 09:16:24 +01:00
Sébastien Han cc822a531c ceph: add more osds to the ci
We now create 3 disks which will give us 2 OSDs and potentially help us
to catch more errors in our scenarios, especially on iterations.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-09 15:24:35 +01:00
Sébastien Han 128dc4cb79 Merge pull request #7325 from subhamkrai/cert-manager
ceph: use cert-manager for admission webhooks
2021-03-09 10:38:27 +01:00
subhamkrai d594a6c904 ceph: remove config-admission-controller.sh
this commit removes file `config-admission-controller.sh`
as we don't need this anymore and update the doc to point
`tests/scripts/deploy_admission_controller.sh` to start
admission controller.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-05 16:39:52 +05:30
subhamkrai 40a99a20ff ceph: webhook check if one of port or securePort are non-zero
this commit adds new crd to admission webhooks to check
if one of the port or securePort are set to non-zero
value in objectstore crd.

If both are set to 0 in crd we'll see error like
```
Error from server (invalid create: either of port or securePort
fields should be not be zero): error when creating "object-test.yaml":
admission webhook
"cephobjectstore-wh-rook-ceph-admission-controller-rook-ceph.rook.io"
denied the request: invalid create: either of port or securePort fields
should be not be zero.
```

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-03 21:22:04 +05:30
subhamkrai 8b6ec60653 ceph: use cert-manager for admission webhooks
we are now using cert-manager for certificates
instead of a self-signed certificate for admission
webhooks.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-03 20:22:53 +05:30
subhamkrai afed5bf109 ci: fix codegen err
codegen is currently broken in master.
this commit fix the broken codegen by fixing
the correct working directory in gh action.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-03-01 10:29:26 +05:30
Travis Nielsen 043f947321 build: remove yugabytedb operator
The YugabyteDB team has decided to move support of their operator
to a new repo at https://github.com/yugabyte/yugabyte-operator.
The operator in Rook is no longer needed. Further usage of
the YugabyteDB operator is recommended at the new location.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-06 00:03:41 -07:00
Sébastien Han 685e0a7a55 ceph: fail of any codegen files are found
If any files are found after running `make codegen` we fail.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-01 15:13:37 +01:00
Sébastien Han c0123cf182 ceph: add cephfs mirroring support
With Ceph Pacific, Rook can now deploy the cephfs-mirror daemon.
This initial commit covers the deployment of a single daemon only.
Multiple mirror daemons is currently untested.
Only a single mirror daemon is recommended.

The configuration of peers will come in a later PR since the mgr module
is still pending upstream: https://github.com/ceph/ceph/pull/39050

The same goes for integration tests, they will get added later once we
start testing on Pacific.

Closes: https://github.com/rook/rook/issues/7002
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-01-28 19:21:18 +01:00
Sébastien Han 720380e3d3 Merge pull request #7024 from travisn/remove-cockroachdb
build: Remove the CockroachDB operator from Rook
2021-01-25 10:04:44 +01:00
Jiffin Tony Thottan 968b002a6f test: validation test for RGW vault authentication
Extending existing deploy-validate-vault.sh to include RGW as well

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-01-22 10:44:17 +05:30
subhamkrai 9898e00ac5 ceph: update admission controller to v1 from v1beta1
this commit update admission controller to v1 from
v1beta1. v1beta1 is deprecated in v1.16+ and unavailable
in v1.22+.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-21 22:26:02 +05:30
Travis Nielsen 2294851ca3 build: remove the cockroachdb operator from rook
The cockroachDB operator has not had community support in Rook.
Therefore, the time has come to deprecate and remove it.
If the sources are still needed, there is always git history.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-20 17:28:58 -07:00
subhamkrai fcd1529b23 ci: add option to download artifacts in canary test
this commit add option to download artifacts in
canary integration test for better debug.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-12 21:06:30 +05:30
Sébastien Han 05fe296436 Merge pull request #6825 from binoue/rename-webhooks
ceph: rename webhooks
2021-01-07 09:08:14 +01:00
subhamkrai f2ea2daf07 ceph: remove extra space
this commit removes extra space from
func test_csi.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-05 14:58:35 +05:30
subhamkrai 6ea06713b6 ceph: remove leftover line
this commit removes the leftover line from PR #6800.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-01-05 10:46:51 +05:30
binoue 70ed282cc4 ceph: rename webhooks
Currently, ValidatingWebhookConfiguration has two same named webhooks.
This causes kube-apiserver to create error logs

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-12-25 17:21:26 +09:00
subhamkrai 24c3002307 ci: minor update to validate script
canary test failing because the validate
script not updating the argument passed.

Signed-off-by: subhamkrai <srai@redhat.com>
2020-12-10 13:12:39 +05:30
Shachar Sharon 0786b72752 test: avoid minikube deprecated option
Minikube deprecates '--vm-driver' option. When user starts new minkube
run with '--driver=xxx', the test will fail and cause him to use the wrong
default value of 'virtualbox'.

Tested with minikube=v1.15.1, driver=kvm2 on Fedora32.

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2020-11-26 18:16:49 +02:00
Shachar Sharon 72791c7151 test: use proper shell variable in minikube script
Users may prefer to use docker alternatives, by setting DOCKERCMD
variable, which is set by 'common.sh'. Use it in 'copy_image_to_cluster'
instead of plain 'docker'.

Tested with DOCKERCMD=podman (podman-2.1.1).

Signed-off-by: Shachar Sharon <ssharon@redhat.com>
2020-11-26 18:16:42 +02:00
Sébastien Han 38e475601b ci: probe the device and wait for udev
When we are done creating the partitions it's good to give the kernel
some time to reprobe the device and for udev to finish syncing up.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-18 12:16:14 +01:00
Sébastien Han dcd84e63ac ci: use sudo test if the device is a block
Permissions on the disk might changed due to the partitions being
created. So the CI user is not able to read the device correctly.

Closes: https://github.com/rook/rook/issues/6580
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-11-18 12:15:57 +01:00
Pete Birley 152a05c85e ceph: update to helm 3 for the rook chart
This updates the chart to make use of helm3 which has been released
for some time, and also permits CRDs to be installed pror to other objects
allowing the chart to be deployed at the same time as CRs for rook objects.

Co-authored-by: Pete Birley <pete@port.direct>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-11 14:41:24 -07:00
Mateusz Gozdek 8ba3762fa4 docs: fix bunch of typos
Found by running the following command:

codespell -S .git,*.png,*.jpg -L \
aks,keyserver,atleast,dne,ser,ist,files\',ba,dum,iam,te -f -H

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-06 10:01:04 +01:00
Sébastien Han 3403776c3e ci: add more osd on pvc scenario
Add the following scenario:

* simple osd on pvc
* osd on pvc with db device
* osd on pvc with wal device
* encrypted simple osd on pvc
* encrypted osd on pvc with db device
* encrypted osd on pvc with wal device

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:17:10 +01:00
Sébastien Han ea1d71cbfb ceph: add vault kms support for osd encryption
When the Ceph cluster runs on PVC and the OSDs are encrypted we can
store LUKS's Key Encryption Key inside a Key Management System. Today,
Rook only supports HashiCorp Vault: https://www.vaultproject.io/

The CephCluster has now a new "security" field which will plug onto the
KMS. Here is an example:

security:
  kms:
    tokenSecretName: <name of the secret containing a Vault token, used
    to authenticate>
    connectionDetails: < a map of strings containing connection
    information>

Refer to the ceph-cluster-crd documentation to lear more.

Closes: https://github.com/rook/rook/issues/6105
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-10-30 16:16:33 +01:00
Satoru Takeuchi 9621671e5e ci: remove an unnecessary code
Remove a workaround code of old-Jenkins-file-is-used-in-CI problem.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-10-21 11:08:58 +00:00
Thomas Bechtold 7eae8086e4 ceph: use get.helm.sh instead of storage.googleapis.com
To be able to switch to helm v3, helm itself needs to be downloaded from
get.helm.sh. The old location from googleapis.com will only contain
helm v2 binaries. See [1].

[1] https://helm.sh/blog/get-helm-sh/

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-10-20 14:47:09 +02:00
ZhenLiu94 b83c8e9942 build: fix error when building rook in centos7
if I don't delete arg 'z' in 'tar -zxvf', compile process while return compilation fails in centos7.

Signed-off-by: ZhenLiu94 <zhenliu94@163.com>
2020-10-20 16:31:46 +08:00
Satoru Takeuchi a188a80289 ci: clarify the supported vm-driver of minikube scripts
We can't use vm-drivers other than "docker" or "none" in minikube
scripts. It's because there is no device for OSD.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-10-15 20:11:31 +00:00
Takashi IIGUNI 27c7146526 ci: simplify helm path setting
Download the pre-defined helm by default to make the integration test simpler.
As a result, we can make PATH/TEST_HELM_PATH environment variable optional.
In addition, the default helm path can be simplified that doesn't include arch and os.

Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-10-15 10:09:00 +09:00
Satoru Takeuchi 1b2ccf2b6c ci: remove unnecessary argument of kubeadm-install
The second argument of kubeadm-install.sh is not used.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Satoru Takeuchi a824c253ef ci: update the default Kubernetes version
Update the default Kubernetes version to v1.15.12 that is tested in CI.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-08 15:03:05 +09:00
Sébastien Han 6b11a86bf0 Merge pull request #6193 from satoru-takeuchi/ci-force-reset-test-cluster
ci: reset test cluster without prompting
2020-09-01 09:12:05 +02:00
Satoru Takeuchi 4b764c20b1 ci: reset test cluster without prompting
It's messy to answer `y` everytime in `tests/script/kubeadm.sh clean.`
Since the cluster only exists for testing, it's safe to reset without prompting.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-09-01 14:02:28 +09:00
Sébastien Han 9a06d059f0 ci: change local disk path
With the recent aws instance type the disk naming changed too, so
replace xvdc with nvme0n1.

Closes: https://github.com/rook/rook/issues/6189
Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-31 22:04:46 +02:00
Sébastien Han 04467dd915 ci: print dev info
Try to understand the issue:

invalid scratch device name: /dev/xvdc

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-08-31 22:04:33 +02:00
tenzen-y 1d7d715482 ci: remove unnecessary "rm" command
This commit will remove "sudo rm /usr/local/bin/kube*" and "sudo rm kubectl" in "tests/scripts/kubeadm.sh".
I think that CI-test doesn't make those files.

Signed-off-by: tenzen-y <toyonomajyutushi@yahoo.co.jp>
2020-08-06 05:34:01 +00:00
Takashi IIGUNI 18a28f7dee ceph: use fixed mon directory in ci
It's not necessary to use random string for mon directory.
In addition, current implementation leaves garbage under /var/lib/rook.

Signed-off-by: Takashi IIGUNI <iiguni.tks@gmail.com>
2020-08-05 09:04:34 +00:00
Travis Nielsen 7dcd64f1a2 Merge pull request #5761 from vbnrh/rook-ac-controller-runtime
ceph: implement controller-runtime for admission controllers
2020-07-13 16:31:23 -06:00
Vineet Badrinath 98874ccf4d ceph: implement controller-runtime for admission controllers
moves the admission-controller server to use controller-runtime library for better support, maintainibility of code.

Signed-off-by: Vineet Badrinath <vbadrina@redhat.com>
2020-07-14 01:10:03 +05:30
Travis Nielsen 902762364d Merge pull request #5769 from cybozu-go/tests-fix-aws_1.11.x-test-failure
tests: fix aws_1.11.x test failure
2020-07-06 15:47:09 -06:00
Satoru Takeuchi 2cda00345a tests: fix aws_1.11.x test failure
kubelet in aws_1.11.x test requires kubernetes-cni 0.7.5.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2020-07-07 04:43:45 +09:00
Travis Nielsen dbae36b2bb ceph: update to the latest octopus release
Update the base operator image and cluster examples to use the latest
octopus release v15.2.4. Also cleanup some old examples and unit tests
that were still based on mimic.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-06 12:11:47 -06:00
Travis Nielsen fec3e02bbd ci: only install newer packages
Skip downgrading the kubernetes-cni, kubectl, or other components

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-07-01 16:59:18 -06:00