Commit Graph
12 Commits
Author SHA1 Message Date
Sébastien Han 68a4bc2d1b ceph: remove unnecessary package
We don't need to use github.com/ghodss/yaml since
"k8s.io/apimachinery/pkg/util/yaml" provides the same functionality and
we already import it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-17 16:10:47 +02:00
YZ775andHiroya Onoe c38e1f1ddd ceph: avoid duplicate ownerReferences
If we call OwnerInfo.SetOwnerReference for an object multiple times,
it results in OwnerReference duplication.

Signed-off-by: Yuzuki Mimura <yuzuki725.m@gmail.com>
Co-authored-by: Hiroya Onoe <onoehiroya@gmail.com>
2021-08-31 04:58:59 +00:00
Satoru Takeuchi 9eb3160d8b ceph: validate all owner references
Remaining work of #7259

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-03-26 06:43:54 +00:00
Sébastien Han 461dcd7457 ceph: fix csi blocker owner deletion
Small regression introduced in https://github.com/rook/rook/commit/26c8fd9bd14178d74dcc28f009e5c2f658224436
which was overriding the BlockOwnerDeletion from the ownerref.
Now, if set we don't modify it.
This fixes deployments on OCP.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-03-18 09:50:52 +01:00
Satoru Takeuchi 26c8fd9bd1 ceph: improve owner reference management
It's better to validate ownerReferences when setting them. In addition, we should use
controllerrutil.Set{Controller,Owner}Reference, that have such validation, as possible.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-03-16 10:29:33 +00:00
Madhu Rajanna 1bb5e1bab2 k8sUtil: Add YamlToContainerResource to resource
YamlToContainerResource can be used to convert the raw
string data to the array of ContainerResource.
the ContainerResource can be applied to the
pod container resources request and limits.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-04-28 13:13:31 +05:30
Travis Nielsen 5d24710fd2 ceph: set discover ownerrefs without blocking parent deletion
An owner reference cannot be set with BlockOwnerDeletion: true
if the operator does not have privs to add a finalizer to the parent.
The discover resources don't need to block deletion based on the
parent so we remove that property from the owner reference.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2019-12-13 15:22:21 -07:00
travisn 8226d577f6 remove obsolete check for setting the resource ownerreferences
The check for whether to set the OwnerReferences is no longer
necessary. When passing the correct value to the apiVersion,
the OwnerReferences can be successfully set for OpenShift.

Signed-off-by: travisn <tnielsen@redhat.com>
2019-07-01 06:55:07 -06:00
Alexander Trost 010c6747ab Fix MergeResourceRequirements() func
Resources are now correctly merged when "not set".

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2018-10-06 17:49:03 +02:00
travisn 89cfccd5a2 enable rook to run on openshift
Signed-off-by: travisn <tnielsen@redhat.com>
2018-07-05 11:20:43 -06:00
Travis Nielsen 4f44ace92b clean up the licenses that are not actually from etcd-operator 2018-01-02 22:46:14 -08:00
Alexander Trost 434e978b4d Added v1.ResourceRequirements to Cluster Spec
Added per node resource override/merge

Added unit tests to check for specs

Added documentation for resource requests/limits
2017-11-16 19:56:58 +01:00