Commit Graph
166 Commits
Author SHA1 Message Date
Michael Adam 5c39ac537a build: remove broken make target lint
The lint make target is not used anywhere in the codebase and is particular not run in the CI.
It was recently discovered that `make lint` does not even work at all.
It was subsequently suggested to remove the broken and unused target altogether.

This change settles that issue by removing the lint target and the preparatory
 golint installation target.

Fixes: #15317

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-24 18:20:49 +01:00
9e725b6214 build: upgrade codegen tooling to the latest version
This includes and is based on the changes of:

https://github.com/rook/rook/pull/14894

Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: subhamkrai <srai@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>

Fixes: #14894
2024-12-04 21:00:10 +01:00
Michael Adam 9ecd6a2500 build: support golang 1.23
Signed-off-by: Michael Adam <obnox@samba.org>
2024-09-23 18:07:01 +02:00
Blaine Gardner 5da7feb9d7 test: fix 'make test' on arm mac
make test was failing when running on arm macbooks. Fix it so that it
isn't running with hardcoded GOOS=linux.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-08-20 11:19:12 -06:00
subhamkrai d116429f75 build: upgrade to go 1.22
this commit upgrade to go 1.22 in go mod file and ci related files.
Also remove go 1.21 support

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-03 17:01:33 +05:30
Michael Adam 212ecb6a0f build: update to use the latest version of go-junit-report
`make test` failed for me on MacOS with this error:

```console
$ make test

...

=== installing go-junit-report
tar: Error opening archive: Unrecognized archive format
make[2]: ***
$
```

So it seems the version v2.0.0 of go-junit-report has a broken source
tarball

Going to the latest version v2.1.0 fixes the problem for me.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-06-04 17:45:31 +02:00
subhamkrai 43e0c1cdb3 build: add support for go 1.22
Few day's back go 1.22 is release. Let's add that
as valid version to build on. Also, adding 1.22 as
test matric for linux build CI.

https://tip.golang.org/doc/go1.22

Signed-off-by: subhamkrai <srai@redhat.com>
2024-03-27 10:34:21 +05:30
subhamkrai 0c115927e1 build: remove go1.20 support and default to go1.21
Signed-off-by: subhamkrai <srai@redhat.com>
2023-12-19 11:55:03 +05:30
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
travisn 0e0598c155 build: add go modules for apis subdir
To keep the go dependencies minimal, add the go packages
just for the pkg/apis directory. Projects that only reference
the rook apis can then have a smaller footprint for Go
dependencies.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-10-26 16:25:56 -06:00
subhamkrai e9cc7ed7b9 build: update go version to 1.21 from 1.20
Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-25 12:23:21 +05:30
travisn 1a4917de78 build: remove go modules under apis directory
The go package dependencies (go.mod and go.sum) were created
under the pkg/apis directory to simplify the dependencies for
other projects referencing the rook repo. The downside is that
the dependabot can no longer open a working and valid PR since
the bot is not aware of the go.mod and go.sum in the apis directory.

Since the reduction of dependencies for vault in #12455,
the list of extra dependencies is not quite so extensive.
We are putting effort into shrinking the dependency list instead
of using the modules files in the apis subdirectory.

Note that #12419 updated the dependencies for the latest controller
runtime which also increased the size of the modules
list in the pkgs subdirectory, which means the difference
in dependencies in the pkgs subdirectory is no longer
signficant anyway.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-08-21 15:13:33 -06:00
parth-gr 67f294b623 helm: update the default version tag to master
updating this to ease the local testing
using helm for master branch repo

Signed-off-by: parth-gr <paarora@redhat.com>
2023-08-21 20:05:14 +05:30
travisn 05bebc1615 ci: require go 1.20 in the builds
To update to the latest go modules we need to restrict golang
support to 1.20 for now.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-22 16:37:10 -06:00
s3rj1k dc55f23cba build: add Golang module for APIs
Create separate module for API for external projects to consume.

Signed-off-by: s3rj1k <evasive.gyron@gmail.com>
2023-05-03 21:26:16 +03: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
Blaine Gardner 442e6480bd build: allow building on Mac with Apple silicon
There are a couple minor changes needed to allow building Rook on Apple
silicon.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2023-02-22 17:32:42 -07:00
parth-gr b81ee215a7 build: update golang version to v1.19
Updated the go mod and ci to use gov1.19 as
minimum and removed support for go1.18

