Commit Graph
157 Commits
Author SHA1 Message Date
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
subhamkrai 14d0c402c8 ci: remove brackets when checking repo
having brackets around if is showing
errors. this commit removes the brackets.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-12 10:52:19 +05:30
Ali Maredia b6404ae2ab ceph: rgw multisite intgration testing
This test:
- starts up 2 minikube clusters
- create 2 ceph clusters
- creates object multisite CRDs on each cluster and
syncs the clusters
- writes an object to cluster 1 and reads it on
cluster 2

This commit also adds new functions in
github-action-helper.sh that aid in the multisite
test and the multi cluster mirroring test.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2021-08-11 13:25:43 -04:00
Travis Nielsen 5f64f5eb15 Merge pull request #8513 from subhamkrai/reduce-tmate-time
ci: reduce tmate session time
2021-08-11 08:17:41 -06:00
subhamkrai ea4a705b1a ci: reduce tmate session time
reduce tmate session timeout to 60min for carnary test
and 30min when push/tag event.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-11 15:53:01 +05:30
parth-gr cad1c5320a ci: CephSmokeSuite test run on kubernetes 1.21
Kubernetes 1.22 version didn't support
certificates.k8s.io v1beta1 version
reverting the k8s 1.22 version to 1.21
till the certificates.k8s.io #8364 Pr
didn't get completed
so the CI can run successfully

Signed-off-by: parth-gr <paarora@redhat.com>
2021-08-10 21:52:28 +05:30
Travis Nielsen 529ec0ff7e Merge pull request #8461 from subhamkrai/automate-release-action
ci: create tag and print release notes
2021-08-06 09:41:11 -06:00
subhamkrai 8572fdb58b ci: create tag and print release notes
since we moved to github action for the release,
we maunally have to push the tag to build image.

with this change,
first, this action will set some
environment variable which will be consume by
the script to print release notes.
then,
it will ask for 1 input from
github UI(in Action tab)
tag: where we'll give the tag for the release

after creating tag it will run the script and
print release notes.

**NOTE** please verify the environment var
and release notes after the successful action run.

.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-06 16:00:25 +05:30
Sébastien Han 796f6d12c8 ci: test on kubernetes 1.22
1.22 just got released. We now bump our tests one version higher too.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-05 09:39:05 +02:00
Sébastien Han 412b3eaf5e Merge pull request #8447 from leseb/fix-8438
ceph: ignore errors when mirroring is not enabled on the filesystem
2021-08-03 16:06:16 +02:00
Sébastien Han 630c2f6a8b ceph: add an rbd-mirror bootstrap token on cluster creation
They are scenarios where the mirroring information want to be shared
between clusters prior to creating pool. Because the bootstrap peer
import command needs a pool name to operate this is not suitable. So
additionally now each time the cluster is reconciled and on any new
clusters a new secret will be created that contains a boostrap peer
token. It can be exchanged with another cluster.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-02 18:34:27 +02:00
Sébastien Han 082858bf53 ceph: use v16 for mirroring test in ci
The CI test for mirroring now runs on stable v16 tag. Internally our
code has a minimum version of 16.2.5 for cephfs mirroring since it's
available.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-30 16:17:08 +02:00
Sébastien Han 99e00dea1e ceph: auto detect vault k/v version
Rook will now auto detect the kv version of the vault server. This
allows users not having to pass the VAULT_BACKEND configuration in the
CephCluster CR.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-29 10:16:31 +02:00
Sébastien Han a62e7e75e7 Merge pull request #8380 from sp98/update-cephblockpool-cr
ceph: add mirroring peer specification to CephBlockPool CRD
2021-07-28 17:34:52 +02:00
Travis Nielsen 87596c6f8e build: detect git version instead of setting to 0
The build version should be detected with the git describe
command, but if the VERSION var is already set, it will be
used instead of being detected from git. During the official
builds or even local builds, we just want to let the makefile
detect the git version.

