Commit Graph
457 Commits
Author SHA1 Message Date
subhamkrai 0dab47d408 build: use buildx instead of manifest-tool
instead of using of using manifest-tool and updating
it's version, we can use docker buildx which works like
manifest-tool only and based on manifest-tool working.

Signed-off-by: subhamkrai <srai@redhat.com>
2026-02-17 15:01:50 +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
fullstackjam f635d96ae9 helm: add missing labels to RBAC resources to prevent ArgoCD drift
This PR addresses ArgoCD drift detection issues by adding consistent
metadata labels to RBAC resources in Rook Ceph Helm charts. The problem
occurs because many RBAC resources lack metadata labels, causing ArgoCD
to interpret them as 'labels: null' and report continuous drift.

Changes made:
- Added consistent labels to all RBAC templates in rook-ceph and library charts
- Created _recommended-labels.tpl template for standardized labeling
- Removed app.kubernetes.io/component label per consideRatio feedback to avoid scope creep
- Suppressed Helm-specific labels (version, instance, managed-by, created-by, chart) from static RBAC files
- Regenerated deploy/examples/common.yaml and deploy/examples/csi/nfs/rbac.yaml

Labels added to RBAC resources:
- operator: rook
- storage-backend: ceph
- app.kubernetes.io/name: rook-ceph
- app.kubernetes.io/part-of: rook-ceph-operator

Impact:
- Resolves ArgoCD 'OutOfSync' issues for Rook RBAC resources
- Improves resource identification and management
- Provides consistent labeling across all Rook Helm charts
- No functional changes to RBAC permissions
- Focuses on essential labels to avoid over-engineering

This addresses review feedback from travisn and consideRatio to maintain
scope and ensure static RBAC files only contain meaningful labels.

Signed-off-by: fullstackjam <fullstackjam@outlook.com>
2025-10-01 14:43:25 +08:00
Erik Sundell ee346bd951 helm: fix failure to cleanup psp fully
I failed to save a file before making the commit becomign PR #16558.
This small change should also have been part of it.

Signed-off-by: Erik Sundell <erik@sundellopensource.se>
2025-09-30 21:42:46 +02:00
Erik Sundell e7a704ccf1 helm: remove legacy PodSecurityPolicy resource
The helm charts allowed rendering a PodSecurityPolicy resource via the
configuration `pspEnable`. This option is removed and all references to
psp, PodSecurityPolicy, and Pod Security Policy have been cleaned up.

The PSP resource was only rendered if k8s version was lower than 1.25
when it was still supported. It has been deprecated since k8s 1.21.

Signed-off-by: Erik Sundell <erik@sundellopensource.se>
2025-09-30 18:25:35 +02:00
Travis Nielsen c177bf1d4d Merge pull request #16374 from subhamkrai/add-cosign
build: use cosign to sign the images/helm charts
2025-09-19 07:11:13 -06:00
subhamkrai 7dd21a0468 build: use cosign to sign the images/helm charts
this commit added changes to use cosign to sign the
docker images and the helm charts being published to
different the oci repos. This will enhance software supply
chain security by enabling signing and verification of
container images, ensuring their authenticity and integrity

Signed-off-by: subhamkrai <srai@redhat.com>
2025-09-19 12:05:28 +05:30
Travis Nielsen 67e48bb701 Merge pull request #16494 from consideRatio/pr/helm-refactor-2
helm: refactoring to modernize templates
2025-09-18 13:53:21 -06:00
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
Erik Sundell 039f158950 helm: refactoring to modernize templates
This touches a lot where a typo could cause issues for someone, so I have self-
reviewed it many times line-by-line already.

There are a few types of changes:
- All resources get tied to their own YAML document separator (`---`)
  before their definition, reducing the risk of not separating resources
  correctly when rendering multiple into a file. I think the changes
  will fix edge case bugs for people with mutiple items listed in
  `cephFileSystems` and similar configuration.
- `toYaml ...` is made into `... | toYaml` consistently.
- `default A B` is made into `B | default A` consistently.
- Consistent whitespace chomping, so instead of `{{ end }}` you would
  find `{{- end }}` typically. The system is that you should chomp left
  almost all the time, and almost all the time _not_ chomp right. You
  would chomp right in the beginning of a file or helper function in
  order to clear some initial whitespace, otherwise not.
- Multiline helm template comments `{{- /* ... */ }}` get their content
  indented 2 spaces.
- List items are consistently rendered with two spaces of indentation.
- `kind` is put before `apiVersion` consistently, to follow a practice
  observed partially in the repo.
- Calls to the helm `template` function have been replaced with
  `include` to be consistent and to stick with modern practices.
- Use of `indent` have been replaced with `nindent #` and a left
  whitespace chomp for a consistent easy to follow practice that gets
  good result.
- Several `if` statements like `if X -> render X` have been replaced
  with `with X -> render .` to avoid repetition. The `with` statement
  won't render if the provided context, making it function also like an
  `if` statement.
- Fixed a bug with `if .Values.revisionHistoryLimit`, which should
  really be `if not (typeIs "<nil>" .Values.revisionHistoryLimit)` to
  handle situations when its set to `0`.