Closes: https://github.com/rook/rook/issues/11681
Signed-off-by: parth-gr <paarora@redhat.com>
2023-02-17 18:39:05 +05:30
Zuhair 792a261ca9 docs: auto generate helm chart docs using helm-docs
Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2022-12-02 17:08:50 -05:00
Travis Nielsen b726f81542 ci: add support for go 1.19
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-11 12:41:10 -06:00
Travis Nielsen 49ca309622 build: only support go 1.18 with the latest modules
The modules are only compatible with go 1.18.
Remove support for go 1.17.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-08-11 12:31:50 -06:00
subhamkrai 4283973e07 build: add support for go 1.18
adding support for go 1.18 but rook master still
build on 1.17.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-21 19:59:46 +05:30
subhamkrai 81d696652d build: update golang version to v1.17
update golang version to v1.17

Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-19 09:04:29 +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
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 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
Travis Nielsen bffe99c39d helm: add appversion property to the charts
The appVersion should be set to the version of the application. Since the helm
charts are built by Rook in the same release version as Rook itself, the
version and appVersion values will be the same.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-10-28 09:26:18 -06:00
Blaine Gardner d9146f6f95 helm: create shared library chart
Create a Helm library chart to share content between the Operator Helm
chart (rook-ceph) and the CephCluster (etc.) Helm chart
(rook-ceph-cluster).

This will ensure that when resources related to the CephCluster change,
notably RBAC resources, they will change for both charts.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-10-18 12:33:47 -06:00
Blaine Gardner 9531c252a5 ceph: remove NFS and Cassandra make targets
Remove all make-related references to NFS and Cassandra. This is limited
purely to make targets. Leave CRD and codegen script references to be
removed in a different commit.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-31 14:05:33 -06: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
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
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
subhamkrai 7161afbb70 build: update go fmt version
till now we were using older go fmt version(1.11).
From now, go fmt version will be same as golang version

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-04 20:17:02 +05:30
Blaine Gardner 9138732c81 build: stage CSV files into tmp while building
If a user were to `make build` Rook, and after the Ceph CSV was
generated and before make had finished, the Rook repo would be left with
changes caused by the build modifying files temporarily in-place.

All CSV template generation in the Ceph makefile is now self-contained
and can be configured to operate outside of the main repo so that files
are not modified in-place.

In-place modification of files was also incorrect. On Mac some files
with `-e` trailing were left, and in-place backups were also present in
the form `<filename>''`. Therefore, also fix the generation to fix
in-place modifications.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-07-27 16:11:58 -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
Travis Nielsen 1af84e34c0 Merge pull request #7778 from henryzhangsta/ceph-cluster-helm-chart
ceph: implement CephCluster CRD Helm Chart
2021-05-27 12:41:01 -06:00
Henry Zhang ecf6bdcfae ceph: add build and tests for rook-ceph-cluster Helm chart
Adds rook-ceph-cluster chart to chart build, add tests.
Pulled out some common functionality between the Helm and non-Helm installers

Signed-off-by: Henry Zhang <me@henry.dev>
2021-05-27 01:08:27 -07:00
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
Satoru Takeuchi 8a48dbb00d ceph: stop vendoring
We generate vendor directory in building process. It doesn't reduce
build time. In addition, we have encountered some vendoring-related
problems. So let's stop vendoring.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-04-21 02:01:56 +00:00
Sébastien Han 57131e1a90 ci: build and run various make commands on MacOS
Introducing a small action on MacOS to help us catch errors with various
'make' command on OSX, most notably 'sed' versus 'gnu-sed'.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-20 17:21:08 +02:00
Blaine Gardner a818a01a13 test: do not allow go.test parallel dependencies
Dependencies for `make go.test` have to run in order, so call them
explicitly from the target rather than allowing them to be done in
parallel if `make -j` flag is used.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-16 12:24:39 -06:00
Blaine Gardner 37b31a7c5e build: run 'go mod vendor' on each build
CI fails on builds warning with the warning below

    [2021-04-15T14:15:28.461Z] go: inconsistent vendoring in /home/rook/go/src/github.com/rook/rook:
    [2021-04-15T14:15:28.461Z] 	github.com/jstemmer/go-junit-report@v0.9.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

Fix this by running `go mod vendor` before each build.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-15 16:11:59 -06:00
Travis Nielsen 31c4ef622e build: update the build to use go 1.16
With the release of go 1.16, we update the tools. The -i flag is
now deprecated, no longer necessary for building in a private directory.
The go modules are cleaned up at the same time.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-12 15:01:14 -06:00
Blaine Gardner f2f622412c build: allow CSV gen on mac
CSV generation now requires versions of yq and operator-sdk that are
downloaded by the makefiles. Previously Ceph image creation used
makefile versions but `make csv-ceph` used versions present on the
system.

`sed -i 's///g' $FILE` doesn't work on Unix/Mac.
`sed -i'' -e 's///g' $FILE` is portable.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-09 13:22:15 -06:00
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 1bdee1e512 build: try sha256sum if shasum is not present
shasum is not always available and sha256sum seems to exist more often
since it's part of coreutils where sha256sum comes with perl.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-02 14:43:52 +01:00