Commit Graph
246 Commits
Author SHA1 Message Date
Michael Adam e34c41ce2c build: fix S5CMD_ARCH calculation
In image building, when building on arm based systems,
the s5cmd tool was added with the wrong architecture
(amd64 instead of arm64).

This change fixes the architecture of the s5cmd to match the
architecture of the image built.

Fixes: #15262

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-15 18:23:04 +01:00
Michael Adam 0649cd38ac build: move a Makefile comment to a more appropriate place
in the image building Makefile, a comment explaining the construction
of the operator-sdk download URL was in a wrong place.

Now it is moved to the lines that it actually explains.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-15 18:17:25 +01:00
TomHellier a87843de62 build: update s5cmd to resolve vulnerabilities
The docker.io/rook/ceph image contains vulnerabilities in the s5cmd binary.
A new version of s5cmd was released on 16th December which resolves these issues.

Signed-off-by: TomHellier <me@tomhellier.com>
2024-12-17 12:12:52 +00:00
Travis Nielsen 4e2447277f multus: install ip tool for multus
The ceph base image removed the ip tool, so we add
it into the rook image.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 11:19:37 -06:00
Travis Nielsen e26920a483 manifest: update the ceph recommended version to v18.2.4
Since Reef v18.2.4 is released, set it to the default
ceph version that is deployed with Rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 11:06:09 -06:00
parth-gr 5387ef16fd external: add support for config file in external mode
Now user can pass the cli flags using config file and
also command line argument,
if mentioned at both the place priority is given to
command line argument

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-06-26 17:07:49 +05:30
Blaine Gardner c4e99c1462 build: remove iproute build dependency on centos repo
Multus requires that the 'ip' tool be installed in the Rook image.
Today, it is present in the upstream Ceph base image that is used, but
that is expected to change in the future. The Ceph project intends to
switch to CentOS 9 minimal images, and the 'ip' tool will likely be
removed from the base image at that point.

However, Rook CI has occasionally had issues with the current 'dnf
install' command when CentOS repos go down, or when there is otherwise
some problem. Because the package is already installed today, there is
no need to hamstring Rook builds when CentOS is having problems. But we
do want to make sure that Rook builds don't silently succeed in the
eventual future when 'ip' tool is removed from the Ceph image.

For now, replace the 'dnf install' with a check to verify that 'ip' tool
is installed, and add a shorter form of this note as a comment above it
to help Rook maintainers know how to resolve future 'ip' tool removal.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-06-03 14:38:10 -06:00
subham rai b3b6775cf9 Merge pull request #13906 from subhamkrai/remove-csv-files
build: remove csv related files
2024-03-20 19:01:48 +05:30
Travis Nielsen 026d745f8a core: set default ceph version to v18.2.2
With the release of Reef v18.2.2 we update the default
recommended version of Ceph to fix the prometheus issues
seen with v18.2.1

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-03-11 11:06:59 -06:00
subhamkrai dd8c3c9974 build: remove csv related files
remove csv related files/content which are not used/required for
upstream uses.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-03-11 21:01:53 +05:30
Blaine Gardner 072884f451 build: use 'baseos' as repo for iproute install
The rook/ceph Dockerfile uses dnf to ensure iproute (containing the 'ip'
CLI tool) is installed in the Rook image for Multus usage. This comes
from the 'baseos' repo, but if any other repos are unavailable
temporarily, it can cause the container build to fail.

Use the '--repo baseos' flag to help prevent these kinds of failures.
Additionally, this will speed up the build slightly since it does not
attempt to load any non-necessary repos.

This change may make the container build slightly fragile in the future
if CentOS changes the name of its baseos repo, or if the Ceph image
switches to a non-CentOS base image.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-03-04 11:08:48 -07:00
Scott Miller d12478beb3 build: add ability to stash docker build context
This commit gives builders the necessary tooling to save off a docker build context for use
with other tools that dont follow the same command format as $DOCKERCMD.

Signed-off-by: Scott Miller <smiller1@coreweave.com>
2024-02-29 15:48:00 -05:00
Blaine Gardner 01d7b22cf1 build: update base and manifests to ceph v18.2.1
Update Rook operator base image and example manifests to the latest Ceph
version released late last week v18.2.1.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-12-18 11:27:52 -07:00
Alexander Trost fcf52207f8 build: use /usr/bin/env to look up script interpreters
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2023-11-21 14:38:22 +01:00
Blaine Gardner db1ca8c93e multus: use rook image for ip range detection
Use the Rook image (defined by the operator pod) to detect the Multus
network address ranges. It is reasonable for users to want to have a
minimal Ceph image that does not have the `ip` utility installed, which
is used for detecting the address ranges of multus interfaces. Instead,
use the Rook image, which Rook can ensure has the `ip` tool if Ceph ever
removes it from their image.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-11-08 10:11:04 -07:00
travisn fdb72adb8f core: update operator base image to reef
Reef object store configuration may have issues due to
the operator base image being Quincy, while trying
to deploy a Reef cluster. There appear to be forward
compatibility issues with the radosgw-admin command.
Now the base image is updated to v18.2.0 to better
handle the compatibility across ceph versions.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-25 15:26:16 -06:00
cef43e1155 build: update s5cmd to version v2.2.1
This is the latest available version.
The previously used version v2.0.0 was very outdated.