The full git history is added to enable proper detection of the
version. Without the full history only a hash is returned for
the version, which then results in an invalid semantic version
error for the helm chart.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-28 07:25:10 -06:00
Santosh Pillai 3b50f5fd00 ceph: add MirroringPeerSpec to CephBlockPool.Spec.Mirroring
Instead of having the RBDMirroringPeerSpec in the RBDMirror CRD we want
to move it on the CephBlockPool CRD so that each pool can have its own peer.
This enables pool to re-use an existing peer secret if it points to the
same cluster peer.So we don't need to duplicate secret peer anymore.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-07-28 17:47:36 +05:30
Travis Nielsen 0f797e74ca build: unshallow not needed with fetch-depth 0
The unshallow step in the action is replaced now with the
fetch-depth: 0 option on the checkout@v2 action.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit c6d8df931f)
2021-07-26 17:34:19 -06:00
Travis Nielsen 67a3822e95 build: publish and promote with correct branch name
The tagged builds will run git checkout on the correct tag,
though the publish and promote actions expect a branch name
to be available due to internal build assumptions. Now the
publish looks up the branch name from the tag and passes
it to the publish command as expected.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit d8c5f459de)
2021-07-26 17:34:10 -06:00
Travis Nielsen b9b2391fe9 build: run integration tests on release branch and tags
The integration test actions were not running on the release branch
or tags due to an incorrect condition.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 1052abac30)
2021-07-23 15:46:03 -06:00
subhamkrai 492a8176e0 ci: action for release build
this commit adds github action for
release builds and also modify the
helper script `build-release.sh`.

Closes: https://github.com/rook/rook/issues/8041
Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-23 13:09:30 +05:30
Travis Nielsen e7f44a8f3f build: min version for cassandra and nfs tests is k8s 1.16
The minimum K8s version for v1 CRDs is 1.16. Since support for
v1beta1 cassandra and nfs was removed and only v1 is supported,
the CI will now only run back to 1.16 for those providers.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 15:40:15 -06:00
Travis NielsenandNicolaj Græsholt f114db952b nfs: generate the crds from types for v1
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for nfs for full fidelity of all settings.

Co-authored-by: Nicolaj Græsholt <figaw@hotmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 08:18:05 -06:00
Travis Nielsen 093cf6dbbd cassandra: generate the crds from types for v1
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for cassandra for full fidelity of all the
settings.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 08:18:05 -06:00
subhamkrai bc1fabb6e4 ci: update helm version to 3.6.2
this commit update helm version to `3.6.2`

Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-07 20:09:26 +05:30
Sébastien Han b578f916e7 ceph: add fs mirror config
Similarly to block volume replication, Ceph is capable of replicating the
content of a Ceph Filesystem from one cluster to another.
For this, during the 1.6 cycle, we introduced a new CRD called
CephFilesystemMirror which effectively deploys a cephfs-mirror daemon.
However, configuring peers to enable replication between two clusters
had to be done manually.
Also various bug fix made it in Ceph eventually and the minimum required
version for this to work is to run on Ceph Pacific 16.2.5 at least.

So the automatic configuration of Ceph Filesystem peers is now possible.

By editing the CephFilesystem CRD, you can now turn on mirroring:

```yaml
  mirroring:
    enabled: false
    # list of Kubernetes Secrets containing the peer token
    # for more details see: https://docs.ceph.com/en/latest/dev/cephfs-mirroring/#bootstrap-peers
    peers:
      secretNames:
        - secondary-cluster-peer
```

Also, the mirroring status is displayed in the CR status:

```
status:
  info:
    fsMirrorBootstrapPeerSecretName: fs-peer-token-myfs
  mirroringStatus:
    daemonsStatus:
    - daemon_id: 4186
      filesystems:
      - filesystem_id: 2
        name: myfs
    lastChecked: "2021-07-01T14:16:29Z"
  phase: Ready
  snapshotScheduleStatus:
    lastChecked: "2021-07-01T14:16:29Z"
    snapshotSchedules:
    - fs: myfs
      path: /
      rel_path: /
      retention: {}
      schedule: 24h
```

