Commit Graph
193 Commits
Author SHA1 Message Date
Michael AdamandBlaine Gardner f5d7004d22 build: make the yamllint target self-contained
The yamllint make target required yamllint to be installed
in the PATH.

This change renders it self-contained
by using a container image instead.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
2026-04-24 21:04:49 +02:00
Michael AdamandCopilot ffc87c674e build: make the shellcheck target self-contained
running make shellcheck required shellcheck to be
installed locally in the $PATH.

This change renders make shellcheck self-contained
by installing shellcheck in the local tools cache directory
likeit is already done  with other tools.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-23 11:15:08 +02:00
Michael AdamandCopilot c970221299 build: fix malformed definition of newline
The definition of a newline withe name '\n' was invalid and broke
introduced commands-before-first-target syntax errors in the
Makefile.

This change fixes the poblem by changing the name to the valid name
NEWLINE.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-17 12:17:09 +02:00
d4c3f36bba build: make markdownlint targets self-contained
the markdownlint and markdownlint.fix make targets
required markdownlint-cli2 to be installed locally
in the $PATH.

This change renders them self-contained by running
markdownlint from the official markdownlint-cli2
docker image.

Also clean the development-flow guide for linting tools

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2026-04-15 21:27:15 +02:00
Michael AdamandCopilot 0f79537493 build: make the helm.lint target self-contained
make helm.lint depended on the chart-testing tool ct as well as helm and kustomize being available in
the PATH.

This makes the target self-contained by
- running ct via go run
- using the cached version of helm used elswhere in the
build system
- caching kustomize in the tools dir and using that

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-09 18:06:19 +02:00
Michael AdamandCopilot f1774e3d78 build: use the new tools cache dir target as prereq for helm-related tools
A target was recently introduced for creating the host-specific tools
cache directory.

Several helmng-related tools installation targets depended on the directory implicitly or
created it as part of their recipe.

This change makes the dependency explicit by using the new target as a
prerequisite.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-08 09:54:54 +02:00
Michael AdamandCopilot 6bfa7bbb33 build: use the new tools cache dir target as prereq for go-related tools
A target was recently introduced for creating the host-specific tools
cache directory.

Several golang-related tools install targets depended on the directory implicitly or
created it as part of their recipe.

This change makes the dependency explicit by using the new targett as a
prerequisite. This also simplifies some recipes by removing now unneeded
mkdir operations.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-08 09:54:29 +02:00
Michael Adam 9fc4a4fc5e build: install go-junit-report into host-specific tools cachedir
The go-junit-reporttool used to be installed into the general tools cache dir.

For consistency, this changes it to be into the host-specific tools
cache directory like the other cached tools

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-08 09:54:01 +02:00
Michael Adam 75d56faa3a build: fix host platform for tools cache
Tool binaries were installed to a host-specific  cache for that was eforced to  the linux platform.

This change fixes the mechanism to install the tool binaries to the cache directory  for the real
detected platform

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-03 15:33:15 +02:00
Michael AdamandTravis Nielsen 8923e4f6f4 build: add a target for creating the tools cache dir
the target for installing helm to the local
host-specific tools cache and a few other targets are
using the tools cache directory and depend on it
implicitly.

This change is a preparation for making this  dependency explicit
by adding a new target for creating the tools cache directory
that can be use as a target prerequisite in subsequent changes.

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
2026-04-02 19:32:49 +02:00
subhamkrai d3b50aebbc build: add support for go 1.26
this commits add support for 1.26 and updating
go version in ci as well.

Signed-off-by: subhamkrai <srai@redhat.com>
2026-03-02 21:27:35 +05:30
Blaine Gardner 526acaf868 ci: add initial kube-api-linter support to CI
Kubernetes has begun releasing a kube-api-linter application for linting
Kubernetes APIs to match against common best-practices. (a.k.a., KAL).
Of note: KAL is still new and has no semver releases.

I believe this linter is helpful in encouraging Rook devs to think
deeply about how end-users consume the API. It ensures that new APIs
account for set/unset status, zero values, upper/lower bounds, and
possibly others in the future.

This commit adds initial support to Rook, without making the results a
requirement. Maintainers still need to evaluate rule configuration and
determine how tightly Rook wants to hold to the results.

As of this commit, I observe around 650  "issues" with the current Rook APIs.
This doesn't mean that Rook is in danger of breaking. Issues with API
types are often just indications that upper/lower bounds are missing, or
that there is ambiguity between set-empty and unset-empty values.

This commit uses `--new` in CI to ensure only new API issues are
flagged.