Fixes: #12883

Co-authored-by: subham rai subhamkrai <srai@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Subham Rai subhamkrai <srai@redhat.com>
  signed-off-by: Travis Nielsen <tnielsen@redhat.com>
    Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2023-09-15 16:16:47 +02:00
Jiffin Tony Thottan b48dc8a335 object: intial cosi driver controller design
Adding CephCOSIDriver CRD and controller. The controller will bring up
the ceph cosi driver when first object store is created in the rook
operator namespace. Then admin can defined COSI CRDs like BucketClass
and BucketAccessClass for different object stores deployed via Rook.
Using the BucketClass and BucketAccessClass, user can define
BucketAccess for backend bucket in the RGW. The CephCOSIDriver CRD
defines configuration options for ceph cosi driver. In the first version
its usability is minimal. Even if it is not defined Rook will bring up
the ceph cosi driver with default values.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-07-18 22:49:41 +05:30
travisn 609ac91cb1 core: update default image to ceph v17.2.6
With the release of ceph v17.2.6, the examples and the base
image for the operator are updated to pick up the latest
and greatest.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-04-11 14:07:11 -06:00
Alexander Trost ecb6ba7383 build: allow overriding variables from a dot env file
This helps forks build custom rook releases more easily by allowing
certain Makefile vars to be overwriten using a `.env` file.
In addition this introduces the `DOCKERCMD` var to the
`build/release/Makefile`.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2023-03-31 11:34:07 -04:00
subhamkrai 4699e8885a build: add rbac which are required
adding necessary rbac and also updating
csv-gen script.

Closes: https://github.com/rook/rook/issues/10141
Signed-off-by: subhamkrai <srai@redhat.com>
2023-02-17 23:00:03 +05:30
subhamkrai 45a10dcb85 core: upgrade to latest operator-sdk v1.25.0
upgrading to latest operator-sdk later version
and changing the way of csv generation.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-02-13 17:08:09 +05:30
Travis Nielsen 4f77664862 manifest: toolbox and jobs mount secret volume
The toolbox, toolbox job, and osd prepare jobs need to mount the
ceph admin keyring as a file instead of using an env var.
The toolbox script will still allow setting of the env var
for backward compatibility, though all the examples are now
updated to use the keyring as a file.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-12-14 21:44:59 -07:00
Pratik Raj db9bd9f918 security: update "s5cmd" to "v2.0.0"
update "s5cmd" to "v2.0.0" as "1.4.0" was built using go v1.16 and has many vulnerabilities

Resolves #11176

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2022-10-27 14:56:15 +05:30
subhamkrai 270b565f18 core: upgrade ceph to latest release v17.2.5
Signed-off-by: subhamkrai <srai@redhat.com>
2022-10-26 19:59:53 +05:30
Travis Nielsen f02fadc531 manifest: update default version of ceph to v17.2.3
For the Rook v1.10 release we want the latest version of Quincy to
be the default deployment. Updating to v17.2.3 with the latest
patch release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-11 16:55:03 -06:00
Travis Nielsen 4d8cbaac83 build: remove obsolete image base var
The OSBASE and OSBASEIMAGE are obsolete from an older version
of rook where Ceph was not the base image. Now that Ceph provides
the base image, there is no need for these vars in the makefile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-07-26 11:57:49 -06:00
Travis Nielsen eb08b009ba build: update to latest quincy release 17.2.1
With the latest quincy release, we update the operator base image
and examples to use 17.2.1

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-06-24 15:57:19 -06:00
parth-gr 38dcf09843 build: update examples and base image to use ceph v17.2.0 quincy version
The operator base image has been changed to
ceph v17.2.0 quincy release version `quay.io/ceph/ceph:v17.2.0`

Closes: https://github.com/rook/rook/issues/10140
Signed-off-by: parth-gr <paarora@redhat.com>
2022-06-07 12:55:47 +05:30
Madhu Rajanna 15da42cf0c csi: change sidecar images repo to new link
Change sidecar images repo to registry.k8s.io
which is a redirect to k8s.gcr.io.

Ref: https://github.com/kubernetes/k8s.io/wiki/
New-Registry-url-for-Kubernetes-(registry.k8s.io)

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-06-06 11:02:38 +05:30
parth-gr 09d52511ad rgw: validate rgw endpoint ip
The ceph-external-cluster-details-exporter.py
generates the json output even with
rgw-endpoint IP from different cluster
Added a check validate_rgw_endpoint which will validate
the above rgw_endpoint Ip by matching the cluster fsid

