Commit Graph
184 Commits
Author SHA1 Message Date
Michael Adam 953fae17c9 build: make make helm.lint truly self-contained
PR #17306 intended to make the helm.lint target self-contained
so that it would not require tools to be installed in the system.
But it missed the fact that ct requires helm to be available
in the path. So make helm.lint would still fail when helm was not
installed.

This change fixes this by creating a symlink to the cached versioned
helm tool and rewriting PATH for the ct invocation.

This renders the helm.lint target truly self-contained.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-27 18:42:40 +02:00
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 Adam c6ab030cd4 build: declare generate-docs-crds PHONY to fix local checkmake
Locally, checkmake complained that the target generate-docs-crds
should be declared PHONY.

And it should in fact be PHONY as it is a target without recipe
depending on another PHONY target.

This change fixes the local xheckmake run by declaring
generate-docs-crds PHONY as desired.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-24 18:30:20 +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 Adam 5c755b8c20 build: reduce build time
Commit 8a80743bf has led to a significant increase runtime for
make build. More precisely, the runtime of
make build.common was increased.

The reason for this was that the prerequisite build.common target
implicitly ran crd docs generation where it shouldn't and originally
didn't.

This additional opertion caused the extra time consumption.

This change re-establishes old behavior and build time
by ensuring that crd docs generationhappens only when desired.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-17 12:17:09 +02:00
Michael Adam e65d81a73a build: combine LC_ALL variable and export statement
The separate definition and export of LC_ALL caused
commands-before-first-target errors with some changes to the
Makefile

This change combines the definition and export to a single line
which makes those other changes possible without breaking syntax.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-04-17 12:17:09 +02:00
Michael Adam d673b528d8 build: make build.version target phony
The build.version target does not refe to a timestamped file.
So it should be declared PHONY.
This change does that.

Signed-off-by: Michael Adam <obnox@samba.org>
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
Santosh Pillai 7a0afce65f Merge pull request #17041 from sp98/rgw-account-controller
rgw: controller for account management
2026-03-13 21:37:02 +05:30
Santosh c4ec7faee5 rgw: controller for account management
PR only focuses on account creation, deletion and update.

Signed-off-by: Santosh <sapillai@redhat.com>
2026-03-13 11:21:46 +05:30
Michael Adam 8a80743bf8 build: let checkmake pass locally
checkmake was locally still failing
despite previous partial fixes,
complaining about a duplicate definition of
build.common.

build.common was duplicate:
Once for a  target specific variable setting and once for the
dependencies and recipe.

This change fixes make checkmake locally
by adding an extra target build.common.var
just for setting the variable.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-03-06 18:52:51 +01:00
Michael AdamandCopilot 3aef40c7f7 build: clean HELPTEXT variable
The HELPTEXT Makefile variable contained a string
"available options:"at the start of a line.
This could be confused as a target
(for example by checkmake).

This change fixes the problem by extracting the string
out of the variable

Signed-off-by: Michael Adam <obnox@samba.org>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-06 18:38:09 +01:00
Michael Adam a33bc2a0d8 build: make checkmake target self-contained
make checkmake depended on checkmake being available in the PATH.

This change makes it selfcontained by usin go run
to run checkmake without installation.

This also pins checkmake to the latest released version v0.3.2

Signed-off-by: Michael Adam <obnox@samba.org>
2026-03-06 18:37:22 +01:00
Michael Adam 2f6b7531a6 build: reorganize PHONY target declarations
most phony targets in the Makefile were declared phony
by grouping multiple targets in  long combined .PHONY
statements which obfuscates the phony nature of a target
to some extent.

This change makes the phony target declarations a bit more obvious
and explicit
by prepending each phony target by a corresponding
individual .PHONY statement and removing the confusing combined .PHONY
line.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-03-04 11:05:58 +01:00
Michael Adam a1f3a03e73 build: make mod.check and mod.update phony
make targets mod.check and mod.update should habve been phony
but weren't.

This change fixes that.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-03-03 19:35:14 +01:00
Michael Adam 1fcef7f364 build: make do.build.parallel PHONY
Target do.buil.parallel should have been declared
phony but wasn't.

This change fixes that.