Signed-off-by: Erik Sundell <erik@sundellopensource.se>
2025-09-16 09:55:10 +02:00
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 506ac2a3ff csi: make csi-operator default deployment
this commits enable the csi-operator by default,
moving it from experimental to stable.

Also, disable the csi-operator chart from generating
rbac in common.yaml

Signed-off-by: subhamkrai <srai@redhat.com>
2025-08-14 22:33:07 +05:30
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 AdamandTravis Nielsen 987e9c8bb5 build: merge helm indexes instead of recreating for every release (really)
A new helm repo index was created from scratch for every new release
    which meant that the release timestamps in the index were basically all
    identical.

    This change intends to fix that by merging the new index with the
    existing one

The first attempt to fix this (PR #16033) did not work properly.
This change is intended to fix the issue for good by closing the gap the
previuous PR has left.

    Fixes: #15604

Co-Authored-By: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
2025-06-23 16:57:33 +02:00
Michael Adam 2704f23ea7 build: merge helm indexes instead of recreating for every release
A new helm repo index was created from scratch for every new release
which meant that the release timestamps in the index were basically all
identical.

This change intends to fix that by merging the new index with the
existing one

Fixes: #15604

Signed-off-by: Michael Adam <obnox@samba.org>
2025-06-19 22:24:07 +02: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 0f0b3b2df8 Revert "ci: only publish docs in master and tagged releases"
This reverts commit 28fa387dff.
2025-05-08 12:19:13 -06:00
subham rai 3be9c92f1a Merge pull request #15830 from travisn/docs-publish
ci: Only publish docs in master and tagged releases
2025-05-06 11:08:17 +05:30
Travis Nielsen 28fa387dff ci: only publish docs in master and tagged releases
Until now, docs have been published for every master and
release branch build. This can lead to confusion if a new
feature is backported to the release branch and the docs
are published to the website, even though the feature will
not be available until the next tagged release.

This does have the effect that small doc-only fixes will
not be in the latest release docs until we actually tag
a release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-05-05 13:44:07 -06:00
Michael Adam d7f2a4b4d8 build: move se-release-ver script to better place
The script sel-release-ver.sh was added in a somewhat unnatural place
tests/scripts .
This moves it to a more natural location build/release .

Signed-off-by: Michael Adam <obnox@samba.org>
2025-05-05 17:02:39 +02:00
a1b941f969 build: add a script for setting the release version in examples,docs, and charts
This script updates examples and docs for a new release.

Invocation in principle: set-release-ver.sh  NEW_VER
For example: set-release-ver.sh v1.16.8

Fixes: #15749

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Travis Nielsen <tnielsen@redhat.com>
Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
2025-05-01 10:36:26 -06:00
Michael Adam 47a3ec3466 docs: slightly improve wording in release guide
Reading the release process documentation, I found the description
of steps in one place to not quite match the intended effect of the
actual command steps due to a slight imprecision in used terminology.

This change improves and clarifies the corresponding wording to hopefully
prevent others from facing the same confusion.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-04-23 12:25:53 +02:00
Travis Nielsen 63e13868ea build: push arch specific images to the registries
The arch specific images were not be pushed since the make
target was missing.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-04-21 14:37:19 -06: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
Allen Conlon 1291045c7f ci: fix push version mismatch
Signed-off-by: Allen Conlon <software@conlon.dev>
2025-03-25 17:04:48 -04:00
Allen Conlon 2cbcbffd52 ci: fix version of chart not existing
Signed-off-by: Allen Conlon <software@conlon.dev>
2025-03-25 15:50:13 -04: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
subham rai dd6cd626f8 Merge pull request #15540 from subhamkrai/add-go-1.24
build: add support for golang 1.24
2025-03-19 11:55:54 +05:30
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
subhamkrai df3c757141 ci: push rook image to other oci like quay,ghcr
currently rook images are only available in docker,
let's start pushing rook images to quay.io and ghcr.io as well.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-02-27 09:44:29 +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
Blaine Gardner 33f5407dd4 multus: add host checking to validation tool
In order to help users check that they have implemented the newly-added
Multus host configuration prerequisites, add a check to the validation
tool to verify connectivity.

Because users who are already running clusters with Multus enabled, add
a flag that allows users to only check for host configuration
prerequisites. This mode will not start the large number of clients that
would normally be started because those clients could disrupt a running
Rook cluster negatively.

Host checking pods require host network access. Many Kubernetes
distributions have pod security features enabled. In order to allow
non-Vanilla distros to run this tool, allow specifying a service account
that pods will run as, which can be configured by the admin to allow
test pods.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-07-10 13:41:38 -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 ea159ad9b7 ci: remove extra comma from platforms
The last pr missed removing the extra comma after the platform
so, instead of ` linux/amd64,linux/arm64,` it should be
` linux/amd64,linux/arm64`.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-05-16 14:47:51 +05:30
subhamkrai f89540c4ef ci: push image ci failing in ubuntu 22.04
since we moved to ubuntu 22.04, ci push image build is failing
due wrong parameter `--platforms linux/amd64 linux/arm64,` it should
be instead `--platforms linux/amd64, linux/arm64`.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-05-15 22:09:16 +05:30
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 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
Travis Nielsen d77cee791c Merge pull request #13362 from parth-gr/service-account-deafult
core: Set default service account on all Ceph daemons
2024-02-28 10:52:12 -07:00