Commit Graph
142 Commits
Author SHA1 Message Date
Blaine Gardner 113e2f849d build: use yq for RBAC yaml parsing
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>
2021-11-30 08:08:08 -07:00
Sébastien Han c890710b63 core: change directory layout
As per discussion, proposing a new layout for the charts/yaml/olm files.

./deploy
├── charts
│   ├── rook-ceph
│   │   └── templates
│   └── rook-ceph-cluster
│       └── templates
├── examples
│   ├── csi
│   │   ├── cephfs
│   │   └── rbd
│   ├── flex
│   ├── monitoring
│   ├── pre-k8s-1.16
└── olm
    └── assemble

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-30 09:12:53 +01:00
Sébastien Han 6fb67a297d build: only produce binary for linux
We now build rook to build only for linux platforms and not darwin nor
windows anymore.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-04 15:13:40 +01:00
Sébastien Han e08755ef61 build: make CGO_ENABLED configurable
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-11-04 15:13:40 +01:00
Travis Nielsen bffe99c39d helm: add appversion property to the charts
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>
2021-10-28 09:26:18 -06:00
Blaine Gardner d9146f6f95 helm: create shared library chart
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>
2021-10-18 12:33:47 -06:00
Blaine Gardner 9531c252a5 ceph: remove NFS and Cassandra make targets
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>
2021-08-31 14:05:33 -06:00
Sébastien Han 06a5571149 core: parse go files only subdirs
Instead of using the root let's only lookup our packages. Otherwise we
will format files from ./.work.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 18:52:39 +02:00
Sébastien Han cd9754e2f1 core: do not format deepcopy-gen files
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>
2021-08-24 12:03:17 +02:00
Sébastien Han 7c14b32435 ci: build on golang 1.16 and 1.17
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>
2021-08-24 11:18:51 +02:00
Blaine Gardner e51c078050 Merge pull request #8541 from BlaineEXE/print-go-version-on-build
build: print go version when building
2021-08-16 12:41:50 -06:00
Blaine Gardner a83745cbcd build: print go version when building
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>
2021-08-16 12:16:07 -06:00
subhamkrai 7161afbb70 build: update go fmt version
till now we were using older go fmt version(1.11).
From now, go fmt version will be same as golang version

Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-04 20:17:02 +05:30
Blaine Gardner 9138732c81 build: stage CSV files into tmp while building
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>
2021-07-27 16:11:58 -06:00
subhamkrai bc1fabb6e4 ci: update helm version to 3.6.2
this commit update helm version to `3.6.2`

Signed-off-by: subhamkrai <srai@redhat.com>
2021-07-07 20:09:26 +05:30
Travis Nielsen 1af84e34c0 Merge pull request #7778 from henryzhangsta/ceph-cluster-helm-chart
ceph: implement CephCluster CRD Helm Chart
2021-05-27 12:41:01 -06:00
Henry Zhang ecf6bdcfae ceph: add build and tests for rook-ceph-cluster Helm chart
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>
2021-05-27 01:08:27 -07:00
subhamkrai bf7b4609b1 build: bump to golang version 1.16
this commit bump to golang version 1.16.

Signed-off-by: subhamkrai <srai@redhat.com>
2021-05-19 13:35:20 +05:30
Satoru Takeuchi 8a48dbb00d ceph: stop vendoring
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>
2021-04-21 02:01:56 +00:00
Sébastien Han 57131e1a90 ci: build and run various make commands on MacOS
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>
2021-04-20 17:21:08 +02:00
Blaine Gardner a818a01a13 test: do not allow go.test parallel dependencies
Dependencies for `make go.test` have to run in order, so call them
explicitly from the target rather than allowing them to be done in
parallel if `make -j` flag is used.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-16 12:24:39 -06:00
Blaine Gardner 37b31a7c5e build: run 'go mod vendor' on each build
CI fails on builds warning with the warning below

    [2021-04-15T14:15:28.461Z] go: inconsistent vendoring in /home/rook/go/src/github.com/rook/rook:
    [2021-04-15T14:15:28.461Z] 	github.com/jstemmer/go-junit-report@v0.9.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt

Fix this by running `go mod vendor` before each build.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-15 16:11:59 -06:00
Travis Nielsen 31c4ef622e build: update the build to use go 1.16
With the release of go 1.16, we update the tools. The -i flag is
now deprecated, no longer necessary for building in a private directory.
The go modules are cleaned up at the same time.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-12 15:01:14 -06:00
Blaine Gardner f2f622412c build: allow CSV gen on mac
CSV generation now requires versions of yq and operator-sdk that are
downloaded by the makefiles. Previously Ceph image creation used
makefile versions but `make csv-ceph` used versions present on the
system.

`sed -i 's///g' $FILE` doesn't work on Unix/Mac.
`sed -i'' -e 's///g' $FILE` is portable.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-04-09 13:22:15 -06:00
Travis Nielsen 043f947321 build: remove yugabytedb operator
The YugabyteDB team has decided to move support of their operator
to a new repo at https://github.com/yugabyte/yugabyte-operator.
The operator in Rook is no longer needed. Further usage of
the YugabyteDB operator is recommended at the new location.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-02-06 00:03:41 -07:00
Sébastien Han 1bdee1e512 build: try sha256sum if shasum is not present
shasum is not always available and sha256sum seems to exist more often
since it's part of coreutils where sha256sum comes with perl.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-02-02 14:43:52 +01:00
Travis Nielsen 53ed11f15b build: remove the edgefs operator from rook
The EdgeFS operator has been deprecated for some time in Rook.
If the replacement is added back to Rook it can be completed
according to the new guidelines in the documentation.
https://rook.io/docs/rook/master/storage-providers.html

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-25 17:51:24 -07:00
Travis Nielsen 2294851ca3 build: remove the cockroachdb operator from rook
The cockroachDB operator has not had community support in Rook.
Therefore, the time has come to deprecate and remove it.
If the sources are still needed, there is always git history.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-20 17:28:58 -07:00
Travis Nielsen 7f169a71a5 build: enforce golang 1.15 in the build
The build currently requires golang 1.15 and will fail if an
older version is used.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-19 11:20:18 -07:00
Travis Nielsen 9ba8c937dd build: print the golang version during the build
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-01-19 11:19:53 -07:00
Artur 0754695655 build: switch to new aws buckets
Signed-off-by: Artur <artur@upbound.io>
2021-01-15 23:58:23 -08:00
Pete Birley 152a05c85e ceph: update to helm 3 for the rook chart
This updates the chart to make use of helm3 which has been released
for some time, and also permits CRDs to be installed pror to other objects
allowing the chart to be deployed at the same time as CRs for rook objects.

Co-authored-by: Pete Birley <pete@port.direct>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-11-11 14:41:24 -07:00
Mateusz Gozdek 8ba3762fa4 docs: fix bunch of typos
Found by running the following command:

codespell -S .git,*.png,*.jpg -L \
aks,keyserver,atleast,dne,ser,ist,files\',ba,dum,iam,te -f -H

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-06 10:01:04 +01:00
Thomas Bechtold 7eae8086e4 ceph: use get.helm.sh instead of storage.googleapis.com
To be able to switch to helm v3, helm itself needs to be downloaded from
get.helm.sh. The old location from googleapis.com will only contain
helm v2 binaries. See [1].

[1] https://helm.sh/blog/get-helm-sh/

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2020-10-20 14:47:09 +02:00
Alexander Trost 2f5d076e20 build: allow golang 1.15
Added Golang 1.15 to the supported versions in the Makefile check.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-08-24 11:30:18 +02:00
binoue a86b060849 ceph: update helm version
Currently, Helm v2.5.1 is used, but this version is released in 2017
and a little outdated.
To use the latest version of helm v2.x.x would be beneficial
as we can use more useful Helm commands like `helm template`.

