Commit Graph
109 Commits
Author SHA1 Message Date
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
Blaine Gardner d260b81e97 core: persist VolumeClaimTemplate metadtata
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>
2021-04-27 13:37:48 -06:00
Satoru Takeuchi a4277d2913 Merge pull request #7723 from travisn/build-linux-only
build: Only build linux platform
2021-04-22 17:35:05 +09:00
Travis Nielsen 2398b1636b build: only build linux platform
No need to include darwin and windows in the list of platforms
since rook is only containerized and expected to run in a linux
environment.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-04-21 14:57:31 -06:00
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 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
Sébastien Han 3d1d659e28 ci: do not include ob/obc/volumes crds in csv
We don't want to include those CRDs anymore, as they get imported from
another operator.
This trims further down the size of our CSV generation.

Additionally, we always clean the csv directory before proceeding.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-06 17:08:39 +02:00
Sébastien Han 5a194af3b1 ceph: strip crd description for csv generation
The CSV file size cannot be bigger than 1MB so let's remove all the
description fields make it lighter.

With that change the CRDs size went from 692K to 372K so the size was
reduced by almost 50%.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-06 14:13:07 +02:00
Sébastien Han 2851ba78e5 ceph: bump controller-gen version
0.5.0 is out so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-04-06 10:26:26 +02:00
Boris Ranto 9aad3005fc build: fix ceph-csv dependency
The crds-gen make target was recently renamed to crds. This broke the
ceph-csv target since it still depends on the old name.

Signed-off-by: Boris Ranto <branto@redhat.com>
2021-03-29 15:17:05 +02:00
Sébastien Han cf00a86fc2 ceph: force yq and controller-gen versions
Let's not use any controllen-gen version we might find on the system,
always pull the version we need.
Same goes for yq.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 09:21:33 +01:00
Sébastien Han eac743ffc7 ceph: shorten make crds
Let's use "makge crds" instead of "make crds-gen", it's shorter and
simplier to remember.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-26 09:08:46 +01:00
Sébastien Han 31db03fece ceph: auto-gen crds
Finally! We can now stop editing manually our crds definition. Simply
run `make crds-gen`. These two files:

* `cluster/examples/kubernetes/ceph/crds.yaml`
* `cluster/charts/rook-ceph/templates/resources.yaml`

will be autogenerated for us.

We rely on the controller-gen tool, it reads our API definitions from
`pkg/apis/` and produces the CRD files accordingly.

It uses "markers" to add extra yaml fields to the CRD, for instance we
have a lot fields with:

```
nullable: true
x-kubernetes-preserve-unknown-fields: true
```

The corresponding API type markers are:

```
// +kubebuilder:pruning:PreserveUnknownFields
// +nullable
```

For more API convention see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required
and for the markers see: https://book.kubebuilder.io/reference/markers/crd-validation.html

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-16 09:16:24 +01:00
Jiffin Tony Thottan 51c98bf3a4 build: add a seperate make command for cleaning olm files
Currently olm will be removed as part of clean command, but it cleans up
all the dependent modules as well
Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-06-15 17:07:08 +05:30
Sébastien Han e936c97b50 build: purge olm directory on clean
When running `make clean` we also purge any existing OLM files.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-06-10 14:40:21 +02:00
Jiffin Tony Thottan 391b0be44b makefile: complete the help menu
makefile items such as "check test", "mod.update", "mod.check" were
missing from help menu.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2020-05-18 15:12:55 +05:30
Alexander Trost 976011e923 makefile: auto generate target help menu
This uses grep, sort and awk to auto generate the `make help` menu based
on comments after each target.
Removed `clean.all` and `prune.all` targets as they are not available
anymore.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2020-03-27 16:07:56 +01:00
Travis Nielsen adba744320 build: ensure go.sum is updated with every build
Every developer should commit all the files that need to be changed
in a given set of changes. The go.sum file was not being generated
as expected since the update to go modules. Since the Jenkinsfile
was running make mod.check, the build was ending up with a modified
file, which caused a dirty tag on the build. Now it is expected
that each PR will merge with the corresponding go.sum changes.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2020-03-26 15:42:06 -06:00
Sébastien Han c4cd5eaa2e make: remove leftover help flag
This flag is gone since we move to go modules.

Signed-off-by: Sébastien Han <seb@redhat.com>
2020-03-26 17:34:26 +01: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 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
Mateusz Gozdek 81628fb0cf Makefile: fix targets list
0fc3775b99 added csv-ceph target to Makefile, but
'csv' target to the description.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2019-05-31 11:09:23 +02:00
Sébastien Han 0fc3775b99 deployment: OLM integration
Add necessary script to auto-generate a CSV file for OLM.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-05-16 22:53:30 +02:00
Bassam Tabbara eabc9bde1a simplify dependencies and add vendor.update target
remove all cosntraints that are not really needed from Gopkg.toml.
we should only be adding constraints that are direct dependencies
of the project and we require a specific version/revision of.

added a vendor.update makefile target that can be used to update
dependencies to the latest.

Signed-off-by: Bassam Tabbara <bassam@upbound.io>
2018-09-30 16:01:43 -07:00
Bassam Tabbara 2464e32857 add vendor checks
this commit updates dep to version 0.5, and adds a check during
CI runs that enforces that the vendor dependencies have not changed.
There is a now a makefile target `make vendor.check` that performs
this check. Also removed the requirement that PR run make vendor as
this will be done by CI.

