In anticipation of generating common.yaml from the Helm charts, sort
common.yaml using the same script used to sort the output from Helm
charts.
This was done using the flow here:
```
cat build/rbac/common.yaml.header > new-common.yaml
cat deploy/examples/common.yaml | build/rbac/keep-rbac-yaml.sh >> new-common.yaml
mv new-common.yaml deploy/examples/common.yaml
```
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
In order to generate common.yaml from Helm charts, we have to have a
different way of generating CSV than from meta-comments in common.yaml.
This implementation changes what appears in the CSV's RBAC somewhat, but
these changes could be considered bugs fixed by using the new Helm
generation method.
- a few PSP related resources are removed from CSV
- resources related to 'rook-ceph-purge-osd' Job are added to CSV
- ClusterRoleBinding 'rook-ceph-object-bucket' is added to CSV
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
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>
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>
Jenkins has been decommissioned so the release instructions are
updated to work more clearly with the new processes around
the github actions.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
replaces all occurences of lduo/rduo quotation marks to make
sure that using the snippets in a k8s manifest will work
This fixes an issue with ArgoCD not being able
to apply `common.yaml` because of an encoding issue
Signed-off-by: PixelJonas <jonas@janz.digital>
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>
The volume replication CRDs are an external component, not owned by Rook.
Therefore, they should be installed as any other independent component
in case the admin will install other consumers of the volumereplication CRDs
in the future in addition to Rook and the CSI driver.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Assume common.yaml is the right source of truth, and remove major
content from helm charts that does not exist in common.yaml.
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
This is a starting step to be able to generate common.yaml from Helm
charts. For right now, we merely want to be able to determine when the
rendered output of the Helm chart changes.
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
In Rook v1.8 the min version of K8s supported is updated to 1.16.
Users running on older versions of K8s are recommended to update
to 1.16 or newer before updating to Rook v1.8.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The flex driver has been fully deprecated and thus removed from Rook.
Before upgrading to v1.8, users will need to convert existing flex volumes
from flex to csi volumes.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Simplify the test documentation on running the integration tests
to clarify that any K8s cluster can be used, and only support
minikube in the instructions.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Rename the master docs to latest. This will be easier
to understand for users who are new to the project.
The url will also contain latest, which will be more
clear to reference instead of the master path. This
also follows the pattern of the ceph docs site.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
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>
we are adding new linter for shellcheck.
As we are writing more shell scripts this
will help maintain quality.
Also, doing all the changes required in
bash files to pass this shellcheck.
Closes: https://github.com/rook/rook/issues/8431
Signed-off-by: subhamkrai <srai@redhat.com>
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>
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>
to use prerelease of kubernetes it requires
to have `-0` added in kubernetes version check
ex:
```{{- if semverCompare ">=1.16.0-0" .Capabilities.KubeVersion.GitVersion }}```
Closes: https://github.com/rook/rook/issues/8548
Signed-off-by: subhamkrai <srai@redhat.com>
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>
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>
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for nfs for full fidelity of all settings.
Co-authored-by: Nicolaj Græsholt <figaw@hotmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for cassandra for full fidelity of all the
settings.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
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>
The rook.io/v1 package was only an internal implementation detail and
does not have any CRDs that rely on it. The CRD deserialization should
handle the change in internal types without any issue. This separation
gives more flexibility for the storage providers to implement exactly
what is needed for their storage provider instead of forcing to use the
same types and risk affecting another storage provider.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The upgrade of the csv is failing to the latest schema when
the crushDeviceClass is specified and when the volumeClaimTemplate
annotations do not preserve the unknown fields. To fix the upgrade,
we preserve the fields even though it should not be necessary
from the strict schema.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Allow metadata on VolumeClaimTemplates in StorageClassDeviceSets to be
persisted. The latest changes to controller-gen allows us to embed
objectmeta for embedded types.
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
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>
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>