Closes: https://github.com/rook/rook/issues/7063
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-01 17:35:19 +02:00
subhamkrai d3190c3755 ci: remove read access from kube config
this commit remove read access from kube
config file for group and others.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-28 21:37:11 +05:30
subhamkrai 279fbb0b93 ci: downgrade minikube version from helm suite
this commit downgrades minikube version
from release test for helm suite as
test are failing.

closes: https://github.com/rook/rook/issues/8202
Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-28 10:51:56 +05:30
Sebastian Wagner a411aa015f ci: disable stale workflow on forks
Running the stale workflow is a waste of resources.

Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
2021-06-27 16:59:47 +02:00
subhamkrai f90050c5b2 ci: update versions in the gh action
this commit update the versions in the
action. example minikube, python, commitlint
and others.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-24 23:07:47 +05:30
Travis Nielsen 077ed3f444 Merge pull request #8183 from subhamkrai/timeout-tmate
ci: set tmate for 120min in case of ci failure
2021-06-23 10:52:28 -06:00
Sébastien Han ba04b3eeef ci: wait for the ceph-mgr IP to be available
The ceph-mgr needs some time to come up so we need to wait for an IP
address to be available.

Closes: https://github.com/rook/rook/issues/8126
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-23 09:39:12 +02:00
subhamkrai fb7f4ce33b ci: set tmate for 120min in case of ci failure
this commit enable tmate session for every ci failure
with 120min timeout.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-23 12:31:54 +05:30
Blaine Gardner 76e82e419a Merge pull request #8146 from BlaineEXE/debug-canary-integration
test: add xtrace logging to github actions
2021-06-22 11:55:08 -06:00
Blaine Gardner e71882fd16 test: add xtrace for github action shells
For all Rook-maintained GH actions, use a default shell that has xtrace
enabled to help debug any errors.

Enable xtrace on all actions except these that use only external tools:
- codespell
- commitlint (wagoid/commitlint)
- golangci-lint
- helm-lint (chart-testing)
- stale
- yamllint

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-06-22 10:58:08 -06:00
Sébastien Han e6929ce308 Merge pull request #7913 from abursavich/extract-kk
Remove dependency on k8s.io/kubernetes
2021-06-22 09:22:41 +02:00
subhamkrai b9e1daa9ea ci: restrict canary integration arm64 to run on forked
this commit restrict canary integration arm64 test
to run on rook/rook only(not on forked).

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-22 10:04:43 +05:30
Andy Bursavich 11f0add706 build: update golangci-lint version and nolint comment format
Signed-off-by: Andy Bursavich <abursavich@gmail.com>
2021-06-21 08:50:04 -07:00
subhamkrai 626725b89d ci: add one more kubernetes version in upgrade suite
this commit add one more kubernetes version 'v1.15.12'
in upgrade suite test.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-06-17 08:44:58 +05:30
Sébastien Han b178c8ae2c ci: add arm64 hosted runner
Thanks to @xin3liang we now have 2 hosted runners on ARM64. So let's add
a small integration test for it.
The action will run every day at midnight.

Successful run: https://github.com/rook/rook/pull/7946/checks?check_run_id=2726403458

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-06-02 11:54:43 +02:00
Madhu Rajanna 3a3bfdefb4 ceph: add github action for helm lint
adding github action for helm lint to
catch the static check errors in helm
charts.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-05-26 14:27:59 +05:30
Travis Nielsen e1b64e3624 Merge pull request #7945 from subhamkrai/bump-golang1.16
build: bump to golang version 1.16
2021-05-24 23:20:52 -06:00
Sébastien Han c9f28b85cf Merge pull request #7948 from subhamkrai/nfs-action
nfs: add github action for NFS integration test
2021-05-20 17:37:04 +02:00
Sébastien Han 003e2535b5 ci: wait a bit for the python script to succeed
We still see the CI failing with:

```
Traceback (most recent call last):
  File "/etc/ceph/create-external-cluster-resources.py", line 801, in <module>
    raise err
  File "/etc/ceph/create-external-cluster-resources.py", line 798, in <module>
    rjObj.main()
  File "/etc/ceph/create-external-cluster-resources.py", line 779, in main
    generated_output = self.gen_json_out()
  File "/etc/ceph/create-external-cluster-resources.py", line 613, in gen_json_out
    self._gen_output_map()
  File "/etc/ceph/create-external-cluster-resources.py", line 598, in _gen_output_map
    self.out_map['MONITORING_ENDPOINT_PORT'] = self.get_active_and_standby_mgrs()
  File "/etc/ceph/create-external-cluster-resources.py", line 389, in get_active_and_standby_mgrs
    self.endpoint_dial(monitoring_endpoint)
  File "/etc/ceph/create-external-cluster-resources.py", line 245, in endpoint_dial
    "unable to connect to endpoint: {}".format(endpoint_str))
__main__.ExecutionFailureException: unable to connect to endpoint: 172.17.0.7:9283
command terminated with exit code 1
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-20 09:44:49 +02:00
subhamkrai a19a7f90e1 nfs: add github action for NFS integration test
this commit add github action for NFS
integration test.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-20 10:53:14 +05:30
subhamkrai de96a14e31 ci: restrict push image build action to run on fork
this commit restrict push image build action to run on
fork repo.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-19 13:37:35 +05:30
subhamkrai bf7b4609b1 build: bump to golang version 1.16
this commit bump to golang version 1.16.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-19 13:35:20 +05:30
Travis Nielsen f61083bb2b Revert "ci: restrict push image build action to run on fork"
This reverts commit e0206c56d5.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-05-18 11:39:58 -06:00
subhamkrai 9d8853d49a ci: add missing tag in master push images
tags are missing in master pushed images
to shallow problem. this commit add command
to unshallow.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-18 12:14:17 +05:30
Sébastien Han ffd263c539 Merge pull request #7891 from leseb/wait-for-prom
ceph: wait for the prometheus module to be ready
2021-05-12 17:22:45 +02:00
Sébastien Han cc763df671 ceph: wait for the prometheus module to be ready
Before running the external script test let's make sure the prometheus
exporter is loaded. We often see in the CI errors like:

```
  kubectl -n rook-ceph exec $(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[0].metadata.name}') -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool
  shell: /bin/bash -e {0}
  env:
    GOROOT: /opt/hostedtoolcache/go/1.16.4/x64
    MINIKUBE_HOME: /home/runner/work/_temp
Execution Failed: unable to connect to endpoint: 172.17.0.10:9283
Traceback (most recent call last):
  File "/etc/ceph/create-external-cluster-resources.py", line 801, in <module>
    raise err
  File "/etc/ceph/create-external-cluster-resources.py", line 798, in <module>
    rjObj.main()
  File "/etc/ceph/create-external-cluster-resources.py", line 779, in main
    generated_output = self.gen_json_out()
  File "/etc/ceph/create-external-cluster-resources.py", line 613, in gen_json_out
    self._gen_output_map()
  File "/etc/ceph/create-external-cluster-resources.py", line 598, in _gen_output_map
    self.out_map['MONITORING_ENDPOINT_PORT'] = self.get_active_and_standby_mgrs()
  File "/etc/ceph/create-external-cluster-resources.py", line 389, in get_active_and_standby_mgrs
    self.endpoint_dial(monitoring_endpoint)
  File "/etc/ceph/create-external-cluster-resources.py", line 245, in endpoint_dial
    "unable to connect to endpoint: {}".format(endpoint_str))
__main__.ExecutionFailureException: unable to connect to endpoint: 172.17.0.10:9283
command terminated with exit code 1
```

but then when we log into the runner, we can see the command works.
So let's wait a little bit for the module to be up.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-05-12 14:59:57 +02:00