Commit Graph
470 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
subham rai 294b5a2f19 Merge pull request #17237 from taraasrita10/fixing-checkout-version
ci: upgrade checkout action to v6.0.2
2026-04-08 12:14:52 +05:30
Prabhala Tara Aasrita d591037b4d ci: upgrade checkout action to v6.0.2
actions/checkout v6 changed how credentials are persisted. Instead of writing GITHUB_TOKEN as an extraheader in .git/config, it now stores a pointer to a credential helper file in $RUNNER_TEMP. The Makefile's `git config --unset http.https://github.com/.extraheader` no longer clears the token, so the cross-repo push to rook.github.io was failing.

I have updated the checkout action to v6.0.2, set the persist-credentials field to false and removed the unset line from releases/Makefile.

Signed-off-by: Prabhala Tara Aasrita <taraasrita@ibm.com>
2026-04-07 21:48:16 +05:30
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
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