Commit Graph
25 Commits
Author SHA1 Message Date
Arun Kumar Mohan 65d16bfc94 ceph: manual changes needed for kubernetes api updates
Fetched latest lib-bucket-provisioner changes as well.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2020-11-18 21:14:01 +05:30
subhamkrai 0fddfcf307 ceph: handle golangci-lint linter errcheck error
this commit handle golangci-lint linter errcheck.

`errcheck` - Errcheck is a program for checking for
unchecked errors in go programs. These unchecked errors
can be critical bugs in some cases

To see only staticcheck linter output
`golangci-lint run --disable-all -E errcheck`

Signed-off-by: subhamkrai <srai@redhat.com>
2020-09-30 22:24:34 +05:30
Madhu Rajanna 81688398f2 cleanup: use err.Wrap when the formatting is not required
Replaced err.Wrapf with err.Wrap when the formatting
is not required.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-29 17:42:59 +05:30
Nizamudeen 53883f68cf ceph: Handling Unhandled errors
This commit is to handle all those unhandled errors which raises the gosec warning.

Fixed G104: Unhandled Errors are handled now

Signed-off-by: Nizamudeen <nia@redhat.com>
2020-02-21 22:48:24 +05:30
Sébastien Han ad95c7296f ceph: do not print extended format for loggers.
When using the "errors" package, using `%+v` (extended format),
each Frame of the error's StackTrace will be printed in detail.
Let's only print `%v` to print the error.
If the error has a Cause it will be printed recursively.

Basically `%+v` has been replaced with `%v` for all `error` type
interfaces, whether the logger is Info, Warning or Error.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-16 18:35:54 +01:00
Sébastien Han 5ce2ed220e ceph: use "github.com/pkg/errors"
We now use the error package.
Kubernetes errors have been renamed kerrors since they are lower than
'errors'.

Closes: https://github.com/rook/rook/issues/4054
Signed-off-by: Sébastien Han <seb@redhat.com>
2019-12-09 16:58:32 +01:00
d-luu 9c755fac66 ceph: added priority classes to components
Adds priority class support to Ceph components
  to influence scheduler's pod preemption

Signed-off-by: d-luu <david@davidluu.info>
2019-11-15 16:28:41 -06:00
Madhu Rajanna 55e9340737 rename kserrors to k8serrors
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-09-27 10:05:45 +05:30
Madhu Rajanna 3af3cd63ab Rename AddNodeAffinity to GenerateNodeAffinity
function AddNodeAffinity was not adding any node
affinity instead it was forming the nodeaffinity
object. renamed it to GenerateNodeAffinity for more
meaningful

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-09-27 10:05:45 +05:30
Mateusz Gozdek f936394764 ceph: allow to set multiple tolerations for agent and discover pods
Closes #2896

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2019-07-17 23:11:18 +02:00
Umanga Chapagain 25e4275082 Rook: Added NodeAffinity to agent and discovery daemon
Previously, Rook Agent and Discovery DaemonSet deployment didn't allow
adding nodeAffinity. This commit adds nodeAffinity spec to daemonSet
deployment, which can be configured through environment variables in
operator deployment yaml.

+ Support multiple LabelKey, each with multiple LabelValue
+ Support multiple LabelKey with no value

Signed-off-by: Umanga Chapagain <chapagainumanga@gmail.com>
2019-07-05 13:48:09 +05:30
Alexander Trost 8bc26d9096 k8sclient: Update all operators to use apps/v1
All usages of k8s go client are now also using the versioned `AppsV1() `
call for the client.

