mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
helm: add helm charts E2E
This PR adds the support for helm installation, and cephcsi helm charts deployment and teardown and also runs E2E on for helm charts. Add socat to provide port forwadring access for helm Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
b2dfcae802
commit
d09ffbd6de
@ -92,7 +92,7 @@ cluster or you can pass `kubeconfig`flag while running tests.
|
||||
Functional tests are run by the `go test` command.
|
||||
|
||||
```console
|
||||
$go test ./e2e/ -timeout=20m -v
|
||||
$go test ./e2e/ -timeout=20m -v -mod=vendor
|
||||
```
|
||||
|
||||
Functional tests can be invoked by `make` command
|
||||
|
@ -129,6 +129,8 @@ var _ = Describe("cephfs", func() {
|
||||
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed {
|
||||
// log pods created by helm chart
|
||||
logsCSIPods("app=ceph-csi-cephfs", c)
|
||||
// log provisoner
|
||||
logsCSIPods("app=csi-cephfsplugin-provisioner", c)
|
||||
// log node plugin
|
||||
|
@ -19,6 +19,11 @@ var (
|
||||
)
|
||||
|
||||
func deployVault(c kubernetes.Interface, deployTimeout int) {
|
||||
// hack to make helm E2E pass as helm charts creates this configmap as part
|
||||
// of cephcsi deployment
|
||||
_, err := framework.RunKubectl("delete", "cm", "ceph-csi-encryption-kms-config", "--namespace", cephCSINamespace, "--ignore-not-found=true")
|
||||
Expect(err).Should(BeNil())
|
||||
|
||||
createORDeleteVault("create")
|
||||
opt := metav1.ListOptions{
|
||||
LabelSelector: "app=vault",
|
||||
|
@ -131,6 +131,8 @@ var _ = Describe("RBD", func() {
|
||||
|
||||
AfterEach(func() {
|
||||
if CurrentGinkgoTestDescription().Failed {
|
||||
// log pods created by helm chart
|
||||
logsCSIPods("app=ceph-csi-rbd", c)
|
||||
// log provisoner
|
||||
logsCSIPods("app=csi-rbdplugin-provisioner", c)
|
||||
// log node plugin
|
||||
@ -382,7 +384,7 @@ var _ = Describe("RBD", func() {
|
||||
}
|
||||
|
||||
// delete rbd nodeplugin pods
|
||||
err = deletePodWithLabel("app=csi-rbdplugin")
|
||||
err = deletePodWithLabel("app=csi-rbdplugin", cephCSINamespace, false)
|
||||
if err != nil {
|
||||
Fail(err.Error())
|
||||
}
|
||||
|
@ -775,8 +775,8 @@ func validateEncryptedPVCAndAppBinding(pvcPath, appPath, kms string, f *framewor
|
||||
}
|
||||
}
|
||||
|
||||
func deletePodWithLabel(label string) error {
|
||||
_, err := framework.RunKubectl("delete", "po", "-l", label)
|
||||
func deletePodWithLabel(label, ns string, skipNotFound bool) error {
|
||||
_, err := framework.RunKubectl("delete", "po", "-l", label, fmt.Sprintf("--ignore-not-found=%t", skipNotFound), fmt.Sprintf("--namespace=%s", ns))
|
||||
if err != nil {
|
||||
e2elog.Logf("failed to delete pod %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user