Commit Graph
7961 Commits
Author SHA1 Message Date
Satoru Takeuchi 77e7c249cc core: remove unnecessary option
rook command doesn't interpret `logtostderr` option. It's OK to just
remove this option because `capnslog` outputs all logs to stdout
by default. It's better to keep `AddGoFlagSet()` call because
some libraries might define their own flags with Go's `flag` package.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-11-15 11:53:45 +00:00
Sébastien Han 7d87de838e Merge pull request #8994 from parth-gr/external-cluster-permission
security: update auth permissions for external cluster
2021-11-15 12:32:39 +01:00
Sébastien Han ecd7fa7880 Merge pull request #9164 from y1r/add-context-k8sutil-pod
core: add context parameter to k8sutil pod
2021-11-15 11:58:36 +01:00
Sébastien Han 460cfad0de Merge pull request #9160 from y1r/add-context-k8sutil-deployment
core: add context parameter to k8sutil deployment
2021-11-15 11:44:20 +01:00
Yuichiro Ueno 0559977b8a core: add context parameter to k8sutil pod
This commit adds context parameter to k8sutil pod functions. By this, we
can handle cancellation during API call of pod resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-11-13 15:39:41 +09:00
Yuichiro Ueno e278812cc1 core: add context parameter to k8sutil daemonset
This commit adds context parameter to k8sutil daemonset functions. By
this, we can handle cancellation during API call of daemonset resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-11-13 15:09:31 +09:00
Yuichiro Ueno 0b575703c7 core: add context parameter to k8sutil deployment
This commit adds context parameter to k8sutil deployment functions. By
this, we can handle cancellation during API call of deployment resource.

Signed-off-by: Yuichiro Ueno <y1r.ueno@gmail.com>
2021-11-13 14:58:13 +09:00
Travis Nielsen c3b5d3b078 Merge pull request #9155 from travisn/latest-doc-links
docs: Fix the links from docs to github examples in master branch
2021-11-11 17:27:47 -07:00
Travis Nielsen 839fdfe95d docs: fix the links to examples in master branch
With the recent rename of master docs to the latest docs,
the links from the docs back to github need to be generated
with the latest url instead of master.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-11 15:32:29 -07:00
Travis Nielsen 480c7f89f2 Merge pull request #9147 from Madhu-1/fix-emp-link
doc: fix ephemeral link for rbd pod
2021-11-11 07:52:27 -07:00
Madhu Rajanna 953cabf999 docs: fix ephemeral link for rbd pod
fixed the ephemeral link for the rbd pod.
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-11-11 20:04:55 +05:30
parth-gr 7d106c8e21 security: adding a cluster name suffix on ceph auth
Current auth names are inadequate for a ceph cluster
serving storage to muliple Openshift clusters
Added a clusterName as a suffix on ceph auth
principals for external cluster

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1996830
Signed-off-by: parth-gr <paarora@redhat.com>
2021-11-11 19:34:54 +05:30
Travis Nielsen 59729765bf build: default to amd64 arch for the the s5cmd tool
On mac, the docker build was failing due to an unspecified
S5CMD_ARCH. Now we default to build amd64 always and override
it if the arch is arm64.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-10 12:25:57 -07:00
Travis Nielsen 901263f8fd Merge pull request #9137 from travisn/raise-rgw-error
rgw: Raise errors when rgw daemon fails to be created
2021-11-10 10:00:17 -07:00
Travis Nielsen 9ecd0cbc75 rgw: raise errors when rgw daemon fails to be created
The generation of the rgw deployment spec was swallowing errors
if any issues are raised such as the tls cert not being found
as expected in some configurations. We need to fail the reconcile
so the error will be logged and the admin can identify the issue.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-10 09:13:03 -07:00
Sébastien Han f07c944aaa Merge pull request #9128 from travisn/cephfs-helm-expansion
helm: Enable cephfs volume expansion by default
2021-11-10 15:02:39 +01:00
parth-gr fc64ce3fc4 security: update rbd auth permissions for external cluster
The permissions set for ceph auth principals for
external storage are too broad, which leads to
maintenance and security risk
Modified auth principals permissions to specific pools

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1996829
Signed-off-by: parth-gr <paarora@redhat.com>
2021-11-10 14:23:04 +05:30
Blaine Gardner 9e3ee92152 Merge pull request #9081 from subhamkrai/composite-action
ci: use github composition to reduce duplication
2021-11-09 11:36:58 -07:00
Sébastien Han 7a4f3966c4 Merge pull request #9130 from leseb/fix-4968
core: add s5cmd binary to operator image
2021-11-09 17:33:31 +01:00
Sébastien Han 889856b78f core: add s5cmd binary to operator image
The toolbox can now interact with S3 gateways using the `s5cmd` tool.
The binary is only 12M so this does not add up too much to the operator
image size.