Also of note, KAL is a golangci-lint plugin. It is possible to locally
build KAL (from source) into golangci-lint to run both at the same time.
However, this is time-consuming, and it's harder to coordinate tool
binary caching this way when it's related to 2 different versions.
Treating KAL as a standalone binary allows for simpler make scripting
and maintenance.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2026-01-21 11:34:22 -07:00
dependabot[bot] 3c51e808f2 build(deps): bump the k8s-dependencies group with 6 updates
Bumps the k8s-dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.2` | `0.34.3` |
| [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.34.2` | `0.34.3` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.34.2` | `0.34.3` |
| [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) | `0.34.2` | `0.34.3` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.34.2` | `0.34.3` |
| [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) | `0.34.2` | `0.34.3` |

Updates `k8s.io/api` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/api/compare/v0.34.2...v0.34.3)

Updates `k8s.io/apiextensions-apiserver` from 0.34.2 to 0.34.3
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.34.2...v0.34.3)

Updates `k8s.io/apimachinery` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.34.2...v0.34.3)

Updates `k8s.io/cli-runtime` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.34.2...v0.34.3)

Updates `k8s.io/client-go` from 0.34.2 to 0.34.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.34.2...v0.34.3)

Updates `k8s.io/cloud-provider` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.34.2...v0.34.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cli-runtime
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cloud-provider
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 07:59:21 -07:00
subhamkrai 73d2541b3d build: update codegen code generator to 0.34.2
this commit update the codegen to latest version
v0.34.2 to support golang 1.25

Signed-off-by: subhamkrai <srai@redhat.com>
2025-12-01 17:02:59 +05:30
Travis Nielsen a24e10ccf9 Merge pull request #16361 from subhamkrai/optimize-helm-update
build: optimize to pull charts when not present
2025-09-17 08:50:50 -06:00
subhamkrai 635ed630b2 build: optimize to pull charts when not present
this commit add check to pull helm chart dependency
only when the charts are not available locally on the
system. This reduces overall make build other make
command completion time.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-17 16:45:33 +05:30
Michael Adam ae3938d57d build: add support for golang v1.25
With this change, rook supports the two most recent versions of golang,
v1.24 and v1.25.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-09-04 09:53:05 +02:00
Michael Adam 30667877a4 build: fix/improve an error message
The error message issued by `make` when the available golang was ont one
of the supported versions was somewhat confusion or even broken.

This change fixes the message.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-08-27 18:53:11 +02:00
subhamkrai ee6f2e654a helm: add helm support for new csi-operator
This commit test csi-operator helm chart as a dependencies with rook-ceph operator helm chart.
With these changes csi-operator will be installed as a part of rook-ceph operator helm chart.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-08-14 13:18:13 +05:30
Oded Viner 67925c9bbe core: update rook to go 1.24.3
update rook to go 1.24.3

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-07-16 12:24:50 +03:00
Michael Adam 7c05f532ce helm: use the latest version
update the helm version used to the latest (v3.18.2)

Signed-off-by: Michael Adam <obnox@samba.org>
2025-06-04 19:01:47 +02:00
Travis Nielsen 7d908d0a5e build: stop publishing charts in master branch
The helm charts will now only be published when it is
an officially tagged release build.

The images will only be published to all repos for
dockerhub, quay, and ghcr when it is a tagged release.

The images will be published only to dockerhub for all
master and interim release branch builds.

Remove obsolete makefile option for images.
Ceph is the only image Rook ever expects to build.
Simplify the makefile by removing the legacy option
to select which image to build.

Also included are other small improvements to clean up
the release scripts.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-04-18 10:40:29 -06:00
Joshua Hoblitt b721c30dd1 core: fix golangci-lint warn caused by comment in nolint directive
Resolves this warning:

    WARN [runner/nolint_filter] Found unknown linters in //nolint directives: just configuration keys., value not credential

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-27 09:43:16 -07:00
Joshua Hoblitt c5f59db859 core: replace gofmt with golangci-lint
This has the effect of running gofmt and gofumpt at the same time.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-03-26 16:17:37 -07:00
Travis Nielsen 4aec70601c Merge pull request #15542 from a1994sc/feature/oci-chart
ci: publish helm charts to oci repos
2025-03-24 13:42:49 -06:00
Allen Conlon fa2e499727 ci: publish helm charts to oci repos
Signed-off-by: Allen Conlon <software@conlon.dev>
2025-03-21 20:15:59 -04:00
subhamkrai 3bbfe8a70e build: add support for golang 1.24
rook now supports two recent version of golang
i.e 1.23, 1.24 and also run canary test on go 1.24

Signed-off-by: subhamkrai <srai@redhat.com>
2025-03-18 22:08:06 +05:30
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