Skip to content

Commit

Permalink
Merge pull request #573 from red-hat-storage/sync_us--master
Browse files Browse the repository at this point in the history
Syncing latest changes from upstream master for rook
  • Loading branch information
travisn committed Feb 14, 2024
2 parents 7068a95 + 64cf8f2 commit e828b65
Show file tree
Hide file tree
Showing 33 changed files with 476 additions and 63 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"mon",
"monitoring",
"multus",
"network",
"nfs",
"object",
"operator",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary-test-config/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ runs:
- name: Setup Minikube
shell: bash --noprofile --norc -eo pipefail -x {0}
run: |
tests/scripts/github-action-helper.sh install_minikube_with_none_driver v1.29.0
tests/scripts/github-action-helper.sh install_minikube_with_none_driver v1.29.1
- name: install deps
shell: bash --noprofile --norc -eo pipefail -x {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-helm-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-mgr-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.29.0"]
kubernetes-versions: ["v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.29.0"]
kubernetes-versions: ["v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-object-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test-smoke-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-test-upgrade-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration-tests-on-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.25.16", "v1.27.10", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.25.16", "v1.27.10", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.25.16", "v1.27.10", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.25.16", "v1.27.8", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.25.16", "v1.27.10", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.26.11", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.26.11", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
strategy:
fail-fast: false
matrix:
kubernetes-versions: ["v1.23.17", "v1.29.0"]
kubernetes-versions: ["v1.24.17", "v1.29.1"]
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and Rook is granted the required privileges (see below for more information).

## Kubernetes Version

Kubernetes versions **v1.23** through **v1.29** are supported.
Kubernetes versions **v1.24** through **v1.29** are supported.

## CPU Architecture

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Getting-Started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This guide will walk through the basic setup of a Ceph cluster and enable K8s ap

## Kubernetes Version

Kubernetes versions **v1.23** through **v1.29** are supported.
Kubernetes versions **v1.24** through **v1.29** are supported.

## CPU Architecture

Expand Down
3 changes: 3 additions & 0 deletions PendingReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# v1.14 Pending Release Notes

## Breaking Changes

- The removal of `CSI_ENABLE_READ_AFFINITY` option and its replacement with per-cluster
read affinity setting in cephCluster CR (CSIDriverOptions section) in [PR](https://github.com/rook/rook/pull/13665)

## Features

- Kubernetes versions **v1.24** through **v1.29** are supported.
2 changes: 1 addition & 1 deletion deploy/charts/rook-ceph/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rules:
verbs: ["create"]
- apiGroups: ["csiaddons.openshift.io"]
resources: ["networkfences"]
verbs: ["create", "get", "update", "delete", "watch", "list"]
verbs: ["create", "get", "update", "delete", "watch", "list", "deletecollection"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get"]
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/rook-ceph/templates/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2282,6 +2282,8 @@ spec:
x-kubernetes-validations:
- message: at least one network selector must be specified when using multus
rule: '!has(self.provider) || (self.provider != ''multus'' || (self.provider == ''multus'' && size(self.selectors) > 0))'
- message: the legacy hostNetwork setting can only be set if the network.provider is set to the empty string
rule: '!has(self.hostNetwork) || self.hostNetwork == false || !has(self.provider) || self.provider == ""'
placement:
additionalProperties:
description: Placement is the placement for an object
Expand Down
2 changes: 1 addition & 1 deletion deploy/examples/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ rules:
verbs: ["create"]
- apiGroups: ["csiaddons.openshift.io"]
resources: ["networkfences"]
verbs: ["create", "get", "update", "delete", "watch", "list"]
verbs: ["create", "get", "update", "delete", "watch", "list", "deletecollection"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["get"]
Expand Down
2 changes: 2 additions & 0 deletions deploy/examples/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2280,6 +2280,8 @@ spec:
x-kubernetes-validations:
- message: at least one network selector must be specified when using multus
rule: '!has(self.provider) || (self.provider != ''multus'' || (self.provider == ''multus'' && size(self.selectors) > 0))'
- message: the legacy hostNetwork setting can only be set if the network.provider is set to the empty string
rule: '!has(self.hostNetwork) || self.hostNetwork == false || !has(self.provider) || self.provider == ""'
placement:
additionalProperties:
description: Placement is the placement for an object
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replace github.com/rook/rook/pkg/apis => ./pkg/apis

require (
github.com/IBM/keyprotect-go-client v0.12.2
github.com/aws/aws-sdk-go v1.50.12
github.com/aws/aws-sdk-go v1.50.15
github.com/banzaicloud/k8s-objectmatcher v1.8.0
github.com/ceph/go-ceph v0.25.0
github.com/coreos/pkg v0.0.0-20230601102743-20bbbf26f4d8
Expand All @@ -15,7 +15,7 @@ require (
github.com/go-ini/ini v1.67.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/hashicorp/vault/api v1.11.0
github.com/hashicorp/vault/api v1.12.0
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.5.0
github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1
github.com/libopenstorage/secrets v0.0.0-20231011182615-5f4b25ceede1
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/aws/aws-sdk-go v1.44.164/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.50.12 h1:Gc6QS4Ys++cWSl63U+HyPbKeLVcoOvi6veayhcipPac=
github.com/aws/aws-sdk-go v1.50.12/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go v1.50.15 h1:wEMnPfEQQFaoIJwuO18zq/vtG4Ft7NxQ3r9xlEi/8zg=
github.com/aws/aws-sdk-go v1.50.15/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/banzaicloud/k8s-objectmatcher v1.8.0 h1:Nugn25elKtPMTA2br+JgHNeSQ04sc05MDPmpJnd1N2A=
github.com/banzaicloud/k8s-objectmatcher v1.8.0/go.mod h1:p2LSNAjlECf07fbhDyebTkPUIYnU05G+WfGgkTmgeMg=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
Expand Down Expand Up @@ -487,8 +487,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM=
github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM=
github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8=
github.com/hashicorp/vault/api v1.11.0 h1:AChWByeHf4/P9sX3Y1B7vFsQhZO2BgQiCMQ2SA1P1UY=
github.com/hashicorp/vault/api v1.11.0/go.mod h1:si+lJCYO7oGkIoNPAN8j3azBLTn9SjMGS+jFaHd1Cck=
github.com/hashicorp/vault/api v1.12.0 h1:meCpJSesvzQyao8FCOgk2fGdoADAnbDu2WPJN1lDLJ4=
github.com/hashicorp/vault/api v1.12.0/go.mod h1:si+lJCYO7oGkIoNPAN8j3azBLTn9SjMGS+jFaHd1Cck=
github.com/hashicorp/vault/api/auth/approle v0.5.0 h1:a1TK6VGwYqSAfkmX4y4dJ4WBxMU5dStIZqScW4EPXR8=
github.com/hashicorp/vault/api/auth/approle v0.5.0/go.mod h1:CHOQIA1AZACfjTzHggmyfiOZ+xCSKNRFqe48FTCzH0k=
github.com/hashicorp/vault/api/auth/kubernetes v0.5.0 h1:CXO0fD7M3iCGovP/UApeHhPcH4paDFKcu7AjEXi94rI=
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/ceph.rook.io/v1/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func (n *NetworkSpec) IsHost() bool {
}

func ValidateNetworkSpec(clusterNamespace string, spec NetworkSpec) error {
if spec.HostNetwork && (spec.Provider != NetworkProviderDefault) {
return errors.Errorf(`the legacy hostNetwork setting is only valid with the default network provider ("") and not with '%q'`, spec.Provider)
}
if spec.IsMultus() {
if len(spec.Selectors) == 0 {
return errors.Errorf("at least one network selector must be specified when using the %q network provider", NetworkProviderMultus)
Expand Down
30 changes: 30 additions & 0 deletions pkg/apis/ceph.rook.io/v1/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,36 @@ func TestNetworkCephSpecLegacy(t *testing.T) {
assert.Equal(t, expected, net)
}

func TestValidateNetworkSpec(t *testing.T) {
net := NetworkSpec{
HostNetwork: true,
Provider: NetworkProviderDefault,
}
err := ValidateNetworkSpec("", net)
assert.NoError(t, err)

net = NetworkSpec{
HostNetwork: true,
Provider: NetworkProviderHost,
}
err = ValidateNetworkSpec("", net)
assert.Error(t, err)

net = NetworkSpec{
HostNetwork: false,
Provider: NetworkProviderDefault,
}
err = ValidateNetworkSpec("", net)
assert.NoError(t, err)

net = NetworkSpec{
HostNetwork: false,
Provider: NetworkProviderHost,
}
err = ValidateNetworkSpec("", net)
assert.NoError(t, err)
}

func TestNetworkCephIsHostLegacy(t *testing.T) {
net := NetworkSpec{HostNetwork: true}

Expand Down
1 change: 1 addition & 0 deletions pkg/apis/ceph.rook.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,7 @@ type SSSDSidecarAdditionalFile struct {

// NetworkSpec for Ceph includes backward compatibility code
// +kubebuilder:validation:XValidation:message="at least one network selector must be specified when using multus",rule="!has(self.provider) || (self.provider != 'multus' || (self.provider == 'multus' && size(self.selectors) > 0))"
// +kubebuilder:validation:XValidation:message=`the legacy hostNetwork setting can only be set if the network.provider is set to the empty string`,rule=`!has(self.hostNetwork) || self.hostNetwork == false || !has(self.provider) || self.provider == ""`
type NetworkSpec struct {
// Provider is what provides network connectivity to the cluster e.g. "host" or "multus".
// If the Provider is updated from being empty to "host" on a running cluster, then the operator will automatically fail over all the mons to apply the "host" network settings.
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/rook/rook/pkg/apis
go 1.21

require (
github.com/hashicorp/vault/api v1.11.0
github.com/hashicorp/vault/api v1.12.0
github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.5.0
github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1
github.com/libopenstorage/secrets v0.0.0-20231011182615-5f4b25ceede1
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31RPDgJM=
github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM=
github.com/hashicorp/vault/api v1.10.0/go.mod h1:jo5Y/ET+hNyz+JnKDt8XLAdKs+AM0G5W0Vp1IrFI8N8=
github.com/hashicorp/vault/api v1.11.0 h1:AChWByeHf4/P9sX3Y1B7vFsQhZO2BgQiCMQ2SA1P1UY=
github.com/hashicorp/vault/api v1.11.0/go.mod h1:si+lJCYO7oGkIoNPAN8j3azBLTn9SjMGS+jFaHd1Cck=
github.com/hashicorp/vault/api v1.12.0 h1:meCpJSesvzQyao8FCOgk2fGdoADAnbDu2WPJN1lDLJ4=
github.com/hashicorp/vault/api v1.12.0/go.mod h1:si+lJCYO7oGkIoNPAN8j3azBLTn9SjMGS+jFaHd1Cck=
github.com/hashicorp/vault/api/auth/approle v0.5.0 h1:a1TK6VGwYqSAfkmX4y4dJ4WBxMU5dStIZqScW4EPXR8=
github.com/hashicorp/vault/api/auth/approle v0.5.0/go.mod h1:CHOQIA1AZACfjTzHggmyfiOZ+xCSKNRFqe48FTCzH0k=
github.com/hashicorp/vault/api/auth/kubernetes v0.5.0 h1:CXO0fD7M3iCGovP/UApeHhPcH4paDFKcu7AjEXi94rI=
Expand Down
34 changes: 33 additions & 1 deletion pkg/operator/ceph/cluster/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import (
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
apituntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/record"
Expand Down Expand Up @@ -387,9 +388,40 @@ func (c *ClusterController) requestClusterDelete(cluster *cephv1.CephCluster) (r
nsName, existing.namespacedName.Name)
return reconcile.Result{}, nil // do not requeue the delete
}
_, err := c.context.ApiExtensionsClient.ApiextensionsV1().CustomResourceDefinitions().Get(c.OpManagerCtx, "networkfences.csiaddons.openshift.io", metav1.GetOptions{})
if err == nil {
logger.Info("removing networkFence if matching cephCluster UID found")
networkFenceList := &addonsv1alpha1.NetworkFenceList{}
labelSelector := labels.SelectorFromSet(map[string]string{
networkFenceLabel: string(cluster.GetUID()),
})

logger.Infof("cleaning up CephCluster %q", nsName)
opts := []client.DeleteAllOfOption{
client.MatchingLabels{
networkFenceLabel: string(cluster.GetUID()),
},
client.GracePeriodSeconds(0),
}
err = c.client.DeleteAllOf(c.OpManagerCtx, &addonsv1alpha1.NetworkFence{}, opts...)
if err != nil && !kerrors.IsNotFound(err) {
return reconcile.Result{}, errors.Wrapf(err, "failed to delete networkFence with label %s", networkFenceLabel)
}

err = c.client.List(c.OpManagerCtx, networkFenceList, &client.MatchingLabelsSelector{Selector: labelSelector})
if err != nil && !kerrors.IsNotFound(err) {
return reconcile.Result{}, errors.Wrap(err, "failed to list networkFence")
}
if len(networkFenceList.Items) > 0 {
for i := range networkFenceList.Items {
err = opcontroller.RemoveFinalizerWithName(c.OpManagerCtx, c.client, &networkFenceList.Items[i], "csiaddons.openshift.io/network-fence")
if err != nil {
return reconcile.Result{}, errors.Wrap(err, "failed to remove finalizer")
}
}
}
}

logger.Infof("cleaning up CephCluster %q", nsName)
if cluster, ok := c.clusterMap[cluster.Namespace]; ok {
// We used to stop the bucket controller here but when we get a DELETE event for the CephCluster
// we will reload the CRD manager anyway so the bucket controller go routine will be stopped
Expand Down
8 changes: 7 additions & 1 deletion pkg/operator/ceph/cluster/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ import (
"testing"
"time"

addonsv1alpha1 "github.com/csi-addons/kubernetes-csi-addons/apis/csiaddons/v1alpha1"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
rookclient "github.com/rook/rook/pkg/client/clientset/versioned/fake"
"github.com/rook/rook/pkg/client/clientset/versioned/scheme"
"github.com/rook/rook/pkg/clusterd"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
apifake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake"
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -75,11 +78,14 @@ func TestReconcileDeleteCephCluster(t *testing.T) {
// create a Rook-Ceph scheme to use for our tests
scheme := runtime.NewScheme()
assert.NoError(t, cephv1.AddToScheme(scheme))
assert.NoError(t, addonsv1alpha1.AddToScheme(scheme))

t.Run("deletion blocked while dependencies exist", func(t *testing.T) {
// set up clusterd.Context
clusterdCtx := &clusterd.Context{
Clientset: k8sfake.NewSimpleClientset(),
Clientset: k8sfake.NewSimpleClientset(),
RookClientset: rookclient.NewSimpleClientset(),
ApiExtensionsClient: apifake.NewSimpleClientset(),
}

// create the cluster controller and tell it that the cluster has been deleted
Expand Down
Loading

0 comments on commit e828b65

Please sign in to comment.