Signed-off-by: Michael Adam <obnox@samba.org>
2026-03-03 19:35:14 +01:00
Daniel Höxtermann 5ffd43e539 ci: add kustomize to helm.lint
This catches duplicate keys in maps.

Signed-off-by: Daniel Höxtermann <daniel@hxtm.dev>
2025-10-24 16:32:11 +02:00
Michael AdamandTravis Nielsen e268c09c4e build: bump controller-gen to v1.19.0
Co-Authored-by: Travis Nielsen <tnielsen@redhat.com>
Signed-off-by: Michael Adam <obnox@samba.org>
2025-09-04 17:06:01 +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
subham rai 1599042236 Merge pull request #16023 from BlaineEXE/build-x86
build: allow make build for different arch
2025-06-18 14:35:19 +05:30
Blaine Gardner 21d3dddda7 build: allow make build for different arch
Allow `make build` to perform cross-architecture builds by using
`make GOARCH=<arch> build`.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-06-17 14:05:12 -06:00
Michael Adam 0cd75c6206 ci: enable linting of the rook-ceph-cluster chart
Previously, only the rook-ceph operator chart was linted in the CI.

With this change, the rook-ceph-cluster chart is linted additionally.

for developer convenience, The linting is realized via a new make target
'helm.lint'that can easily be invoked locally if the chart-testing tool
'ct' is available.

Fixes: #15966

Signed-off-by: Michael Adam <obnox@samba.org>
2025-06-13 17:28:59 +02:00
Michael Adam a132f64839 build: add make target markdownlint.fix
now `make markdownlint.fix` can be run to
fix markdownlint errors.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-06-05 13:17:11 +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
Michael Adam c14a3e8e2a build: various Makefile improvements
1. add target checkmake

checkmake can  used for linting the Makefile

2. disentangle messed-up check and test  targets

check was supposed to be an alias for test but the definition was messed up.
In particular, no help text for test was shown.
This fixes the mess by separating the test and check targets.
As a side-effect, the  help text for both is now shown correctly

3.  make target docs phony and add help text

checkmake complained that 'docs'should be phony, so fix that.
Add some help text while at it.

4. reword misleading line to silence checkmake

checkmake was complaining that target 'Options' should be phony.
but Options not a target. It was a line in the Help text.
Fix this by rewording this part of help text

Signed-off-by: Michael Adam <obnox@samba.org>
2025-04-03 09:41:46 +02: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 fa2e499727 ci: publish helm charts to oci repos
Signed-off-by: Allen Conlon <software@conlon.dev>
2025-03-21 20:15:59 -04:00
Michael Adam 8a4aa1fd00 build: add a make target 'golangci-lint'
This adds a command 'make golangci-lint'

This is done so developers can conveiently run golangci-lint
locally like it runs in the CI.

golangci-lint is also run as part of the more general 'make lint'.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-02-27 16:29:54 +01:00
Michael Adam d1ef4f9e69 build: add a make target 'markdownlint'
This checks the documentation sources for syntactic correctness

The functionality is essentially extracted from the docs-check workflow
to provide developers with a tool to locally run the corresponding check
before pushing

Signed-off-by: Michael Adam <obnox@samba.org>
2025-02-27 16:29:54 +01:00
Michael Adam c3ed3fc2a2 build: add make target lint
The newly added make target 'lint' runs various linters
on the code base.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-27 20:40:11 +01:00
Michael Adam 11a15d3adf ci: refactor a shellcheck make target out of the github ci workflow
This is to allow developers to conveniently run the same check locally
as run in the CI.

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-24 18:37:58 +01:00
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
Michael Adam 8addaff330 ci: extract make targets from linters workflow
This extracts two functionalities from
the linters ci workflow into make targets for
convenient local execution: yamllint and pylint

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-22 18:30:42 +01:00
Michael Adam 795e188024 ci: rework docs-related workflow and make targets a bit
This change continues an effort started earlier to make some
make targets and ci workflows more consistent and systematic.
see https://github.com/rook/rook/pull/14922

it adds a  make target gen.helm-docs as an alias to helm-docs.
Additionally, gen.docs is added as alias to docs.
targets check.docs and check.helm-docs are removed because it was agreed
that targets using git are of little value to developers.
Their functionality is moved back into the corresponding docs workflow.