This commit updates Helm version and stop using `helm lint`
with `--strict` option because Helm v2.16.7 does not allow
to use undefined values in values.yaml and
the Helm upstream is now stopping using the `--strict` option.

Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
2020-05-24 16:48:05 +09:00
Alexander Trost a85df12b73 build: allow go 1.14
This adds v1.14 to the supported Golang versions in the makefile.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-04-01 15:11:35 +02:00
moricho f556add260 codegen: use the bopilerplate for the header of the generated codes
This specifies `--output-base` and `--go-header-file` option at executing `code-generator`.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-30 17:54:56 +09:00
moricho 7d0215d820 ci: switch to use go.mod.check target
This switches to use `go.mod.check` target instead of `go.vendor.check` target.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:48:43 +09:00
moricho 437a0b1d9b go: versionup sig-storage-lib-external-provisioner/controller
version up sig-storage-lib-external-provisioner/controller to v4.1.0 and
modify related files

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:47:55 +09:00
moricho 2beb731a7e go: move to gomodules
This switches Rook to use `go mod` instead of `dep` for
dependencies management.

Signed-off-by: moricho <ikeda.morito@gmail.com>
2020-03-17 16:47:53 +09:00
Travis Nielsen a960e263db ceph: remove obsolete longhaul tests
The longhaul tests have not been run for a very long time,
on the order of two years. The intention is to get them running
again, but until then it is better to purge the obsolete sources
than to attempt to keep them building. We'll need to rewrite them
when they are restored.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-02-17 14:11:39 -07:00
taeuk_kim 58a99c5410 build: fix typo in makelib
Fix a grammer typo in /build/makelib/golang.mk

Signed-off-by: taeuk_kim <taeuk_kim@tmax.co.kr>
2020-01-13 21:37:14 +09:00
Travis Nielsen 55c5f44cb1 Merge pull request #4632 from HaichaoLii/rook-arm
Dep: Update golang dep to support Arm64
2020-01-10 23:50:10 -07:00
Haichao Li 065bb6677e Dep: Update golang dep to support Arm64
Current Rook code uses go dep 0.5.0 and separates handling
for Arm and x86. It's because there's no dep 0.5.0 binary
for arm64.Dep has updated to 0.5.4 and supports arm64. Rook
code can be simplified by upgrading dep to fix gaps of Arm
and x86.

Change-Id: Id91a993ca059461faa8a83065c93dadc7cdffeb2
Signed-off-by: Haichao Li <haichao.li@arm.com>
2020-01-09 10:13:54 +08:00
Travis Nielsen 9a078bf9e6 minio: remove from rook
The minio operator has not had community support nor
any updates since being added to Rook. Support is being
removed from Rook due to this lack of community interest.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-01-08 15:45:21 -08:00
Ashish Ranjan ec7bd4dda0 enhance: Updates Makefile to allow compiling with go 1.13
This commit updates Makefile to allow compiling with golang 1.13.

Signed-off-by: Ashish Ranjan <aranjan@redhat.com>
2019-09-25 21:22:12 +05:30
Dinar Valeev df7580e86c Remove helm incompatible chars from values.yaml
Remove %% around VERSION in charts yaml, so helm can process it.

Otherwise helm complains:
"unmarshal vendor values: yaml: line 7: found character that cannot start any token"

Signed-off-by: Dinar Valeev <k0da@opensuse.org>
2019-09-16 10:29:10 +02:00
Dinar Valeev f81145a283 bugfix: copy helm chart aside for packaging
In order to not leave any modified file after release, lets put
chart tree aside and run sed logic on it.

Signed-off-by: Dinar Valeev <k0da@opensuse.org>
2019-09-01 19:12:26 +02:00
Travis Nielsen d11481ebe4 Merge pull request #3701 from k0da/helm_chart
helm: rename values.yaml.tmpl to values.yaml
2019-08-27 15:23:51 -06:00