Closes: https://github.com/rook/rook/issues/4968
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-09 16:56:30 +01:00
Travis Nielsen 35e3ebd1d2 helm: enable cephfs volume expansion by default
The cluster helm chart missed adding the default setting
for the volume expansion, so now we enable it by default.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-09 07:35:02 -07:00
Travis Nielsen 54d532b623 Merge pull request #9125 from sp98/update-scc
core: add `AllowHostDirVolumePlugin: true` to SCC and remove unused imports
2021-11-09 07:26:28 -07:00
subhamkrai 99358688d8 ci: use github composition to reduce duplication
Using Github Compositoin to reduce the yaml duplication.
https://github.blog/changelog/2021-08-25-github-actions-reduce-duplication-with-action-composition/

Closes: https://github.com/rook/rook/issues/8637
Signed-off-by: subhamkrai <srai@redhat.com>
2021-11-09 16:41:55 +05:30
Blaine Gardner 5a7dee2f63 nfs: restart nfs servers when configmap is updated
When the configuration configmap is updated for a CephNFS server, the
NFS application should restart to ensure it is running with the latest
config.

Fixes #9028

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-11-08 11:01:09 -07:00
Sébastien Han 8cfaedcbf6 Merge pull request #9127 from leseb/fix-9090
ci: wait for kubeproxy to be ready
2021-11-08 18:16:57 +01:00
Sébastien Han 0e26176b54 ci: wait for kubeproxy to be ready
When requesting issuer, we run a local kubectl proxy command which spawn
a proxy server. However, we must wait for the proxy to be ready before
we actually start making requests to it.
Now the CI waits up to 10sec to retrieve the issuer.

Closes: https://github.com/rook/rook/issues/9090
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-08 17:45:53 +01:00
Santosh Pillai 650a451d65 core: remove unused imports
removed unused import of embed package from scc.go file

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-11-08 19:56:47 +05:30
Santosh Pillai 584b3bd328 core: add AllowHostDirVolumePlugin: true to SCC
Adds AllowHostDirVolumePlugin to the go representation of the rook-ceph
SCC for using the hostPath. Also making it consistent with the yaml
representation.

From Openshift docs

For backwards compatibility, the usage of allowHostDirVolumePlugin overrides
settings in the volumes field. For example, if allowHostDirVolumePlugin is
set to false but allowed in the volumes field, then the hostPath
value will be removed from volumes.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-11-08 19:55:54 +05:30
Satoru Takeuchi cd4862a7f7 Merge pull request #9123 from leseb/fix-arm64
ci: fix arm64 job
2021-11-08 20:19:11 +09:00
Sébastien Han dd351a914a Merge pull request #9122 from leseb/error-on-failure
core: fail if config dir creation fails
2021-11-08 09:51:51 +01:00
Sébastien Han d081a3e764 ci: fix arm64 job
They are no arm64 packages for ceph-nfs so we must skip this validation
for the nightly arm64 CI job.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-08 09:18:23 +01:00
Sébastien Han 10a114a45a core: fail if config dir creation fails
If the operator fails to create the operator's configuration directory
then we should fail the Operator.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-08 08:48:35 +01:00
Travis Nielsen 6f4a68c81f Merge pull request #9116 from travisn/osd-prepare-cleanup-timeout
osd: Increase wait timeout for osd prepare cleanup
2021-11-05 15:11:09 -06:00
Travis Nielsen 427996a7c0 osd: increase wait timeout for osd prepare cleanup
When a reconcile is started for OSDs, the prepare jobs are first
deleted from a previous reconcile. The timeout for the osd prepare
job deletion was only 40s. After that timeout, the reconcile attempts
to continue waiting for the pod, but of course will never complete
since the OSD prepare was not running in the first place, causing the
reconcile to wait indefinitely. In the reported issue, the osd prepare
jobs were actually deleted successfully, the timeout just wasn't long
enough. Pods need at least a minute to be forcefully deleted,
so we increase the timeout to 90s to give it some extra buffer.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-05 14:20:43 -06:00
Sébastien Han 3b85de420f Merge pull request #8744 from leseb/fix-8734
ceph: run operator with rook user
2021-11-05 17:56:54 +01:00
Sébastien Han d06a6f93a5 core: run operator with rook user
The rook operator as well as the toolbox pod run with the "rook" user
with UID 2016. The UID was chosen based on the year of the initial
commit in the rook/rook repository.
No more root user running.