Signed-off-by: Bassam Tabbara <bassam@upbound.io>
2018-09-30 08:10:42 -07:00
Blaine Gardner 483163fc21 make: Allow building select images
Raise the scope of the `IMAGES` config variable in the
`build/release/Makefile` to the `build/makelib/common.mk` file, and use
the `IMAGES` variable in the `images/Makefile` to allow users to build
only select images.

Examples of new use:
  make IMAGES='ceph ceph-toolbox' build
  make -C build/release IMAGES='ceph ceph-toolbox' publish

The 'images/image.mk' clean.build target was changed to use
`CLEAN_IMAGES` instead of `IMAGES`, as it was conflicting with use of
the parameter in image builds.

Added IMAGES option to top-level make's help text. The text for this
option exceeded 80 lines in the `Makefile` itself, so the help text was
refactored to eliminate `    @echo '<text>'`. The `Makefile` text should
now match exactly what is output to the user including line length.

Added IMAGES option to `INSTALL.md` file's "Build" section and also
moved some text around and added a few extra points of clarification
there to hopefully improve readability, especially for first-time
readers.

Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
2018-07-20 15:49:46 -06:00
Dennis Chen 4679fe5694 Disable the 'cross' build on AArch64
AArch64 platform doesn't support the `build.all` command due to the
`hypriot/qemu-register` issue, so we disable this kind of 'cross' build
on AArch64 platform.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-04-26 16:16:12 +08:00
Dennis Chen 872717d879 Add native build support on AArch64
Remove the `amd64` hardcode and the 'amd64 only build support' block.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-04-19 15:38:23 +08:00
travisn 9e4baf4c96 (ichekrygin) Remove the rook api service from production code
Remove controller api component and api daemon
Remove rookctl and  endpoints from Docker image

Signed-off-by: travisn <tnielsen@redhat.com>
2018-03-16 08:30:54 -07:00
Bassam Tabbara 9b611abda7 inital attempt at upgrading to kubernetes 1.8
Update all K8s dependencies to the release-1.8 branches.

Added build and make file support for generating code.

Fixed our use of client-go to match changes in new release.
2017-12-11 14:34:24 -08:00
Steve Leon 9f4df4f7ad Renaming flexvolume to rookflex
Fixes https://github.com/rook/rook/issues/1052
2017-10-12 13:19:55 -07:00
Steve Leon b4279e06fb Rook plugin for Kubernetes implemented as flexvolume
- Operator is deployed under namespace rook-system
- Operator deploys rook-agent on all nodes as daemonset also on
  rook-system
- Rook-agent installs flexvolume driver on hosts
- Rook-agent listens on unix socket for driver requests
- Rook-agent perform attach/detach on its node
- Rook-agent creates/delete CRD volumeattach objects
- Added fencing to support ROX and RWO
- Added unit and integration tests
- Updated examples and docks

fixes #432
2017-10-09 09:14:08 -07:00
Divesh Angula 21228d4d4b CI updates
- Add support for running individual test in a tests suite
 - building integration and longhaul test binaries
 - Addiing support for skipping CI or running just smoke test on a PR.
2017-09-21 15:52:12 -07:00
Jared Watts caa9fdf96a log version, arguments and flags at start up 2017-08-24 14:02:53 -07:00
Bassam Tabbara 9f6d3798e5 build: publish and promote helm charts
we now support charts.rook.io
2017-08-10 13:26:45 -07:00
Bassam Tabbara 556d221c93 build: build helm charts and reorganize demo dir
moved the helm charts and demo files to a `cluster` directory

helm charts are now built by the makefiles, and version tag is updated automagically.
2017-08-09 12:57:39 -07:00
Bassam Tabbara df51b6de32 build: images should only run for linux_amd64 2017-07-24 13:32:30 -07:00
Bassam Tabbara 3b948e0901 build: write version file during build not release 2017-07-24 13:27:16 -07:00
Bassam Tabbara 5732003ec6 build: explicitly build the test packages 2017-07-21 19:25:12 -07:00
Bassam Tabbara 0a9077b0da build: fix building of integration tests 2017-07-21 19:25:11 -07:00
Bassam Tabbara a8379cf251 build: disable glide up on build 2017-07-21 17:08:40 -07:00
Bassam Tabbara d8dc2c35b9 ensure test code is all covered by gofmt 2017-07-20 16:01:51 -07:00
Bassam Tabbara 2cdfdab3db build: optionally build integration tests binary 2017-07-17 17:35:25 -07:00
Bassam Tabbara a5959bbf8a build: run glide update when glide.yaml changes
this will ensure that we do not have broken dependencies.
2017-07-07 12:45:07 -07:00
Bassam Tabbara e4b1db9bc9 tests: refactor integration tests
refactor integration tests splitting out the kubernetes
cluster setup to just be in a script and making it the reponsibility
of the host/user/jenkins.

integration tests now run just like unit tests using "go test".
2017-06-29 15:20:28 -07:00
Bassam Tabbara e55fd55e7d build: rework release scripts and jenkinsfile
inital commit to convert release scripts to makefiles for improved maintenance.

now publishing to docker hub including manifest list support.

initial attempt at reworking the jenkinsfile to pipeline syntax.
2017-06-29 15:20:27 -07:00
Bassam Tabbara bc02e76f2d rename rookd to rook 2017-06-28 22:21:05 -07:00
Bassam Tabbara 58164be89b build: avoid building images twice on release 2017-06-22 15:11:58 -07:00