Signed-off-by: parth-gr <paarora@redhat.com>
2022-05-11 19:52:30 +05:30
Madhu Rajanna 52c8211e43 csi: use k8s.gcr.io for csi nfsplugin image
use k8s.gcr.io like other kubernetes sidecar
image to pull the nfsplugin image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-13 11:54:35 +05:30
Rakshith R 34162c3dc5 csi: add nfs nodeplugin daemonset
This commit adds nfs nodeplugin daemonset.
This will allow rook to deploy nfs nodeplugin
which can mount/unmount nfs volumes.

refer:
- https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/nfs.md
- https://github.com/kubernetes-csi/csi-driver-nfs

Signed-off-by: Rakshith R <rar@redhat.com>
2022-04-12 11:07:38 +05:30
Travis Nielsen 738a300827 build: remove obsolete cross build container
The cross build container is not used anymore since the conversion
to github actions. Now the obsolete scripts and makefiles are
cleaned up to remove some confusing leftovers from the
cross container.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-04-07 13:42:18 -06:00
Travis Nielsen d86bb78f11 build: add volume replication crds to csv ownership
The volume replication crds are not owned by rook, but if installing
with the csv, ownership must be specified for the CRDs. Thus, we limit
ownership to the csv for the volume replication crds.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-09 15:53:43 -07:00
Travis Nielsen a98678585a build: update ceph base image to v16.2.7-20220216
The latest ceph image should be used for the base of
the rook image to pick up the latest security releases.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-28 11:21:49 -07:00
Sébastien Han 0a918814ea core: bump to ceph 16.2.7
ceph 16.2.7 is out so let's use it in our manifests.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-08 17:24:56 +01:00
Blaine Gardner 2c4b66957c build: generate CSV from helm charts
In order to generate common.yaml from Helm charts, we have to have a
different way of generating CSV than from meta-comments in common.yaml.
This implementation changes what appears in the CSV's RBAC somewhat, but
these changes could be considered bugs fixed by using the new Helm
generation method.
- a few PSP related resources are removed from CSV
- resources related to 'rook-ceph-purge-osd' Job are added to CSV
- ClusterRoleBinding 'rook-ceph-object-bucket' is added to CSV

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-11-30 08:35:54 -07:00
Blaine Gardner 51fc36d591 build: prevent parallel build collisions for ceph
Prevent parallel build collisions in the 'ceph' image by building
prerequisites for the builds before running the build targets in
parallel. Build targets can collide and try to create the same target at
nearly the same time, causing failures.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-11-30 08:09:24 -07:00
Blaine Gardner 113e2f849d build: use yq for RBAC yaml parsing
Use yq instead of Python for parsing RBAC from the Helm chart. We need
to use yq v4.14.1 or higher to fix yq's handling of the yaml header
markers ('---'). Update the Makefile's yq version to v4, which also
requires updating the script to update the CRDs. This was quite easy.

It is very difficult, however, to change the version of yq used by the
CSV generating/parsing scripts, which already used their own yq
download. Continue using yq v3 for this.

In order to make sure the scripts are using the right version of yq, add
basic validation to them to verify they are running v3 or v4 as required
for their operation.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-11-30 08:08:08 -07:00
Sébastien Han c890710b63 core: change directory layout
As per discussion, proposing a new layout for the charts/yaml/olm files.

./deploy
├── charts
│   ├── rook-ceph
│   │   └── templates
│   └── rook-ceph-cluster
│       └── templates
├── examples
│   ├── csi
│   │   ├── cephfs
│   │   └── rbd
│   ├── flex
│   ├── monitoring
│   ├── pre-k8s-1.16
└── olm
    └── assemble

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-30 09:12:53 +01:00
Sébastien Han 619f5eee6e build: revert "build: images/cross/Dockerfile to reduce vulnerabilities"
This reverts commit ceec0bc48c. The build
is failing to push images to master. This is not a critical update so
let's remove.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-25 14:53:21 +01:00
snyk-bot ceec0bc48c build: images/cross/Dockerfile to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-UBUNTU1604-LIBGCRYPT20-1585790
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-25 11:59:22 +01:00
snyk-bot 38b2af711a build: images/cross/Dockerfile to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-UBUNTU1604-LIBGCRYPT20-1585790
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131
- https://snyk.io/vuln/SNYK-UBUNTU1604-SYSTEMD-1320131

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-24 15:38:15 +01:00
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
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
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 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
Travis Nielsen 9655e3a21e Merge pull request #8927 from synarete/aarch64-graviton
build: support build of rook on aarch64 (AWS/graviton)
2021-10-20 07:55:20 -06:00