Closes: https://github.com/rook/rook/issues/8734
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-05 17:22:04 +01:00
Sébastien Han 1294d511fc Merge pull request #9086 from leseb/build-for-linux-only
build: only produce binary for linux
2021-11-05 17:18:16 +01:00
Travis Nielsen be48cc8028 Merge pull request #9107 from travisn/ec-maximum
pool: Allow more data chunks in an ec pool
2021-11-05 10:13:06 -06:00
Travis Nielsen 53b6c7128e pool: allow more data chunks in an ec pool
The schema has a limit of 9 data and 9 coding chunks in an EC pool.
While not typically recommended, more data chunks may be desired.
Ceph does not have a limit, so we match the behavior and also
allow any number of desired chunks to be specified.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-05 08:27:46 -06:00
Travis Nielsen 6dc0cc54b9 Merge pull request #8426 from yuvalif/ceph-bucket-notifications
ceph: support bucket notifications for object storage
2021-11-04 17:35:08 -06:00
Blaine Gardner 685cf0e6d7 Merge pull request #9092 from leseb/fix-bound_service_account_names
osd: use multiple service account for vault role
2021-11-04 16:00:20 -06:00
Blaine Gardner cd480df581 Merge pull request #9112 from BlaineEXE/allow-push-image-build-on-tag-again
Revert "ci: trigger push build action after tag creation"
2021-11-04 14:48:36 -06:00
Blaine Gardner 30e02c1063 Revert "ci: trigger push build action after tag creation"
This reverts commit c53304c3b4.

After experimenting with this release, we have found that the
`workflow_run` action source doesn't work for branches. The
documentation was updated with this PR and has more detail.
https://github.com/github/docs/pull/531

For now, we will revert back to using on.push.tags = ["v*"]

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-11-04 14:40:37 -06:00
Travis Nielsen 41ef578859 Merge pull request #9055 from humblec/ephemeral
ceph: support ephemeral volumes with Ceph CSI RBD and CephFS driver
2021-11-04 09:03:56 -06:00
Sébastien Han be1c5931ed Merge pull request #9098 from travisn/consistent-downgrade
core: Allow downgrade of all daemons consistently
2021-11-04 15:41:15 +01:00
Sébastien Han 16729e0e38 osd: use multiple service account for vault role
We can pass bound_service_account_names with a comma separated list of
service accounts. Let's do this instead of remapping new values.
Earlier, we thought a single service account could be added per Vault
role and we were using other variables like
`VAULT_AUTH_KUBERNETES_ROOK_OPERATOR_ROLE` that we were remapping to
`VAULT_AUTH_KUBERNETES_ROLE` internal for the API calls to Vault.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-04 15:15:46 +01:00
Sébastien Han 6fb67a297d build: only produce binary for linux
We now build rook to build only for linux platforms and not darwin nor
windows anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-04 15:13:40 +01:00
Sébastien Han e08755ef61 build: make CGO_ENABLED configurable
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-04 15:13:40 +01:00
Yuval Lifshitz 71ed45b69b rgw: implement bucket notifications for object storage
following the design from here:
https://github.com/rook/rook/blob/master/design/ceph/object/ceph-bucket-notification-crd.md

Closes: https://github.com/rook/rook/issues/5313
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2021-11-04 11:20:40 +02:00
Travis Nielsen 0c6ed25c4e core: allow downgrade of all daemons consistently
In the event a ceph image is specified that is lower than the current running
version of the daemons, the downgrade is allowed, even if not technically
supported. All of the core daemons (mon,mgr,osd) were being downgraded,
but the daemons for other controllers (rgw,mds,rbdmirror) were not being
downgraded, resulting in an inconsistent cluster. Now we log that the downgrade
is not supported and all all of the daemons to be downgraded.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-11-03 17:03:39 -06:00