xiFinally, the  redundant "Check helm-docs" check is removed from the
docs-check workflow

Signed-off-by: Michael Adam <obnox@samba.org>
2025-01-09 20:31:14 +01:00
Michael AdamandBlaine Gardner 04741fb899 build: make generating make targets more systematic
This addresses a suggestion from a review comment in another PR.

The goal of this change is to make generating make targets more systematic.

Firstly, generating targets are made available under a more systematic naming
 following the pattern of "gen.foo".
more concretely, the following targets are introduced as aliases of the corresponding existing
 targets:

* gen.codegen
* gen.rbac
* gen.crds
* gen.docs
* gen.crd-docs

additionally, a  new "generate" make target is added that invokes all generating targets.

Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Signed-off-by: Michael Adam <obnox@samba.org>
2024-10-30 12:11:01 +01:00
Michael Adam d9d0d8e1d3 ci: rename 'check-helm-docs' to 'check.helm-docs
This makes the naming of ci-related make targets more systematic and
consistent.

It is based on PR https://github.com/rook/rook/pull/14672
 and continues the pattern started in that PR.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-09-06 17:49:17 +02:00
Michael Adam 93179a41f3 ci: slightly rework the docs-check workflow
This reworks the docs-check ci workflow in several ways:

* It renames the make target 'check-docs' to the  more systematic 'check.docs'.
* It adds a 'docs'mode to the  files validation script, and uses the script in `make check.docs`.

Overall, the workflow and local make targets are more systematic and
consistent with this change.

Signed-off-by: Michael Adam <obnox@samba.org>
2024-09-05 22:09:40 +02:00
subhamkrai 2556e14780 build: changes forced by latest controller-runtime
this commit contains changes that are forced by latest
controller-runtime version v0.19.0.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-08-20 21:21:42 +05:30
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 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
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 0bf117493d build: avoid crd edits when building on mac
On mac development machines, the crds are being left in a
state of change with the description removed and the
OBC CRDs removed from crds.yaml and resources.yaml.
By skipping the related env vars, these resources
are no longer left unexpectedly modified.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-09-15 08:00:57 -06:00
subhamkrai 1b652f8176 build: add check to validate crd in csv
In the past we had few cases where the new crd
was missed adding in metadata-common.yaml file.
So, now we'll check if crds.yaml and metadata-common.yaml
crd name are matching.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-09-06 19:37:25 +05:30
Michael Adam 04670d3f76 ci: simplify the docs-check workflow by extracting functionality
This simplifies the docs-check workflow definition by extracting  functionality
directly coded into the workflow file into new make targets 'check-docs'
and 'check-helm-docs' and replacing the code in the workflow file by the simple invocation of
new make targets. As a side effect, it makes it easily possible for a
developer to check locally if they forgot to commit any autogenerated
docs.

Signed-off-by: Michael Adam <obnox@samba.org>
2023-09-01 18:17:02 +02:00
Michael AdamandBlaine Gardner 22882c5358 multus: auto-update the validation job manifest file with help text
Signed-off-by: Michael Adam <obnox@samba.org>

this change  introduces a new 'make target 'docs'that generates part of the documentation

It particular, it runs the `helm-docs` target.

Additionally, `make docs`  updates the  multus validation job manifest
by inserting the output of `rook multus validation run --help` between
two newly introduced markers.

The result of running `make docs` is intended to be committed to git after running

Fixes: #12706

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

Update build/deploy/generate-deploy-examples.sh

Signed-off-by: Michael Adam <obnox@samba.org>
2023-08-25 18:37:16 +02:00
parth-gr 8175bc0218 build: make crds should be able to build generated docs
Currently, if there is any change in the API we need to separately
run the make generate-crd-docs but with this change
make crds will also update the generated docs

Also improved the file locations

Closes: https://github.com/rook/rook/issues/12310

Signed-off-by: parth-gr <paarora@redhat.com>
2023-06-15 20:11:23 +05:30
Javier 661e476969 docs: auto-generate the documentation for CRDs
add generate-crd-docs.sh tool for auto-generate the documentation for CRDs automatically

Closes: #1873
Signed-off-by: Javier <sjavierlopez@gmail.com>
2023-05-01 19:23:27 -06:00