Updated MySQL and Wordpress, and Kube Registy examples to use apps/v1
Deployments.

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2019-04-12 09:25:42 +02:00
Bogdan Luca b60897b034 Fix typo
Signed-off-by: Bogdan Luca <luca.bogdan@gmail.com>
2019-02-20 20:10:01 +02:00
Huamin Chen 1b21e42a90 convert extensions to apps
Signed-off-by: Huamin Chen <hchen@redhat.com>
2019-02-14 16:06:05 -05:00
Travis Nielsen 8a2001c3d7 Merge pull request #2522 from travisn/reference-k8s-provisioner
Reference the k8s provisioner instead of the outdated in-tree provisioner
2019-02-07 19:39:32 -07:00
travisn bd25630d91 allow disabling of fsGroup in the flex driver
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-24 07:53:44 -07:00
travisn c9d3d1bf17 reference the k8s pvc provisioner and remove outdated in-tree provisioner
Signed-off-by: travisn <tnielsen@redhat.com>
2019-01-19 07:48:00 -07:00
Timothy Allen ae46f31882 Add ENV flag for selinux labeling
Signed-off-by: Timothy Allen <kex.allen13@gmail.com>
2019-01-10 15:05:39 +00:00
Alexander Trost ac19f85fbb Allow specifying custom Ceph user and secret name for mounting
Introduce mount security mode for basic multi tenancy

Fixes #2164.

This adds three new parameters/options to StorageClass/flexvolume entry:
* `mountUser`
* `mountSecret`
* `mountSecretNamespace`

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-12-04 20:17:15 +01:00
John Axel Eriksson dd7860fb8e Support additonal agent mounts and alternate lib/modules host path.
The background is that there are at least two distributions with very
different host fs layouts. Those would be NixOS and GNU Guix.

For example, on NixOS, /lib/modules does not exist, it can instead
be found at /run/current-system/kernel-modules/lib/modules where
/run/current-system/kernel-modules is a symlink into /nix/store.

Within the modules directory, again on NixOS, there are more links
into the /nix store.

So to support alternate host fs layouts it is now possible to specify
the lib/modules host path and in addition specify extra mounts.

Signed-off-by: John Axel Eriksson <john@insane.se>
2018-10-17 21:03:44 +02:00
Angus Lees 9c95ed5f6f Don't misinterpret command output as string format
Previous code tried to interpret the string output as a `fmt.Sprintf`
string formatter, mangling `%` into `%!(MISSING)`, etc.

Thanks to go, I don't belive these are exploitable (unlike the similar
error in C).

Since this seemed to be a common error in the codebase, I did a quick
audit by visually inspecting the results of `git grep 'f([^"]'`.  I
don't have a good suggestion for automated tests to prevent this in
future :(

Example error (look for `(MISSING)`):
```
E0927 05:31:07.618429   11227 driver-call.go:237] Failed to unmarshal output for command: unmount, output: "2018-09-27 05:31:07.191711 I | exec: Running command: df --type ceph /var/lib/kubelet/pods/95461479-c216-11e8-bcf0-02030782ac80/volumes/ceph.rook.io~rook/oe-scratch\n2018-09-27 05:46:43.808596 I | Filesystem                                                 1K-blocks     Used Available Use%!M(MISSING)ounted on\n2018-09-27 05:46:43.808659 I | 10.107.25.147:6790,10.109.173.79:6790,10.104.85.255:6790:/ 151678976 49410048 102268928  33%!/(MISSING)var/lib/kubelet/pods/95461479-c216-11e8-bcf0-02030782ac80/volumes/ceph.rook.io~rook/oe-scratch\n{\"status\":\"Success\"}\n", error: invalid character '-' after top-level value
```

Signed-off-by: Angus Lees <gus@inodes.org>
2018-10-15 15:59:13 +11:00
travisn 9416fa8c65 update client-go to 1.11.3
Signed-off-by: travisn <tnielsen@redhat.com>
2018-09-21 15:39:29 -06:00
travisn 6502cda3b4 refactor cluster roles for minimal rbac access
Signed-off-by: travisn <tnielsen@redhat.com>
2018-06-25 12:57:25 -06:00
Jared Watts e48e951d1c Rename toolbox to make it Ceph specific, short names for CRDs, upgrade guide tweaks
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-05-22 12:31:38 -07:00
Jared Watts f3df68e573 operator, daemon, and cmd updates for supporting multiple storage types
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-05-18 14:32:20 -07:00