From ce2968410dec52fff567396234cbc4440978d305 Mon Sep 17 00:00:00 2001 From: Pavan Date: Fri, 18 Aug 2023 11:40:57 +0200 Subject: [PATCH] CAP Operator: Initial open source version created Initial Open Source version Change-Id: I51258701067d3b05b9a79dbff0d37101c2dac1e8 --- .dockerignore | 4 + .github/workflows/go.yml | 32 + .github/workflows/publish-website.yaml | 79 + .gitignore | 21 + .reuse/dep5 | 20 +- .vscode/launch.json | 15 + LICENSE | 27 +- README.md | 32 +- build/controller/Dockerfile | 15 + build/mtx-job/Dockerfile | 15 + build/server/Dockerfile | 15 + build/web-hooks/Dockerfile | 15 + cmd/controller/main.go | 125 + cmd/controller/temp.go | 367 +++ cmd/mtx-job/main.go | 539 ++++ cmd/mtx-job/main_test.go | 506 ++++ cmd/server/internal/client.go | 15 + cmd/server/internal/handler.go | 581 +++++ cmd/server/internal/handler_test.go | 659 +++++ cmd/server/internal/jwt.go | 231 ++ cmd/server/internal/jwt_test.go | 356 +++ .../internal/testdata/auth.service.local.crt | 30 + .../internal/testdata/auth.service.local.key | 28 + cmd/server/internal/testdata/rootCA.pem | 23 + cmd/server/server.go | 67 + cmd/web-hooks/internal/handler/handler.go | 625 +++++ .../internal/handler/handler_test.go | 1160 +++++++++ cmd/web-hooks/main.go | 73 + crds/capapplication.yaml | 133 + crds/capapplicationversion.yaml | 755 ++++++ crds/captenant.yaml | 95 + crds/captenantoperation.yaml | 106 + go.mod | 79 + go.sum | 251 ++ hack/LICENSE_BOILERPLATE.txt | 15 + hack/api-reference/config.json | 20 + hack/api-reference/generate.sh | 14 + hack/api-reference/template/members.tpl | 48 + hack/api-reference/template/pkg.tpl | 49 + hack/api-reference/template/placeholder.go | 2 + hack/api-reference/template/type.tpl | 81 + hack/generate.sh | 55 + hack/helm-reference/generate.sh | 22 + hack/tools.go | 8 + internal/controller/common_test.go | 634 +++++ internal/controller/controller.go | 277 ++ internal/controller/controller_test.go | 288 +++ internal/controller/informers.go | 240 ++ internal/controller/informers_test.go | 145 ++ .../controller/reconcile-capapplication.go | 404 +++ .../reconcile-capapplication_test.go | 1124 +++++++++ .../reconcile-capapplicationversion.go | 834 ++++++ .../reconcile-capapplicationversion_test.go | 536 ++++ internal/controller/reconcile-captenant.go | 693 +++++ .../controller/reconcile-captenant_test.go | 591 +++++ .../reconcile-captenantoperation.go | 678 +++++ .../reconcile-captenantoperation_test.go | 651 +++++ internal/controller/reconcile-domains.go | 1270 ++++++++++ internal/controller/reconcile-domains_test.go | 280 +++ internal/controller/reconcile.go | 515 ++++ internal/controller/reconcile_test.go | 581 +++++ internal/controller/reconciliation-result.go | 42 + .../capapplication/ca-01.expected.yaml | 42 + .../capapplication/ca-01.initial.yaml | 38 + .../capapplication/ca-02.expected.yaml | 49 + .../capapplication/ca-02.initial.yaml | 42 + .../capapplication/ca-03.expected.yaml | 52 + .../capapplication/ca-03.initial.yaml | 42 + .../capapplication/ca-04.expected.yaml | 50 + .../capapplication/ca-04.initial.yaml | 43 + .../capapplication/ca-05.expected.yaml | 52 + .../capapplication/ca-05.initial.yaml | 42 + .../capapplication/ca-06.expected.yaml | 57 + .../capapplication/ca-06.initial.yaml | 43 + .../capapplication/ca-07.expected.yaml | 49 + .../capapplication/ca-07.initial.yaml | 42 + .../capapplication/ca-08.expected.yaml | 49 + .../capapplication/ca-08.initial.yaml | 42 + .../capapplication/ca-09.expected.yaml | 50 + .../capapplication/ca-09.initial.yaml | 43 + .../capapplication/ca-10.expected.yaml | 50 + .../capapplication/ca-10.initial.yaml | 43 + .../capapplication/ca-11.expected.yaml | 50 + .../capapplication/ca-11.initial.yaml | 43 + .../capapplication/ca-12.expected.yaml | 50 + .../capapplication/ca-12.initial.yaml | 43 + .../capapplication/ca-13.expected.yaml | 42 + .../capapplication/ca-13.initial.yaml | 40 + .../capapplication/ca-14.expected.yaml | 41 + .../capapplication/ca-14.initial.yaml | 41 + .../capapplication/ca-15.expected.yaml | 50 + .../capapplication/ca-15.initial.yaml | 43 + .../capapplication/ca-16.expected.yaml | 46 + .../capapplication/ca-16.initial.yaml | 47 + .../capapplication/ca-17.expected.yaml | 47 + .../capapplication/ca-17.initial.yaml | 47 + .../capapplication/ca-18.expected.yaml | 47 + .../capapplication/ca-18.initial.yaml | 47 + .../capapplication/ca-19.expected.yaml | 46 + .../capapplication/ca-19.initial.yaml | 47 + .../capapplication/ca-20.expected.yaml | 47 + .../capapplication/ca-20.initial.yaml | 47 + .../capapplication/ca-21.expected.yaml | 50 + .../capapplication/ca-21.initial.yaml | 43 + .../capapplication/ca-22.expected.yaml | 53 + .../capapplication/ca-22.initial.yaml | 42 + .../capapplication/ca-23.expected.yaml | 58 + .../capapplication/ca-23.initial.yaml | 43 + .../capapplication/ca-24.expected.yaml | 50 + .../capapplication/ca-24.initial.yaml | 42 + .../capapplication/ca-25.expected.yaml | 50 + .../capapplication/ca-25.initial.yaml | 43 + .../capapplication/ca-26.expected.yaml | 50 + .../capapplication/ca-26.initial.yaml | 43 + .../capapplication/ca-27.expected.yaml | 50 + .../capapplication/ca-27.initial.yaml | 43 + .../capapplication/ca-28.expected.yaml | 50 + .../capapplication/ca-28.initial.yaml | 43 + .../capapplication/ca-29.expected.yaml | 55 + .../capapplication/ca-29.initial.yaml | 52 + .../capapplication/ca-30.expected.yaml | 50 + .../capapplication/ca-30.initial.yaml | 45 + .../capapplication/ca-31.expected.yaml | 58 + .../capapplication/ca-31.initial.yaml | 44 + .../capapplication/ca-32.expected.yaml | 58 + .../capapplication/ca-32.initial.yaml | 44 + .../capapplication/ca-33.expected.yaml | 58 + .../capapplication/ca-33.initial.yaml | 44 + .../capapplication/ca-34.expected.yaml | 43 + .../capapplication/ca-34.initial.yaml | 41 + .../capapplication/ca-35.expected.yaml | 47 + .../capapplication/ca-35.initial.yaml | 46 + .../capapplication/ca-36.expected.yaml | 50 + .../capapplication/ca-36.initial.yaml | 44 + .../capapplication/ca-37.expected.yaml | 48 + .../capapplication/ca-37.initial.yaml | 48 + .../capapplication/ca-38.expected.yaml | 49 + .../capapplication/ca-38.initial.yaml | 48 + .../capapplication/ca-39.expected.yaml | 49 + .../capapplication/ca-39.initial.yaml | 48 + .../capapplication/ca-40.expected.yaml | 48 + .../capapplication/ca-40.initial.yaml | 48 + .../capapplication/ca-41.expected.yaml | 49 + .../capapplication/ca-41.initial.yaml | 48 + .../capapplication/ca-42.expected.yaml | 48 + .../capapplication/ca-42.initial.yaml | 42 + .../capapplication/ca-43.expected.yaml | 50 + .../capapplication/ca-43.initial.yaml | 48 + .../capapplication/ca-44.expected.yaml | 49 + .../capapplication/ca-45.expected.yaml | 55 + .../capapplication/ca-45.initial.yaml | 52 + .../testdata/capapplication/ca-dns-error.yaml | 27 + .../capapplication/ca-dns-not-ready.yaml | 23 + .../testdata/capapplication/ca-dns.yaml | 26 + .../cat-consumer-no-finalizers-ready.yaml | 35 + .../capapplication/cat-consumer-ready.yaml | 38 + .../cat-consumer-upg-never-deleting.yaml | 37 + .../cat-consumer-upg-never-ready.yaml | 37 + .../capapplication/cat-provider-error.yaml | 37 + .../cat-provider-no-finalizers-error.yaml | 35 + .../cat-provider-no-finalizers-ready.yaml | 35 + .../cat-provider-upgrade-error.yaml | 37 + .../cav-33-version-updated-ready.yaml | 67 + .../testdata/capapplication/cav-error.yaml | 67 + .../cav-name-modified-ready.yaml | 67 + .../testdata/capapplication/gateway.yaml | 30 + .../istio-ingress-with-cert-error.yaml | 65 + ...istio-ingress-with-cert-no-finalizers.yaml | 62 + .../istio-ingress-with-cert.yaml | 64 + .../istio-ingress-with-certManager-error.yaml | 68 + ...ngress-with-certManager-no-finalizers.yaml | 66 + .../istio-ingress-with-certManager.yaml | 68 + .../istio-ingress-with-no-cert.yaml | 46 + .../cat-provider-version.yaml | 31 + .../cav-annotations.yaml | 170 ++ .../cav-cluster-netpol-port.yaml | 153 ++ .../cav-custom-destination-config.yaml | 71 + .../cav-custom-labels.yaml | 101 + .../cav-empty-status.yaml | 48 + .../cav-error-condition-status.yaml | 55 + .../cav-error-status.yaml | 50 + .../cav-failed-content-job.yaml | 70 + .../capapplicationversion/cav-invalid-ca.yaml | 44 + .../cav-invalid-env-cap.yaml | 69 + .../cav-invalid-env-content.yaml | 63 + .../cav-invalid-env-job-worker.yaml | 80 + .../cav-merged-destinations-router.yaml | 66 + .../cav-pod-security-context.yaml | 167 ++ .../cav-probes-and-resources.yaml | 143 ++ .../cav-processing-job-finished.yaml | 67 + .../capapplicationversion/cav-processing.yaml | 66 + .../cav-ready-deleting.yaml | 68 + .../cav-security-context.yaml | 156 ++ .../cav-unknown-deleting.yaml | 59 + .../cav-valid-env-config.yaml | 91 + .../content-job-completed.yaml | 71 + .../content-job-failed.yaml | 72 + .../content-job-pending.yaml | 69 + .../expected/cav-deleted-unknown.yaml | 67 + .../expected/cav-deleted.yaml | 68 + .../expected/cav-deleting.yaml | 69 + .../cav-error-condition-processing.yaml | 68 + .../expected/cav-error-processing.yaml | 68 + .../expected/cav-failed-content-job.yaml | 71 + .../expected/cav-failed-env-cap.yaml | 78 + .../expected/cav-failed-env-content.yaml | 72 + .../expected/cav-failed-env-job-worker.yaml | 89 + .../expected/cav-missing-content-job.yaml | 69 + .../expected/cav-missing-secrets.yaml | 68 + .../expected/cav-processing.yaml | 68 + .../expected/cav-ready-annotations.yaml | 449 ++++ .../expected/cav-ready-app-netpol.yaml | 308 +++ .../cav-ready-cluster-netpol-port.yaml | 349 +++ .../expected/cav-ready-content-job.yaml | 70 + .../cav-ready-custom-destination-config.yaml | 153 ++ .../cav-ready-custom-labels-config.yaml | 189 ++ .../cav-ready-merged-destinations-router.yaml | 142 ++ .../cav-ready-pod-security-context.yaml | 399 +++ .../cav-ready-probes-and-resources.yaml | 248 ++ .../expected/cav-ready-security-context.yaml | 355 +++ .../expected/cav-ready-valid-env-config.yaml | 174 ++ .../expected/cav-ready.yaml | 68 + .../testdata/captenant/cat-01.initial.yaml | 11 + .../testdata/captenant/cat-02.expected.yaml | 36 + .../testdata/captenant/cat-02.initial.yaml | 11 + .../testdata/captenant/cat-03.expected.yaml | 89 + .../testdata/captenant/cat-03.initial.yaml | 36 + .../testdata/captenant/cat-04.expected.yaml | 99 + .../testdata/captenant/cat-04.initial.yaml | 72 + .../testdata/captenant/cat-05.expected.yaml | 36 + .../testdata/captenant/cat-05.initial.yaml | 72 + .../testdata/captenant/cat-06.expected.yaml | 36 + .../testdata/captenant/cat-06.initial.yaml | 69 + .../testdata/captenant/cat-07.expected.yaml | 67 + .../testdata/captenant/cat-07.initial.yaml | 37 + .../testdata/captenant/cat-08.expected.yaml | 37 + .../testdata/captenant/cat-08.initial.yaml | 37 + .../testdata/captenant/cat-09.expected.yaml | 67 + .../testdata/captenant/cat-09.initial.yaml | 38 + .../testdata/captenant/cat-10.expected.yaml | 37 + .../testdata/captenant/cat-10.initial.yaml | 74 + .../testdata/captenant/cat-11.expected.yaml | 36 + .../testdata/captenant/cat-11.initial.yaml | 37 + .../testdata/captenant/cat-13.expected.yaml | 105 + .../testdata/captenant/cat-13.initial.yaml | 75 + .../testdata/captenant/cat-14.initial.yaml | 29 + .../testdata/captenant/cat-15.expected.yaml | 102 + .../testdata/captenant/cat-15.initial.yaml | 74 + .../testdata/captenant/cat-16.expected.yaml | 74 + .../testdata/captenant/cat-17.expected.yaml | 124 + .../testdata/captenant/cat-17.initial.yaml | 101 + .../testdata/captenant/cat-20.expected.yaml | 36 + .../testdata/captenant/cat-20.initial.yaml | 36 + .../testdata/captenant/cat-21.expected.yaml | 78 + .../testdata/captenant/cat-21.initial.yaml | 109 + .../testdata/captenant/cat-22.initial.yaml | 106 + .../testdata/captenant/cat-23.expected.yaml | 40 + .../testdata/captenant/cat-23.initial.yaml | 75 + .../testdata/captenant/cat-24.expected.yaml | 70 + .../testdata/captenant/cat-24.initial.yaml | 74 + .../testdata/captenant/cat-25.expected.yaml | 70 + .../testdata/captenant/cat-25.initial.yaml | 39 + .../testdata/captenant/cat-26.initial.yaml | 72 + .../testdata/captenant/cat-27.expected.yaml | 67 + .../testdata/captenant/cat-28.expected.yaml | 91 + .../testdata/captenant/cat-28.initial.yaml | 36 + .../testdata/captenant/cat-29.expected.yaml | 44 + .../testdata/captenant/cat-29.initial.yaml | 79 + .../captenant/cat-with-no-version.yaml | 35 + .../changed-provider-tenant-dnsentry.yaml | 27 + .../provider-tenant-dnsentry-not-ready.yaml | 27 + .../captenant/provider-tenant-dnsentry.yaml | 27 + .../captenant/provider-tenant-dr-v1.yaml | 27 + .../captenant/provider-tenant-vs-v1.yaml | 34 + ...o-be-updated-provider-tenant-dnsentry.yaml | 27 + .../captenantoperation/ctop-01.expected.yaml | 30 + .../captenantoperation/ctop-01.initial.yaml | 13 + .../captenantoperation/ctop-02.expected.yaml | 31 + .../captenantoperation/ctop-02.initial.yaml | 30 + .../captenantoperation/ctop-03.expected.yaml | 34 + .../captenantoperation/ctop-03.initial.yaml | 28 + .../captenantoperation/ctop-04.expected.yaml | 129 + .../captenantoperation/ctop-04.initial.yaml | 32 + .../captenantoperation/ctop-05.expected.yaml | 31 + .../captenantoperation/ctop-05.initial.yaml | 13 + .../captenantoperation/ctop-06.expected.yaml | 134 + .../captenantoperation/ctop-06.initial.yaml | 33 + .../captenantoperation/ctop-07.expected.yaml | 114 + .../captenantoperation/ctop-07.initial.yaml | 37 + .../captenantoperation/ctop-08.expected.yaml | 119 + .../captenantoperation/ctop-08.initial.yaml | 119 + .../captenantoperation/ctop-09.expected.yaml | 138 + .../captenantoperation/ctop-09.initial.yaml | 42 + .../captenantoperation/ctop-10.expected.yaml | 42 + .../captenantoperation/ctop-10.initial.yaml | 141 ++ .../captenantoperation/ctop-11.expected.yaml | 42 + .../captenantoperation/ctop-11.initial.yaml | 118 + .../captenantoperation/ctop-12.expected.yaml | 44 + .../captenantoperation/ctop-12.initial.yaml | 119 + .../captenantoperation/ctop-13.expected.yaml | 43 + .../captenantoperation/ctop-13.initial.yaml | 142 ++ .../captenantoperation/ctop-14.expected.yaml | 42 + .../captenantoperation/ctop-14.initial.yaml | 43 + .../captenantoperation/ctop-15.expected.yaml | 16 + .../captenantoperation/ctop-15.initial.yaml | 13 + .../captenantoperation/ctop-16.expected.yaml | 129 + .../captenantoperation/ctop-16.initial.yaml | 32 + .../captenantoperation/ctop-17.expected.yaml | 129 + .../captenantoperation/ctop-17.initial.yaml | 128 + .../captenantoperation/ctop-18.expected.yaml | 110 + .../captenantoperation/ctop-18.initial.yaml | 32 + .../captenantoperation/ctop-19.expected.yaml | 109 + .../captenantoperation/ctop-19.initial.yaml | 32 + .../captenantoperation/ctop-20.expected.yaml | 109 + .../captenantoperation/ctop-20.initial.yaml | 32 + .../captenantoperation/ctop-21.expected.yaml | 115 + .../captenantoperation/ctop-21.initial.yaml | 32 + .../captenantoperation/ctop-22.expected.yaml | 118 + .../captenantoperation/ctop-22.initial.yaml | 32 + .../captenantoperation/ctop-23.expected.yaml | 119 + .../captenantoperation/ctop-23.initial.yaml | 37 + .../captenantoperation/ctop-24.expected.yaml | 110 + .../captenantoperation/ctop-24.initial.yaml | 32 + .../captenantoperation/ctop-25.expected.yaml | 123 + .../captenantoperation/ctop-25.initial.yaml | 37 + .../captenantoperation/ctop-26.expected.yaml | 134 + .../captenantoperation/ctop-26.initial.yaml | 33 + .../common/capapplication-multi-xsuaa.yaml | 41 + .../testdata/common/capapplication.yaml | 39 + .../capapplicationversion-invalid-env.yaml | 78 + ...applicationversion-v1-mtxs-custom-cmd.yaml | 72 + .../common/capapplicationversion-v1-mtxs.yaml | 68 + .../capapplicationversion-v1-not-ready.yaml | 65 + .../capapplicationversion-v1-resources.yaml | 74 + ...pplicationversion-v1-security-context.yaml | 77 + .../common/capapplicationversion-v1.yaml | 70 + .../capapplicationversion-v2-annotations.yaml | 104 + .../capapplicationversion-v2-multi-xsuaa.yaml | 78 + ...icationversion-v2-multiple-tenant-ops.yaml | 98 + ...applicationversion-v2-no-mtx-workload.yaml | 63 + ...cationversion-v2-pod-security-context.yaml | 101 + .../common/capapplicationversion-v2.yaml | 66 + .../common/capapplicationversion-v3.yaml | 66 + .../common/captenant-provider-ready.yaml | 37 + .../captenant-provider-upgraded-ready.yaml | 37 + .../testdata/common/credential-secrets.yaml | 35 + .../testdata/common/istio-ingress.yaml | 46 + .../testdata/common/operator-gateway.yaml | 26 + internal/controller/utils.go | 218 ++ internal/util/config.go | 55 + internal/util/types.go | 38 + internal/util/uaa.go | 36 + internal/util/uaa_test.go | 93 + internal/util/vcap-credentials.go | 149 ++ internal/util/vcap-credentials_test.go | 211 ++ pkg/apis/sme.sap.com/v1alpha1/doc.go | 4 + pkg/apis/sme.sap.com/v1alpha1/register.go | 53 + pkg/apis/sme.sap.com/v1alpha1/types.go | 471 ++++ pkg/apis/sme.sap.com/v1alpha1/utils.go | 89 + .../v1alpha1/zz_generated.deepcopy.go | 804 ++++++ .../applyconfiguration/internal/internal.go | 61 + .../v1alpha1/applicationdomains.go | 72 + .../sme.sap.com/v1alpha1/btp.go | 43 + .../v1alpha1/btptenantidentification.go | 47 + .../sme.sap.com/v1alpha1/capapplication.go | 218 ++ .../v1alpha1/capapplicationspec.go | 74 + .../v1alpha1/capapplicationstatus.go | 80 + .../v1alpha1/capapplicationversion.go | 218 ++ .../v1alpha1/capapplicationversionspec.go | 81 + .../v1alpha1/capapplicationversionstatus.go | 73 + .../sme.sap.com/v1alpha1/captenant.go | 218 ++ .../v1alpha1/captenantoperation.go | 218 ++ .../v1alpha1/captenantoperationspec.go | 82 + .../v1alpha1/captenantoperationstatus.go | 80 + .../v1alpha1/captenantoperationstep.go | 60 + .../sme.sap.com/v1alpha1/captenantspec.go | 77 + .../sme.sap.com/v1alpha1/captenantstatus.go | 91 + .../sme.sap.com/v1alpha1/containerdetails.go | 100 + .../sme.sap.com/v1alpha1/deploymentdetails.go | 145 ++ .../sme.sap.com/v1alpha1/genericstatus.go | 53 + .../sme.sap.com/v1alpha1/jobdetails.go | 122 + .../sme.sap.com/v1alpha1/namevalue.go | 47 + .../sme.sap.com/v1alpha1/ports.go | 78 + .../sme.sap.com/v1alpha1/serviceinfo.go | 56 + .../sme.sap.com/v1alpha1/tenantoperations.go | 71 + .../tenantoperationworkloadreference.go | 47 + .../sme.sap.com/v1alpha1/workloaddetails.go | 97 + pkg/client/applyconfiguration/utils.go | 86 + pkg/client/clientset/versioned/clientset.go | 119 + .../versioned/fake/clientset_generated.go | 84 + pkg/client/clientset/versioned/fake/doc.go | 19 + .../clientset/versioned/fake/register.go | 55 + pkg/client/clientset/versioned/scheme/doc.go | 19 + .../clientset/versioned/scheme/register.go | 55 + .../sme.sap.com/v1alpha1/capapplication.go | 255 ++ .../v1alpha1/capapplicationversion.go | 255 ++ .../typed/sme.sap.com/v1alpha1/captenant.go | 255 ++ .../v1alpha1/captenantoperation.go | 255 ++ .../typed/sme.sap.com/v1alpha1/doc.go | 19 + .../typed/sme.sap.com/v1alpha1/fake/doc.go | 19 + .../v1alpha1/fake/fake_capapplication.go | 188 ++ .../fake/fake_capapplicationversion.go | 188 ++ .../v1alpha1/fake/fake_captenant.go | 188 ++ .../v1alpha1/fake/fake_captenantoperation.go | 188 ++ .../v1alpha1/fake/fake_sme.sap.com_client.go | 51 + .../v1alpha1/generated_expansion.go | 26 + .../v1alpha1/sme.sap.com_client.go | 121 + .../informers/externalversions/factory.go | 250 ++ .../informers/externalversions/generic.go | 67 + .../internalinterfaces/factory_interfaces.go | 39 + .../externalversions/sme.sap.com/interface.go | 45 + .../sme.sap.com/v1alpha1/capapplication.go | 89 + .../v1alpha1/capapplicationversion.go | 89 + .../sme.sap.com/v1alpha1/captenant.go | 89 + .../v1alpha1/captenantoperation.go | 89 + .../sme.sap.com/v1alpha1/interface.go | 65 + .../sme.sap.com/v1alpha1/capapplication.go | 98 + .../v1alpha1/capapplicationversion.go | 98 + .../listers/sme.sap.com/v1alpha1/captenant.go | 98 + .../v1alpha1/captenantoperation.go | 98 + .../v1alpha1/expansion_generated.go | 50 + website/archetypes/default.md | 6 + website/content/en/_index.md | 17 + website/content/en/docs/_index.md | 25 + website/content/en/docs/concepts/_index.md | 16 + .../concepts/cap-application-components.md | 30 + .../concepts/operator-components/_index.md | 23 + .../operator-components/controller.md | 23 + .../concepts/operator-components/mtx-job.md | 16 + .../subscription-server.md | 26 + .../content/en/docs/configuration/_index.md | 20 + .../content/en/docs/installation/_index.md | 10 + .../en/docs/installation/helm-install.md | 56 + .../en/docs/installation/prerequisites.md | 30 + website/content/en/docs/reference/_index.md | 10 + website/content/en/docs/support/_index.md | 19 + .../content/en/docs/troubleshoot/_index.md | 80 + website/content/en/docs/usage/_index.md | 8 + .../en/docs/usage/deploying-application.md | 127 + .../content/en/docs/usage/prerequisites.md | 105 + .../content/en/docs/usage/resources/_index.md | 8 + .../en/docs/usage/resources/capapplication.md | 67 + .../usage/resources/capapplicationversion.md | 318 +++ .../en/docs/usage/resources/captenant.md | 32 + .../usage/resources/captenantoperation.md | 44 + .../en/docs/usage/tenant-provisioning.md | 65 + .../content/en/docs/usage/version-upgrade.md | 120 + website/go.mod | 5 + website/go.sum | 5 + website/hugo.yaml | 167 ++ website/includes/api-reference.html | 2234 +++++++++++++++++ website/includes/chart-values.md | 67 + website/layouts/shortcodes/include.html | 1 + website/package-lock.json | 1611 ++++++++++++ website/package.json | 7 + .../img/activity-tenantprovisioning.png | Bin 0 -> 113312 bytes website/static/img/block-cluster.png | Bin 0 -> 73905 bytes website/static/img/block-controller.png | Bin 0 -> 40858 bytes website/static/img/block-subscription.png | Bin 0 -> 88912 bytes website/static/img/logo.png | Bin 0 -> 7522 bytes website/static/img/workflow.png | Bin 0 -> 256756 bytes 461 files changed, 50213 insertions(+), 62 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/publish-website.yaml create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 build/controller/Dockerfile create mode 100644 build/mtx-job/Dockerfile create mode 100644 build/server/Dockerfile create mode 100644 build/web-hooks/Dockerfile create mode 100644 cmd/controller/main.go create mode 100644 cmd/controller/temp.go create mode 100644 cmd/mtx-job/main.go create mode 100644 cmd/mtx-job/main_test.go create mode 100644 cmd/server/internal/client.go create mode 100644 cmd/server/internal/handler.go create mode 100644 cmd/server/internal/handler_test.go create mode 100644 cmd/server/internal/jwt.go create mode 100644 cmd/server/internal/jwt_test.go create mode 100644 cmd/server/internal/testdata/auth.service.local.crt create mode 100644 cmd/server/internal/testdata/auth.service.local.key create mode 100644 cmd/server/internal/testdata/rootCA.pem create mode 100644 cmd/server/server.go create mode 100644 cmd/web-hooks/internal/handler/handler.go create mode 100644 cmd/web-hooks/internal/handler/handler_test.go create mode 100644 cmd/web-hooks/main.go create mode 100644 crds/capapplication.yaml create mode 100644 crds/capapplicationversion.yaml create mode 100644 crds/captenant.yaml create mode 100644 crds/captenantoperation.yaml create mode 100644 go.mod create mode 100644 go.sum create mode 100644 hack/LICENSE_BOILERPLATE.txt create mode 100644 hack/api-reference/config.json create mode 100644 hack/api-reference/generate.sh create mode 100644 hack/api-reference/template/members.tpl create mode 100644 hack/api-reference/template/pkg.tpl create mode 100644 hack/api-reference/template/placeholder.go create mode 100644 hack/api-reference/template/type.tpl create mode 100644 hack/generate.sh create mode 100644 hack/helm-reference/generate.sh create mode 100644 hack/tools.go create mode 100644 internal/controller/common_test.go create mode 100644 internal/controller/controller.go create mode 100644 internal/controller/controller_test.go create mode 100644 internal/controller/informers.go create mode 100644 internal/controller/informers_test.go create mode 100644 internal/controller/reconcile-capapplication.go create mode 100644 internal/controller/reconcile-capapplication_test.go create mode 100644 internal/controller/reconcile-capapplicationversion.go create mode 100644 internal/controller/reconcile-capapplicationversion_test.go create mode 100644 internal/controller/reconcile-captenant.go create mode 100644 internal/controller/reconcile-captenant_test.go create mode 100644 internal/controller/reconcile-captenantoperation.go create mode 100644 internal/controller/reconcile-captenantoperation_test.go create mode 100644 internal/controller/reconcile-domains.go create mode 100644 internal/controller/reconcile-domains_test.go create mode 100644 internal/controller/reconcile.go create mode 100644 internal/controller/reconcile_test.go create mode 100644 internal/controller/reconciliation-result.go create mode 100644 internal/controller/testdata/capapplication/ca-01.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-01.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-02.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-02.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-03.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-03.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-04.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-04.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-05.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-05.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-06.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-06.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-07.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-07.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-08.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-08.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-09.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-09.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-10.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-10.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-11.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-11.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-12.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-12.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-13.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-13.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-14.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-14.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-15.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-15.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-16.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-16.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-17.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-17.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-18.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-18.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-19.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-19.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-20.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-20.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-21.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-21.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-22.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-22.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-23.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-23.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-24.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-24.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-25.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-25.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-26.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-26.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-27.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-27.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-28.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-28.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-29.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-29.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-30.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-30.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-31.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-31.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-32.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-32.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-33.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-33.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-34.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-34.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-35.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-35.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-36.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-36.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-37.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-37.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-38.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-38.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-39.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-39.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-40.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-40.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-41.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-41.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-42.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-42.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-43.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-43.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-44.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-45.expected.yaml create mode 100644 internal/controller/testdata/capapplication/ca-45.initial.yaml create mode 100644 internal/controller/testdata/capapplication/ca-dns-error.yaml create mode 100644 internal/controller/testdata/capapplication/ca-dns-not-ready.yaml create mode 100644 internal/controller/testdata/capapplication/ca-dns.yaml create mode 100644 internal/controller/testdata/capapplication/cat-consumer-no-finalizers-ready.yaml create mode 100644 internal/controller/testdata/capapplication/cat-consumer-ready.yaml create mode 100644 internal/controller/testdata/capapplication/cat-consumer-upg-never-deleting.yaml create mode 100644 internal/controller/testdata/capapplication/cat-consumer-upg-never-ready.yaml create mode 100644 internal/controller/testdata/capapplication/cat-provider-error.yaml create mode 100644 internal/controller/testdata/capapplication/cat-provider-no-finalizers-error.yaml create mode 100644 internal/controller/testdata/capapplication/cat-provider-no-finalizers-ready.yaml create mode 100644 internal/controller/testdata/capapplication/cat-provider-upgrade-error.yaml create mode 100644 internal/controller/testdata/capapplication/cav-33-version-updated-ready.yaml create mode 100644 internal/controller/testdata/capapplication/cav-error.yaml create mode 100644 internal/controller/testdata/capapplication/cav-name-modified-ready.yaml create mode 100644 internal/controller/testdata/capapplication/gateway.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-cert-error.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-cert.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-certManager-error.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-certManager.yaml create mode 100644 internal/controller/testdata/capapplication/istio-ingress-with-no-cert.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cat-provider-version.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-annotations.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-cluster-netpol-port.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-custom-destination-config.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-custom-labels.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-empty-status.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-error-condition-status.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-error-status.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-failed-content-job.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-invalid-ca.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-invalid-env-cap.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-invalid-env-content.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-invalid-env-job-worker.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-merged-destinations-router.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-pod-security-context.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-probes-and-resources.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-processing-job-finished.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-processing.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-ready-deleting.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-security-context.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-unknown-deleting.yaml create mode 100644 internal/controller/testdata/capapplicationversion/cav-valid-env-config.yaml create mode 100644 internal/controller/testdata/capapplicationversion/content-job-completed.yaml create mode 100644 internal/controller/testdata/capapplicationversion/content-job-failed.yaml create mode 100644 internal/controller/testdata/capapplicationversion/content-job-pending.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-deleted-unknown.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-deleted.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-deleting.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-error-condition-processing.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-error-processing.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-failed-content-job.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-failed-env-cap.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-failed-env-content.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-failed-env-job-worker.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-missing-content-job.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-missing-secrets.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-processing.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-annotations.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-app-netpol.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-cluster-netpol-port.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-content-job.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-destination-config.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-labels-config.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-merged-destinations-router.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-pod-security-context.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-probes-and-resources.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-security-context.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready-valid-env-config.yaml create mode 100644 internal/controller/testdata/capapplicationversion/expected/cav-ready.yaml create mode 100644 internal/controller/testdata/captenant/cat-01.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-02.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-02.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-03.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-03.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-04.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-04.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-05.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-05.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-06.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-06.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-07.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-07.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-08.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-08.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-09.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-09.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-10.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-10.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-11.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-11.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-13.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-13.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-14.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-15.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-15.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-16.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-17.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-17.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-20.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-20.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-21.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-21.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-22.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-23.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-23.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-24.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-24.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-25.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-25.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-26.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-27.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-28.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-28.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-29.expected.yaml create mode 100644 internal/controller/testdata/captenant/cat-29.initial.yaml create mode 100644 internal/controller/testdata/captenant/cat-with-no-version.yaml create mode 100644 internal/controller/testdata/captenant/changed-provider-tenant-dnsentry.yaml create mode 100644 internal/controller/testdata/captenant/provider-tenant-dnsentry-not-ready.yaml create mode 100644 internal/controller/testdata/captenant/provider-tenant-dnsentry.yaml create mode 100644 internal/controller/testdata/captenant/provider-tenant-dr-v1.yaml create mode 100644 internal/controller/testdata/captenant/provider-tenant-vs-v1.yaml create mode 100644 internal/controller/testdata/captenant/to-be-updated-provider-tenant-dnsentry.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-01.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-01.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-02.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-02.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-03.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-03.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-04.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-04.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-05.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-05.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-06.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-06.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-07.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-07.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-08.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-08.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-09.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-09.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-10.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-10.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-11.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-11.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-12.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-12.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-13.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-13.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-14.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-14.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-15.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-15.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-16.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-16.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-17.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-17.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-18.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-18.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-19.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-19.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-20.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-20.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-21.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-21.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-22.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-22.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-23.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-23.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-24.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-24.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-25.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-25.initial.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-26.expected.yaml create mode 100644 internal/controller/testdata/captenantoperation/ctop-26.initial.yaml create mode 100644 internal/controller/testdata/common/capapplication-multi-xsuaa.yaml create mode 100644 internal/controller/testdata/common/capapplication.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-invalid-env.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1-mtxs-custom-cmd.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1-mtxs.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1-not-ready.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1-resources.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1-security-context.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v1.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2-annotations.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2-multi-xsuaa.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2-no-mtx-workload.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2-pod-security-context.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v2.yaml create mode 100644 internal/controller/testdata/common/capapplicationversion-v3.yaml create mode 100644 internal/controller/testdata/common/captenant-provider-ready.yaml create mode 100644 internal/controller/testdata/common/captenant-provider-upgraded-ready.yaml create mode 100644 internal/controller/testdata/common/credential-secrets.yaml create mode 100644 internal/controller/testdata/common/istio-ingress.yaml create mode 100644 internal/controller/testdata/common/operator-gateway.yaml create mode 100644 internal/controller/utils.go create mode 100644 internal/util/config.go create mode 100644 internal/util/types.go create mode 100644 internal/util/uaa.go create mode 100644 internal/util/uaa_test.go create mode 100644 internal/util/vcap-credentials.go create mode 100644 internal/util/vcap-credentials_test.go create mode 100644 pkg/apis/sme.sap.com/v1alpha1/doc.go create mode 100644 pkg/apis/sme.sap.com/v1alpha1/register.go create mode 100644 pkg/apis/sme.sap.com/v1alpha1/types.go create mode 100644 pkg/apis/sme.sap.com/v1alpha1/utils.go create mode 100644 pkg/apis/sme.sap.com/v1alpha1/zz_generated.deepcopy.go create mode 100644 pkg/client/applyconfiguration/internal/internal.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/applicationdomains.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btp.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btptenantidentification.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplication.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationspec.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationstatus.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversion.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionspec.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionstatus.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenant.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperation.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationspec.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstatus.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstep.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantspec.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantstatus.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/containerdetails.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/deploymentdetails.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/genericstatus.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/jobdetails.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/namevalue.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/ports.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/serviceinfo.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperations.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperationworkloadreference.go create mode 100644 pkg/client/applyconfiguration/sme.sap.com/v1alpha1/workloaddetails.go create mode 100644 pkg/client/applyconfiguration/utils.go create mode 100644 pkg/client/clientset/versioned/clientset.go create mode 100644 pkg/client/clientset/versioned/fake/clientset_generated.go create mode 100644 pkg/client/clientset/versioned/fake/doc.go create mode 100644 pkg/client/clientset/versioned/fake/register.go create mode 100644 pkg/client/clientset/versioned/scheme/doc.go create mode 100644 pkg/client/clientset/versioned/scheme/register.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplication.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplicationversion.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenant.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenantoperation.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/doc.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/doc.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplication.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplicationversion.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenant.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenantoperation.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_sme.sap.com_client.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/generated_expansion.go create mode 100644 pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/sme.sap.com_client.go create mode 100644 pkg/client/informers/externalversions/factory.go create mode 100644 pkg/client/informers/externalversions/generic.go create mode 100644 pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/interface.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplication.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplicationversion.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenant.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenantoperation.go create mode 100644 pkg/client/informers/externalversions/sme.sap.com/v1alpha1/interface.go create mode 100644 pkg/client/listers/sme.sap.com/v1alpha1/capapplication.go create mode 100644 pkg/client/listers/sme.sap.com/v1alpha1/capapplicationversion.go create mode 100644 pkg/client/listers/sme.sap.com/v1alpha1/captenant.go create mode 100644 pkg/client/listers/sme.sap.com/v1alpha1/captenantoperation.go create mode 100644 pkg/client/listers/sme.sap.com/v1alpha1/expansion_generated.go create mode 100644 website/archetypes/default.md create mode 100644 website/content/en/_index.md create mode 100644 website/content/en/docs/_index.md create mode 100644 website/content/en/docs/concepts/_index.md create mode 100644 website/content/en/docs/concepts/cap-application-components.md create mode 100644 website/content/en/docs/concepts/operator-components/_index.md create mode 100644 website/content/en/docs/concepts/operator-components/controller.md create mode 100644 website/content/en/docs/concepts/operator-components/mtx-job.md create mode 100644 website/content/en/docs/concepts/operator-components/subscription-server.md create mode 100644 website/content/en/docs/configuration/_index.md create mode 100644 website/content/en/docs/installation/_index.md create mode 100644 website/content/en/docs/installation/helm-install.md create mode 100644 website/content/en/docs/installation/prerequisites.md create mode 100644 website/content/en/docs/reference/_index.md create mode 100644 website/content/en/docs/support/_index.md create mode 100644 website/content/en/docs/troubleshoot/_index.md create mode 100644 website/content/en/docs/usage/_index.md create mode 100644 website/content/en/docs/usage/deploying-application.md create mode 100644 website/content/en/docs/usage/prerequisites.md create mode 100644 website/content/en/docs/usage/resources/_index.md create mode 100644 website/content/en/docs/usage/resources/capapplication.md create mode 100644 website/content/en/docs/usage/resources/capapplicationversion.md create mode 100644 website/content/en/docs/usage/resources/captenant.md create mode 100644 website/content/en/docs/usage/resources/captenantoperation.md create mode 100644 website/content/en/docs/usage/tenant-provisioning.md create mode 100644 website/content/en/docs/usage/version-upgrade.md create mode 100644 website/go.mod create mode 100644 website/go.sum create mode 100644 website/hugo.yaml create mode 100644 website/includes/api-reference.html create mode 100644 website/includes/chart-values.md create mode 100644 website/layouts/shortcodes/include.html create mode 100644 website/package-lock.json create mode 100644 website/package.json create mode 100644 website/static/img/activity-tenantprovisioning.png create mode 100644 website/static/img/block-cluster.png create mode 100644 website/static/img/block-controller.png create mode 100644 website/static/img/block-subscription.png create mode 100644 website/static/img/logo.png create mode 100644 website/static/img/workflow.png diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0f04682 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file +# Ignore build and test binaries. +bin/ +testbin/ diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..3b06548 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +name: Go (Build & Unit test) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + name: Build + runs-on: ubuntu-22.04 + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ^1.21 + cache: true + + - name: Get dependencies + run: go get -v -t -d ./... + + - name: Build all relevant packages + run: CGO_ENABLED=0 go build -v ./cmd/... + + - name: Test relevant packages + run: CGO_ENABLED=0 go test -v ./... \ No newline at end of file diff --git a/.github/workflows/publish-website.yaml b/.github/workflows/publish-website.yaml new file mode 100644 index 0000000..35a60dd --- /dev/null +++ b/.github/workflows/publish-website.yaml @@ -0,0 +1,79 @@ +name: Publish Website + +on: + push: + branches: + - main + paths: + - website/** + - .github/workflows/publish-website.yaml + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +defaults: + run: + shell: bash + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: ^1.21 + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: "0.115.2" + extended: true + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18.x" + - name: Update dependencies + run: | + cd website + npm ci + - name: Build with Hugo + env: + HUGO_ENVIRONMENT: production + HUGO_ENV: production + run: | + cd website + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: website/public + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-22.04 + needs: build + + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..16a4dcf --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +local/ +.kubeconfig + +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +bin +testbin/* + +# Test binary, build with `go test -c` +*.test + +# OS specific +.DS_Store + +# Hugo artifacts +.hugo_build.lock +/website/resources +/website/node_modules +/website/public diff --git a/.reuse/dep5 b/.reuse/dep5 index 96d499f..3891e91 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,7 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: -Upstream-Contact: -Source: +Upstream-Name: cap-operator +Upstream-Contact: cap-operator@sap.com +Source: Disclaimer: The code in this project may include calls to APIs ("API Calls") of SAP or third-party products or services developed outside of this project ("External Products"). @@ -24,14 +24,6 @@ Disclaimer: The code in this project may include calls to APIs ("API Calls") of you any rights to use or access any SAP External Product, or provide any third parties the right to use of access any SAP External Product, through API Calls. -Files: -Copyright: SAP SE or an SAP affiliate company and contributors -License: Apache-2.0 - -Files: -Copyright: -License: - -Files: -Copyright: -License: \ No newline at end of file +Files: ** +Copyright: 2023 SAP SE or an SAP affiliate company and cap-operator contributors +License: Apache-2.0 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0ffb9a0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Controller", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/cmd/controller" + } + ] +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 261eeb9..2bb9ad2 100644 --- a/LICENSE +++ b/LICENSE @@ -173,29 +173,4 @@ incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/README.md b/README.md index 9721fd8..c39bdb0 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,20 @@ -# SAP Repository Template +# [CAP Operator](https://sap.github.io/cap-operator/) -Default templates for SAP open source repositories, including LICENSE, .reuse/dep5, Code of Conduct, etc... All repositories on github.com/SAP will be created based on this template. +CAP Operator manages the lifecycle operations involved in running multi-tenant CAP applications on Kubernetes clusters, primarily SAP Gardener managed clusters. -## To-Do +#### Documentation +Visit the [Documentation](https://sap.github.io/cap-operator/docs) to find out how to install and use the CAP Operator -In case you are the maintainer of a new SAP open source project, these are the steps to do with the template files: +#### Helm Chart +The local version of the [helm chart](https://github.com/sap/cap-operator-lifecycle/tree/release/chart) is now part of [CAP Operator Lifecycle](https://github.com/sap/cap-operator-lifecycle) repo. -- Check if the default license (Apache 2.0) also applies to your project. A license change should only be required in exceptional cases. If this is the case, please change the [license file](LICENSE). -- Enter the correct metadata for the REUSE tool. See our [wiki page](https://wiki.wdf.sap.corp/wiki/display/ospodocs/Using+the+Reuse+Tool+of+FSFE+for+Copyright+and+License+Information) for details how to do it. You can find an initial .reuse/dep5 file to build on. Please replace the parts inside the single angle quotation marks < > by the specific information for your repository and be sure to run the REUSE tool to validate that the metadata is correct. -- Adjust the contribution guidelines (e.g. add coding style guidelines, pull request checklists, different license if needed etc.) -- Add information about your project to this README (name, description, requirements etc). Especially take care for the placeholders - those ones need to be replaced with your project name. See the sections below the horizontal line and [our guidelines on our wiki page](https://wiki.wdf.sap.corp/wiki/display/ospodocs/Guidelines+for+README.md+file) what is required and recommended. -- Remove all content in this README above and including the horizontal line ;) +#### CRDs +CRDs for the CAP Operator can be applied from the [./crds](./crds) folder, these are also copied over to the [helm chart](https://github.com/sap/cap-operator-lifecycle/tree/main/chart) when updated. -*** - -# Our new open source project - -## About this project - -*Insert a short description of your project here...* - -## Requirements and Setup - -*Insert a short description what is required to get your project running...* ## Support, Feedback, Contributing -This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP//issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). +This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/SAP/cap-operator/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). ## Code of Conduct @@ -34,4 +22,4 @@ We as members, contributors, and leaders pledge to make participation in our com ## Licensing -Copyright (20xx-)20xx SAP SE or an SAP affiliate company and contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/). +Copyright 2023 SAP SE or an SAP affiliate company and cap-operator contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/SAP/cap-operator). diff --git a/build/controller/Dockerfile b/build/controller/Dockerfile new file mode 100644 index 0000000..0920f0e --- /dev/null +++ b/build/controller/Dockerfile @@ -0,0 +1,15 @@ +# Build stage for go modules +FROM golang:1.21-alpine as build + +WORKDIR /build + +COPY . . + +RUN CGO_ENABLED=0 go build -o bin/controller ./cmd/controller/ + +# Run Stage +FROM gcr.io/distroless/static AS final + +ENTRYPOINT ["/app/controller"] + +COPY --from=build /build/bin/controller /app/controller \ No newline at end of file diff --git a/build/mtx-job/Dockerfile b/build/mtx-job/Dockerfile new file mode 100644 index 0000000..348daf2 --- /dev/null +++ b/build/mtx-job/Dockerfile @@ -0,0 +1,15 @@ +# Build stage for go modules +FROM golang:1.21-alpine as build + +WORKDIR /build + +COPY . . + +RUN CGO_ENABLED=0 go build -o ./bin/mtx-job ./cmd/mtx-job/main.go + +# Run Stage +FROM gcr.io/distroless/static AS final + +ENTRYPOINT ["/app/mtx-job"] + +COPY --from=build /build/bin/mtx-job /app/mtx-job \ No newline at end of file diff --git a/build/server/Dockerfile b/build/server/Dockerfile new file mode 100644 index 0000000..4c92101 --- /dev/null +++ b/build/server/Dockerfile @@ -0,0 +1,15 @@ +# Build stage for go modules +FROM golang:1.21-alpine as build + +WORKDIR /build + +COPY . . + +RUN CGO_ENABLED=0 go build -o bin/server ./cmd/server/ + +# Run Stage +FROM gcr.io/distroless/static AS final + +ENTRYPOINT ["/app/server"] + +COPY --from=build /build/bin/server /app/server \ No newline at end of file diff --git a/build/web-hooks/Dockerfile b/build/web-hooks/Dockerfile new file mode 100644 index 0000000..356fb13 --- /dev/null +++ b/build/web-hooks/Dockerfile @@ -0,0 +1,15 @@ +# Build stage for go modules +FROM golang:1.21-alpine as build + +WORKDIR /build + +COPY . . + +RUN CGO_ENABLED=0 go build -o ./bin/webhook ./cmd/web-hooks/main.go + +# Run Stage +FROM gcr.io/distroless/static AS final + +ENTRYPOINT ["/app/webhook"] + +COPY --from=build /build/bin/webhook /app/webhook \ No newline at end of file diff --git a/cmd/controller/main.go b/cmd/controller/main.go new file mode 100644 index 0000000..825c763 --- /dev/null +++ b/cmd/controller/main.go @@ -0,0 +1,125 @@ +package main + +import ( + "context" + "os" + "os/signal" + "syscall" + "time" + + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/leaderelection" + "k8s.io/client-go/tools/leaderelection/resourcelock" + "k8s.io/klog/v2" + + certManager "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" + gardenerCert "github.com/gardener/cert-management/pkg/client/cert/clientset/versioned" + dns "github.com/gardener/external-dns-management/pkg/client/dns/clientset/versioned" + "github.com/google/uuid" + "github.com/sap/cap-operator/internal/controller" + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" + istio "istio.io/client-go/pkg/clientset/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + LeaseLockName = "capoperator-lease-lock" +) + +func main() { + config := util.GetConfig() + if config == nil { + klog.Fatal("Config not found") + } + + leaseLockNamespace := util.GetNamespace() + leaseLockId := uuid.New().String() + + coreClient, err := kubernetes.NewForConfig(config) + if err != nil { + klog.Fatal("Could not create kubernetes core client: ", err.Error()) + } + + crdClient, err := versioned.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for custom resources: ", err.Error()) + } + + istioClient, err := istio.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for istio resources: ", err.Error()) + } + + certClient, err := gardenerCert.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for certificate resources: ", err.Error()) + } + + certManagerClient, err := certManager.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for certManager certificate resources: ", err.Error()) + } + + dnsClient, err := dns.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for dns resources: ", err.Error()) + } + + // context for the reconciliation controller + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // Handle sys exits to ensure cleanup of controller code before stopping leading + leaseCh := make(chan os.Signal, 1) + signal.Notify(leaseCh, os.Interrupt, syscall.SIGTERM) + go func() { + <-leaseCh + klog.Info("Interrupt received, shutting down operator context") + cancel() + }() + + // Create a LeaseLock resource + leaseLock := &resourcelock.LeaseLock{ + LeaseMeta: metav1.ObjectMeta{ + Name: LeaseLockName, + Namespace: leaseLockNamespace, + }, + Client: coreClient.CoordinationV1(), + LockConfig: resourcelock.ResourceLockConfig{ + Identity: leaseLockId, + }, + } + + // Run leader election + leaderelection.RunOrDie(ctx, leaderelection.LeaderElectionConfig{ + Lock: leaseLock, + LeaseDuration: 15 * time.Second, + RenewDeadline: 10 * time.Second, + RetryPeriod: 5 * time.Second, + ReleaseOnCancel: true, + Callbacks: leaderelection.LeaderCallbacks{ + OnStartedLeading: func(ctx context.Context) { + klog.Infof("Started leading: %s - %s", LeaseLockName, leaseLockId) + + checkDone := make(chan bool, 1) + go checkHashedLabels(checkDone, coreClient, crdClient, istioClient, certClient, certManagerClient, dnsClient) + <-checkDone + klog.Info("check & update of hashed labels done") + + c := controller.NewController(coreClient, crdClient, istioClient, certClient, certManagerClient, dnsClient) + go c.Start(ctx) + }, + OnStoppedLeading: func() { + klog.Infof("Stopped leading: %s - %s", LeaseLockName, leaseLockId) + os.Exit(0) + }, + OnNewLeader: func(id string) { + if id == leaseLockId { + return + } + klog.Infof("Leader exists: %s", id) + }, + }, + }) +} diff --git a/cmd/controller/temp.go b/cmd/controller/temp.go new file mode 100644 index 0000000..0453ea6 --- /dev/null +++ b/cmd/controller/temp.go @@ -0,0 +1,367 @@ +package main + +import ( + "context" + "crypto/sha1" + "fmt" + "strings" + + certManager "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" + gardenerCert "github.com/gardener/cert-management/pkg/client/cert/clientset/versioned" + gardenerDNS "github.com/gardener/external-dns-management/pkg/client/dns/clientset/versioned" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" + istio "istio.io/client-go/pkg/clientset/versioned" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/selection" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" +) + +type ownerInfo struct { + kind string + ownerNamespace string + ownerName string +} + +type appIdentifier struct { + globalAccountId string + appName string +} + +const ( + AnnotationOwnerIdentifier = "sme.sap.com/owner-identifier" + AnnotationBTPApplicationIdentifier = "sme.sap.com/btp-app-identifier" + LabelOwnerIdentifierHash = "sme.sap.com/owner-identifier-hash" + LabelBTPApplicationIdentifierHash = "sme.sap.com/btp-app-identifier-hash" + CAPApplication = "CAPApplication" + CAPApplicationVersion = "CAPApplicationVersion" + CAPTenant = "CAPTenant" + CAPTenantOperation = "CAPTenantOperation" + CAPOperator = "CAPOperator" + OperatorDomains = "OperatorDomains" +) + +var btpAppIdMap map[string]*appIdentifier +var ownerMap map[string]*ownerInfo + +func checkHashedLabels(checkDone chan bool, client kubernetes.Interface, crdClient versioned.Interface, istioClient istio.Interface, gardenerCertificateClient gardenerCert.Interface, certManagerCertificateClient certManager.Interface, gardenerDNSClient gardenerDNS.Interface) { + btpAppIdMap = map[string]*appIdentifier{} + ownerMap = map[string]*ownerInfo{} + // Always set the channel to true in the end + defer func() { + checkDone <- true + }() + + ownerMap[CAPOperator+"."+OperatorDomains] = &ownerInfo{ + ownerNamespace: CAPOperator, + ownerName: OperatorDomains, + } + + ctx := context.TODO() + klog.Info("checking for old Labels on known resources") + + btpAppLabelReq, _ := labels.NewRequirement(AnnotationBTPApplicationIdentifier, selection.Exists, []string{}) + ownerLabelReq, _ := labels.NewRequirement(AnnotationOwnerIdentifier, selection.Exists, []string{}) + + btpAppSelector := labels.NewSelector() + btpAppSelector.Add(*btpAppLabelReq) + + ownerSelector := labels.NewSelector() + ownerSelector.Add(*ownerLabelReq) + + btpAppOwnerSelector := labels.NewSelector() + btpAppOwnerSelector.Add(*btpAppLabelReq, *ownerLabelReq) + + // CAP application with LabelBTPApplicationIdentifier + caList, err := crdClient.SmeV1alpha1().CAPApplications("").List(ctx, metav1.ListOptions{LabelSelector: btpAppSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, ca := range caList.Items { + // Update map with known good values + btpAppIdMap[ca.Labels[AnnotationBTPApplicationIdentifier]] = &appIdentifier{ + globalAccountId: ca.Spec.GlobalAccountId, + appName: ca.Spec.BTPAppName, + } + ownerMap[ca.Namespace+"."+ca.Name] = &ownerInfo{ + ownerNamespace: ca.Namespace, + ownerName: ca.Name, + } + // certificates are created with CAPApplication as the kind in ownerinfo + ownerMap[CAPApplication+"."+ca.Namespace+"."+ca.Name] = &ownerInfo{ + kind: CAPApplication, + ownerNamespace: ca.Namespace, + ownerName: ca.Name, + } + // add Label/Annotation for BTP App + if updateLabelAnnotationMetadata(&ca.ObjectMeta, true, false) { + crdClient.SmeV1alpha1().CAPApplications(ca.Namespace).Update(ctx, &ca, metav1.UpdateOptions{}) + } + } + + // CAP application version with LabelBTPApplicationIdentifier and LabelOwnerIdentifier + cavList, err := crdClient.SmeV1alpha1().CAPApplicationVersions("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, cav := range cavList.Items { + ownerMap[cav.Namespace+"."+cav.Name] = &ownerInfo{ + ownerNamespace: cav.Namespace, + ownerName: cav.Name, + } + if updateLabelAnnotationMetadata(&cav.ObjectMeta, true, true) { + crdClient.SmeV1alpha1().CAPApplicationVersions(cav.Namespace).Update(ctx, &cav, metav1.UpdateOptions{}) + } + } + + // CAP Tenant with LabelBTPApplicationIdentifier and LabelOwnerIdentifier + catList, err := crdClient.SmeV1alpha1().CAPTenants("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, cat := range catList.Items { + ownerMap[cat.Namespace+"."+cat.Name] = &ownerInfo{ + ownerNamespace: cat.Namespace, + ownerName: cat.Name, + } + // DNS entries are being created with CAPTenant as the kind in owner info + ownerMap[CAPTenant+"."+cat.Namespace+cat.Name] = &ownerInfo{ + kind: CAPTenant, + ownerNamespace: cat.Namespace, + ownerName: cat.Name, + } + if updateLabelAnnotationMetadata(&cat.ObjectMeta, true, true) { + crdClient.SmeV1alpha1().CAPTenants(cat.Namespace).Update(ctx, &cat, metav1.UpdateOptions{}) + } + } + + // CAP Tenant Operation with LabelOwnerIdentifier + ctopList, err := crdClient.SmeV1alpha1().CAPTenantOperations("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, ctop := range ctopList.Items { + ownerMap[ctop.Namespace+"."+ctop.Name] = &ownerInfo{ + ownerNamespace: ctop.Namespace, + ownerName: ctop.Name, + } + + if updateLabelAnnotationMetadata(&ctop.ObjectMeta, false, true) { + crdClient.SmeV1alpha1().CAPTenantOperations(ctop.Namespace).Update(ctx, &ctop, metav1.UpdateOptions{}) + } + } + + // Cert Manager Certificates + certManagerCertificateList, err := certManagerCertificateClient.CertmanagerV1().Certificates("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, cert := range certManagerCertificateList.Items { + if updateLabelAnnotationMetadata(&cert.ObjectMeta, false, true) { + certManagerCertificateClient.CertmanagerV1().Certificates(cert.Namespace).Update(ctx, &cert, metav1.UpdateOptions{}) + } + } + + // Gardener Certificates + gardenerCertificateList, err := gardenerCertificateClient.CertV1alpha1().Certificates("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, cert := range gardenerCertificateList.Items { + if updateLabelAnnotationMetadata(&cert.ObjectMeta, false, true) { + gardenerCertificateClient.CertV1alpha1().Certificates(cert.Namespace).Update(ctx, &cert, metav1.UpdateOptions{}) + } + } + + // Gateways + gwList, err := istioClient.NetworkingV1beta1().Gateways("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, gw := range gwList.Items { + // Update one for just app id (primary domain gw) + if updateLabelAnnotationMetadata(&gw.ObjectMeta, true, false) { + istioClient.NetworkingV1beta1().Gateways(gw.Namespace).Update(ctx, gw, metav1.UpdateOptions{}) + } + // Update one for just owner info (Secondary domain gw) + if updateLabelAnnotationMetadata(&gw.ObjectMeta, false, true) { + istioClient.NetworkingV1beta1().Gateways(gw.Namespace).Update(ctx, gw, metav1.UpdateOptions{}) + } + } + + // DNS Entries + dnsEntryList, err := gardenerDNSClient.DnsV1alpha1().DNSEntries("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, dnsEntry := range dnsEntryList.Items { + if updateLabelAnnotationMetadata(&dnsEntry.ObjectMeta, false, true) { + gardenerDNSClient.DnsV1alpha1().DNSEntries(dnsEntry.Namespace).Update(ctx, &dnsEntry, metav1.UpdateOptions{}) + } + } + + // Destination Rules + destRuleList, err := istioClient.NetworkingV1beta1().DestinationRules("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, destRule := range destRuleList.Items { + if updateLabelAnnotationMetadata(&destRule.ObjectMeta, false, true) { + istioClient.NetworkingV1beta1().DestinationRules(destRule.Namespace).Update(ctx, destRule, metav1.UpdateOptions{}) + } + } + + // Virtual Services + virtualServiceList, err := istioClient.NetworkingV1beta1().VirtualServices("").List(ctx, metav1.ListOptions{LabelSelector: ownerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, virtualService := range virtualServiceList.Items { + if updateLabelAnnotationMetadata(&virtualService.ObjectMeta, false, true) { + istioClient.NetworkingV1beta1().VirtualServices(virtualService.Namespace).Update(ctx, virtualService, metav1.UpdateOptions{}) + } + } + + // CAV Deployments + deploymentList, err := client.AppsV1().Deployments("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, deployment := range deploymentList.Items { + if updateLabelAnnotationMetadata(&deployment.ObjectMeta, true, true) { + client.AppsV1().Deployments(deployment.Namespace).Update(ctx, &deployment, metav1.UpdateOptions{}) + } + } + + // CAV Services + serviceList, err := client.CoreV1().Services("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, service := range serviceList.Items { + if updateLabelAnnotationMetadata(&service.ObjectMeta, true, true) { + client.CoreV1().Services(service.Namespace).Update(ctx, &service, metav1.UpdateOptions{}) + } + } + + // CTOP Jobs + jobList, err := client.BatchV1().Jobs("").List(ctx, metav1.ListOptions{LabelSelector: btpAppOwnerSelector.String()}) + if err != nil { + klog.Error(err) + return + } + for _, job := range jobList.Items { + if updateLabelAnnotationMetadata(&job.ObjectMeta, true, true) { + client.BatchV1().Jobs(job.Namespace).Update(ctx, &job, metav1.UpdateOptions{}) + } + } +} + +func sha1Sum(source ...string) string { + sum := sha1.Sum([]byte(strings.Join(source, ""))) + return fmt.Sprintf("%x", sum) +} + +func amendObjectMetadata(object *metav1.ObjectMeta, annotatedOldLabel string, hashLabel string, oldValue string, hashedValue string) (updated bool) { + // Check if old label exists, if so remove it + if _, ok := object.Labels[annotatedOldLabel]; ok { + delete(object.Labels, annotatedOldLabel) + klog.Infof("Removed old label %s=%s for resource %s.%s", annotatedOldLabel, oldValue, object.Namespace, object.Name) + updated = true + } + // Add hashed label as the new label with the hashed identifier value + if _, ok := object.Labels[hashLabel]; !ok { + object.Labels[hashLabel] = hashedValue + klog.Infof("Added hashed label %s=%s for resource %s.%s", hashLabel, hashedValue, object.Namespace, object.Name) + updated = true + } + // Add old label as an annotation with the old value + if _, ok := object.Annotations[annotatedOldLabel]; !ok { + object.Annotations[annotatedOldLabel] = oldValue + klog.Infof("Added annotation %s=%s for resource %s.%s", annotatedOldLabel, oldValue, object.Namespace, object.Name) + updated = true + } + // return if something was updated + return updated +} + +func updateLabelAnnotationMetadata(object *metav1.ObjectMeta, updateAppId bool, updateOwner bool) (updated bool) { + if object.Labels == nil { + object.Labels = make(map[string]string) + } + if object.Annotations == nil { + object.Annotations = map[string]string{} + } + + // Update BTP Application Identifier + if updateAppId { + var appDetails *appIdentifier + ok := false + appID := object.Labels[AnnotationBTPApplicationIdentifier] + if appID != "" { + if appDetails, ok = btpAppIdMap[appID]; !ok { + index := strings.Index(appID, ".") + appDetails = &appIdentifier{ + globalAccountId: appID[:index], + appName: appID[index+1:], + } + btpAppIdMap[appID] = appDetails + } + + if amendObjectMetadata(object, AnnotationBTPApplicationIdentifier, LabelBTPApplicationIdentifierHash, strings.Join([]string{appDetails.globalAccountId, appDetails.appName}, "."), sha1Sum(appDetails.globalAccountId, appDetails.appName)) { + updated = true + } + } + } + + // Update OwnerInfo if owner details exists + if updateOwner { + var ownerDetails *ownerInfo + owner := []string{} + + ok := false + ownerID := object.Labels[AnnotationOwnerIdentifier] + if ownerID != "" { + if ownerDetails, ok = ownerMap[ownerID]; !ok { + kind := "" + if strings.Index(ownerID, CAPApplication+".") == 0 { + kind = CAPApplication + ownerID = ownerID[15:] + } else if strings.Index(ownerID, CAPTenant+".") == 0 { + kind = CAPTenant + ownerID = ownerID[10:] + } + index := strings.Index(ownerID, ".") + ownerDetails = &ownerInfo{ + kind: kind, + ownerNamespace: ownerID[:index], + ownerName: ownerID[index+1:], + } + ownerMap[ownerID] = ownerDetails + } + if ownerDetails.kind != "" { + owner = append(owner, ownerDetails.kind) + } + owner = append(owner, ownerDetails.ownerNamespace, ownerDetails.ownerName) + + if amendObjectMetadata(object, AnnotationOwnerIdentifier, LabelOwnerIdentifierHash, strings.Join(owner, "."), sha1Sum(owner...)) { + updated = true + } + } + } + + return updated +} diff --git a/cmd/mtx-job/main.go b/cmd/mtx-job/main.go new file mode 100644 index 0000000..3905aa0 --- /dev/null +++ b/cmd/mtx-job/main.go @@ -0,0 +1,539 @@ +package main + +import ( + "bytes" + "context" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io/ioutil" + "net" + "net/http" + "net/url" + "os" + "path" + "strings" + "time" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/klog/v2" +) + +const ( + EnvXSUAAInstanceName = "XSUAA_INSTANCE_NAME" + EnvMTXServiceURL = "MTX_SERVICE_URL" + EnvMTXRequestType = "MTX_REQUEST_TYPE" + EnvMTXTenantId = "MTX_TENANT_ID" + EnvMTXPayload = "MTX_REQUEST_PAYLOAD" + EnvCredentialsPath = "CREDENTIALS_FILE_PATH" + EnvWaitForMTXTimeoutSeconds = "WAIT_FOR_MTX_TIMEOUT_SECONDS" + EnvVCAPServices = "VCAP_SERVICES" +) + +const ( + RequestTypeProvisioning = "provisioning" + RequestTypeDeprovisioning = "deprovisioning" + RequestTypeUpgrade = "upgrade" +) + +const ( + Authorization = "Authorization" + Bearer = "Bearer" + ContentType = "Content-Type" + ContentAppJson = "application/json" + ContentFormEncoded = "application/x-www-form-urlencoded" + ServiceClassXSUAA = "xsuaa" +) + +const ( + ErrorKillingProcess = "Error killing process" + FailedWith = "failed with" +) + +const ( + statusQueued = "QUEUED" + statusRunning = "RUNNING" + statusFailed = "FAILED" + statusSuccess = "SUCCESS" +) + +type asyncUpgradeResponse struct { + JobId string `json:"jobID"` +} + +type upgradeJobResponse struct { + Error string `json:"error"` + Status string `json:"status"` + Result upgradeJobResult `json:"result"` +} + +type upgradeJobResult struct { + Tenants map[string]tenantUpgradeResult `json:"tenants"` +} + +type tenantUpgradeResult struct { + Status string `json:"status"` + Message string `json:"message"` + BuildLogs string `json:"buildLogs"` +} + +func fetchXSUAAServiceCredentials() (*util.XSUAACredentials, error) { + vcap, ok := os.LookupEnv(EnvVCAPServices) + if !ok || vcap == "" { + return fetchXSUAAServiceCredentialsFromVolume() + } + return fetchXSUAAServiceCredentialsFromVCAP() +} + +func fetchXSUAAServiceCredentialsFromVCAP() (*util.XSUAACredentials, error) { + serviceInstanceName := os.Getenv(EnvXSUAAInstanceName) + raw := os.Getenv(EnvVCAPServices) + if raw == "" { + return nil, fmt.Errorf("could not read %s from environment", EnvVCAPServices) + } + var parsed map[string][]util.VCAPServiceInstance + err := json.Unmarshal([]byte(raw), &parsed) + if err != nil { + return nil, fmt.Errorf("error parsing VCAP_SERVICES: %s", err.Error()) + } + instances := parsed[ServiceClassXSUAA] + if len(instances) == 0 { + return nil, fmt.Errorf("could not find instances of service offering %s", ServiceClassXSUAA) + } + for _, i := range instances { + name := i.Name + if i.BindingName != "" { // if binding name is provided, use explicit instance name + if i.InstanceName == "" { + continue // instance name could not be identified + } + name = i.InstanceName + } + if name == serviceInstanceName { + return parseXSUAACredentials(i.Credentials) + } + } + + return nil, fmt.Errorf("credentials for service instance %s not found", serviceInstanceName) +} + +func parseXSUAACredentials(data interface{}) (credentials *util.XSUAACredentials, err error) { + defer func() { + if err != nil { + err = fmt.Errorf("could parse credentials for service %s: %s", ServiceClassXSUAA, err.Error()) + } + }() + creds, err := json.Marshal(data) + if err != nil { + return nil, err + } + var xsuaaCredentials util.XSUAACredentials + err = json.Unmarshal(creds, &xsuaaCredentials) + if err != nil { + return nil, err + } + return &xsuaaCredentials, nil +} + +func fetchXSUAAServiceCredentialsFromVolume() (*util.XSUAACredentials, error) { + instance := os.Getenv(EnvXSUAAInstanceName) + credPath := getXSUAACredentialsPath(instance) + readAttribute := func(attribute string) (string, error) { + data, err := os.ReadFile(path.Join(credPath, attribute)) + if err != nil { + return "", err + } + return string(data), nil + } + + var err error + parameters := &util.XSUAACredentials{} + parameters.CredentialType, err = readAttribute("credential-type") + if err != nil { + return nil, err + } + parameters.AuthUrl, err = readAttribute("url") + if err != nil { + return nil, err + } + parameters.ClientId, err = readAttribute("clientid") + if err != nil { + return nil, err + } + if parameters.CredentialType == "x509" { + parameters.CertificateUrl, err = readAttribute("certurl") + if err != nil { + return nil, err + } + parameters.Certificate, err = readAttribute("certificate") + if err != nil { + return nil, err + } + parameters.CertificateKey, err = readAttribute("key") + if err != nil { + return nil, err + } + } else { + parameters.ClientSecret, err = readAttribute("clientsecret") + if err != nil { + return nil, err + } + } + + return parameters, nil +} + +func getXSUAACredentialsPath(instance string) string { + basePath, ok := os.LookupEnv(EnvCredentialsPath) + if !ok { + basePath = "/etc/secrets/sapcp" + } + return path.Join(basePath, ServiceClassXSUAA, instance) +} + +type OAuthResponse struct { + AccessToken string `json:"access_token"` + TokenType string `json:"token_type"` // bearer + ExpiresIn int `json:"expires_in"` + Scope string `json:"scope"` + JTI string `json:"jti"` +} + +func main() { + os.Exit(execute()) +} + +func execute() int { + var ( + err error // main error used for control flow + mtxURL *url.URL + token *OAuthResponse + client http.Client = http.Client{Timeout: time.Duration(5 * time.Second)} + ) + + defer func() { + // terminate mtx sidecar via tcp connect when completed + terminateMTXSidecar() + + // log final error, if any + if err != nil { + klog.Error("aborting with error: ", err.Error()) + } + }() + + if token, err = fetchOAuthToken(client); err != nil { + return 1 + } + + if mtxURLEnv, ok := os.LookupEnv(EnvMTXServiceURL); ok { + mtxURL, err = url.Parse(mtxURLEnv) + } else { + err = errors.New("could not identify mtx service URL from environment") + return 1 + } + + // wait for mtx instance by checking available tenants + if err = waitForMTX(mtxURL, client, token); err != nil { + return 1 + } + + // process request + if err = processRequest(mtxURL, client, token); err != nil { + return 1 + } + + return 0 +} + +func terminateMTXSidecar() { + klog.Info("Terminating by TCP connect..") + // TODO: make port configurable + conn, err := net.Dial("tcp", "localhost:8080") + if err != nil { + klog.Error("Error during mtx termination: ", err) + } + if conn != nil { + conn.Close() + klog.Info("Terminated..") + } +} + +func waitForMTX(mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + t, ok := os.LookupEnv(EnvWaitForMTXTimeoutSeconds) + if !ok || t == "" { + t = "300" // default wait period of 5 minutes + } + d, err := time.ParseDuration(t + "s") + if err != nil { + return fmt.Errorf("error parsing wait duration: %s", err.Error()) + } + + wait, cancel := context.WithTimeout(context.Background(), d) + defer cancel() + + for { + select { + case <-wait.Done(): + return fmt.Errorf("error when waiting for mtx: %s", wait.Err().Error()) + default: + err := getTenants(mtxURL, client, token) + if err == nil { + return nil + } + klog.Warningf("waiting for mtx: %v", err) + } + time.Sleep(3 * time.Second) + } +} + +func getTenants(mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + mtxURL.Path = path.Join("mtx", "v1/provisioning/tenant") + + req, err := http.NewRequest("GET", mtxURL.String(), nil) + if err != nil { + return err + } + req.Header.Set(Authorization, fmt.Sprintf("%s %s", Bearer, token.AccessToken)) + resp, err := client.Do(req) + if err != nil { + return err + } + + if resp.StatusCode >= 200 && resp.StatusCode <= 299 { + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + klog.Infof("%s: %s", v1alpha1.CAPTenantResource, body) + return nil + } else { + return fmt.Errorf("mtx returned status %s", resp.Status) + } +} + +func fetchOAuthToken(client http.Client) (*OAuthResponse, error) { + parameters, err := fetchXSUAAServiceCredentials() + if err != nil { + return nil, fmt.Errorf("error when reading xsuaa credentials: %w", err) + } + + var req *http.Request + if parameters.CredentialType == "x509" { + req, err = createRequestWithX509Certificate(parameters, &client) + // reset client tls config + defer func() { client.Transport = &http.Transport{} }() + } else { + req, err = createRequestWithClientCredentials(parameters) + } + if err != nil { + return nil, fmt.Errorf("error preparing token request: %w", err) + } + + resp, err := client.Do(req) + if err != nil { + return nil, fmt.Errorf("error during http call: status %w", err) + } + + body, err := ioutil.ReadAll(resp.Body) + if err != nil { + return nil, fmt.Errorf("error reading response body: %w", err) + } + + var token OAuthResponse + err = json.Unmarshal(body, &token) + if err != nil { + return nil, fmt.Errorf("could not parse oauth response: %w", err) + } else { + klog.Infof("retrieved token with scope: %s", token.Scope) + } + + return &token, nil +} + +func prepareTokenRequest(clientID string, tokenURL string) (*http.Request, error) { + data := url.Values{} + data.Add("client_id", clientID) + data.Add("grant_type", "client_credentials") + req, err := http.NewRequest(http.MethodPost, tokenURL+"/oauth/token", strings.NewReader(data.Encode())) + if err != nil { + return nil, fmt.Errorf("error when creating request: %w", err) + } + req.Header.Set(ContentType, ContentFormEncoded) + return req, nil +} + +func createRequestWithClientCredentials(parameters *util.XSUAACredentials) (*http.Request, error) { + req, err := prepareTokenRequest(parameters.ClientId, parameters.AuthUrl) + if err != nil { + return nil, err + } + req.Header.Set(Authorization, "Basic "+base64.URLEncoding.EncodeToString([]byte(parameters.ClientId+":"+parameters.ClientSecret))) + return req, nil +} + +func createRequestWithX509Certificate(parameters *util.XSUAACredentials, client *http.Client) (*http.Request, error) { + // Read the key pair to create certificate + cert, err := tls.X509KeyPair([]byte(parameters.Certificate), []byte(parameters.CertificateKey)) + if err != nil { + return nil, err + } + + // Use system certificate pool and add add certificate to it + caCertPool, err := x509.SystemCertPool() + if err != nil { + return nil, err + } + caCertPool.AppendCertsFromPEM([]byte(parameters.Certificate)) + + // setup TLS configuration for client + tlsConfig := &tls.Config{ + RootCAs: caCertPool, + Certificates: []tls.Certificate{cert}, + } + if t, ok := client.Transport.(*http.Transport); ok { + t.TLSClientConfig = tlsConfig + } else { + client.Transport = &http.Transport{TLSClientConfig: tlsConfig} + } + + return prepareTokenRequest(parameters.ClientId, parameters.CertificateUrl) +} + +func processRequest(mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + switch os.Getenv(EnvMTXRequestType) { + case RequestTypeProvisioning: + return processSubscription(RequestTypeProvisioning, mtxURL, client, token) + case RequestTypeDeprovisioning: + return processSubscription(RequestTypeDeprovisioning, mtxURL, client, token) + case RequestTypeUpgrade: + return processUpgrade(mtxURL, client, token) + default: + return errors.New("unknown mtx request type") + } +} + +func processSubscription(requestType string, mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + tenantId := os.Getenv(EnvMTXTenantId) + + client.Timeout = 10 * time.Minute + mtxURL.Path = path.Join("mtx", "v1/provisioning/tenant", tenantId) + reqBody := bytes.NewBufferString(os.Getenv(EnvMTXPayload)) + var ( + req *http.Request + err error + ) + if requestType == RequestTypeProvisioning { + req, err = http.NewRequest("PUT", mtxURL.String(), reqBody) + } else { + req, err = http.NewRequest("DELETE", mtxURL.String(), reqBody) + } + if err != nil { + return fmt.Errorf("error when creating request for %s: %w", requestType, err) + } + req.Header.Set(ContentType, ContentAppJson) + req.Header.Set(Authorization, fmt.Sprintf("%s %s", Bearer, token.AccessToken)) + resp, err := client.Do(req) + if err != nil { + return err + } + + klog.Infof("%s %s %s response code: %d", v1alpha1.CAPTenantKind, tenantId, requestType, resp.StatusCode) + if resp.StatusCode >= 200 && resp.StatusCode <= 299 { + return nil + } else { + return fmt.Errorf("%s for %s %s %s: %d", requestType, v1alpha1.CAPTenantKind, tenantId, FailedWith, resp.StatusCode) + } +} + +func processUpgrade(mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + tenantId := os.Getenv(EnvMTXTenantId) + client.Timeout = 10 * time.Minute + mtxURL.Path = "mtx/v1/model/asyncUpgrade" + reqBody := bytes.NewBufferString(os.Getenv(EnvMTXPayload)) + + req, err := http.NewRequest("POST", mtxURL.String(), reqBody) + + if err != nil { + return fmt.Errorf("error when creating request for upgrade: %v", err) + } + req.Header.Set(ContentType, ContentAppJson) + req.Header.Set(Authorization, fmt.Sprintf("%s %s", Bearer, token.AccessToken)) + resp, err := client.Do(req) + if err != nil { + return err + } + + klog.Infof("%s %s upgrade response code: %d", v1alpha1.CAPTenantKind, tenantId, resp.StatusCode) + if resp.StatusCode >= 200 && resp.StatusCode <= 299 { + decoder := json.NewDecoder(resp.Body) + defer resp.Body.Close() + var asyncUpgradeResp asyncUpgradeResponse + err = decoder.Decode(&asyncUpgradeResp) + if err != nil { + klog.Errorf("Error parsing response for async upgrade: %v", err) + return err + } + // Check the final job status + return checkJobStatus(asyncUpgradeResp.JobId, tenantId, mtxURL, client, token) + + } else { + return fmt.Errorf("upgrade for %s %s %s: %d", v1alpha1.CAPTenantKind, tenantId, FailedWith, resp.StatusCode) + } +} + +func checkJobStatus(jobId string, tenantId string, mtxURL *url.URL, client http.Client, token *OAuthResponse) error { + // Create Request for fetching mtx upgrade Job status + mtxURL.Path = "/mtx/v1/model/status/" + jobId + req, err := http.NewRequest("GET", mtxURL.String(), nil) + if err != nil { + return fmt.Errorf("error when creating request for %s(%s) upgrade job status: %w", v1alpha1.CAPTenantKind, tenantId, err) + } + req.Header.Set(ContentType, ContentAppJson) + req.Header.Set(Authorization, fmt.Sprintf("%s %s", Bearer, token.AccessToken)) + // wait until the final status of Upgrade job is received + success, err := fetchJobStatus(tenantId, client, req) + if err != nil || !success { + return fmt.Errorf("upgrade job for %s: %s %s: %w", v1alpha1.CAPTenantKind, tenantId, FailedWith, err) + } + // Upgrade Job was Successful + return nil +} + +// Wait for and check mtx upgrade job result until a final status is received +func fetchJobStatus(tenantId string, client http.Client, req *http.Request) (bool, error) { + // Send the Get Request to fetch mtx asyncUpgrade Job status + jobResp, err := client.Do(req) + if err != nil { + return false, err + } + // Parse the respnose + decoder := json.NewDecoder(jobResp.Body) + defer jobResp.Body.Close() + var upgradeJobResp upgradeJobResponse + err = decoder.Decode(&upgradeJobResp) + if err != nil { + klog.Errorf("parsing response for async upgrade of %s: %s%s%v", v1alpha1.CAPTenantKind, tenantId, FailedWith, err) + return false, err + } + // Re-trigger after sleeping for 10s if status is not "FINISHED" + // TODO: check if some of these should be moved to own go routines + if upgradeJobResp.Status == statusQueued || upgradeJobResp.Status == statusRunning { + time.Sleep(10 * time.Second) + return fetchJobStatus(tenantId, client, req) + } else if upgradeJobResp.Status == statusFailed { + // Job Failure + return false, fmt.Errorf("aync upgrade job for %s: %s %s: %s", v1alpha1.CAPTenantKind, tenantId, FailedWith, upgradeJobResp.Error) + } + + // Check tenant upgrade status for the current tenant and return error if needed + if upgradeJobResp.Result.Tenants[tenantId].Status != statusSuccess { + return false, fmt.Errorf("upgrade of %s: %s %s: %s", v1alpha1.CAPTenantKind, tenantId, FailedWith, upgradeJobResp.Result.Tenants[tenantId].Message) + } + // tenant upgrade was successful + klog.Infof("%s upgrade for %s successful!", v1alpha1.CAPTenantKind, tenantId) + return true, nil +} diff --git a/cmd/mtx-job/main_test.go b/cmd/mtx-job/main_test.go new file mode 100644 index 0000000..45f4b73 --- /dev/null +++ b/cmd/mtx-job/main_test.go @@ -0,0 +1,506 @@ +package main + +import ( + "context" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "fmt" + "io/ioutil" + "net" + "net/http" + "net/http/httptest" + "net/url" + "os" + "path" + "strings" + "testing" + + "github.com/sap/cap-operator/internal/util" +) + +type testPayload struct { + Test string `json:"test"` +} + +type tlsAttributes struct { + certificate string + key string +} + +func readCertificateData() *struct { + cacert []byte + cert []byte + key []byte +} { + cacert, _ := ioutil.ReadFile("../server/internal/testdata/rootCA.pem") + cert, _ := ioutil.ReadFile("../server/internal/testdata/auth.service.local.crt") + key, _ := ioutil.ReadFile("../server/internal/testdata/auth.service.local.key") + return &struct { + cacert []byte + cert []byte + key []byte + }{ + cacert: cacert, + cert: cert, + key: key, + } +} + +func createTestServer(ctx context.Context, t *testing.T, handler http.HandlerFunc, enableTLS bool, useVCAP bool) (string, func(), error) { + var ( + tlsInfo *tlsAttributes = nil + serverURL string + ) + // create test server + ts := httptest.NewUnstartedServer(handler) + if enableTLS { + // Append CA cert to the system pool + rootCAs, _ := x509.SystemCertPool() + if rootCAs == nil { + rootCAs = x509.NewCertPool() + } + certInfo := readCertificateData() + rootCAs.AppendCertsFromPEM(certInfo.cacert) + cert, err := tls.X509KeyPair(certInfo.cert, certInfo.key) + if err != nil { + return "", nil, err + } + ts.TLS = &tls.Config{Certificates: []tls.Certificate{cert}, RootCAs: rootCAs} + ts.StartTLS() + + tlsInfo = &tlsAttributes{ + certificate: string(certInfo.cert), + key: string(certInfo.key), + } + serverURL = ts.Listener.Addr().String() + } else { + ts.Start() + serverURL = ts.URL + } + go func() { + <-ctx.Done() + ts.Close() + }() + + basePath, err := createCredentialsForTesting(ts.URL, tlsInfo, useVCAP) + return serverURL, func() { + if !useVCAP { + os.RemoveAll(basePath) + } else { + os.Unsetenv(EnvVCAPServices) + } + }, err +} + +func createCredentialsForTesting(url string, tls *tlsAttributes, useVCAP bool) (string, error) { + instance := "test-uaa" + os.Setenv(EnvXSUAAInstanceName, instance) + + files := map[string]string{ + "clientid": "xsuaa-client-id", + "clientsecret": "xsuaa-secret", + "url": url, + "credential-type": "instance-secret", + "certurl": "https://cert.auth.service.local", + } + if tls != nil { + files["credential-type"] = "x509" + files["certificate"] = tls.certificate + files["key"] = tls.key + } + + if useVCAP { + vcap := map[string][]util.VCAPServiceInstance{"xsuaa": {{ + Name: instance, + InstanceName: instance, + Label: "xsuaa", + Tags: []string{"xsuaa"}, + Credentials: files, + }}} + data, _ := json.Marshal(vcap) + os.Setenv(EnvVCAPServices, string(data)) + return "", nil + } + + basePath, err := os.MkdirTemp("", "test-*") + if err != nil { + return "", fmt.Errorf("could not create temp dir: %s", err.Error()) + } + os.Setenv(EnvCredentialsPath, basePath) + + tmpDir := path.Join(basePath, "xsuaa", instance) + if err := os.MkdirAll(tmpDir, 0755); err != nil { + return "", fmt.Errorf("could not create temp dir: %s", err.Error()) + } + var createAttributeFile = func(ch chan<- error, file string, value string) { + ch <- os.WriteFile(path.Join(tmpDir, file), []byte(value), 0755) + } + + ch := make(chan error, len(files)) + for k, v := range files { + go createAttributeFile(ch, k, v) + } + for i := 0; i < len(files); i++ { + err := <-ch + if err != nil { + return "", fmt.Errorf("could not create temp file") + } + } + + return basePath, nil +} + +func TestWaitForMTX(t *testing.T) { + ready, timeout := false, false + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/mtx/v1/provisioning/tenant" { + t.Error("wrong URI path") + } + if ready && !timeout { + body, _ := json.Marshal([]string{"t1", "t2"}) + w.Write(body) + } else { + ready = true + w.WriteHeader(http.StatusServiceUnavailable) + } + })) + defer ts.Close() + mtxURL, _ := url.Parse(ts.URL) + token := &OAuthResponse{AccessToken: "sample-access-token", TokenType: "bearer"} + + // test with one iteration expecting error and the next successful + err := waitForMTX(mtxURL, http.Client{}, token) + if err != nil { + t.Error("unexpected error") + } + + // test timeout + timeout = true + os.Setenv(EnvWaitForMTXTimeoutSeconds, "2") + err = waitForMTX(mtxURL, http.Client{}, token) + if err == nil { + t.Error("expected context deadline error") + } else { + if err.Error() != "error when waiting for mtx: context deadline exceeded" { + t.Errorf("wrong error: %s", err.Error()) + } + } +} + +func TestFetchOAuthTokenWithClientSecret(t *testing.T) { + var unauthorized bool + handler := func(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + t.Error("expected POST operation") + } + if r.Header.Get(ContentType) != ContentFormEncoded { + t.Errorf("expected %s %s", ContentType, ContentFormEncoded) + } + if r.Header.Get(Authorization) != fmt.Sprintf("Basic %s", base64.URLEncoding.EncodeToString([]byte("xsuaa-client-id:xsuaa-secret"))) { + t.Errorf("incorrect authorization header") + } + if !unauthorized { + w.Write([]byte("{\"access_token\":\"sample-access-token\",\"token_type\":\"bearer\",\"expires_in\":43199}")) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + } + + _, tearDown, err := createTestServer(context.TODO(), t, handler, false, false) + if err != nil { + t.Fatal(err.Error()) + } + defer tearDown() + + // test valid request + token, err := fetchOAuthToken(http.Client{}) + if err != nil { + t.Fatal(err.Error()) + } + if token.TokenType != "bearer" || token.AccessToken != "sample-access-token" { + t.Error("unexpected response body") + } + + // test unauthorized + unauthorized = true + _, err = fetchOAuthToken(http.Client{}) + if err == nil { + t.Error("expected error") + } +} + +func TestFetchOAuthTokenWithX509Cert(t *testing.T) { + handler := func(w http.ResponseWriter, r *http.Request) { + if r.Method != http.MethodPost { + t.Error("expected POST operation") + } + if r.Header.Get(ContentType) != ContentFormEncoded { + t.Errorf("expected %s %s", ContentType, ContentFormEncoded) + } + w.Write([]byte("{\"access_token\":\"sample-access-token\",\"token_type\":\"bearer\",\"expires_in\":43199}")) + } + + type testConfig struct { + testCase string + useVCAP bool + } + + for _, p := range []testConfig{ + {testCase: "fetch token using x509 certificate using credentials from volume", useVCAP: false}, + {testCase: "fetch token using x509 certificate using credentials from VCAP_SERVICES", useVCAP: true}, + } { + t.Run(p.testCase, func(t *testing.T) { + serverAddr, tearDown, err := createTestServer(context.TODO(), t, handler, true, p.useVCAP) + if err != nil { + t.Fatal(err.Error()) + } + defer tearDown() + + dial := func(ctx context.Context, network, addr string) (net.Conn, error) { + if strings.Contains(addr, "auth.service.local:") { + addr = serverAddr + } + return net.Dial(network, addr) + } + client := http.Client{} + if t, ok := client.Transport.(*http.Transport); ok { + t.DialContext = dial + } else { + client.Transport = &http.Transport{DialContext: dial} + } + + // test valid request + token, err := fetchOAuthToken(client) + if err != nil { + t.Fatal(err.Error()) + } + if token.TokenType != "bearer" || token.AccessToken != "sample-access-token" { + t.Error("unexpected response body") + } + }) + } +} + +func TestSubscription(t *testing.T) { + mtx := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.URL.Path != "/mtx/v1/provisioning/tenant/test-tenant-id" { + t.Errorf("expected route with tenant id test-tenant-id") + } + if r.Header.Get(ContentType) != ContentAppJson { + t.Errorf("expected %s %s", ContentType, ContentAppJson) + } + if r.Header.Get(Authorization) != "Bearer sample-token" { + t.Error("expected oauth token for authorization") + } + content, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Errorf("could not read payload: %s", err.Error()) + } + var p testPayload + err = json.Unmarshal(content, &p) + if err != nil { + t.Errorf("could not read payload: %s", err.Error()) + } + switch p.Test { + case "provisioning-ok": + if r.Method != http.MethodPut { + t.Errorf("expected %s", http.MethodPut) + } + w.WriteHeader(http.StatusOK) + case "provisioning-fail": + w.WriteHeader(http.StatusBadRequest) + case "deprovisioning-ok": + if r.Method != http.MethodDelete { + t.Errorf("expected %s", http.MethodDelete) + } + w.WriteHeader(http.StatusOK) + default: + t.Error("unknown test payload") + } + })) + defer mtx.Close() + mtxURL, _ := url.Parse(mtx.URL) + os.Setenv(EnvMTXTenantId, "test-tenant-id") + + os.Setenv(EnvMTXRequestType, RequestTypeProvisioning) + os.Setenv(EnvMTXPayload, "{\"test\":\"provisioning-ok\"}") + err := processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err != nil { + t.Errorf("unexpected error: %s", err.Error()) + } + + os.Setenv(EnvMTXPayload, "{\"test\":\"provisioning-fail\"}") + err = processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err == nil { + t.Errorf("expected error") + } + + os.Setenv(EnvMTXRequestType, RequestTypeDeprovisioning) + os.Setenv(EnvMTXPayload, "{\"test\":\"deprovisioning-ok\"}") + err = processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err != nil { + t.Errorf("unexpected error: %s", err.Error()) + } +} + +func TestUpgrade(t *testing.T) { + jobPreviousStatus := "" + mtx := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Header.Get(Authorization) != "Bearer sample-token" { + t.Error("expected oauth token for authorization") + } + + switch r.URL.Path { + case "/mtx/v1/model/asyncUpgrade": + if r.Method != http.MethodPost { + t.Errorf("expected %s", http.MethodPost) + } + jobPreviousStatus = "" + if r.Header.Get(ContentType) != ContentAppJson { + t.Errorf("expected %s %s", ContentType, ContentAppJson) + } + content, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Errorf("could not read payload: %s", err.Error()) + } + var p testPayload + err = json.Unmarshal(content, &p) + if err != nil { + t.Errorf("could not read payload: %s", err.Error()) + } + switch p.Test { + case "upgrade-job-ok": + w.WriteHeader(http.StatusCreated) + w.Write([]byte("{\"jobID\":\"job-id-ok\"}")) + case "upgrade-job-fail": + w.WriteHeader(http.StatusCreated) + w.Write([]byte("{\"jobID\":\"job-id-fail\"}")) + case "upgrade-job-queue-tenant-fail": + w.WriteHeader(http.StatusCreated) + w.Write([]byte("{\"jobID\":\"job-id-queue-fail\"}")) + case "upgrade-fail": + w.WriteHeader(http.StatusInternalServerError) + } + case "/mtx/v1/model/status/job-id-ok": + if r.Method != http.MethodGet { + t.Errorf("expected %s", http.MethodGet) + } + jobResponse := upgradeJobResponse{Status: "FINISHED", Result: upgradeJobResult{Tenants: map[string]tenantUpgradeResult{"test-tenant-id": {Status: "SUCCESS"}}}} + body, _ := json.Marshal(jobResponse) + w.Write(body) + case "/mtx/v1/model/status/job-id-fail": + if r.Method != http.MethodGet { + t.Errorf("expected %s", http.MethodGet) + } + jobResponse := upgradeJobResponse{Status: "FAILED", Error: "memory dump"} + body, _ := json.Marshal(jobResponse) + w.Write(body) + case "/mtx/v1/model/status/job-id-queue-fail": + if r.Method != http.MethodGet { + t.Errorf("expected %s", http.MethodGet) + } + var jobResponse upgradeJobResponse + if jobPreviousStatus == "" { + jobResponse = upgradeJobResponse{Status: "QUEUED"} + jobPreviousStatus = "QUEUED" + } else { + jobResponse = upgradeJobResponse{Status: "FINISHED", Result: upgradeJobResult{Tenants: map[string]tenantUpgradeResult{"test-tenant-id": {Status: "FAILED", Message: "tenant upgrade failed"}}}} + } + body, _ := json.Marshal(jobResponse) + w.Write(body) + } + })) + defer mtx.Close() + mtxURL, _ := url.Parse(mtx.URL) + os.Setenv(EnvMTXRequestType, RequestTypeUpgrade) + os.Setenv(EnvMTXTenantId, "test-tenant-id") + + os.Setenv(EnvMTXPayload, "{\"test\":\"upgrade-job-ok\"}") + err := processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err != nil { + t.Errorf("unexpected error: %s", err.Error()) + } + + os.Setenv(EnvMTXPayload, "{\"test\":\"upgrade-fail\"}") + err = processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err == nil { + t.Errorf("expected error") + } + + os.Setenv(EnvMTXPayload, "{\"test\":\"upgrade-job-fail\"}") + err = processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err == nil { + t.Errorf("expected error") + } + + os.Setenv(EnvMTXPayload, "{\"test\":\"upgrade-job-queue-tenant-fail\"}") + err = processRequest(mtxURL, http.Client{}, &OAuthResponse{AccessToken: "sample-token", TokenType: "bearer"}) + if err == nil { + t.Errorf("expected error") + } +} + +func TestExecute(t *testing.T) { + provisioningError, mtxTimeout := false, false + handler := func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/oauth/token": + w.Write([]byte("{\"access_token\":\"sample-access-token\",\"token_type\":\"bearer\",\"expires_in\":43199}")) + case "/mtx/v1/provisioning/tenant": + if mtxTimeout { + w.WriteHeader(http.StatusBadGateway) + } else { + w.Write([]byte("[]")) + } + case "/mtx/v1/provisioning/tenant/test-tenant-id": + if provisioningError { + w.WriteHeader(http.StatusInternalServerError) + } else { + w.WriteHeader(http.StatusOK) + } + } + } + + serverURL, tearDown, err := createTestServer(context.TODO(), t, handler, false, false) + if err != nil { + t.Fatal(err.Error()) + } + defer tearDown() + + // test w/o mtx url + os.Unsetenv(EnvMTXServiceURL) + code := execute() + if code != 1 { + t.Error("expected error") + } + + // test w/o request type + provisioningError = true + os.Setenv(EnvMTXServiceURL, serverURL) + os.Unsetenv(EnvMTXRequestType) + code = execute() + if code != 1 { + t.Error("expected error") + } + + // test with successful simulated provisioning + provisioningError = false + os.Setenv(EnvMTXTenantId, "test-tenant-id") + os.Setenv(EnvMTXPayload, "{}") + os.Setenv(EnvMTXRequestType, RequestTypeProvisioning) + code = execute() + if code != 0 { + t.Error("expected exit code 0") + } + + // test timeout waiting for mtx + mtxTimeout = true + os.Setenv(EnvMTXServiceURL, serverURL) + os.Setenv(EnvWaitForMTXTimeoutSeconds, "2") + code = execute() + if code != 1 { + t.Error("expected error") + } +} diff --git a/cmd/server/internal/client.go b/cmd/server/internal/client.go new file mode 100644 index 0000000..4b1b68e --- /dev/null +++ b/cmd/server/internal/client.go @@ -0,0 +1,15 @@ +package handler + +import ( + "net/http" +) + +type httpClientGenerator interface { + NewHTTPClient() *http.Client +} + +type httpClientGeneratorImpl struct{} + +func (facade *httpClientGeneratorImpl) NewHTTPClient() *http.Client { + return &http.Client{} +} diff --git a/cmd/server/internal/handler.go b/cmd/server/internal/handler.go new file mode 100644 index 0000000..136d119 --- /dev/null +++ b/cmd/server/internal/handler.go @@ -0,0 +1,581 @@ +package handler + +import ( + "bytes" + "context" + "crypto/sha1" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "strings" + "sync" + "time" + + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" +) + +const ( + LabelBTPApplicationIdentifierHash = "sme.sap.com/btp-app-identifier-hash" + LabelTenantId = "sme.sap.com/btp-tenant-id" +) + +const ( + ResourceCreated = "resource created successfully" + ResourceFound = "resource exists" + ResourceDeleted = "resource deleted successfully" + ResourceNotFound = "resource not found" +) + +const ErrorOccured = "Error occured " +const InvalidRequestMethod = "invalid request method" +const AuthorizationCheckFailed = "authorization check failed" +const BearerPrefix = "Bearer " +const BasicPrefix = "Basic " + +const ( + CallbackSucceeded = "SUCCEEDED" + CallbackFailed = "FAILED" + ProvisioningSucceededMessage = "Provisioning successful" + ProvisioningFailedMessage = "Provisioning failed" + DeprovisioningSucceededMessage = "Deprovisioning successful" + DeprovisioningFailedMessage = "Deprovisioning failed" +) + +type Result struct { + Tenant *v1alpha1.CAPTenant + Message string +} + +type SubscriptionHandler struct { + Clientset versioned.Interface + KubeClienset kubernetes.Interface + httpClientGenerator httpClientGenerator +} + +type UserInfo struct { + UserId string `json:"userId"` + UserName string `json:"userName"` + Email string `json:"email"` + SubIdp string `json:"subIdp"` + Sub string `json:"sub"` +} + +type AdditionalInformation struct { + Clientid string `json:"clientid"` + Clientsecret string `json:"clientsecret"` + Tokenurl string `json:"tokenurl"` +} + +type DeprovisioningRequest struct { + SubscriptionAppId string `json:"subscriptionAppId"` + SubscriptionAppName string `json:"subscriptionAppName"` + SubscribedTenantId string `json:"subscribedTenantId"` + SubscribedZoneId string `json:"subscribedZoneId"` + SubscribedSubdomain string `json:"subscribedSubdomain"` + SubscribedSubaccountId string `json:"subscribedSubaccountId"` + SubscribedCrmId string `json:"subscribedCrmId"` + SubscriptionAppPlan string `json:"subscriptionAppPlan"` + SubscriptionAppAmount string `json:"subscriptionAppAmount"` + DependentServiceInstanceAppIds string `json:"dependentServiceInstanceAppIds"` + GlobalAccountGUID string `json:"globalAccountGUID"` + UserId string `json:"userId"` + UserInfo UserInfo `json:"userInfo"` +} + +type ProvisioningRequest struct { + SubscriptionAppId string `json:"subscriptionAppId"` + SubscriptionAppName string `json:"subscriptionAppName"` + SubscribedTenantId string `json:"subscribedTenantId"` + SubscribedZoneId string `json:"subscribedZoneId"` + SubscribedSubdomain string `json:"subscribedSubdomain"` + SubscribedSubaccountId string `json:"subscribedSubaccountId"` + SubscribedLicenseType string `json:"subscribedLicenseType"` + SubscribedCrmId string `json:"subscribedCrmId"` + SubscriptionAppPlan string `json:"subscriptionAppPlan"` + SubscriptionAppAmount string `json:"subscriptionAppAmount"` + DependentServiceInstanceAppIds string `json:"dependentServiceInstanceAppIds"` + GlobalAccountGUID string `json:"globalAccountGUID"` + EventType string `json:"eventType"` + AdditionalInformation AdditionalInformation `json:"additionalInformation"` + UserId string `json:"userId"` + UserInfo UserInfo `json:"userInfo"` +} + +type GetRequest struct { + SubscriptionAppName string `json:"subscriptionAppName"` + GlobalAccountGUID string `json:"globalAccountGUID"` + SubscribedTenantId string `json:"subscribedTenantId"` +} + +type CallbackResponse struct { + Status string `json:"status"` + Message string `json:"message"` + SubscriptionUrl string `json:"subscriptionUrl"` +} + +type OAuthResponse struct { + AccessToken string `json:"access_token"` +} + +func (s *SubscriptionHandler) CreateTenant(req *http.Request) *Result { + klog.Info("Create Tenant triggered") + var created = false + // Get the relevant provisioning request + decoder := json.NewDecoder(req.Body) + var reqType ProvisioningRequest + err := decoder.Decode(&reqType) + if err != nil { + klog.Error(ErrorOccured, err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + + // Check if CAPApplication instance for the given btpApp exists + ca, err := s.checkCAPApp(reqType.GlobalAccountGUID, reqType.SubscriptionAppName) + if err != nil { + klog.Error(ErrorOccured, err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + + // fetch SaaS Registry and XSUAA information + saasData, uaaData := s.getServiceDetails(ca) + if saasData == nil || uaaData == nil { + return &Result{Tenant: nil, Message: ResourceNotFound} + } + + // validate token + err = s.checkAuthorization(req.Header.Get("Authorization"), saasData, uaaData) + if err != nil { + return &Result{Tenant: nil, Message: err.Error()} + } + + // Check if A CRO for CAPTenant already exists + tenant := s.getTenant(reqType.GlobalAccountGUID, reqType.SubscriptionAppName, reqType.SubscribedTenantId, ca.Namespace).Tenant + + // If the resource doesn't exist, we'll create it + if tenant == nil { + created = true + klog.Info("Creating Tenant") + tenant, _ = s.Clientset.SmeV1alpha1().CAPTenants(ca.Namespace).Create(context.TODO(), &v1alpha1.CAPTenant{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: ca.Name + "-", + Namespace: ca.Namespace, + Labels: map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(reqType.GlobalAccountGUID, reqType.SubscriptionAppName), + LabelTenantId: reqType.SubscribedTenantId, + }, + }, + Spec: v1alpha1.CAPTenantSpec{ + CAPApplicationInstance: ca.Name, + BTPTenantIdentification: v1alpha1.BTPTenantIdentification{ + SubDomain: reqType.SubscribedSubdomain, + TenantId: reqType.SubscribedTenantId, + }, + }, + }, metav1.CreateOptions{}) + } + + // TODO: consider retying tenant creation if it is in Error state + if tenant != nil { + s.initializeCallback(tenant.Name, ca, saasData, req, reqType.SubscribedSubdomain, true) + } + + // Tenant created/exists + message := func(isCreated bool) string { + if isCreated { + return ResourceCreated + } else { + return ResourceFound + } + } + klog.V(2).Info("Done with create: ", message, tenant) + return &Result{Tenant: tenant, Message: message(created)} +} + +func (s *SubscriptionHandler) getTenant(globalAccountGUID string, btpAppName string, tenantId string, namespace string) *Result { + labelSelector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(globalAccountGUID, btpAppName), + LabelTenantId: tenantId, + }) + if err != nil { + klog.Error("Error occurred in getTenant", err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + + ctList, err := s.Clientset.SmeV1alpha1().CAPTenants(namespace).List(context.TODO(), metav1.ListOptions{LabelSelector: labelSelector.String()}) + if err != nil { + klog.Error("Error occured in getTenant", err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + if len(ctList.Items) == 0 { + klog.Info("No tenant found") + return &Result{Tenant: nil, Message: ResourceNotFound} + } + // Assume only 1 tenant actually matches the selector! + klog.V(2).Info("Tenant found", &ctList.Items[0]) + return &Result{Tenant: &ctList.Items[0], Message: ResourceFound} +} + +func (s *SubscriptionHandler) DeleteTenant(req *http.Request) *Result { + klog.Info("Delete Tenant triggered") + // Get the relevant deprovisioning request + decoder := json.NewDecoder(req.Body) + var reqType DeprovisioningRequest + err := decoder.Decode(&reqType) + if err != nil { + klog.Error(ErrorOccured, err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + + // Check if CAPApplication instance for the given btpApp exists + ca, err := s.checkCAPApp(reqType.GlobalAccountGUID, reqType.SubscriptionAppName) + if err != nil { + klog.Error(ErrorOccured, err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + + // fetch SaaS Registry and XSUAA information + saasData, uaaData := s.getServiceDetails(ca) + if saasData == nil || uaaData == nil { + return &Result{Tenant: nil, Message: ResourceNotFound} + } + if saasData == nil || uaaData == nil { + return &Result{Tenant: nil, Message: ResourceNotFound} + } + + // validate token + err = s.checkAuthorization(req.Header.Get("Authorization"), saasData, uaaData) + if err != nil { + return &Result{Tenant: nil, Message: err.Error()} + } + + tenant := s.getTenant(reqType.GlobalAccountGUID, reqType.SubscriptionAppName, reqType.SubscribedTenantId, ca.Namespace).Tenant + + tenantName := "foo" //TODO + if tenant != nil { + tenantName = tenant.Name + klog.Info("Tenant found, deleting") + err = s.Clientset.SmeV1alpha1().CAPTenants(tenant.Namespace).Delete(context.TODO(), tenant.Name, metav1.DeleteOptions{}) + if err != nil { + klog.Error("Error deleting tenant", err.Error()) + return &Result{Tenant: nil, Message: err.Error()} + } + } + + s.initializeCallback(tenantName, ca, saasData, req, reqType.SubscribedSubdomain, false) + + return &Result{Tenant: tenant, Message: ResourceDeleted} +} + +func (s *SubscriptionHandler) checkCAPApp(globalAccountId string, btpAppName string) (*v1alpha1.CAPApplication, error) { + labelSelector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(globalAccountId, btpAppName), + }) + if err != nil { + return nil, err + } + + capAppsList, err := s.Clientset.SmeV1alpha1().CAPApplications(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labelSelector.String()}) + if err != nil { + return nil, err + } + if len(capAppsList.Items) == 0 { + return nil, errors.New(ResourceNotFound) // TODO proper error message handling + } + // Assume only 1 app actually matches the selector! + return &capAppsList.Items[0], nil +} + +func (s *SubscriptionHandler) checkAuthorization(authHeader string, saasData *util.SaasRegistryCredentials, uaaData *util.XSUAACredentials) error { + if strings.Index(authHeader, BearerPrefix) != 0 { + return errors.New("expected bearer token") + } + + token := authHeader[7:] + err := VerifyXSUAAJWTToken(context.TODO(), token, &XSUAAConfig{ + UAADomain: saasData.UAADomain, + ClientID: saasData.ClientId, + XSAppName: uaaData.XSAppName, + RequiredScopes: []string{uaaData.XSAppName + ".Callback", uaaData.XSAppName + ".mtcallback"}, + }, s.httpClientGenerator.NewHTTPClient()) + if err != nil { + klog.Errorf("failed token validation: %s", err.Error()) + return errors.New(AuthorizationCheckFailed) + } + return nil +} + +func (s *SubscriptionHandler) initializeCallback(tenantName string, ca *v1alpha1.CAPApplication, saasData *util.SaasRegistryCredentials, req *http.Request, tenantSubDomain string, isProvisioning bool) { + appUrl := "https://" + tenantSubDomain + "." + ca.Spec.Domains.Primary + asyncCallbackPath := req.Header.Get("STATUS_CALLBACK") + klog.Infof("Subscription URL: %s, Async callback URL: %s", appUrl, asyncCallbackPath) + + go func() { + // create a context for tenant checks and outgoing requests + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + // Check tenant status asynchronously + klog.Info("Waiting for tenant status check...") + status := s.checkCAPTenantStatus(ctx, ca.Namespace, tenantName, isProvisioning, saasData.CallbackTimeoutMillis) + klog.Info("CAPTenant check result: ", status) + + s.handleAsyncCallback(ctx, saasData, status, asyncCallbackPath, appUrl, isProvisioning) + }() + + klog.Info("Waiting for async saas callback after checks...") +} + +func (s *SubscriptionHandler) checkCAPTenantStatus(ctx context.Context, tenantNamespace string, tenantName string, provisioning bool, callbackTimeoutMs string) bool { + asyncCallbackTimeout := 15 * time.Minute + if callbackTimeoutMs != "" { + asyncCallbackTimeout, _ = time.ParseDuration(callbackTimeoutMs + "ms") + } + + timedCtx, cancel := context.WithTimeout(ctx, asyncCallbackTimeout) // Assume tenants won't take over 15mins to be "Ready" + defer cancel() + + for { + select { + case <-timedCtx.Done(): + klog.Warningf("tenant status check: %s", timedCtx.Err().Error()) + return false + default: + capTenant, err := s.Clientset.SmeV1alpha1().CAPTenants(tenantNamespace).Get(context.TODO(), tenantName, metav1.GetOptions{}) + if k8sErrors.IsNotFound(err) { + klog.Info("No tenant found.. Exiting CAPTenant status check.") + if !provisioning { + return true + } + } + if capTenant != nil { + klog.Info("CAPTenant (tenantid: "+capTenant.Spec.TenantId+"), status: ", capTenant.Status.State) + if provisioning && (capTenant.Status.State == v1alpha1.CAPTenantStateReady || capTenant.Status.State == v1alpha1.CAPTenantStateProvisioningError) { + klog.Info("Exiting CAPTenant status check: ", capTenant.Status.State) + return capTenant.Status.State == v1alpha1.CAPTenantStateReady + } + } + time.Sleep(5 * time.Second) + } + } +} + +func (s *SubscriptionHandler) getServiceDetails(ca *v1alpha1.CAPApplication) (*util.SaasRegistryCredentials, *util.XSUAACredentials) { + var ( + wg sync.WaitGroup + saasData *util.SaasRegistryCredentials + uaaData *util.XSUAACredentials + ) + wg.Add(1) + go func() { + defer wg.Done() + saasData = s.getSaasDetails(ca) + }() + wg.Add(1) + go func() { + defer wg.Done() + uaaData = s.getXSUAADetails(ca) + }() + + wg.Wait() + return saasData, uaaData +} + +func (s *SubscriptionHandler) getSaasDetails(capApp *v1alpha1.CAPApplication) *util.SaasRegistryCredentials { + var ( + result *util.SaasRegistryCredentials = nil + err error + info *v1alpha1.ServiceInfo + ) + if info, err = s.getServiceInfo(capApp, "saas-registry"); err == nil { + result, err = util.ReadServiceCredentialsFromSecret[util.SaasRegistryCredentials](info, capApp.Namespace, s.KubeClienset) + } + if err != nil { + klog.Error("SaaS Registry credentials could not be read. Exiting..", err.Error()) + } + return result +} + +func (s *SubscriptionHandler) getXSUAADetails(capApp *v1alpha1.CAPApplication) *util.XSUAACredentials { + var ( + result *util.XSUAACredentials = nil + err error + info *v1alpha1.ServiceInfo + ) + info = util.GetXSUAAInfo(capApp.Spec.BTP.Services, capApp) + + if info == nil { + err = fmt.Errorf("could not find service with class %s in CAPApplication %s.%s", "xsuaa", capApp.Namespace, capApp.Name) + } else { + result, err = util.ReadServiceCredentialsFromSecret[util.XSUAACredentials](info, capApp.Namespace, s.KubeClienset) + } + + if err != nil { + klog.Error("XSUAA credentials could not be read. Exiting..", err.Error()) + } + return result +} + +func (s *SubscriptionHandler) getServiceInfo(ca *v1alpha1.CAPApplication, serviceClass string) (*v1alpha1.ServiceInfo, error) { + for i := range ca.Spec.BTP.Services { + if ca.Spec.BTP.Services[i].Class == serviceClass { + return &ca.Spec.BTP.Services[i], nil + } + } + return nil, fmt.Errorf("could not find service with class %s in CAPApplication %s.%s", serviceClass, ca.Namespace, ca.Name) +} + +func prepareTokenRequest(ctx context.Context, saasData *util.SaasRegistryCredentials, client *http.Client) (tokenReq *http.Request, err error) { + defer func() { + if err != nil { + err = fmt.Errorf("error preparing token request: %w", err) + } + }() + var ( + tokenURL string + ) + if saasData.CredentialType == "x509" { + tokenURL = saasData.CertificateUrl + "/oauth/token" + + // setup client for mTLS + cert, err := tls.X509KeyPair([]byte(saasData.Certificate), []byte(saasData.CertificateKey)) + if err != nil { + return nil, err + } + caCertPool, err := x509.SystemCertPool() + if err != nil { + return nil, err + } + caCertPool.AppendCertsFromPEM([]byte(saasData.Certificate)) + tlsConfig := &tls.Config{ + RootCAs: caCertPool, + Certificates: []tls.Certificate{cert}, + } + if t, ok := client.Transport.(*http.Transport); ok { + t.TLSClientConfig = tlsConfig + } else { + client.Transport = &http.Transport{TLSClientConfig: tlsConfig} + } + } else { + tokenURL = saasData.AuthUrl + "/oauth/token" + } + tokenData := url.Values{} + tokenData.Add("client_id", saasData.ClientId) + tokenData.Add("grant_type", "client_credentials") + + tokenReq, err = http.NewRequestWithContext(ctx, http.MethodPost, tokenURL, strings.NewReader(tokenData.Encode())) + if err != nil { + return nil, err + } + tokenReq.Header.Set("Content-Type", "application/x-www-form-urlencoded") + if saasData.CredentialType != "x509" { + tokenReq.Header.Set("Authorization", BasicPrefix+base64.StdEncoding.EncodeToString([]byte(saasData.ClientId+":"+saasData.ClientSecret))) + } + + return tokenReq, nil +} + +func (s *SubscriptionHandler) handleAsyncCallback(ctx context.Context, saasData *util.SaasRegistryCredentials, status bool, asyncCallbackPath string, appUrl string, isProvisioning bool) { + // Get OAuth token + tokenClient := s.httpClientGenerator.NewHTTPClient() + tokenReq, err := prepareTokenRequest(ctx, saasData, tokenClient) + if err != nil { + klog.Error(err.Error()) + return + } + klog.V(2).Info("Triggering OAuth: ", tokenReq) + + tokenResponse, err := tokenClient.Do(tokenReq) + if err != nil { + klog.Error("Error getting token for async callback: ", err.Error()) + return + } else { + klog.V(2).Info("Response from token handling for async callback: ", tokenResponse) + // Get the relevant OAuth request + decoder := json.NewDecoder(tokenResponse.Body) + var oAuthType OAuthResponse + err := decoder.Decode(&oAuthType) + if err != nil { + klog.Error("Error parsing token for async callback: ", err.Error()) + return + } + defer tokenResponse.Body.Close() + + checkMatch := func(match bool, trueVal string, falseVal string) string { + if match { + return trueVal + } + return falseVal + } + + payload, _ := json.Marshal(&CallbackResponse{ + Status: checkMatch(status, CallbackSucceeded, CallbackFailed), + Message: checkMatch(status, checkMatch(isProvisioning, ProvisioningSucceededMessage, DeprovisioningSucceededMessage), checkMatch(isProvisioning, ProvisioningFailedMessage, DeprovisioningFailedMessage)), + SubscriptionUrl: appUrl, + }) + callbackReq, _ := http.NewRequestWithContext(ctx, http.MethodPut, saasData.SaasManagerUrl+asyncCallbackPath, bytes.NewBuffer(payload)) + callbackReq.Header.Set("Content-Type", "application/json") + callbackReq.Header.Set("Authorization", BearerPrefix+oAuthType.AccessToken) + + client := s.httpClientGenerator.NewHTTPClient() + klog.V(2).Info("Triggering callback: ", callbackReq) + + callbackResponse, err := client.Do(callbackReq) + if err != nil { + klog.Error("Error sending async callback: ", err.Error()) + return + } else { + klog.Info("Response from async callback: ", callbackResponse) + defer callbackResponse.Body.Close() + } + } + + klog.Info("Exiting from async callback..") +} + +func (s *SubscriptionHandler) HandleRequest(w http.ResponseWriter, req *http.Request) { + var subscriptionResult *Result + switch req.Method { + case http.MethodPut: + subscriptionResult = s.CreateTenant(req) + if subscriptionResult.Tenant == nil { + w.WriteHeader(http.StatusNotAcceptable) + } else { + w.WriteHeader(http.StatusAccepted) + } + case http.MethodDelete: + subscriptionResult = s.DeleteTenant(req) + if subscriptionResult.Message != ResourceDeleted { + w.WriteHeader(http.StatusNotAcceptable) + } else { + w.WriteHeader(http.StatusAccepted) + } + default: + subscriptionResult = &Result{Tenant: nil, Message: InvalidRequestMethod} + w.WriteHeader(http.StatusMethodNotAllowed) + } + res, _ := json.Marshal(subscriptionResult) + w.Write(res) +} + +func NewSubscriptionHandler(clientset versioned.Interface, kubeClienset kubernetes.Interface) *SubscriptionHandler { + return &SubscriptionHandler{Clientset: clientset, KubeClienset: kubeClienset, httpClientGenerator: &httpClientGeneratorImpl{}} +} + +// Returns an sha1 checksum for a given source string +func sha1Sum(source ...string) string { + sum := sha1.Sum([]byte(strings.Join(source, ""))) + return fmt.Sprintf("%x", sum) +} diff --git a/cmd/server/internal/handler_test.go b/cmd/server/internal/handler_test.go new file mode 100644 index 0000000..6c97c78 --- /dev/null +++ b/cmd/server/internal/handler_test.go @@ -0,0 +1,659 @@ +package handler + +import ( + "context" + "crypto/tls" + "crypto/x509" + "encoding/json" + "io" + "net" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + "time" + + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + k8sfake "k8s.io/client-go/kubernetes/fake" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "github.com/sap/cap-operator/pkg/client/clientset/versioned/fake" +) + +const RequestPath = "/provision" + +type httpTestClientGenerator struct { + client *http.Client +} + +func (facade *httpTestClientGenerator) NewHTTPClient() *http.Client { return facade.client } + +const ( + cavName = "cav-test-controller" + caName = "ca-test-controller" + appName = "some-app-name" + globalAccountId = "cap-app-global" + subDomain = "foo" + tenantId = "012012012-1234-1234-123456" +) + +func setup(ca *v1alpha1.CAPApplication, cat *v1alpha1.CAPTenant, client *http.Client) *SubscriptionHandler { + crdObjects := []runtime.Object{} + if ca != nil { + crdObjects = append(crdObjects, ca) + } + if cat != nil { + crdObjects = append(crdObjects, cat) + } + + subHandler := NewSubscriptionHandler(fake.NewSimpleClientset(crdObjects...), k8sfake.NewSimpleClientset(createSecrets()...)) + if client != nil { + subHandler.httpClientGenerator = &httpTestClientGenerator{client: client} + } + return subHandler +} + +func createSecrets() []runtime.Object { + secs := []runtime.Object{} + secs = append(secs, &corev1.Secret{ + ObjectMeta: v1.ObjectMeta{ + Name: "test-xsuaa-sec", + Namespace: v1.NamespaceDefault, + }, + Type: corev1.SecretTypeOpaque, + Data: map[string][]byte{ + "credentials": []byte(`{ + "uaadomain": "auth.service.local", + "xsappname": "appname!b14", + "trustedclientidsuffix": "|appname!b14", + "verificationkey": "", + "sburl": "internal.auth.service.local", + "url": "https://app-domain.auth.service.local", + "credential-type": "instance-secret" + }`), + }, + }, &corev1.Secret{ + ObjectMeta: v1.ObjectMeta{ + Name: "test-xsuaa-sec2", + Namespace: v1.NamespaceDefault, + }, + Type: corev1.SecretTypeOpaque, + Data: map[string][]byte{ + "credentials": []byte(`{ + "uaadomain": "auth2.service.local", + "xsappname": "appname!b21", + "trustedclientidsuffix": "|appname!b21", + "verificationkey": "", + "sburl": "internal.auth2.service.local", + "url": "https://app2-domain.auth2.service.local", + "credential-type": "instance-secret" + }`), + }, + }, &corev1.Secret{ + ObjectMeta: v1.ObjectMeta{ + Name: "test-saas-sec", + Namespace: v1.NamespaceDefault, + }, + Type: corev1.SecretTypeOpaque, + Data: map[string][]byte{ + "credentials": []byte(`{ + "saas_registry_url": "https://sm.service.local", + "clientid": "clientid", + "clientsecret": "clientsecret", + "uaadomain": "auth.service.local", + "sburl": "internal.auth.service.local", + "url": "https://app-domain.auth.service.local", + "credential-type": "instance-secret" + }`), + }, + }) + + return secs +} + +func createCA() *v1alpha1.CAPApplication { + return &v1alpha1.CAPApplication{ + ObjectMeta: v1.ObjectMeta{ + Name: caName, + Namespace: v1.NamespaceDefault, + Labels: map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(globalAccountId, appName), + }, + }, + Spec: v1alpha1.CAPApplicationSpec{ + Domains: v1alpha1.ApplicationDomains{Primary: "app.sme.sap.com", IstioIngressGatewayLabels: []v1alpha1.NameValue{{Name: "foo", Value: "bar"}}}, + GlobalAccountId: globalAccountId, + BTPAppName: appName, + Provider: v1alpha1.BTPTenantIdentification{ + SubDomain: subDomain, + TenantId: tenantId, + }, + BTP: v1alpha1.BTP{ + Services: []v1alpha1.ServiceInfo{ + { + Class: "xsuaa", + Name: "test-xsuaa", + Secret: "test-xsuaa-sec", + }, + { + Class: "xsuaa", + Name: "test-xsuaa2", + Secret: "test-xsuaa-sec2", + }, + { + Class: "saas-registry", + Name: "test-saas", + Secret: "test-saas-sec", + }, + { + Class: "service-manager", + Name: "test-sm", + Secret: "test-sm-sec", + }, + { + Class: "destination", + Name: "test-dest", + Secret: "test-dest-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-host", + Secret: "test-html-host-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-rt", + Secret: "test-html-rt-sec", + }, + }, + }, + }, + } +} + +func createCAT(ready bool) *v1alpha1.CAPTenant { + cat := &v1alpha1.CAPTenant{ + ObjectMeta: v1.ObjectMeta{ + Name: caName + "-provider", + Namespace: v1.NamespaceDefault, + Labels: map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(globalAccountId, appName), + LabelTenantId: tenantId, + }, + }, + Spec: v1alpha1.CAPTenantSpec{ + CAPApplicationInstance: caName, + BTPTenantIdentification: v1alpha1.BTPTenantIdentification{ + SubDomain: subDomain, + TenantId: tenantId, + }, + }, + } + if ready { + cat.Status = v1alpha1.CAPTenantStatus{ + State: v1alpha1.CAPTenantStateReady, + CurrentCAPApplicationVersionInstance: "cap-version", + GenericStatus: v1alpha1.GenericStatus{ + Conditions: []v1.Condition{{ + Type: string(v1alpha1.ConditionTypeReady), + Status: "True", + Reason: "TenantReady", + }}, + }, + } + } + return cat +} + +func TestMain(m *testing.M) { + m.Run() +} + +func Test_IncorrectMethod(t *testing.T) { + res := httptest.NewRecorder() + req := httptest.NewRequest(http.MethodPatch, RequestPath, strings.NewReader(`{"foo": "bar"}`)) + subHandler := setup(nil, nil, nil) + subHandler.HandleRequest(res, req) + if res.Code != http.StatusMethodNotAllowed { + t.Errorf("Expected status '%d', received '%d'", http.StatusMethodNotAllowed, res.Code) + } + + // Get the relevant response + decoder := json.NewDecoder(res.Body) + var resType Result + err := decoder.Decode(&resType) + if err != nil { + t.Error("Unexpected error in expected response: ", res.Body) + } + + if resType.Tenant != nil && resType.Message != InvalidRequestMethod { + t.Error("Response: ", res.Body, " does not match expected result: ", InvalidRequestMethod) + } + +} + +func Test_provisioning(t *testing.T) { + tests := []struct { + name string + method string + body string + createCROs bool + withSecretKey bool + existingTenant bool + expectedStatusCode int + expectedResponse Result + }{ + { + name: "Invalid Provisioning Request", + method: http.MethodPut, + body: "", + expectedStatusCode: http.StatusNotAcceptable, + expectedResponse: Result{ + Message: "EOF", //TODO + }, + }, + { + name: "Provisioning Request without CROs", + method: http.MethodPut, + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + expectedStatusCode: http.StatusNotAcceptable, + expectedResponse: Result{ + Message: "the server could not find the requested resource (get capapplications.sme.sap.com)", //TODO + }, + }, + { + name: "Provisioning Request with CROs with invalid app name", + method: http.MethodPut, + body: `{"subscriptionAppName":"test-app","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + createCROs: true, + expectedStatusCode: http.StatusNotAcceptable, + expectedResponse: Result{ + Message: "", //TODO + }, + }, + { + name: "Provisioning Request valid", + method: http.MethodPut, + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + createCROs: true, + expectedStatusCode: http.StatusAccepted, + expectedResponse: Result{ + Message: ResourceCreated, + }, + }, + { + name: "Provisioning Request with existing tenant", + method: http.MethodPut, + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + createCROs: true, + existingTenant: true, + expectedStatusCode: http.StatusAccepted, + expectedResponse: Result{ + Message: ResourceFound, + }, + }, + } + + for _, testData := range tests { + t.Run(testData.name, func(t *testing.T) { + var ca *v1alpha1.CAPApplication + var cat *v1alpha1.CAPTenant + if testData.createCROs { + ca = createCA() + } + if testData.existingTenant { + cat = createCAT(false) + } + client, tokenString, err := SetupValidTokenAndIssuerForSubscriptionTests("appname!b14") + if err != nil { + t.Fatal(err.Error()) + } + subHandler := setup(ca, cat, client) + + res := httptest.NewRecorder() + req := httptest.NewRequest(testData.method, RequestPath, strings.NewReader(testData.body)) + req.Header.Set("Authorization", "Bearer "+tokenString) + subHandler.HandleRequest(res, req) + if res.Code != testData.expectedStatusCode { + t.Errorf("Expected status '%d', received '%d'", testData.expectedStatusCode, res.Code) + } + + // Get the relevant response + decoder := json.NewDecoder(res.Body) + var resType Result + err = decoder.Decode(&resType) + if err != nil { + t.Error("Unexpected error in expected response: ", res.Body) + } + + if resType.Tenant != testData.expectedResponse.Tenant && resType.Message != testData.expectedResponse.Message { + t.Error("Response: ", res.Body, " does not match expected result: ", testData.expectedResponse) + } + }) + } +} + +func Test_deprovisioning(t *testing.T) { + tests := []struct { + name string + method string + createCROs bool + existingTenant bool + body string + expectedStatusCode int + expectedResponse Result + withSecretKey bool + }{ + { + name: "Invalid Deprovisioning Request", + method: http.MethodDelete, + + body: "", + expectedStatusCode: http.StatusNotAcceptable, + expectedResponse: Result{ + Message: "EOF", //TODO + }, + }, + { + name: "Deprovisioning Request w/o CROs", + method: http.MethodDelete, + + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + expectedStatusCode: http.StatusNotAcceptable, + expectedResponse: Result{ + Message: "the server could not find the requested resource (get capapplications.sme.sap.com)", //TODO + }, + }, + { + name: "Deprovisioning Request valid", + method: http.MethodDelete, + createCROs: true, + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + expectedStatusCode: http.StatusAccepted, + expectedResponse: Result{ + Message: ResourceDeleted, + }, + }, + { + name: "Deprovisioning Request valid existing tenant", + method: http.MethodDelete, + createCROs: true, + existingTenant: true, + body: `{"subscriptionAppName":"` + appName + `","globalAccountGUID":"` + globalAccountId + `","subscribedTenantId":"` + tenantId + `"}`, + expectedStatusCode: http.StatusAccepted, + expectedResponse: Result{ + Message: ResourceDeleted, + }, + }, + } + + for _, testData := range tests { + t.Run(testData.name, func(t *testing.T) { + var ca *v1alpha1.CAPApplication + var cat *v1alpha1.CAPTenant + if testData.createCROs { + ca = createCA() + } + if testData.existingTenant { + cat = createCAT(false) + } + + // set custom client for testing + client, tokenString, err := SetupValidTokenAndIssuerForSubscriptionTests("appname!b14") + if err != nil { + t.Fatal(err.Error()) + } + subHandler := setup(ca, cat, client) + + res := httptest.NewRecorder() + req := httptest.NewRequest(testData.method, RequestPath, strings.NewReader(testData.body)) + req.Header.Set("Authorization", "Bearer "+tokenString) + subHandler.HandleRequest(res, req) + if res.Code != testData.expectedStatusCode { + t.Errorf("Expected status '%d', received '%d'", testData.expectedStatusCode, res.Code) + } + + // Get the relevant response + decoder := json.NewDecoder(res.Body) + var resType Result + err = decoder.Decode(&resType) + if err != nil { + t.Error("Unexpected error in expected response: ", res.Body) + } + + if resType.Tenant != testData.expectedResponse.Tenant && resType.Message != testData.expectedResponse.Message { + t.Error("Response: ", res.Body, " does not match expected result: ", testData.expectedResponse) + } + }) + } +} + +func getX509KeyPair(t *testing.T) (string, string) { + read := func(file string) string { + value, err := os.ReadFile(file) + if err != nil { + t.Fatalf("error reading domain key pair: %s", err.Error()) + } + return string(value) + } + return read("testdata/auth.service.local.crt"), read("testdata/auth.service.local.key") +} + +func TestAsyncCallback(t *testing.T) { + certValue, keyValue := getX509KeyPair(t) + type testConfig struct { + testName string + status bool + useCredentialType string + isProvisioning bool + } + saasData := &util.SaasRegistryCredentials{ + SaasManagerUrl: "https://saas-manager.auth.service.local", + CredentialData: util.CredentialData{ + CredentialType: "x509", + ClientId: "randomapp!b14", + AuthUrl: "https://secret.auth.service.local", + UAADomain: "auth.service.local", + Certificate: certValue, + CertificateKey: keyValue, + CertificateUrl: "https://cert.auth.service.local", + }, + } + + type testContextKey string + const cKey testContextKey = "async-callback-test" + createCallbackTestServer := func(ctx context.Context, t *testing.T, params *testConfig) *http.Client { + // NOTE: reusing the wildcard domain and certificates for *.auth.service.local + + // Append CA cert to the system pool + rootCAs, _ := x509.SystemCertPool() + if rootCAs == nil { + rootCAs = x509.NewCertPool() + } + certs, err := os.ReadFile("testdata/rootCA.pem") + if err != nil { + t.Fatalf("error reading root CA certificate: %s", err.Error()) + } + rootCAs.AppendCertsFromPEM(certs) + + var calledHost string + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case "/oauth/token": + t.Log(calledHost) + var expectedHostPattern string + if params.useCredentialType == "x509" { + expectedHostPattern = "cert.auth.service.local:" + } else { + expectedHostPattern = "secret.auth.service.local:" + } + if !strings.Contains(calledHost, expectedHostPattern) { + t.Error("wrong host for token fetch") + } + w.Write([]byte("{\"access_token\": \"test-server-access-token\"}")) + case "/async/callback": + if !strings.Contains(calledHost, "saas-manager.auth.service.local:") { + t.Error("wrong host for async callback") + } + if r.Header.Get("Authorization") != "Bearer test-server-access-token" { + t.Error("expected authorization header with token in async callback") + } + payload := &CallbackResponse{} + body, err := io.ReadAll(r.Body) + if err != nil { + t.Fatalf("could not read callback request body: %s", err.Error()) + } + err = json.Unmarshal(body, payload) + if err != nil { + t.Fatalf("could not parse callback request body: %s", err.Error()) + } + if (params.status && payload.Status != CallbackSucceeded) || (!params.status && payload.Status != CallbackFailed) { + t.Fatalf("status %s does not match status initiated from callback", payload.Status) + } + if params.isProvisioning { + if strings.Index(payload.Message, "Provisioning ") != 0 { + t.Fatal("incorrect message in payload") + } + } else { + if strings.Index(payload.Message, "Deprovisioning ") != 0 { + t.Fatal("incorrect message in payload") + } + } + w.WriteHeader(200) + } + })) + cert, err := tls.X509KeyPair([]byte(certValue), []byte(keyValue)) + if err != nil { + t.Fatalf("error reading domain key pair: %s", err.Error()) + } + ts.TLS = &tls.Config{Certificates: []tls.Certificate{cert}, RootCAs: rootCAs} + ts.StartTLS() + + // adjust client to have custom domain resolution + client := ts.Client() + client.Transport = &http.Transport{ + DialContext: func(c context.Context, network, addr string) (net.Conn, error) { + if strings.Contains(addr, "auth.service.local:") { + if v := c.Value(cKey); v != nil { + calledHost = addr + } else { + calledHost = "" + } + addr = ts.Listener.Addr().String() + } + return net.Dial(network, addr) + }, + TLSClientConfig: ts.TLS, + } + + go func() { + <-ctx.Done() + ts.Close() + }() + return client + } + + tests := []testConfig{ + {testName: "1", status: true, useCredentialType: "x509", isProvisioning: true}, + {testName: "2", status: true, useCredentialType: "x509", isProvisioning: false}, + {testName: "3", status: false, useCredentialType: "instance-secret", isProvisioning: true}, + } + + ctx := context.WithValue(context.Background(), cKey, true) + for _, p := range tests { + saasData.CredentialType = p.useCredentialType + t.Run(p.testName, func(t *testing.T) { + client := createCallbackTestServer(context.TODO(), t, &p) + subHandler := setup(nil, nil, client) + subHandler.handleAsyncCallback( + ctx, + saasData, + p.status, + "/async/callback", + "https://app.cluster.local", + p.isProvisioning, + ) + }) + } +} + +func TestCheckTenantStatusContextCancellationAsyncTimeout(t *testing.T) { + execTestsWithBLI(t, "Check Tenant Status Context Cancellation AsyncTimeout", []string{"ERP4SMEPREPWORKAPPPLAT-2240"}, func(t *testing.T) { + // test context cancellation (like deadline) + subHandler := setup(nil, nil, nil) + notify := make(chan bool) + go func() { + r := subHandler.checkCAPTenantStatus(context.Background(), "default", "test-cat", true, "4000") + notify <- r + }() + + timeout := time.After(6 * time.Second) // this is greater than the sleep duration of the tenant check routine + + select { + case r := <-notify: + if r != false { + t.Error("expected tenant check to return false") + } + case <-timeout: + t.Fatal("failed to cancel tenant check routine") + } + }) +} + +func TestCheckTenantStatusTenantReady(t *testing.T) { + // test context cancellation (like deadline) + cat := createCAT(true) + subHandler := setup(nil, cat, nil) + r := subHandler.checkCAPTenantStatus(context.TODO(), cat.Namespace, cat.Name, true, "") + + if r != true { + t.Error("expected tenant check to return false") + } +} + +func TestCheckTenantStatusWithCallbacktimeout(t *testing.T) { + execTestsWithBLI(t, "Check Tenant Status With Callback timeout", []string{"ERP4SMEPREPWORKAPPPLAT-2240"}, func(t *testing.T) { + // test context cancellation (like deadline) + cat := createCAT(false) + subHandler := setup(nil, cat, nil) + r := subHandler.checkCAPTenantStatus(context.TODO(), cat.Namespace, cat.Name, true, "4000") + + if r != false { + t.Error("expected tenant check to return false, due to timeout (async callback timeout exceeded)") + } + }) +} + +func TestMultiXSUAA(t *testing.T) { + execTestsWithBLI(t, "Check Multiple xsuaa services used in a CA", []string{"ERP4SMEPREPWORKAPPPLAT-3773"}, func(t *testing.T) { + // CA without "sme.sap.com/primary-xsuaa" annotation + ca := createCA() + + subHandler := setup(ca, nil, nil) + uaaCreds := subHandler.getXSUAADetails(ca) + + if uaaCreds.AuthUrl != "https://app-domain.auth.service.local" { + t.Error("incorrect uaa returned") + } + + // CA with "sme.sap.com/primary-xsuaa" annotation + ca2 := createCA() + ca2.Annotations = map[string]string{ + util.AnnotationPrimaryXSUAA: "test-xsuaa2", + } + + uaaCreds = subHandler.getXSUAADetails(ca2) + + if uaaCreds.AuthUrl != "https://app2-domain.auth2.service.local" { + t.Error("incorrect uaa via annotations returned") + } + }) +} + +func execTestsWithBLI(t *testing.T, name string, backlogItems []string, test func(t *testing.T)) { + t.Run(name+", BLIs: "+strings.Join(backlogItems, ", "), test) +} diff --git a/cmd/server/internal/jwt.go b/cmd/server/internal/jwt.go new file mode 100644 index 0000000..4eb2c92 --- /dev/null +++ b/cmd/server/internal/jwt.go @@ -0,0 +1,231 @@ +package handler + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strings" + "time" + + "github.com/MicahParks/keyfunc/v2" + "github.com/golang-jwt/jwt/v5" +) + +type XSUAAConfig struct { + UAADomain string + // one of xsappname OR clientid must be part of the audience + XSAppName string + ClientID string + // all requested scopes must be fulfilled + RequiredScopes []string +} + +type XSUAAJWTClaims struct { + Scope []string `json:"scope"` + ClientID string `json:"client_id"` + AuthorizedParty string `json:"azp"` + jwt.RegisteredClaims `json:",inline"` +} + +type OpenIDConfig struct { + JWKSURI string `json:"jwks_uri"` + SigningAlgorithmsSupported []string `json:"token_endpoint_auth_signing_alg_values_supported"` + ClaimsSupported []string `json:"claims_supported"` +} + +var ( + errorJKUTokenHeader = errors.New("jku token header validation failed") + errorInvalidClaimsType = errors.New("invalid token claims type") + errorInvalidAudience = errors.New("invalid token audience") + errorInvalidScope = errors.New("invalid token scope") +) + +func getOpenIDConfig(uaaURL string, client *http.Client) (*OpenIDConfig, error) { + url, err := url.Parse(uaaURL) + if err != nil { + return nil, err + } + url.Path = path.Join(".well-known", "openid-configuration") + resp, err := client.Get(url.String()) + if err != nil { + return nil, err + } + if resp.StatusCode != 200 { + return nil, fmt.Errorf("fetching openid configuration returned status %s", resp.Status) + } + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + config := OpenIDConfig{} + return &config, json.Unmarshal(body, &config) +} + +// token validation for XSUAA token implemented by following the guidelines provided -> CPSecurity/Knowledge-Base/03_ApplicationSecurity/TokenValidation/ +func VerifyXSUAAJWTToken(ctx context.Context, tokenString string, config *XSUAAConfig, client *http.Client) error { + _, err := jwt.ParseWithClaims(tokenString, &XSUAAJWTClaims{}, func(t *jwt.Token) (interface{}, error) { + // verify claims excluding expiration (as this is now done internally in jwt v5) + err := verifyClaims(t, config) + if err != nil { + return nil, err + } + + // verify token algorithm + if tokenAlg, ok := t.Header["alg"].(string); !ok || tokenAlg == "" { + return nil, fmt.Errorf("expected token alg to be string") + } + + // verify JKU header as per XSUAA requirements + jkuHost, ok := verifyJKUHeader(t, config.UAADomain) + if !ok { + return nil, errorJKUTokenHeader + } + + // get well-known openid configuration + oidConfig, err := getOpenIDConfig("https://"+jkuHost, client) + if err != nil { + return nil, err + } + + jwks, err := keyfunc.Get(oidConfig.JWKSURI, keyfunc.Options{Ctx: ctx, Client: client}) + if err != nil { + return nil, err + } + return jwks.Keyfunc(t) + }, jwt.WithLeeway(-15*time.Second)) + + if err != nil { + return err + } + + return nil // all good! +} + +func verifyJKUHeader(t *jwt.Token, uaaDomain string) (string, bool) { + if jku, ok := t.Header["jku"].(string); ok { + if jku == "" { + return "", false + } + u, err := url.Parse(jku) + if err != nil { + return "", false + } + if len(u.Query()) > 0 || // there should not be any query parameters + !u.IsAbs() || // should contain a schema (HTTPS) + u.Fragment != "" || // should not contain fragments + !(strings.HasSuffix(u.Path, "token_keys") || strings.HasSuffix(u.Path, "token_keys/")) || // path should end with token_keys + !strings.HasSuffix(u.Hostname(), uaaDomain) { // jku hostname must be a subdomain of uaa domain + return "", false + } + + return u.Host, true + } + return "", false +} + +func verifyClaims(t *jwt.Token, config *XSUAAConfig) error { + claims, ok := t.Claims.(*XSUAAJWTClaims) + if !ok { + return errorInvalidClaimsType + } + + // NOTE: in XSUAA scenarios, do not rely on token iss attribute + + // verify audience + ok = verifyAudience(claims, config) + if !ok { + return errorInvalidAudience + } + + ok = verifyScopes(claims, config) + if !ok { + return errorInvalidScope + } + + return nil +} + +func verifyAudience(claims *XSUAAJWTClaims, config *XSUAAConfig) bool { + tokenAud := convertToMap(extractAudience(claims)) + knownAud := appendWithTrim([]string{config.ClientID}, config.XSAppName) // unless XSAPPNAME is provided, don't add it to valid audience list + + // should match at least one of the expected audience + for _, expected := range knownAud { + if _, ok := tokenAud[expected]; ok { + return true // valid audience + } + + // additional check for broker clients + if strings.Contains(expected, "!b") { // is a broker + for a := range tokenAud { + if strings.HasSuffix(a, "|"+expected) { + return true // valid + } + } + } + } + + return false +} + +func extractAudience(claims *XSUAAJWTClaims) []string { + r := adjustForNamespace(claims.Audience, false) + + // extract audience from client id and scope (XSUAA specific) + // REFERENCE -> CPSecurity/Knowledge-Base/03_ApplicationSecurity/TokenValidation/#xsuaa-specifics_1 + if len(r) == 0 { + + r = append(r, adjustForNamespace(claims.Scope, true)...) + } + // use client id from token as audience + r = appendWithTrim(r, claims.ClientID) + + return r +} + +func appendWithTrim(s []string, v string) []string { + if val := strings.TrimSpace(v); len(val) > 0 { + return append(s, val) + } + return s +} + +func adjustForNamespace(s []string, ignoreIfNotNamespaced bool) []string { + r := []string{} + for _, v := range s { + if i := strings.Index(v, "."); i > -1 { + r = appendWithTrim(r, v[:i]) + } else if !ignoreIfNotNamespaced { // when processing scope, add to list only when namespaced + r = appendWithTrim(r, v) + } + } + return r +} + +func verifyScopes(claims *XSUAAJWTClaims, config *XSUAAConfig) bool { + scope := claims.Scope + tokenScope := convertToMap(scope) + for _, expected := range config.RequiredScopes { + if _, ok := tokenScope[expected]; !ok { + return false // all expected scopes should match + } + } + return true +} + +// Create a dummy lookup map +func convertToMap(s []string) map[string]struct{} { + if s == nil { + return nil + } + m := map[string]struct{}{} + for _, item := range s { + m[item] = struct{}{} + } + return m +} diff --git a/cmd/server/internal/jwt_test.go b/cmd/server/internal/jwt_test.go new file mode 100644 index 0000000..df3b0e9 --- /dev/null +++ b/cmd/server/internal/jwt_test.go @@ -0,0 +1,356 @@ +package handler + +import ( + "context" + "crypto/rand" + "crypto/rsa" + "crypto/tls" + "crypto/x509" + "encoding/json" + "errors" + "fmt" + "net" + "net/http" + "net/http/httptest" + "os" + "reflect" + "runtime" + "strings" + "testing" + "time" + + "github.com/golang-jwt/jwt/v5" + "github.com/lestrrat-go/jwx/v2/jwk" +) + +type JWKeys struct { + Keys []jwk.RSAPublicKey `json:"keys"` +} + +type rsaKeyParams struct { + jwks *JWKeys + key *rsa.PrivateKey + keyID string +} + +const jwksKeyID = "test-key-rsa" +const jwtTestUAADomain = "auth.service.local" +const testSubdomain = "test-subdomain" + +func createRSAKey() (*rsaKeyParams, error) { + privateKey, _ := rsa.GenerateKey(rand.Reader, 2048) + key, _ := jwk.FromRaw(privateKey.PublicKey) + publicKey := key.(jwk.RSAPublicKey) + publicKey.Set(jwk.KeyIDKey, jwksKeyID) + publicKey.Set(jwk.KeyUsageKey, "sig") + return &rsaKeyParams{ + jwks: &JWKeys{Keys: []jwk.RSAPublicKey{publicKey}}, + key: privateKey, + keyID: jwksKeyID, + }, nil +} + +func SetupValidTokenAndIssuerForSubscriptionTests(xsappname string) (*http.Client, string, error) { + return setupTokenAndIssuer(&XSUAAConfig{ + UAADomain: jwtTestUAADomain, + XSAppName: xsappname, + ClientID: "some-client-id", + RequiredScopes: []string{xsappname + ".Callback", xsappname + ".mtcallback"}, + }, &jwtTestParameters{}) +} + +type jwtTestParameters struct { + invalidJKUHeader bool + useDifferentKeyToSign bool + invalidAudience bool + clientIsBroker bool + invalidScope bool + expiredJWT bool + notBeforeInFuture bool +} + +func setupTokenAndIssuer(config *XSUAAConfig, params *jwtTestParameters) (*http.Client, string, error) { + rsaKey, err := createRSAKey() + if err != nil { + return nil, "", fmt.Errorf("error generating rsa key: %s", err.Error()) + } + claims := XSUAAJWTClaims{ + Scope: config.RequiredScopes, + ClientID: "srv-broker!b14", + AuthorizedParty: "srv-broker!b14", + RegisteredClaims: jwt.RegisteredClaims{ + Audience: jwt.ClaimStrings{config.XSAppName, "srv-broker!b14"}, + ID: "jwt-token-01", + Issuer: "https://" + strings.Join([]string{testSubdomain, config.UAADomain}, ".") + "/token", + Subject: "jwt-token-01", + IssuedAt: jwt.NewNumericDate(time.Now().Add(-30 * time.Minute)), + ExpiresAt: jwt.NewNumericDate(time.Now().Add(15 * time.Minute)), + }, + } + + // audience configuration + if params.invalidAudience { + claims.Audience = jwt.ClaimStrings{"invalid-a", "invalid-b"} + } else if params.clientIsBroker { + claims.ClientID = "sb-d447781d-c010-4c19-af30-ed49097f22de!b446|" + config.XSAppName + claims.Audience = jwt.ClaimStrings{} + } + + if params.invalidScope { + claims.Scope = []string{"scope-a", "scope-b"} + } + + if params.expiredJWT { + claims.ExpiresAt = jwt.NewNumericDate(time.Now().Add(-5 * time.Minute)) + } + if params.notBeforeInFuture { + claims.NotBefore = jwt.NewNumericDate(time.Now().Add(5 * time.Minute)) + } + token := jwt.NewWithClaims(jwt.SigningMethodRS256, claims) + + if params.invalidJKUHeader { + token.Header["jku"] = "https://" + strings.Join([]string{testSubdomain, "foo.bar.local"}, ".") + "/token_keys" + } else { + token.Header["jku"] = "https://" + strings.Join([]string{testSubdomain, config.UAADomain}, ".") + "/token_keys" + } + + token.Header["kid"] = rsaKey.keyID + + // sign token + signKey := rsaKey + if params.useDifferentKeyToSign { + signKey, _ = createRSAKey() + } + tokenString, err := token.SignedString(signKey.key) + if err != nil { + return nil, "", fmt.Errorf("error signing token: %s", err.Error()) + } + + client, err := createJWTTestTLSServer(context.TODO(), rsaKey.jwks) + if err != nil { + return nil, "", err + } + + return client, tokenString, nil +} + +func createJWTTestTLSServer(ctx context.Context, jwks *JWKeys) (*http.Client, error) { + domain := strings.Join([]string{testSubdomain, jwtTestUAADomain}, ".") + + // Append CA cert to the system pool + rootCAs, _ := x509.SystemCertPool() + if rootCAs == nil { + rootCAs = x509.NewCertPool() + } + certs, err := os.ReadFile("testdata/rootCA.pem") + if err != nil { + return nil, err + } + if ok := rootCAs.AppendCertsFromPEM(certs); !ok { + return nil, errors.New("could not append CA cert") + } + + // create test TLS server + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var body []byte + switch r.URL.Path { + case "/.well-known/openid-configuration": + body, _ = json.Marshal(OpenIDConfig{JWKSURI: "https://" + domain + "/token_keys", SigningAlgorithmsSupported: []string{"RS256"}}) + case "/token_keys": + body, _ = json.MarshalIndent(jwks, "", " ") + } + w.Write(body) + })) + cert, err := tls.LoadX509KeyPair("testdata/auth.service.local.crt", "testdata/auth.service.local.key") + if err != nil { + return nil, err + } + ts.TLS = &tls.Config{Certificates: []tls.Certificate{cert}, RootCAs: rootCAs} + ts.StartTLS() + + // adjust client to have custom domain resolution + client := ts.Client() + client.Transport = &http.Transport{ + DialContext: func(_ context.Context, network, addr string) (net.Conn, error) { + if strings.Contains(addr, jwtTestUAADomain+":") { + addr = ts.Listener.Addr().String() + } + return net.Dial(network, addr) + }, + TLSClientConfig: ts.TLS, + } + + go func() { + <-ctx.Done() + ts.Close() + }() + return client, nil +} + +var testXSUAAConfig *XSUAAConfig = &XSUAAConfig{ + UAADomain: jwtTestUAADomain, + XSAppName: "myxsappname", + ClientID: "some-client-id", + RequiredScopes: []string{"myxsappname.Callback", "myxsappname.mtcallback"}, +} + +func testVerifyValidToken(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err != nil { + t.Fatal("token validation failed") + } +} + +func testValidTokenWithBrokerClientId(t *testing.T) { + brokerXSUAAConfig := &XSUAAConfig{ + UAADomain: testXSUAAConfig.UAADomain, + ClientID: testXSUAAConfig.ClientID, + RequiredScopes: testXSUAAConfig.RequiredScopes, + XSAppName: "xsapp!b4711", + } + client, tokenString, err := setupTokenAndIssuer(brokerXSUAAConfig, &jwtTestParameters{clientIsBroker: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, brokerXSUAAConfig, client) + if err != nil { + t.Fatal("token validation failed") + } +} + +func testInvalidJKUHeader(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{invalidJKUHeader: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } + + if !errors.Is(err, errorJKUTokenHeader) { + t.Error("error message was not as expected") + } +} + +func testExpiredToken(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{expiredJWT: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } + if !errors.Is(err, jwt.ErrTokenExpired) { + t.Error("error message was not as expected") + } +} + +func testTokenWithNotBefore(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{notBeforeInFuture: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } + if !errors.Is(err, jwt.ErrTokenNotValidYet) { + t.Error("error message was not as expected") + } +} + +func testInvalidSignature(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{useDifferentKeyToSign: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } +} + +func testInvalidAudience(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{invalidAudience: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } + if !errors.Is(err, errorInvalidAudience) { + t.Error("error message was not as expected") + } +} + +func testInvalidScope(t *testing.T) { + client, tokenString, err := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{invalidScope: true}) + if err != nil { + t.Fatal(err.Error()) + } + + err = VerifyXSUAAJWTToken(context.TODO(), tokenString, testXSUAAConfig, client) + if err == nil { + t.Fatal("expected token validation to fail") + } + if !errors.Is(err, errorInvalidScope) { + t.Error("error message was not as expected") + } +} + +func testInvalidClaimsType(t *testing.T) { + type foo struct { + Foo string `json:"foo"` + jwt.RegisteredClaims + } + + _, tokenString, _ := setupTokenAndIssuer(testXSUAAConfig, &jwtTestParameters{}) + + token, _ := jwt.ParseWithClaims(tokenString, &foo{}, func(t *jwt.Token) (interface{}, error) { + return []byte("Test"), nil + }) + + err := verifyClaims(token, testXSUAAConfig) + if err == nil { + t.Fatal("expected token validation to fail") + } + if !errors.Is(err, errorInvalidClaimsType) { + t.Error("error message was not as expected") + } +} + +func TestJWT(t *testing.T) { + catalog := &[]struct { + test func(t *testing.T) + backlogItems []string + }{ + {test: testVerifyValidToken, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testValidTokenWithBrokerClientId, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidJKUHeader, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testExpiredToken, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testTokenWithNotBefore, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidSignature, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidAudience, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidScope, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidSignature, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2019", "ERP4SMEPREPWORKAPPPLAT-3188"}}, + {test: testInvalidClaimsType}, + } + for _, tc := range *catalog { + nameParts := []string{runtime.FuncForPC(reflect.ValueOf(tc.test).Pointer()).Name()} + t.Run(strings.Join(append(nameParts, tc.backlogItems...), " "), tc.test) + } +} diff --git a/cmd/server/internal/testdata/auth.service.local.crt b/cmd/server/internal/testdata/auth.service.local.crt new file mode 100644 index 0000000..a424362 --- /dev/null +++ b/cmd/server/internal/testdata/auth.service.local.crt @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFJTCCBA2gAwIBAgIJANGmQ9qKKpLJMA0GCSqGSIb3DQEBCwUAMIG3MQswCQYD +VQQGEwJERTEUMBIGA1UECAwLUmFuZG9tU3RhdGUxEzARBgNVBAcMClJhbmRvbUNp +dHkxGzAZBgNVBAoMElJhbmRvbU9yZ2FuaXphdGlvbjEfMB0GA1UECwwWUmFuZG9t +T3JnYW5pemF0aW9uVW5pdDEgMB4GCSqGSIb3DQEJARYRaGVsbG9AZXhhbXBsZS5j +b20xHTAbBgNVBAMMFCouYXV0aC5zZXJ2aWNlLmxvY2FsMB4XDTIyMDUwNzIxMjAx +MloXDTIzMDkxOTIxMjAxMlowgbcxCzAJBgNVBAYTAkRFMRQwEgYDVQQIDAtSYW5k +b21TdGF0ZTETMBEGA1UEBwwKUmFuZG9tQ2l0eTEbMBkGA1UECgwSUmFuZG9tT3Jn +YW5pemF0aW9uMR8wHQYDVQQLDBZSYW5kb21Pcmdhbml6YXRpb25Vbml0MSAwHgYJ +KoZIhvcNAQkBFhFoZWxsb0BleGFtcGxlLmNvbTEdMBsGA1UEAwwUKi5hdXRoLnNl +cnZpY2UubG9jYWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDwQOin +JSqDaezbcNDCMSrhd2vG9P7wFssZywzYvy6aU9zBSzQZfDQp/spt5lbQvP/iB4/I +EFkGiSgjqSb6WK/2ids0t2gfI62xLEjCX9QWPtQeeenp8uxpZg8dp4JBYTaS4zlo +1JYt/gyaGd/VhERsd0VNSPyQ4aI+nV7ARzP1lw3sdpOuGkfOtpzajniRw+YMK0tK +k0LSwISVsN3CKYhNNk/Esg0kz+znKTdvQ7IlHUIdVgoQtDsC73VYvt6uADYbKZJq +YmsL9CkESSZ2ZFkzPpYmAdunnOQTz9ZDxarniC7YPmo3sXM7O3tfyw762/nnWPPe +wSLCiqnNqvv1j56LAgMBAAGjggEwMIIBLDCB1gYDVR0jBIHOMIHLoYG9pIG6MIG3 +MQswCQYDVQQGEwJERTEUMBIGA1UECAwLUmFuZG9tU3RhdGUxEzARBgNVBAcMClJh +bmRvbUNpdHkxGzAZBgNVBAoMElJhbmRvbU9yZ2FuaXphdGlvbjEfMB0GA1UECwwW +UmFuZG9tT3JnYW5pemF0aW9uVW5pdDEgMB4GCSqGSIb3DQEJARYRaGVsbG9AZXhh +bXBsZS5jb20xHTAbBgNVBAMMFCouYXV0aC5zZXJ2aWNlLmxvY2FsggkA0Tp8M8gl +9j8wCQYDVR0TBAIwADALBgNVHQ8EBAMCBPAwOQYDVR0RBDIwMIISYXV0aC5zZXJ2 +aWNlLmxvY2FsghQqLmF1dGguc2VydmljZS5sb2NhbIcEfwAAATANBgkqhkiG9w0B +AQsFAAOCAQEAHKtlbkGSPaGryU3ou8QdKqBfSSPXFhl6aoE1drS2VVeSWYpvReAM +weACk70v3jJsG+ia51HRvBHBVPdNUr/H8gawJX7fbECUf3DOkXbww/IUFwxd9jFM +tvv4c3mMh2oHDX68jABApamPfQRhH9qmuEGdsQEwlE8uh0CnUmEeaCw2gtCmjwZ5 +QqCidRtyHQDZtioQzQYxVHeSHEf4YVKtWYkvJSc8kKmAcJAn51cjbD9R7HR3wtsi +ezQo9wHaTfj4rdHDHqXwEpcPdeCA/CrWrDZfXtF4dkVP8BKvH1NVk6f5Cz8LcAe8 +S7s91u98+w/7Tx+cPVPJE+iTmeahEcAP7Q== +-----END CERTIFICATE----- diff --git a/cmd/server/internal/testdata/auth.service.local.key b/cmd/server/internal/testdata/auth.service.local.key new file mode 100644 index 0000000..3ba01ab --- /dev/null +++ b/cmd/server/internal/testdata/auth.service.local.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDwQOinJSqDaezb +cNDCMSrhd2vG9P7wFssZywzYvy6aU9zBSzQZfDQp/spt5lbQvP/iB4/IEFkGiSgj +qSb6WK/2ids0t2gfI62xLEjCX9QWPtQeeenp8uxpZg8dp4JBYTaS4zlo1JYt/gya +Gd/VhERsd0VNSPyQ4aI+nV7ARzP1lw3sdpOuGkfOtpzajniRw+YMK0tKk0LSwISV +sN3CKYhNNk/Esg0kz+znKTdvQ7IlHUIdVgoQtDsC73VYvt6uADYbKZJqYmsL9CkE +SSZ2ZFkzPpYmAdunnOQTz9ZDxarniC7YPmo3sXM7O3tfyw762/nnWPPewSLCiqnN +qvv1j56LAgMBAAECggEBAI8mjbkxyu/8SFXEFY7vjtZCuqQUTGavnhpjQudOmqz3 +tPwzG/rnZ4lyOBldenLreieqS8BwBSuAw7rjyca22zmxkDwL3+1V6+M6OKwgPxV2 +IBt8lqR/yt9OIUmRCmp8SvEglI9iw4zp54ZWTmlBYyehtVhEWcDVwD9Aszkr88ir +LeWsHiApvmoHJafCqY4q3DGPWEzg1ub/9fvi+BHnnH6crOhOH4HqwoJLrLmsGKDo +4qBHLWfiRCR34zDJ2I8S75m1QNjFuvMYHarPFLyq5VvDp/Sml7TQvPPIbLB0YD5U +HfvPoPB6LRG9eFkfTLsmOH9d/rU6054VJBUgwLlRoxECgYEA+BMqt5J6V9oZ2j1W +v0muKyhvywV9krlEmG5+H84A7a9KLSXwIkx88cbAsKehkQqHavQ/xbSiEcTJ5WsW +GTBj/cKfnqL/62QYxD9Kpm/LgWP7NZNteJZyx8NBGt7I9zLTYRJhlMh48ivTNRxp +CxNIEpkf+8eL4hMmkwxGgH0YYnMCgYEA9+3G2WKojfQQhOrgWgal534xD88fxbIU +TPHmOpGHF07YLP+Kogq3ow4C52Qul+O48z6oNZAKm8uOelyXQHxcgyg8eK3fQjPA +j+Ghvn+OH74oqfamvbZbNYFlclYyWBOUlGV8xbMeeva6PeuWynqUirGMFyafuI9J +2epNXFlylYkCgYBfYY81Eb60dIkoHhlyZvPuaBfDqZLEjTNQoHsh42T7/j+46DNS +HLKVi2OfCHTYfYHfn5W9gFwoFM/Dw861VKO9d81Dg0x+xve2zNb481b9ouF9kfev +O7laETrBCBOg6AvZ8OVP/VxzUGJes1O4DGvTqshfWDPycoaMV1XsJSzw/QKBgBo8 +QBmK1hlHZWQbUqhUIcQwV1K78TnDUWCfDGTQN4Jg5oFEfVAOYEZR2j7QHBoYj961 +l6krV+QKk0YhfCPnxQZgAJ4okAJ6ZXsUPkBhURHM1pK9tgFHRbmQusJxmpw1Xjih +0KU/Ag+zAhxBTNCaThOrHA7rGGW4S/FSWONX18c5AoGAYkjPXs/I6B5Jp3H7maNo +RT3nnNGOd0ZhxU+Z1vveilW9w8ZnAbxYolFucyFDX9NXNKyDVuOpAJUgjB0MNVg2 +whT9txoeDAgfhHDy/3sXZ5c5aMSS2og2nX3OmkO5t9YeHRpBscqmvqrK+f6ffudk +K7gbgRz/ykbZKIEQBRCjaeA= +-----END PRIVATE KEY----- diff --git a/cmd/server/internal/testdata/rootCA.pem b/cmd/server/internal/testdata/rootCA.pem new file mode 100644 index 0000000..6be1214 --- /dev/null +++ b/cmd/server/internal/testdata/rootCA.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID7DCCAtQCCQDROnwzyCX2PzANBgkqhkiG9w0BAQsFADCBtzELMAkGA1UEBhMC +REUxFDASBgNVBAgMC1JhbmRvbVN0YXRlMRMwEQYDVQQHDApSYW5kb21DaXR5MRsw +GQYDVQQKDBJSYW5kb21Pcmdhbml6YXRpb24xHzAdBgNVBAsMFlJhbmRvbU9yZ2Fu +aXphdGlvblVuaXQxIDAeBgkqhkiG9w0BCQEWEW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EIx+NPXiRvs1eeydr4G4bB6zcQpYuIulEnImRrMjwmBvwrC3kWHNdnlPq +-----END CERTIFICATE----- diff --git a/cmd/server/server.go b/cmd/server/server.go new file mode 100644 index 0000000..3fa4fdd --- /dev/null +++ b/cmd/server/server.go @@ -0,0 +1,67 @@ +package main + +import ( + "net/http" + "os" + "strconv" + + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" + + handler "github.com/sap/cap-operator/cmd/server/internal" + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" +) + +func main() { + subHandler := getSubscriptionHandler() + http.HandleFunc("/provision/", subHandler.HandleRequest) + + // Default port + port := "4000" + + // Get Port from env + portEnv := os.Getenv("PORT") + if portEnv != "" { + port = portEnv + } + + // Default TLS enabled = false + tlsEnabled := false + + // Get TLS details from env + var tlsCertFile, tlsKeyFile string + tlsEnv := os.Getenv("TLS_ENABLED") + if tlsEnv != "" { + tlsEnvBool, err := strconv.ParseBool(tlsEnv) + if err != nil { + klog.Error("Error parsing TLS_ENABLED: ", err.Error()) + } + tlsEnabled = tlsEnvBool + tlsCertFile = os.Getenv("TLS_CERT") + tlsKeyFile = os.Getenv("TLS_KEY") + } + + klog.Info("Server running and listening (provider) with TLS: ", tlsEnabled, ", at port: ", port) + if tlsEnabled { + klog.Fatal(http.ListenAndServeTLS(":"+port, tlsCertFile, tlsKeyFile, nil)) + } else { + http.ListenAndServe(":"+port, nil) + } +} + +func getSubscriptionHandler() *handler.SubscriptionHandler { + config := util.GetConfig() + + customResourceClientSet, err := versioned.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for custom resources: ", err.Error()) + } + + kubernetesClientset, err := kubernetes.NewForConfig(config) + if err != nil { + klog.Fatal("could not create client for k8s resources: ", err.Error()) + } + + return handler.NewSubscriptionHandler(customResourceClientSet, kubernetesClientset) +} diff --git a/cmd/web-hooks/internal/handler/handler.go b/cmd/web-hooks/internal/handler/handler.go new file mode 100644 index 0000000..483d2c4 --- /dev/null +++ b/cmd/web-hooks/internal/handler/handler.go @@ -0,0 +1,625 @@ +package handler + +import ( + "context" + "encoding/json" + "fmt" + "io/ioutil" + "net/http" + "os" + "strconv" + + "github.com/google/go-cmp/cmp" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" + "golang.org/x/exp/slices" + admissionv1 "k8s.io/api/admission/v1" + "k8s.io/api/admission/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" + "k8s.io/klog/v2" +) + +const ( + LabelTenantType = "sme.sap.com/tenant-type" + ProviderTenantType = "provider" + SideCarEnv = "WEBHOOK_SIDE_CAR" + AdmissionError = "admission error:" + InvalidResource = "invalid resource" + InvalidationMessage = "invalidated from webhook" + ValidationMessage = "validated from webhook" + RequestPath = "/request" + DeploymentWorkloadCountErr = "%s %s there should always be one workload deployment definition of type %s. Currently, there are %d workloads of type %s" + JobWorkloadCountErr = "%s %s there should always be one workload job definition of type %s. Currently, there are %d workloads of type %s" + TenantOpJobWorkloadCountErr = "%s %s there should not be more than one workload job definition of type %s. Currently, there are %d workloads of type %s" +) + +type validateResource struct { + errorOccured bool + allowed bool + message string +} + +var ( + universalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer() +) + +type WebhookHandler struct { + CrdClient versioned.Interface +} + +// Metadata struct for parsing +type Metadata struct { + Name string `json:"name"` + Namespace string `json:"namespace"` + Labels map[string]string `json:"labels"` +} + +type ResponseCat struct { + Metadata `json:"metadata"` + Spec *v1alpha1.CAPTenantSpec `json:"spec"` + Status *v1alpha1.CAPTenantStatus `json:"status"` + Kind string `json:"kind"` +} + +type ResponseCav struct { + Metadata `json:"metadata"` + Spec *v1alpha1.CAPApplicationVersionSpec `json:"spec"` + Kind string `json:"kind"` +} + +type ResponseCa struct { + Metadata `json:"metadata"` + Spec *v1alpha1.CAPApplicationSpec `json:"spec"` + Kind string `json:"kind"` +} + +type responseInterface interface { + isEmpty() bool +} + +func (m Metadata) isEmpty() bool { + return m.Name == "" +} + +func checkWorkloadPort(workload *v1alpha1.WorkloadDetails) validateResource { + if workload.DeploymentDefinition == nil { + return validAdmissionReviewObj() + } + + if len(workload.DeploymentDefinition.Ports) == 0 { + return validAdmissionReviewObj() + } + + // Checks- + // at least one port configuration should have routerDestinationName defined + // port name and port number should be unique + uniquePortNameCountMap := make(map[string]int) + uniquePortNumCountMap := make(map[string]int) + routerDestinationNameFound := false + for _, port := range workload.DeploymentDefinition.Ports { + if port.RouterDestinationName != "" { + routerDestinationNameFound = true + } + uniquePortNameCountMap[port.Name] += 1 + uniquePortNumCountMap[strconv.Itoa(int(port.Port))] += 1 + } + + if !routerDestinationNameFound && workload.DeploymentDefinition.Type == v1alpha1.DeploymentCAP { // workloads of type Additional need not have a router destination + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s routerDestinationName not defined in port configuration of workload - %s", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, workload.Name), + } + } + + if routerDestinationNameFound && workload.DeploymentDefinition.Type == v1alpha1.DeploymentRouter { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s routerDestinationName should not be defined for workload of type Router - %s", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, workload.Name), + } + } + + for portName, cnt := range uniquePortNameCountMap { + if cnt > 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s duplicate port name: %s in workload - %s", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, portName, workload.Name), + } + } + } + + for portNum, cnt := range uniquePortNumCountMap { + if cnt > 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s duplicate port number: %s in workload - %s", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, portNum, workload.Name), + } + } + } + + return validAdmissionReviewObj() +} + +func checkWorkloadType(workload *v1alpha1.WorkloadDetails) validateResource { + if workload.DeploymentDefinition != nil && workload.DeploymentDefinition.Type != v1alpha1.DeploymentCAP && workload.DeploymentDefinition.Type != v1alpha1.DeploymentRouter && workload.DeploymentDefinition.Type != v1alpha1.DeploymentAdditional { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s invalid deployment definition type. Only supported - CAP, Router and Additional", InvalidationMessage, v1alpha1.CAPApplicationVersionKind), + } + } + + if workload.JobDefinition != nil && workload.JobDefinition.Type != v1alpha1.JobContent && workload.JobDefinition.Type != v1alpha1.JobTenantOperation && workload.JobDefinition.Type != v1alpha1.JobCustomTenantOperation { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s invalid job definition type. Only supported - Content, TenantOperation and CustomTenantOperation", InvalidationMessage, v1alpha1.CAPApplicationVersionKind), + } + } + + return validAdmissionReviewObj() +} + +func getWorkloadTypeCount(workloads []v1alpha1.WorkloadDetails) map[string]int { + workloadTypeCount := make(map[string]int) + for _, workload := range workloads { + if workload.DeploymentDefinition != nil && workload.DeploymentDefinition.Type == v1alpha1.DeploymentCAP { + workloadTypeCount[string(v1alpha1.DeploymentCAP)] += 1 + } + + if workload.DeploymentDefinition != nil && workload.DeploymentDefinition.Type == v1alpha1.DeploymentRouter { + workloadTypeCount[string(v1alpha1.DeploymentRouter)] += 1 + } + + if workload.JobDefinition != nil && workload.JobDefinition.Type == v1alpha1.JobContent { + workloadTypeCount[string(v1alpha1.JobContent)] += 1 + } + + if workload.JobDefinition != nil && workload.JobDefinition.Type == v1alpha1.JobTenantOperation { + workloadTypeCount[string(v1alpha1.JobTenantOperation)] += 1 + } + } + + return workloadTypeCount +} + +func checkWorkloadTypeCount(cavObjNew *ResponseCav) validateResource { + + workloadTypeCount := getWorkloadTypeCount(cavObjNew.Spec.Workloads) + + if workloadTypeCount[string(v1alpha1.DeploymentCAP)] != 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf(DeploymentWorkloadCountErr, InvalidationMessage, cavObjNew.Kind, v1alpha1.DeploymentCAP, workloadTypeCount[string(v1alpha1.DeploymentCAP)], v1alpha1.DeploymentCAP), + } + } + + if workloadTypeCount[string(v1alpha1.DeploymentRouter)] != 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf(DeploymentWorkloadCountErr, InvalidationMessage, cavObjNew.Kind, v1alpha1.DeploymentRouter, workloadTypeCount[string(v1alpha1.DeploymentRouter)], v1alpha1.DeploymentRouter), + } + } + + if workloadTypeCount[string(v1alpha1.JobContent)] != 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf(JobWorkloadCountErr, InvalidationMessage, cavObjNew.Kind, v1alpha1.JobContent, workloadTypeCount[string(v1alpha1.JobContent)], v1alpha1.JobContent), + } + } + + return validAdmissionReviewObj() +} + +func validateWorkloads(cavObjNew *ResponseCav) validateResource { + // Check: Workload name should be unique + // Only one workload deployment of type CAP, router and content is allowed + uniqueWorkloadNameCountMap := make(map[string]int) + for _, workload := range cavObjNew.Spec.Workloads { + + if workloadTypeValidate := checkWorkloadType(&workload); !workloadTypeValidate.allowed { + return workloadTypeValidate + } + + if workloadPortValidate := checkWorkloadPort(&workload); !workloadPortValidate.allowed { + return workloadPortValidate + } + + // get count of workload names + uniqueWorkloadNameCountMap[workload.Name] += 1 + } + + for workloadName, cnt := range uniqueWorkloadNameCountMap { + if cnt > 1 { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s duplicate workload name: %s", InvalidationMessage, cavObjNew.Kind, workloadName), + } + } + } + + if workloadTypeCntValidate := checkWorkloadTypeCount(cavObjNew); !workloadTypeCntValidate.allowed { + return workloadTypeCntValidate + } + + return validAdmissionReviewObj() +} + +func getTenantOperationsFromSpec(cavObjNew *ResponseCav) map[string]int { + specTenantOperationsCntMap := make(map[string]int) + var tenantOperationsList []v1alpha1.TenantOperationWorkloadReference + if cavObjNew.Spec.TenantOperations.Provisioning != nil { + tenantOperationsList = append(tenantOperationsList, cavObjNew.Spec.TenantOperations.Provisioning...) + } + + if cavObjNew.Spec.TenantOperations.Deprovisioning != nil { + tenantOperationsList = append(tenantOperationsList, cavObjNew.Spec.TenantOperations.Deprovisioning...) + } + + if cavObjNew.Spec.TenantOperations.Upgrade != nil { + tenantOperationsList = append(tenantOperationsList, cavObjNew.Spec.TenantOperations.Upgrade...) + } + + for _, tenantOperation := range tenantOperationsList { + specTenantOperationsCntMap[tenantOperation.WorkloadName] += 1 + } + return specTenantOperationsCntMap +} + +func checkForTenantOpJob(tenantOperations []v1alpha1.TenantOperationWorkloadReference, tenantOperationWorkloadCntMap map[string]int) bool { + return slices.ContainsFunc(tenantOperations, func(tenantOp v1alpha1.TenantOperationWorkloadReference) bool { + return tenantOperationWorkloadCntMap[tenantOp.WorkloadName] > 0 + }) +} + +func validateWorkloadsinTenantOperations(allTenantOperationsWorkloadCntMap map[string]int, tenantOperationWorkloadCntMap map[string]int, cavObjNew *ResponseCav) validateResource { + + specTenantOperationsCntMap := getTenantOperationsFromSpec(cavObjNew) + + // If spec.tenantOperations is specified, the entries (for provisioning, upgrade and deprovisioning) must include all spec.workloads.jobDefinitions of type TenantOperation and CustomTenantOperation + for workloadTenantOperation := range allTenantOperationsWorkloadCntMap { + if specTenantOperationsCntMap[workloadTenantOperation] == 0 { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s workload tenant operation %s is not specified in spec.tenantOperations", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, workloadTenantOperation), + } + } + } + + // All the entries specified in spec.tenantOperations should be a valid workload of type TenantOperation or customTenantOperation + for specTenantOperation := range specTenantOperationsCntMap { + if allTenantOperationsWorkloadCntMap[specTenantOperation] == 0 { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s %s specified in spec.tenantOperations is not a valid workload of type TenantOperation or CustomTenantOperation", InvalidationMessage, v1alpha1.CAPApplicationVersionKind, specTenantOperation), + } + } + } + + // If spec.tenantOperations are defined for provisioning, upgrade or deprovisioning, one of the operation must be a tenant operation + if cavObjNew.Spec.TenantOperations.Provisioning != nil && !checkForTenantOpJob(cavObjNew.Spec.TenantOperations.Provisioning, tenantOperationWorkloadCntMap) { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.provisioning", InvalidationMessage, v1alpha1.CAPApplicationVersionKind), + } + } + + if cavObjNew.Spec.TenantOperations.Upgrade != nil && !checkForTenantOpJob(cavObjNew.Spec.TenantOperations.Upgrade, tenantOperationWorkloadCntMap) { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.upgrade", InvalidationMessage, v1alpha1.CAPApplicationVersionKind), + } + } + + if cavObjNew.Spec.TenantOperations.Deprovisioning != nil && !checkForTenantOpJob(cavObjNew.Spec.TenantOperations.Deprovisioning, tenantOperationWorkloadCntMap) { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.deprovisioning", InvalidationMessage, v1alpha1.CAPApplicationVersionKind), + } + } + + return validAdmissionReviewObj() +} + +func validateTenantOperations(cavObjNew *ResponseCav) validateResource { + // Check: If a jobDefinition of type CustomTenantOperation is part of the workloads, spec.tenantOperations must be specified. It is possible to omit spec.tenantOperations when there are no jobs of type CustomTenantOperation and only one job of type TenantOperation + // If spec.tenantOperations is specified, the entries (for provisioning, upgrade and deprovisioning) must include all spec.workloads.jobDefinitions of type TenantOperation + // All the entries specified in spec.tenantOperations should be a valid workload of type TenantOperation or CustomTenantOperation + tenantOperationWorkloadCntMap := make(map[string]int) + allTenantOperationsWorkloadCntMap := make(map[string]int) + customTenantOpWorkloadCntMap := make(map[string]int) + for _, workload := range cavObjNew.Spec.Workloads { + if workload.JobDefinition != nil && workload.JobDefinition.Type == v1alpha1.JobTenantOperation { + tenantOperationWorkloadCntMap[workload.Name] += 1 + allTenantOperationsWorkloadCntMap[workload.Name] += 1 + } + + if workload.JobDefinition != nil && workload.JobDefinition.Type == v1alpha1.JobCustomTenantOperation { + customTenantOpWorkloadCntMap[workload.Name] += 1 + allTenantOperationsWorkloadCntMap[workload.Name] += 1 + } + } + + // It is possible to omit spec.tenantOperations when there are no jobs of type CustomTenantOperation and only one job of type TenantOperation + if len(customTenantOpWorkloadCntMap) == 0 && cavObjNew.Spec.TenantOperations == nil { + return validAdmissionReviewObj() + } + + // If a jobDefinition of type CustomTenantOperation is part of the workloads, spec.tenantOperations must be specified + if len(customTenantOpWorkloadCntMap) > 0 && cavObjNew.Spec.TenantOperations == nil { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s - If a jobDefinition of type CustomTenantOperation is part of the workloads, then spec.tenantOperations must be specified", InvalidationMessage, cavObjNew.Kind), + } + } + + if cavObjNew.Spec.TenantOperations == nil { + return validAdmissionReviewObj() + } + + if workloadsinTenantOperationsValidate := validateWorkloadsinTenantOperations(allTenantOperationsWorkloadCntMap, tenantOperationWorkloadCntMap, cavObjNew); !workloadsinTenantOperationsValidate.allowed { + return workloadsinTenantOperationsValidate + } + + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) checkCAPAppExists(cavObjNew *ResponseCav) validateResource { + if app, err := wh.CrdClient.SmeV1alpha1().CAPApplications(cavObjNew.Metadata.Namespace).Get(context.TODO(), cavObjNew.Spec.CAPApplicationInstance, metav1.GetOptions{}); app == nil || err != nil { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s no valid %s found for: %s.%s", InvalidationMessage, cavObjNew.Kind, v1alpha1.CAPApplicationKind, cavObjNew.Metadata.Namespace, cavObjNew.Metadata.Name), + } + } + + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) validateCAPApplicationVersion(w http.ResponseWriter, admissionReview *admissionv1.AdmissionReview) validateResource { + cavObjOld := ResponseCav{} + cavObjNew := ResponseCav{} + + // Note: Object is nil for "DELETE" operation + if admissionReview.Request.Operation == admissionv1.Create || admissionReview.Request.Operation == admissionv1.Update { + if validatedResource := unmarshalRawObj(w, admissionReview.Request.Object.Raw, &cavObjNew, v1alpha1.CAPApplicationVersionKind); !validatedResource.allowed { + return validatedResource + } + } + + // Note: OldObject is nil for "CONNECT" and "CREATE" operations + if admissionReview.Request.Operation == admissionv1.Delete || admissionReview.Request.Operation == admissionv1.Update { + if validatedResource := unmarshalRawObj(w, admissionReview.Request.OldObject.Raw, &cavObjOld, v1alpha1.CAPApplicationVersionKind); !validatedResource.allowed { + return validatedResource + } + } + + // check: on create + if admissionReview.Request.Operation == admissionv1.Create { + // Check: CAPApplication exists + if capAppExistsValidate := wh.checkCAPAppExists(&cavObjNew); !capAppExistsValidate.allowed { + return capAppExistsValidate + } + + if workloadValidate := validateWorkloads(&cavObjNew); !workloadValidate.allowed { + return workloadValidate + } + + return validateTenantOperations(&cavObjNew) + + } + + // check: update on .Spec + if admissionReview.Request.Operation == admissionv1.Update && !cmp.Equal(cavObjOld.Spec, cavObjNew.Spec) { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s spec cannot be modified for: %s.%s", InvalidationMessage, cavObjNew.Kind, cavObjNew.Metadata.Namespace, cavObjNew.Metadata.Name), + } + } + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) checkCaIsConsistent(catObjOld ResponseCat) validateResource { + + ca, err := wh.CrdClient.SmeV1alpha1().CAPApplications(catObjOld.Metadata.Namespace).Get(context.TODO(), catObjOld.Spec.CAPApplicationInstance, metav1.GetOptions{}) + + if ca != nil && err == nil && ca.Status.State == v1alpha1.CAPApplicationStateConsistent && catObjOld.Metadata.Labels[LabelTenantType] == ProviderTenantType && catObjOld.Status.State == v1alpha1.CAPTenantStateReady { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s provider %s %s cannot be deleted when a consistent %s %s exists. Delete the %s instead to delete all tenants", InvalidationMessage, catObjOld.Kind, catObjOld.Name, v1alpha1.CAPApplicationKind, ca.Name, v1alpha1.CAPApplicationKind), + } + } + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) validateCAPTenant(w http.ResponseWriter, admissionReview *admissionv1.AdmissionReview) validateResource { + catObjOld := ResponseCat{} + catObjNew := ResponseCat{} + + // Note: Object is nil for "DELETE" operation + if admissionReview.Request.Operation == admissionv1.Create || admissionReview.Request.Operation == admissionv1.Update { + if validatedResource := unmarshalRawObj(w, admissionReview.Request.Object.Raw, &catObjNew, v1alpha1.CAPTenantKind); !validatedResource.allowed { + return validatedResource + } + } + // Note: OldObject is nil for "CONNECT" and "CREATE" operations + if admissionReview.Request.Operation == admissionv1.Delete || admissionReview.Request.Operation == admissionv1.Update { + if validatedResource := unmarshalRawObj(w, admissionReview.Request.OldObject.Raw, &catObjOld, v1alpha1.CAPTenantKind); !validatedResource.allowed { + return validatedResource + } + } + + // check: CAPApplication exists on create + if admissionReview.Request.Operation == admissionv1.Create { + if app, err := wh.CrdClient.SmeV1alpha1().CAPApplications(catObjNew.Metadata.Namespace).Get(context.TODO(), catObjNew.Spec.CAPApplicationInstance, metav1.GetOptions{}); app == nil || err != nil { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s no valid %s found for: %s.%s", InvalidationMessage, catObjNew.Kind, v1alpha1.CAPApplicationKind, catObjNew.Metadata.Namespace, catObjNew.Metadata.Name), + } + } + } + // check: update on .Spec.CapApplicationInstance + if admissionReview.Request.Operation == admissionv1.Update && catObjOld.Spec.CAPApplicationInstance != catObjNew.Spec.CAPApplicationInstance { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s capApplicationInstance value cannot be modified for: %s.%s", InvalidationMessage, catObjNew.Kind, catObjNew.Metadata.Namespace, catObjNew.Metadata.Name), + } + } + + // check: dont allow provider tenant deletion when CA is consistent + if admissionReview.Request.Operation == admissionv1.Delete { + return wh.checkCaIsConsistent(catObjOld) + } + + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) validateCAPApplication(w http.ResponseWriter, admissionReview *admissionv1.AdmissionReview) validateResource { + caObjOld := ResponseCa{} + caObjNew := ResponseCa{} + + // Note: OldObject is nil for "CONNECT" and "CREATE" operations + if admissionReview.Request.Operation == admissionv1.Delete || admissionReview.Request.Operation == admissionv1.Update { + if validatedResource := unmarshalRawObj(w, admissionReview.Request.OldObject.Raw, &caObjOld, v1alpha1.CAPApplicationKind); !validatedResource.allowed { + return validatedResource + } + } + if admissionReview.Request.Operation == admissionv1.Update || admissionReview.Request.Operation == admissionv1.Create { + // Note: Object is nil for "DELETE" operation + + if validatedResource := unmarshalRawObj(w, admissionReview.Request.Object.Raw, &caObjNew, v1alpha1.CAPApplicationKind); !validatedResource.allowed { + return validatedResource + } + // check: update on .Spec.Provider + if admissionReview.Request.Operation == admissionv1.Update && !cmp.Equal(caObjNew.Spec.Provider, caObjOld.Spec.Provider) { + return validateResource{ + allowed: false, + message: fmt.Sprintf("%s %s provider details cannot be changed for: %s.%s", InvalidationMessage, caObjNew.Kind, caObjNew.Metadata.Namespace, caObjNew.Metadata.Name), + } + } + } + return validAdmissionReviewObj() +} + +func unmarshalRawObj(w http.ResponseWriter, rawBytes []byte, response responseInterface, resourceKind string) validateResource { + if err := json.Unmarshal(rawBytes, response); err != nil || response.isEmpty() { + return invalidAdmissionReviewObj(w, resourceKind, err) + } + return validAdmissionReviewObj() +} + +func (wh *WebhookHandler) Validate(w http.ResponseWriter, r *http.Request) { + // read incoming request to bytes + body, err := ioutil.ReadAll(r.Body) + if err != nil { + httpError(w, http.StatusInternalServerError, fmt.Errorf("%s %w", AdmissionError, err)) + return + } + + // sidecar + if !enableSidecar(w, body) { + return + } + + // create admission review from bytes + admissionReview := getAdmissionRequestFromBytes(w, body) + if admissionReview == nil { + return + } + + klog.Infof("incoming admission review for: %s", admissionReview.Request.Kind.Kind) + + validation := validAdmissionReviewObj() + + switch admissionReview.Request.Kind.Kind { + case v1alpha1.CAPApplicationVersionKind: + if validation = wh.validateCAPApplicationVersion(w, admissionReview); validation.errorOccured { + return + } + case v1alpha1.CAPTenantKind: + if validation = wh.validateCAPTenant(w, admissionReview); validation.errorOccured { + return + } + case v1alpha1.CAPApplicationKind: + if validation = wh.validateCAPApplication(w, admissionReview); validation.errorOccured { + return + } + } + + // prepare response + if responseBytes := prepareResponse(w, admissionReview, validation); responseBytes == nil { + return + } else { + w.Write(responseBytes) + } +} + +func enableSidecar(w http.ResponseWriter, body []byte) bool { + // write request to volume mount - if side car is enabled + sidecarEnv := os.Getenv(SideCarEnv) + + if sidecarEnv != "" { + if sidecarEnabled, err := strconv.ParseBool(sidecarEnv); err != nil { + httpError(w, http.StatusInternalServerError, fmt.Errorf("sidecar env read error: %w", err)) + return false + } else if sidecarEnabled { + if err = ioutil.WriteFile(os.TempDir()+RequestPath, body, 0644); err != nil { + httpError(w, http.StatusInternalServerError, fmt.Errorf("request object write error: %w", err)) + return false + } + } + } + return true +} + +func getAdmissionRequestFromBytes(w http.ResponseWriter, body []byte) *admissionv1.AdmissionReview { + admissionReview := admissionv1.AdmissionReview{} + if _, _, err := universalDeserializer.Decode(body, nil, &admissionReview); err != nil { + httpError(w, http.StatusBadRequest, fmt.Errorf("%s %w", AdmissionError, err)) + return nil + } else if admissionReview.Request == nil { + httpError(w, http.StatusBadRequest, fmt.Errorf("%s empty request", AdmissionError)) + return nil + } + return &admissionReview +} + +func prepareResponse(w http.ResponseWriter, admissionReview *admissionv1.AdmissionReview, validation validateResource) []byte { + // prepare response object + finalizedAdmissionReview := v1beta1.AdmissionReview{} + finalizedAdmissionReview.Kind = admissionReview.Kind + finalizedAdmissionReview.APIVersion = admissionReview.APIVersion + finalizedAdmissionReview.Response = &v1beta1.AdmissionResponse{ + UID: admissionReview.Request.UID, + Allowed: validation.allowed, + } + finalizedAdmissionReview.APIVersion = admissionReview.APIVersion + + if !validation.allowed { + finalizedAdmissionReview.Response.Result = &metav1.Status{ + Message: validation.message, + } + klog.Info(admissionReview.Request.Kind.Kind + " " + string(admissionReview.Request.Operation) + " " + InvalidationMessage) + } else { + klog.Info(admissionReview.Request.Kind.Kind + " " + string(admissionReview.Request.Operation) + " " + ValidationMessage) + } + + if bytes, err := json.Marshal(&finalizedAdmissionReview); err != nil { + httpError(w, http.StatusInternalServerError, fmt.Errorf("%s %w", AdmissionError, err)) + return nil + } else { + return bytes + } +} + +func httpError(w http.ResponseWriter, code int, err error) { + klog.Error(err) + http.Error(w, err.Error(), code) +} + +func invalidAdmissionReviewObj(w http.ResponseWriter, kind string, sourceErr error) validateResource { + httpError(w, http.StatusInternalServerError, fmt.Errorf("%s %s %s %w", InvalidResource, kind, AdmissionError, sourceErr)) + return validateResource{errorOccured: true} +} + +func validAdmissionReviewObj() validateResource { + return validateResource{allowed: true} +} diff --git a/cmd/web-hooks/internal/handler/handler_test.go b/cmd/web-hooks/internal/handler/handler_test.go new file mode 100644 index 0000000..234edd5 --- /dev/null +++ b/cmd/web-hooks/internal/handler/handler_test.go @@ -0,0 +1,1160 @@ +package handler + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "net/http/httptest" + "os" + "strings" + "testing" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + fakeCrdClient "github.com/sap/cap-operator/pkg/client/clientset/versioned/fake" + admissionv1 "k8s.io/api/admission/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +const ( + cavName = "someCavName" + catName = "someCatName" + caName = "someCaName" + uid = "someUID" + apiVersion = "apiVersion" + subDomain = "someSubdomain" + tenantId = "someTenantId" +) + +type updateType int + +const ( + noUpdate updateType = iota + providerUpdate + appInstanceUpdate + registrySecretsUpdate + consumedBTPServicesUpdate + versionUpdate + imageUpdate + emptyUpdate +) + +func createCaCRO() *v1alpha1.CAPApplication { + return &v1alpha1.CAPApplication{ + ObjectMeta: metav1.ObjectMeta{ + Name: caName, + Namespace: metav1.NamespaceDefault, + }, + Spec: v1alpha1.CAPApplicationSpec{ + Domains: v1alpha1.ApplicationDomains{Primary: "primaryDomain", IstioIngressGatewayLabels: []v1alpha1.NameValue{{Name: "foo", Value: "bar"}}}, + GlobalAccountId: "globalAccountId", + BTPAppName: "btpApplicationName", + Provider: v1alpha1.BTPTenantIdentification{ + SubDomain: subDomain, + TenantId: tenantId, + }, + BTP: v1alpha1.BTP{ + Services: []v1alpha1.ServiceInfo{ + { + Class: "xsuaa", + Name: "test-xsuaa", + Secret: "test-xsuaa-sec", + }, + { + Class: "saas-registry", + Name: "test-saas", + Secret: "test-saas-sec", + }, + { + Class: "service-manager", + Name: "test-sm", + Secret: "test-sm-sec", + }, + { + Class: "destination", + Name: "test-dest", + Secret: "test-dest-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-host", + Secret: "test-html-host-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-rt", + Secret: "test-html-rt-sec", + }, + }, + }, + }, + Status: v1alpha1.CAPApplicationStatus{ + State: v1alpha1.CAPApplicationStateConsistent, + }, + } +} + +func getHttpRequest(operation admissionv1.Operation, crdType string, crdName string, change updateType, t *testing.T) (*http.Request, *httptest.ResponseRecorder) { + admissionReview, err := createAdmissionRequest(operation, crdType, crdName, change) + if err != nil { + t.Fatal("admission review error") + } + bytesRequest, err := json.Marshal(admissionReview) + if err != nil { + t.Fatal("marshal error") + } + req := httptest.NewRequest(http.MethodGet, "/validate", bytes.NewBuffer(bytesRequest)) + w := httptest.NewRecorder() + return req, w +} + +func createAdmissionRequest(operation admissionv1.Operation, crdType string, crdName string, change updateType) (*admissionv1.AdmissionReview, error) { + admissionReview := &admissionv1.AdmissionReview{ + TypeMeta: metav1.TypeMeta{ + Kind: crdType, + APIVersion: apiVersion, + }, + Request: &admissionv1.AdmissionRequest{ + Name: crdName, + Kind: metav1.GroupVersionKind{ + Kind: crdType, + }, + Operation: operation, + UID: uid, + }, + } + + var rawBytes []byte + var rawBytesOld []byte + var err error + + switch crdType { + + case v1alpha1.CAPApplicationKind: + crd := &ResponseCa{} + if change != emptyUpdate { + crd = &ResponseCa{ + Metadata: Metadata{ + Name: caName, + Namespace: metav1.NamespaceDefault, + }, + Spec: &v1alpha1.CAPApplicationSpec{ + Provider: v1alpha1.BTPTenantIdentification{ + SubDomain: subDomain, + TenantId: tenantId, + }, + BTP: v1alpha1.BTP{}, + }, + Kind: crdType, + } + } + rawBytes, err = json.Marshal(crd) + rawBytesOld = rawBytes + if operation == admissionv1.Update && err == nil { + crdOld := crd + if change == providerUpdate { + crdOld.Spec.Provider.SubDomain = crdOld.Spec.Provider.SubDomain + "modified" + crdOld.Spec.Provider.TenantId = crdOld.Spec.Provider.TenantId + "modified" + rawBytesOld, err = json.Marshal(crdOld) + } + } + case v1alpha1.CAPApplicationVersionKind: + crd := &ResponseCav{} + if change != emptyUpdate { + crd = &ResponseCav{ + Metadata: Metadata{ + Name: crdName, + Namespace: metav1.NamespaceDefault, + }, + Spec: &v1alpha1.CAPApplicationVersionSpec{ + CAPApplicationInstance: caName, + Workloads: []v1alpha1.WorkloadDetails{ + { + Name: "cap-backend", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentCAP, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + { + Name: "cap-router", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentRouter, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + { + Name: "content", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobContent, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + }, + }, + Kind: crdType, + } + } + rawBytes, err = json.Marshal(crd) + rawBytesOld = rawBytes + if operation == admissionv1.Update && err == nil && change != noUpdate { + crdOld := crd + + switch change { + case appInstanceUpdate: + crdOld.Spec.CAPApplicationInstance = crdOld.Spec.CAPApplicationInstance + "modified" + case registrySecretsUpdate: + crdOld.Spec.RegistrySecrets = append(crdOld.Spec.RegistrySecrets, "newSecret") + case consumedBTPServicesUpdate: + crdOld.Spec.Workloads[0].ConsumedBTPServices = append(crdOld.Spec.Workloads[0].ConsumedBTPServices, "newService") + case versionUpdate: + crdOld.Spec.Version = crdOld.Spec.Version + "modified" + case imageUpdate: + crdOld.Spec.Workloads[0].DeploymentDefinition.Image = crdOld.Spec.Workloads[0].DeploymentDefinition.Image + "modified" + } + rawBytesOld, err = json.Marshal(crdOld) + } + case v1alpha1.CAPTenantKind: + crd := &ResponseCat{} + if change != emptyUpdate { + crd = &ResponseCat{ + Metadata: Metadata{ + Name: crdName, + Namespace: metav1.NamespaceDefault, + Labels: map[string]string{ + LabelTenantType: ProviderTenantType, + }, + }, + Spec: &v1alpha1.CAPTenantSpec{ + CAPApplicationInstance: caName, + }, + Status: &v1alpha1.CAPTenantStatus{ + State: v1alpha1.CAPTenantStateReady, + }, + Kind: crdType, + } + } + rawBytes, err = json.Marshal(crd) + rawBytesOld = rawBytes + if (operation == admissionv1.Update || operation == admissionv1.Delete) && err == nil { + crdOld := crd + if change == appInstanceUpdate { + crdOld.Spec.CAPApplicationInstance = crdOld.Spec.CAPApplicationInstance + "modified" + rawBytesOld, err = json.Marshal(crdOld) + } + } + } + + if err != nil { + return nil, err + } + + if operation != admissionv1.Delete { + admissionReview.Request.Object.Raw = rawBytes + } + + if operation != admissionv1.Create && operation != admissionv1.Connect { + admissionReview.Request.OldObject.Raw = rawBytesOld + } + + return admissionReview, nil +} + +func TestInvalidRequest(t *testing.T) { + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + + recorder := httptest.NewRecorder() + admissionReview := admissionv1.AdmissionReview{} + bytesRequest, err := json.Marshal(admissionReview) + if err != nil { + t.Fatal("marshal error") + } + request := httptest.NewRequest(http.MethodGet, "/validate", bytes.NewBuffer(bytesRequest)) + + wh.Validate(recorder, request) + if recorder.Code != http.StatusBadRequest { + t.Fatal("Error was not recorded correctly") + } +} + +func TestSideCar(t *testing.T) { + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + + tests := []struct { + sideCarEnv string + }{ + { + sideCarEnv: "true", + }, + { + sideCarEnv: "false", + }, + { + sideCarEnv: "invalid", + }, + } + for _, test := range tests { + t.Run("Testing SideCarEnv value "+test.sideCarEnv, func(t *testing.T) { + os.Setenv(SideCarEnv, test.sideCarEnv) + + recorder := httptest.NewRecorder() + + admissionReview := admissionv1.AdmissionReview{} + bytesRequest, err := json.Marshal(admissionReview) + if err != nil { + t.Fatal("marshal error") + } + request := httptest.NewRequest(http.MethodGet, "/validate", bytes.NewBuffer(bytesRequest)) + + wh.Validate(recorder, request) + file, err := os.ReadFile(os.TempDir() + RequestPath) + if err != nil { + t.Error("Side car file read error") + } + json.Unmarshal(file, &admissionReview) + + if admissionReview.Request != nil || admissionReview.Response != nil { + t.Fatal("Invalid admission review with http error") + } + + if test.sideCarEnv == "invalid" { + if recorder.Code != http.StatusInternalServerError { + t.Fatal("Error was not recorded correctly") + } + } else if recorder.Code != http.StatusBadRequest { + t.Fatal("Error was not recorded correctly") + } + + os.Unsetenv(SideCarEnv) + }) + } +} + +func TestEmptyResources(t *testing.T) { + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + tests := []struct { + operation admissionv1.Operation + crdType string + }{ + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Delete, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPTenantKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPTenantKind, + }, + { + operation: admissionv1.Delete, + crdType: v1alpha1.CAPTenantKind, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPApplicationKind, + }, + { + operation: admissionv1.Delete, + crdType: v1alpha1.CAPApplicationKind, + }, + } + for _, test := range tests { + t.Run("Testing admission review for empty (invalid) "+test.crdType+" resource with operation "+string(test.operation), func(t *testing.T) { + crdName := cavName + if test.crdType == v1alpha1.CAPTenantKind { + crdName = catName + } else { + crdName = caName + } + + request, recorder := getHttpRequest(test.operation, test.crdType, crdName, emptyUpdate, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, _ := io.ReadAll(recorder.Body) + universalDeserializer.Decode(bytes, nil, &admissionReview) + if admissionReview.Request != nil || admissionReview.Response != nil { + t.Fatal("Invalid admission review with http error") + } + if recorder.Code != http.StatusInternalServerError { + t.Fatal("Error was not recorded correctly") + } + }) + } +} + +func TestUnhandledType(t *testing.T) { + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + + tests := []struct { + operation admissionv1.Operation + crdType string + }{ + { + operation: admissionv1.Update, + }, + { + operation: admissionv1.Create, + }, + { + operation: admissionv1.Delete, + }, + { + operation: admissionv1.Connect, + }, + } + for _, test := range tests { + t.Run("Testing unhandled resource type validity for operation "+string(test.operation), func(t *testing.T) { + + request, recorder := getHttpRequest(test.operation, "Unhandled", "unhandled", noUpdate, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, _ := io.ReadAll(recorder.Body) + universalDeserializer.Decode(bytes, nil, &admissionReview) + if !admissionReview.Response.Allowed || admissionReview.Response.UID != uid { + t.Fatal("validation response error") + } + }) + } +} + +func TestCavAndCatValidity(t *testing.T) { + // valid CAPApplication + Ca := createCaCRO() + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(Ca), + } + + tests := []struct { + operation admissionv1.Operation + crdType string + backlogItems []string + }{ + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Delete, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Connect, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPTenantKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPTenantKind, + }, + { + operation: admissionv1.Delete, + crdType: v1alpha1.CAPTenantKind, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2520"}, + }, + { + operation: admissionv1.Connect, + crdType: v1alpha1.CAPTenantKind, + }, + } + for _, test := range tests { + nameParts := []string{"Testing " + test.crdType + " validity for operation " + string(test.operation) + "; "} + testName := strings.Join(append(nameParts, test.backlogItems...), " ") + t.Run(testName, func(t *testing.T) { + crdName := cavName + if test.crdType == v1alpha1.CAPTenantKind { + crdName = catName + } + + request, recorder := getHttpRequest(test.operation, test.crdType, crdName, noUpdate, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + + universalDeserializer.Decode(bytes, nil, &admissionReview) + + var errorMessage string + if test.operation == admissionv1.Delete && test.crdType == v1alpha1.CAPTenantKind { + errorMessage = fmt.Sprintf("%s provider %s %s cannot be deleted when a consistent %s %s exists. Delete the %s instead to delete all tenants", InvalidationMessage, admissionReview.Kind, catName, v1alpha1.CAPApplicationKind, Ca.Name, v1alpha1.CAPApplicationKind) + if admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result.Message != errorMessage { + t.Fatal("validation response error") + } + } else if !admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result != nil { + t.Fatal("validation response error") + } + }) + } +} + +func TestCavAndCatInvalidityNoApp(t *testing.T) { + // no CAPApplication + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + + tests := []struct { + operation admissionv1.Operation + crdType string + }{ + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPApplicationVersionKind, + }, + { + operation: admissionv1.Create, + crdType: v1alpha1.CAPTenantKind, + }, + } + for _, test := range tests { + t.Run("Testing "+test.crdType+" invalidity with no CAPApp for operation "+string(test.operation), func(t *testing.T) { + crdName := cavName + if test.crdType == v1alpha1.CAPTenantKind { + crdName = catName + } + + request, recorder := getHttpRequest(test.operation, test.crdType, crdName, noUpdate, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + universalDeserializer.Decode(bytes, nil, &admissionReview) + if admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result.Message != fmt.Sprintf("%s %s no valid %s found for: %s.%s", InvalidationMessage, admissionReview.Kind, v1alpha1.CAPApplicationKind, metav1.NamespaceDefault, crdName) { + t.Fatal("validation response error") + } + }) + } +} + +func TestCavAndCatInvaliditySpecChange(t *testing.T) { + // valid CAPApplication + Ca := createCaCRO() + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(Ca), + } + + tests := []struct { + operation admissionv1.Operation + crdType string + changeType updateType + }{ + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + changeType: appInstanceUpdate, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + changeType: registrySecretsUpdate, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + changeType: consumedBTPServicesUpdate, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + changeType: versionUpdate, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPApplicationVersionKind, + changeType: imageUpdate, + }, + { + operation: admissionv1.Update, + crdType: v1alpha1.CAPTenantKind, + changeType: appInstanceUpdate, + }, + } + for _, test := range tests { + t.Run("Testing "+test.crdType+" invalidity with CAPApp instance change for operation "+string(test.operation), func(t *testing.T) { + crdName := cavName + if test.crdType == v1alpha1.CAPTenantKind { + crdName = catName + } + + request, recorder := getHttpRequest(test.operation, test.crdType, crdName, test.changeType, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + + universalDeserializer.Decode(bytes, nil, &admissionReview) + + expectedMessage := fmt.Sprintf("%s %s spec cannot be modified for: %s.%s", InvalidationMessage, admissionReview.Kind, metav1.NamespaceDefault, crdName) + if test.crdType == v1alpha1.CAPTenantKind { + expectedMessage = fmt.Sprintf("%s %s capApplicationInstance value cannot be modified for: %s.%s", InvalidationMessage, admissionReview.Kind, metav1.NamespaceDefault, crdName) + } + + if admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result.Message != expectedMessage { + t.Fatal("validation response error") + } + }) + } +} + +func TestCaValidity(t *testing.T) { + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(), + } + tests := []struct { + operation admissionv1.Operation + tenantType string + }{ + { + operation: admissionv1.Delete, + }, + { + operation: admissionv1.Update, + }, + { + operation: admissionv1.Create, + }, + { + operation: admissionv1.Connect, + }, + } + for _, test := range tests { + t.Run("Testing CAPApplication validity for operation "+string(test.operation), func(t *testing.T) { + request, recorder := getHttpRequest(test.operation, v1alpha1.CAPApplicationKind, caName, noUpdate, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + universalDeserializer.Decode(bytes, nil, &admissionReview) + + if !admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result != nil { + t.Fatal("validation response error") + } + }) + } +} + +func TestCaInvalidity(t *testing.T) { + tests := []struct { + operation admissionv1.Operation + update updateType + }{ + { + operation: admissionv1.Update, + update: providerUpdate, + }, + } + for _, test := range tests { + t.Run("Testing CAPApplication invalidity for operation "+string(test.operation), func(t *testing.T) { + var crdObjects []runtime.Object + + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(crdObjects...), + } + + request, recorder := getHttpRequest(test.operation, v1alpha1.CAPApplicationKind, caName, test.update, t) + + wh.Validate(recorder, request) + + admissionReview := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + universalDeserializer.Decode(bytes, nil, &admissionReview) + + var errorMessage string + if test.update == providerUpdate { + errorMessage = fmt.Sprintf("%s %s provider details cannot be changed for: %s.%s", InvalidationMessage, admissionReview.Kind, metav1.NamespaceDefault, caName) + } + + if admissionReview.Response.Allowed || + admissionReview.Response.UID != uid || + admissionReview.APIVersion != apiVersion || + admissionReview.Response.Result.Message != errorMessage { + t.Fatal("validation response error") + } + }) + } +} + +func TestCavInvalidity(t *testing.T) { + Ca := createCaCRO() + wh := &WebhookHandler{ + CrdClient: fakeCrdClient.NewSimpleClientset(Ca), + } + tests := []struct { + operation admissionv1.Operation + duplicateWorkloadName bool + invalidDeploymentType bool + invalidJobType bool + onlyOneCAPTypeAllowed bool + onlyOneRouterTypeAllowed bool + onlyOneContentTypeAllowed bool + duplicatePortName bool + duplicatePortNumber bool + routerDestNameCAPChk bool + routerDestNameRouterChk bool + customTenantOpWithoutSequence bool + tenantOperationSequenceInvalid bool + invalidWorkloadInTenantOpSeq bool + missingTenantOpInSeqProvisioning bool + missingTenantOpInSeqUpgrade bool + missingTenantOpInSeqDeprovisioning bool + backlogItems []string + }{ + { + operation: admissionv1.Create, + duplicateWorkloadName: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + invalidDeploymentType: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + invalidJobType: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + onlyOneCAPTypeAllowed: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + onlyOneRouterTypeAllowed: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + onlyOneContentTypeAllowed: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2338"}, + }, + { + operation: admissionv1.Create, + duplicatePortName: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2339"}, + }, + { + operation: admissionv1.Create, + duplicatePortNumber: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2339"}, + }, + { + operation: admissionv1.Create, + routerDestNameCAPChk: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2339"}, + }, + { + operation: admissionv1.Create, + routerDestNameRouterChk: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2339"}, + }, + { + operation: admissionv1.Create, + customTenantOpWithoutSequence: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2405"}, + }, + { + operation: admissionv1.Create, + tenantOperationSequenceInvalid: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2405"}, + }, + { + operation: admissionv1.Create, + invalidWorkloadInTenantOpSeq: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2405"}, + }, + { + operation: admissionv1.Create, + missingTenantOpInSeqProvisioning: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-3537"}, + }, + { + operation: admissionv1.Create, + missingTenantOpInSeqUpgrade: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-3537"}, + }, + { + operation: admissionv1.Create, + missingTenantOpInSeqDeprovisioning: true, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-3537"}, + }, + } + for _, test := range tests { + nameParts := []string{"Testing CAPApplicationversion invalidity for operation " + string(test.operation) + "; "} + testName := strings.Join(append(nameParts, test.backlogItems...), " ") + t.Run(testName, func(t *testing.T) { + admissionReview, err := createAdmissionRequest(test.operation, v1alpha1.CAPApplicationVersionKind, caName, noUpdate) + if err != nil { + t.Fatal("admission review error") + } + + crd := &ResponseCav{ + Metadata: Metadata{ + Name: cavName, + Namespace: metav1.NamespaceDefault, + }, + Spec: &v1alpha1.CAPApplicationVersionSpec{ + CAPApplicationInstance: caName, + Workloads: []v1alpha1.WorkloadDetails{ + { + Name: "cap-backend", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentCAP, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + { + Name: "cap-router", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentRouter, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + { + Name: "content", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobContent, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }, + }, + }, + Kind: v1alpha1.CAPApplicationVersionKind, + } + + if test.duplicateWorkloadName == true { + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "cap-backend", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentAdditional, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + } else if test.invalidDeploymentType == true { + crd.Spec.Workloads[0].DeploymentDefinition.Type = "invalid" + } else if test.invalidJobType == true { + crd.Spec.Workloads[2].JobDefinition.Type = "invalid" + } else if test.onlyOneCAPTypeAllowed == true { + // add additional workload of type CAP + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "cap-backend-2", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentCAP, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + } else if test.onlyOneRouterTypeAllowed == true { + // add additional workload of type Router + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "cap-router-2", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentRouter, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + } else if test.onlyOneContentTypeAllowed == true { + // change existing Content to tenant Operation + crd.Spec.Workloads[2].JobDefinition.Type = v1alpha1.JobTenantOperation + } else if test.duplicatePortName == true { + crd.Spec.Workloads[0].DeploymentDefinition.Ports = []v1alpha1.Ports{ + {Name: "port-1", RouterDestinationName: "port-1-dest", Port: 4000}, {Name: "port-1", Port: 4004}, + } + } else if test.duplicatePortNumber == true { + crd.Spec.Workloads[0].DeploymentDefinition.Ports = []v1alpha1.Ports{ + {Name: "port-1", RouterDestinationName: "port-1-dest", Port: 4000}, {Name: "port-2", Port: 4000}, + } + } else if test.routerDestNameCAPChk == true { + crd.Spec.Workloads[0].DeploymentDefinition.Ports = []v1alpha1.Ports{ + {Name: "port-1", Port: 4000}, {Name: "port-2", Port: 4004}, + } + } else if test.routerDestNameRouterChk == true { + crd.Spec.Workloads[1].DeploymentDefinition.Ports = []v1alpha1.Ports{ + {Name: "port-1", RouterDestinationName: "port-1-dest", Port: 4000}, {Name: "port-2", Port: 4004}, + } + } else if test.customTenantOpWithoutSequence == true { + // add workload of type custom tenant operation + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "custom-tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobCustomTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + } else if test.tenantOperationSequenceInvalid == true { + // add workload of type custom tenant operation and tenant operation + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "custom-tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobCustomTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + + crd.Spec.TenantOperations = &v1alpha1.TenantOperations{ + Provisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + Deprovisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + Upgrade: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + } + } else if test.invalidWorkloadInTenantOpSeq == true { + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + + crd.Spec.TenantOperations = &v1alpha1.TenantOperations{ + Provisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + Deprovisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, + }, + Upgrade: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + } + } else if test.missingTenantOpInSeqProvisioning == true || test.missingTenantOpInSeqUpgrade == true || test.missingTenantOpInSeqDeprovisioning == true { + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + crd.Spec.Workloads = append(crd.Spec.Workloads, v1alpha1.WorkloadDetails{ + Name: "custom-tenant-operation", + ConsumedBTPServices: []string{}, + JobDefinition: &v1alpha1.JobDetails{ + Type: v1alpha1.JobCustomTenantOperation, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "foo", + }, + }, + }) + + if test.missingTenantOpInSeqProvisioning == true { + crd.Spec.TenantOperations = &v1alpha1.TenantOperations{ + Provisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + Deprovisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + Upgrade: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + } + } else if test.missingTenantOpInSeqUpgrade == true { + crd.Spec.TenantOperations = &v1alpha1.TenantOperations{ + Provisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + Deprovisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + Upgrade: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + } + } else if test.missingTenantOpInSeqDeprovisioning == true { + crd.Spec.TenantOperations = &v1alpha1.TenantOperations{ + Provisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + Deprovisioning: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "custom-tenant-operation"}, + }, + Upgrade: []v1alpha1.TenantOperationWorkloadReference{ + {WorkloadName: "tenant-operation"}, {WorkloadName: "custom-tenant-operation"}, + }, + } + } + + } + + rawBytes, _ := json.Marshal(crd) + admissionReview.Request.Object.Raw = rawBytes + bytesRequest, err := json.Marshal(admissionReview) + if err != nil { + t.Fatal("marshal error") + } + request := httptest.NewRequest(http.MethodGet, "/validate", bytes.NewBuffer(bytesRequest)) + recorder := httptest.NewRecorder() + + wh.Validate(recorder, request) + + admissionReviewRes := admissionv1.AdmissionReview{} + bytes, err := io.ReadAll(recorder.Body) + if err != nil { + t.Fatal("io read error") + } + universalDeserializer.Decode(bytes, nil, &admissionReviewRes) + + var errorMessage string + if test.duplicateWorkloadName == true { + errorMessage = fmt.Sprintf("%s %s duplicate workload name: cap-backend", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.invalidDeploymentType == true { + errorMessage = fmt.Sprintf("%s %s invalid deployment definition type. Only supported - CAP, Router and Additional", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.invalidJobType == true { + errorMessage = fmt.Sprintf("%s %s invalid job definition type. Only supported - Content, TenantOperation and CustomTenantOperation", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.onlyOneCAPTypeAllowed == true { + errorMessage = fmt.Sprintf(DeploymentWorkloadCountErr, InvalidationMessage, v1alpha1.CAPApplicationVersionKind, v1alpha1.DeploymentCAP, 2, v1alpha1.DeploymentCAP) + } else if test.onlyOneRouterTypeAllowed == true { + errorMessage = fmt.Sprintf(DeploymentWorkloadCountErr, InvalidationMessage, v1alpha1.CAPApplicationVersionKind, v1alpha1.DeploymentRouter, 2, v1alpha1.DeploymentRouter) + } else if test.onlyOneContentTypeAllowed == true { + errorMessage = fmt.Sprintf(JobWorkloadCountErr, InvalidationMessage, v1alpha1.CAPApplicationVersionKind, v1alpha1.JobContent, 0, v1alpha1.JobContent) + } else if test.duplicatePortName == true { + errorMessage = fmt.Sprintf("%s %s duplicate port name: port-1 in workload - cap-backend", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.duplicatePortNumber == true { + errorMessage = fmt.Sprintf("%s %s duplicate port number: 4000 in workload - cap-backend", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.routerDestNameCAPChk == true { + errorMessage = fmt.Sprintf("%s %s routerDestinationName not defined in port configuration of workload - cap-backend", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.routerDestNameRouterChk == true { + errorMessage = fmt.Sprintf("%s %s routerDestinationName should not be defined for workload of type Router - cap-router", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.customTenantOpWithoutSequence == true { + errorMessage = fmt.Sprintf("%s %s - If a jobDefinition of type CustomTenantOperation is part of the workloads, then spec.tenantOperations must be specified", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.tenantOperationSequenceInvalid == true { + errorMessage = fmt.Sprintf("%s %s workload tenant operation tenant-operation is not specified in spec.tenantOperations", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.invalidWorkloadInTenantOpSeq == true { + errorMessage = fmt.Sprintf("%s %s custom-tenant-operation specified in spec.tenantOperations is not a valid workload of type TenantOperation or CustomTenantOperation", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.missingTenantOpInSeqProvisioning == true { + errorMessage = fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.provisioning", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.missingTenantOpInSeqUpgrade == true { + errorMessage = fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.upgrade", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } else if test.missingTenantOpInSeqDeprovisioning == true { + errorMessage = fmt.Sprintf("%s %s - No tenant operation specified in spec.tenantOperation.deprovisioning", InvalidationMessage, v1alpha1.CAPApplicationVersionKind) + } + + if admissionReviewRes.Response.Allowed || admissionReviewRes.Response.Result.Message != errorMessage { + t.Fatal("validation response error") + } + }) + } +} diff --git a/cmd/web-hooks/main.go b/cmd/web-hooks/main.go new file mode 100644 index 0000000..c54e70b --- /dev/null +++ b/cmd/web-hooks/main.go @@ -0,0 +1,73 @@ +package main + +import ( + "net/http" + "os" + "strconv" + + handler "github.com/sap/cap-operator/cmd/web-hooks/internal/handler" + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" + "k8s.io/klog/v2" +) + +type ServerParameters struct { + port int // webhook server port + certFile string // path to TLS certificate for https + keyFile string // path to TLS key matching for certificate + tlsEnabled bool // indicates if TLS is enabled +} + +var parameters ServerParameters + +func main() { + // check env for relevant values + portEnv := os.Getenv("WEBHOOK_PORT") + port := 8443 + var err error + + if portEnv != "" { + port, err = strconv.Atoi(portEnv) + if err != nil { + klog.Error("Error parsing Webhook server port: ", err.Error()) + } + } + + parameters.port = port + + t := os.Getenv("TLS_ENABLED") + tlsEnabled := false + + if t != "" { + tlsEnabled, err = strconv.ParseBool(t) + if err != nil { + klog.Error("Error parsing tls: ", err.Error()) + } + } + parameters.tlsEnabled = tlsEnabled + + parameters.certFile = os.Getenv("TLS_CERT") + parameters.keyFile = os.Getenv("TLS_KEY") + + if err != nil { + klog.Fatalf("Config build: ", err.Error()) + } + + config := util.GetConfig() + crdClient, err := versioned.NewForConfig(config) + if err != nil { + klog.Fatalf("could not create client for custom resources: %v", err.Error()) + } + + whHandler := &handler.WebhookHandler{ + CrdClient: crdClient, + } + + http.HandleFunc("/validate", whHandler.Validate) + + if parameters.tlsEnabled { + klog.Fatal(http.ListenAndServeTLS(":"+strconv.Itoa(parameters.port), parameters.certFile, parameters.keyFile, nil)) + } else { + klog.Fatal(http.ListenAndServe(":"+strconv.Itoa(parameters.port), nil)) + } +} diff --git a/crds/capapplication.yaml b/crds/capapplication.yaml new file mode 100644 index 0000000..cd8a2c6 --- /dev/null +++ b/crds/capapplication.yaml @@ -0,0 +1,133 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: capapplications.sme.sap.com +spec: + scope: Namespaced + names: + plural: capapplications + singular: capapplication + kind: CAPApplication + shortNames: ["ca"] + group: sme.sap.com + versions: + - name: v1alpha1 + served: true + storage: true + additionalPrinterColumns: + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: State + type: string + jsonPath: .status.state + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + required: ["spec"] + properties: + spec: + type: object + required: + ["btpAppName", "globalAccountId", "provider", "domains", "btp"] + properties: + btpAppName: + type: string + globalAccountId: + type: string + domains: + type: object + required: ["primary", "istioIngressGatewayLabels"] + properties: + primary: + type: string + pattern: "^[a-z0-9-.]+$" + maxLength: 62 + secondary: + type: array + items: + type: string + pattern: "^[a-z0-9-.]+$" + dnsTarget: + type: string + pattern: "^[a-z0-9-.]*$" + istioIngressGatewayLabels: + type: array + items: + minItems: 1 + type: object + required: ["name", "value"] + properties: + name: + type: string + value: + type: string + minLength: 1 + provider: + type: object + required: ["subDomain", "tenantId"] + properties: + subDomain: + type: string + tenantId: + type: string + btp: + type: "object" + required: ["services"] + properties: + services: + type: array + items: + type: object + required: ["class", "name", "secret"] + properties: + class: + type: string + name: + type: string + secret: + type: string + status: + type: object + required: ["state"] + default: + state: "" + observedGeneration: -1 + properties: + observedGeneration: + type: integer + state: + type: string + enum: ["", "Consistent", "Processing", "Error", "Deleting"] + lastFullReconciliationTime: + type: string + format: datetime + conditions: + type: array + items: + type: object + required: ["type", "status"] + properties: + type: + type: string + enum: ["Ready", "AllTenantsReady", "LatestVersionReady"] + status: + type: string + enum: ["True", "False", "Unknown"] + lastUpdateTime: # Unused property + type: string + format: datetime + lastTransitionTime: + type: string + format: datetime + reason: + type: string + minLength: 1 + message: + type: string + observedGeneration: + type: integer + domainSpecHash: + type: string diff --git a/crds/capapplicationversion.yaml b/crds/capapplicationversion.yaml new file mode 100644 index 0000000..22ad825 --- /dev/null +++ b/crds/capapplicationversion.yaml @@ -0,0 +1,755 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: capapplicationversions.sme.sap.com +spec: + scope: Namespaced + names: + plural: capapplicationversions + singular: capapplicationversion + kind: CAPApplicationVersion + shortNames: ["cav"] + group: sme.sap.com + versions: + - name: v1alpha1 + served: true + storage: true + additionalPrinterColumns: + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: State + type: string + jsonPath: .status.state + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + required: ["spec"] + properties: + spec: + type: object + required: ["capApplicationInstance", "workloads", "version"] + properties: + capApplicationInstance: + type: string + registrySecrets: + type: array + items: + type: string + workloads: + type: array + items: + type: object + required: ["name"] + oneOf: + - required: + - deploymentDefinition + - required: + - jobDefinition + properties: + consumedBTPServices: + type: array + items: + type: string + name: + type: string + pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$" + labels: + type: object + additionalProperties: + type: string + annotations: + type: object + additionalProperties: + type: string + deploymentDefinition: + type: object + required: ["type", "image"] + properties: + type: + type: string + image: + type: string + imagePullPolicy: + type: string + command: + type: array + items: + type: string + env: + type: array + items: + type: object + required: ["name"] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretKeyRef: + type: object + required: ["key"] + properties: + key: + type: string + name: + type: string + optional: + type: boolean + configMapKeyRef: + type: object + required: ["key"] + properties: + key: + type: string + name: + type: string + optional: + type: boolean + fieldRef: + type: object + required: ["fieldPath"] + properties: + apiVersion: + type: string + fieldPath: + type: string + resourceFieldRef: + type: object + required: ["resource"] + properties: + containerName: + type: string + resource: + type: string + divisor: + type: string + replicas: + type: integer + format: int32 + ports: + type: array + items: + type: object + properties: + appProtocol: + type: string + name: + type: string + networkPolicy: + type: string + enum: ["Application", "Cluster"] + port: + type: integer + format: int32 + routerDestinationName: + type: string + livenessProbe: + type: object + oneOf: + - required: + - exec + - required: + - grpc + - required: + - httpGet + - required: + - tcpSocket + properties: + exec: + type: object + required: ["command"] + properties: + command: + type: array + items: + type: string + httpGet: + type: object + required: ["port"] + properties: + path: + type: string + port: + type: integer + host: + type: string + scheme: + type: string + httpHeaders: + type: object + required: ["name", "value"] + properties: + name: + type: string + value: + type: string + tcpSocket: + type: object + required: ["port"] + properties: + port: + type: integer + host: + type: string + grpc: + type: object + required: ["port"] + properties: + port: + type: integer + service: + type: string + initialDelaySeconds: + type: integer + format: int32 + timeoutSeconds: + type: integer + format: int32 + periodSeconds: + type: integer + format: int32 + successThreshold: + type: integer + format: int32 + failureThreshold: + type: integer + format: int32 + readinessProbe: + type: object + oneOf: + - required: + - exec + - required: + - grpc + - required: + - httpGet + - required: + - tcpSocket + properties: + exec: + type: object + required: ["command"] + properties: + command: + type: array + items: + type: string + httpGet: + type: object + required: ["port"] + properties: + path: + type: string + port: + type: integer + host: + type: string + scheme: + type: string + httpHeaders: + type: object + required: ["name", "value"] + properties: + name: + type: string + value: + type: string + tcpSocket: + type: object + required: ["port"] + properties: + port: + type: integer + host: + type: string + grpc: + type: object + required: ["port"] + properties: + port: + type: integer + service: + type: string + initialDelaySeconds: + type: integer + format: int32 + timeoutSeconds: + type: integer + format: int32 + periodSeconds: + type: integer + format: int32 + successThreshold: + type: integer + format: int32 + failureThreshold: + type: integer + format: int32 + resources: + type: object + properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + type: object + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + requests: + type: object + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + jobDefinition: + type: object + required: ["type", "image"] + properties: + type: + type: string + image: + type: string + imagePullPolicy: + type: string + command: + type: array + items: + type: string + env: + type: array + items: + type: object + required: ["name"] + properties: + name: + type: string + value: + type: string + valueFrom: + type: object + properties: + secretKeyRef: + type: object + required: ["key"] + properties: + key: + type: string + name: + type: string + optional: + type: boolean + configMapKeyRef: + type: object + required: ["key"] + properties: + key: + type: string + name: + type: string + optional: + type: boolean + fieldRef: + type: object + required: ["fieldPath"] + properties: + apiVersion: + type: string + fieldPath: + type: string + resourceFieldRef: + type: object + required: ["resource"] + properties: + containerName: + type: string + resource: + type: string + divisor: + type: string + backoffLimit: + type: integer + format: int32 + ttlSecondsAfterFinished: + type: integer + format: int32 + resources: + type: object + properties: + claims: + type: array + items: + type: object + properties: + name: + type: string + required: + - name + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + type: object + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + requests: + type: object + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + capabilities: + properties: + add: + items: + type: string + type: array + drop: + items: + type: string + type: array + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + podSecurityContext: + properties: + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + version: + type: string + tenantOperations: + type: object + properties: + provisioning: + type: array + items: + type: object + required: ["workloadName"] + properties: + workloadName: + type: string + pattern: "[a-z0-9-]*" + continueOnFailure: + type: boolean + deprovisioning: + type: array + items: + type: object + required: ["workloadName"] + properties: + workloadName: + type: string + pattern: "[a-z0-9-]*" + continueOnFailure: + type: boolean + upgrade: + type: array + items: + type: object + required: ["workloadName"] + properties: + workloadName: + type: string + pattern: "[a-z0-9-]*" + continueOnFailure: + type: boolean + status: + type: object + required: ["state"] + default: + state: "" + observedGeneration: -1 + properties: + observedGeneration: + type: integer + state: + type: string + enum: ["", "Ready", "Error", "Processing", "Deleting"] + finishedJobs: + type: array + items: + type: string + conditions: + type: array + items: + type: object + required: ["type", "status"] + properties: + type: + type: string + enum: ["Ready", "Error"] + status: + type: string + enum: ["True", "False", "Unknown"] + lastUpdateTime: # Unused property + type: string + format: datetime + lastTransitionTime: + type: string + format: datetime + reason: + type: string + minLength: 1 + message: + type: string + observedGeneration: + type: integer diff --git a/crds/captenant.yaml b/crds/captenant.yaml new file mode 100644 index 0000000..b9e11eb --- /dev/null +++ b/crds/captenant.yaml @@ -0,0 +1,95 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: captenants.sme.sap.com +spec: + scope: Namespaced + names: + plural: captenants + singular: captenant + kind: CAPTenant + shortNames: ["cat"] + group: sme.sap.com + versions: + - name: v1alpha1 + served: true + storage: true + additionalPrinterColumns: + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: State + type: string + jsonPath: .status.state + - name: Current Version + type: string + jsonPath: .status.currentCAPApplicationVersionInstance + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + required: ["spec"] + properties: + spec: + type: object + required: ["capApplicationInstance", "subDomain", "tenantId"] + properties: + capApplicationInstance: + type: string + subDomain: + type: string + tenantId: + type: string + version: + type: string + versionUpgradeStrategy: + default: "always" + type: string + enum: ["always", "never"] + status: + type: object + required: ["state"] + default: + state: "" + observedGeneration: -1 + properties: + currentCAPApplicationVersionInstance: + type: string + observedGeneration: + type: integer + state: + type: string + enum: [ "", "Ready", "Provisioning", "Upgrading", "Deleting", "ProvisioningError", "UpgradeError"] + lastFullReconciliationTime: + type: string + format: datetime + previousCAPApplicationVersions: + type: array + items: + type: string + conditions: + type: array + items: + type: object + required: ["type", "status"] + properties: + type: + type: string + enum: ["Ready", "Error"] + status: + type: string + enum: ["True", "False", "Unknown"] + lastUpdateTime: # Unused property + type: string + format: datetime + lastTransitionTime: + type: string + format: datetime + reason: + type: string + minLength: 1 + message: + type: string + observedGeneration: + type: integer diff --git a/crds/captenantoperation.yaml b/crds/captenantoperation.yaml new file mode 100644 index 0000000..c272b3a --- /dev/null +++ b/crds/captenantoperation.yaml @@ -0,0 +1,106 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: captenantoperations.sme.sap.com +spec: + scope: Namespaced + names: + plural: captenantoperations + singular: captenantoperation + kind: CAPTenantOperation + shortNames: ["ctop"] + group: sme.sap.com + versions: + - name: v1alpha1 + served: true + storage: true + additionalPrinterColumns: + - name: Age + type: date + jsonPath: .metadata.creationTimestamp + - name: State + type: string + jsonPath: .status.state + subresources: + status: {} + schema: + openAPIV3Schema: + type: object + required: ["spec"] + properties: + spec: + type: object + required: + [ + "operation", + "tenantId", + "subDomain", + "capApplicationVersionInstance", + ] + properties: + operation: + type: string + enum: ["provisioning", "deprovisioning", "upgrade"] + subDomain: + type: string + tenantId: + type: string + capApplicationVersionInstance: + type: string + steps: + type: array + items: + type: object + required: ["name", "type"] + properties: + name: + type: string + pattern: "^[a-z]([-a-z0-9]*[a-z0-9])?$" + type: + type: string + enum: ["TenantOperation", "CustomTenantOperation"] + continueOnFailure: + type: boolean + status: + type: object + required: ["state"] + default: + state: "" + observedGeneration: -1 + properties: + currentStep: + type: integer + format: int32 + minimum: 0 + activeJob: + type: string + observedGeneration: + type: integer + state: + type: string + enum: ["", "Processing", "Completed", "Failed", "Deleting"] + conditions: + type: array + items: + type: object + required: ["type", "status"] + properties: + type: + type: string + enum: ["Ready"] + status: + type: string + enum: ["True", "False", "Unknown"] + lastUpdateTime: # Unused property + type: string + format: datetime + lastTransitionTime: + type: string + format: datetime + reason: + type: string + minLength: 1 + message: + type: string + observedGeneration: + type: integer diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..160d554 --- /dev/null +++ b/go.mod @@ -0,0 +1,79 @@ +module github.com/sap/cap-operator + +go 1.21 + +require ( + github.com/MicahParks/keyfunc/v2 v2.1.0 + github.com/cert-manager/cert-manager v1.12.3 + github.com/gardener/cert-management v0.10.10 + github.com/gardener/external-dns-management v0.15.8 + github.com/golang-jwt/jwt/v5 v5.0.0 + github.com/google/go-cmp v0.5.9 + github.com/google/uuid v1.3.0 + github.com/lestrrat-go/jwx/v2 v2.0.12 + golang.org/x/mod v0.12.0 + google.golang.org/protobuf v1.31.0 + istio.io/api v1.19.0-beta.0 + istio.io/client-go v1.18.1 + k8s.io/api v0.28.0 + k8s.io/apimachinery v0.28.0 + k8s.io/client-go v0.28.0 + k8s.io/code-generator v0.28.0 + k8s.io/klog/v2 v2.100.1 +) + +require github.com/google/gnostic-models v0.6.8 // indirect + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/lestrrat-go/blackmagic v1.0.1 // indirect + github.com/lestrrat-go/httpcc v1.0.1 // indirect + github.com/lestrrat-go/httprc v1.0.4 // indirect + github.com/lestrrat-go/iter v1.0.2 // indirect + github.com/lestrrat-go/option v1.0.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/segmentio/asm v1.2.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb + golang.org/x/net v0.14.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.9.1 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apiextensions-apiserver v0.28.0 // indirect + k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect + k8s.io/kube-openapi v0.0.0-20230816210353-14e408962443 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/gateway-api v0.7.1 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 + sigs.k8s.io/yaml v1.3.0 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..e472e1e --- /dev/null +++ b/go.sum @@ -0,0 +1,251 @@ +github.com/MicahParks/keyfunc/v2 v2.1.0 h1:6ZXKb9Rp6qp1bDbJefnG7cTH8yMN1IC/4nf+GVjO99k= +github.com/MicahParks/keyfunc/v2 v2.1.0/go.mod h1:rW42fi+xgLJ2FRRXAfNx9ZA8WpD4OeE/yHVMteCkw9k= +github.com/cert-manager/cert-manager v1.12.3 h1:3gZkP7hHI2CjgX5qZ1Tm98YbHVXB2NGAZPVbOLb3AjU= +github.com/cert-manager/cert-manager v1.12.3/go.mod h1:/RYHUvK9cxuU5dbRyhb7g6am9jCcZc8huF3AnADE+nA= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/gardener/cert-management v0.10.10 h1:r8bjF3QEsC5iRfYd0PdjyOQFeJoWxYk8kVrpeHMeB+M= +github.com/gardener/cert-management v0.10.10/go.mod h1:XWcNx2Vur0MmmptKnR4Ema8zFDDnsDK2ovflUgFyoMs= +github.com/gardener/external-dns-management v0.15.8 h1:YQMjxmSfGbrh2Eim4jfoOrhI/3MACCMGYUwKAwlE+z8= +github.com/gardener/external-dns-management v0.15.8/go.mod h1:TK6nWd+j+e0Ypp7FDhYRnUQqqh9YxlOHBeEraepSdgA= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-jwt/jwt/v5 v5.0.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lestrrat-go/blackmagic v1.0.1 h1:lS5Zts+5HIC/8og6cGHb0uCcNCa3OUt1ygh3Qz2Fe80= +github.com/lestrrat-go/blackmagic v1.0.1/go.mod h1:UrEqBzIR2U6CnzVyUtfM6oZNMt/7O7Vohk2J0OGSAtU= +github.com/lestrrat-go/httpcc v1.0.1 h1:ydWCStUeJLkpYyjLDHihupbn2tYmZ7m22BGkcvZZrIE= +github.com/lestrrat-go/httpcc v1.0.1/go.mod h1:qiltp3Mt56+55GPVCbTdM9MlqhvzyuL6W/NMDA8vA5E= +github.com/lestrrat-go/httprc v1.0.4 h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8= +github.com/lestrrat-go/httprc v1.0.4/go.mod h1:mwwz3JMTPBjHUkkDv/IGJ39aALInZLrhBp0X7KGUZlo= +github.com/lestrrat-go/iter v1.0.2 h1:gMXo1q4c2pHmC3dn8LzRhJfP1ceCbgSiT9lUydIzltI= +github.com/lestrrat-go/iter v1.0.2/go.mod h1:Momfcq3AnRlRjI5b5O8/G5/BvpzrhoFTZcn06fEOPt4= +github.com/lestrrat-go/jwx/v2 v2.0.12 h1:3d589+5w/b9b7S3DneICPW16AqTyYXB7VRjgluSDWeA= +github.com/lestrrat-go/jwx/v2 v2.0.12/go.mod h1:Mq4KN1mM7bp+5z/W5HS8aCNs5RKZ911G/0y2qUjAQuQ= +github.com/lestrrat-go/option v1.0.0/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= +github.com/lestrrat-go/option v1.0.1 h1:oAzP2fvZGQKWkvHa1/SAcFolBEca1oN+mQ7eooNBEYU= +github.com/lestrrat-go/option v1.0.1/go.mod h1:5ZHFbivi4xwXxhxY9XHDe2FHo6/Z7WWmtT7T5nBBp3I= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= +github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3RonqW57k= +github.com/onsi/gomega v1.27.7 h1:fVih9JD6ogIiHUN6ePK7HJidyEDpWGVB5mzM7cWNXoU= +github.com/onsi/gomega v1.27.7/go.mod h1:1p8OOlwo2iUUDsHnOrjE5UKYJ+e3W8eQ3qSlRahPmr4= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= +github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878 h1:Iveh6tGCJkHAjJgEqUQYGDGgbwmhjoAOz8kO/ajxefY= +google.golang.org/genproto v0.0.0-20230815205213-6bfd019c3878/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878 h1:WGq4lvB/mlicysM/dUT3SBvijH4D3sm/Ny1A4wmt2CI= +google.golang.org/genproto/googleapis/api v0.0.0-20230815205213-6bfd019c3878/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +istio.io/api v1.19.0-beta.0 h1:ZbWXHd7kqug+TGBlzWJZwRcXHH4Sfn0jJv0WmNAMHio= +istio.io/api v1.19.0-beta.0/go.mod h1:dDMe1TsOtrRoUlBzdxqNolWXpXPQjLfbcXvqPMtQ6eo= +istio.io/client-go v1.18.1 h1:qSpKeJ0+3L9wAEfs30KaTWkifhz7YRmyXsOPnC+zMqk= +istio.io/client-go v1.18.1/go.mod h1:ha62DtaYYStYdisMZw9OG5iG92irhr2sWK7C38qCdqI= +k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= +k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= +k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= +k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= +k8s.io/code-generator v0.28.0 h1:msdkRVJNVFgdiIJ8REl/d3cZsMB9HByFcWMmn13NyuE= +k8s.io/code-generator v0.28.0/go.mod h1:ueeSJZJ61NHBa0ccWLey6mwawum25vX61nRZ6WOzN9A= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d h1:U9tB195lKdzwqicbJvyJeOXV7Klv+wNAWENRnXEGi08= +k8s.io/gengo v0.0.0-20220902162205-c0856e24416d/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230816210353-14e408962443 h1:CAIciCnJnSOQxPd0xvpV6JU3D4AJvnYbImPpFpO9Hnw= +k8s.io/kube-openapi v0.0.0-20230816210353-14e408962443/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/gateway-api v0.7.1 h1:Tts2jeepVkPA5rVG/iO+S43s9n7Vp7jCDhZDQYtPigQ= +sigs.k8s.io/gateway-api v0.7.1/go.mod h1:Xv0+ZMxX0lu1nSSDIIPEfbVztgNZ+3cfiYrJsa2Ooso= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/hack/LICENSE_BOILERPLATE.txt b/hack/LICENSE_BOILERPLATE.txt new file mode 100644 index 0000000..ba3788b --- /dev/null +++ b/hack/LICENSE_BOILERPLATE.txt @@ -0,0 +1,15 @@ +/* +Copyright (c) YEAR SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ \ No newline at end of file diff --git a/hack/api-reference/config.json b/hack/api-reference/config.json new file mode 100644 index 0000000..9b853bd --- /dev/null +++ b/hack/api-reference/config.json @@ -0,0 +1,20 @@ +{ + "hideMemberFields": [ + "TypeMeta" + ], + "hideTypePatterns": [ + "ParseError$", + "List$" + ], + "externalPackages": [ + { + "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", + "docsURLTemplate": "https://pkg.go.dev/{{.PackagePath}}#{{.TypeIdentifier}}" + } + ], + "typeDisplayNamePrefixOverrides": { + "k8s.io/api/": "Kubernetes ", + "k8s.io/apimachinery/pkg/apis/": "Kubernetes " + }, + "markdownDisabled": false +} diff --git a/hack/api-reference/generate.sh b/hack/api-reference/generate.sh new file mode 100644 index 0000000..57bc47a --- /dev/null +++ b/hack/api-reference/generate.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -eo pipefail + +# Change directory to the script dir (i.e. .../hack/api-reference/) +cd $(dirname "${BASH_SOURCE[0]}") + +echo "PWD: ${PWD}" + +gen-crd-api-reference-docs \ + -config config.json \ + -template-dir template \ + -api-dir ../../pkg/apis/sme.sap.com/v1alpha1 \ + -out-file ../../website/includes/api-reference.html diff --git a/hack/api-reference/template/members.tpl b/hack/api-reference/template/members.tpl new file mode 100644 index 0000000..a529c67 --- /dev/null +++ b/hack/api-reference/template/members.tpl @@ -0,0 +1,48 @@ +{{ define "members" }} + +{{ range .Members }} +{{ if not (hiddenMember .)}} + + + {{ fieldName . }}
+ + {{ if linkForType .Type }} + + {{ typeDisplayName .Type }} + + {{ else }} + {{ typeDisplayName .Type }} + {{ end }} + + + + {{ if fieldEmbedded . }} +

+ (Members of {{ fieldName . }} are embedded into this type.) +

+ {{ end}} + + {{ if isOptionalMember .}} + (Optional) + {{ end }} + + {{ safe (renderComments .CommentLines) }} + + {{ if and (eq (.Type.Name.Name) "ObjectMeta") }} + Refer to the Kubernetes API documentation for the fields of the + metadata field. + {{ end }} + + {{ if or (eq (fieldName .) "spec") }} +
+
+ + {{ template "members" .Type }} +
+ {{ end }} + + +{{ end }} +{{ end }} + +{{ end }} diff --git a/hack/api-reference/template/pkg.tpl b/hack/api-reference/template/pkg.tpl new file mode 100644 index 0000000..842ec93 --- /dev/null +++ b/hack/api-reference/template/pkg.tpl @@ -0,0 +1,49 @@ +{{ define "packages" }} + +{{ with .packages}} +

Packages:

+ +{{ end}} + +{{ range .packages }} +

+ {{- packageDisplayName . -}} +

+ + {{ with (index .GoPackages 0 )}} + {{ with .DocComments }} +
+ {{ safe (renderComments .) }} +
+ {{ end }} + {{ end }} + + Resource Types: +
    + {{- range (visibleTypes (sortedTypes .Types)) -}} + {{ if isExportedType . -}} +
  • + {{ typeDisplayName . }} +
  • + {{- end }} + {{- end -}} +
+ + {{ range (visibleTypes (sortedTypes .Types))}} + {{ template "type" . }} + {{ end }} +
+{{ end }} + +

+ Generated with gen-crd-api-reference-docs + {{ with .gitCommit }} on git commit {{ . }}{{end}}. +

+ +{{ end }} diff --git a/hack/api-reference/template/placeholder.go b/hack/api-reference/template/placeholder.go new file mode 100644 index 0000000..cc8f145 --- /dev/null +++ b/hack/api-reference/template/placeholder.go @@ -0,0 +1,2 @@ +// Placeholder file to make Go vendor this directory properly. +package template diff --git a/hack/api-reference/template/type.tpl b/hack/api-reference/template/type.tpl new file mode 100644 index 0000000..976e224 --- /dev/null +++ b/hack/api-reference/template/type.tpl @@ -0,0 +1,81 @@ +{{ define "type" }} + +

+ {{- .Name.Name }} + {{ if eq .Kind "Alias" }}({{.Underlying}} alias){{ end -}} +

+{{ with (typeReferences .) }} +

+ (Appears on: + {{- $prev := "" -}} + {{- range . -}} + {{- if $prev -}}, {{ end -}} + {{- $prev = . -}} + {{ typeDisplayName . }} + {{- end -}} + ) +

+{{ end }} + +
+ {{ safe (renderComments .CommentLines) }} +
+ +{{ with (constantsOfType .) }} + + + + + + + + + {{- range . -}} + + {{- /* + renderComments implicitly creates a

element, so we + add one to the display name as well to make the contents + of the two cells align evenly. + */ -}} +

+ + + {{- end -}} + +
ValueDescription

{{ typeDisplayName . }}

{{ safe (renderComments .CommentLines) }}
+{{ end }} + +{{ if .Members }} + + + + + + + + + {{ if isExportedType . }} + + + + + + + + + {{ end }} + {{ template "members" .}} + +
FieldDescription
+ apiVersion
+ string
+ + {{apiGroup .}} + +
+ kind
+ string +
{{.Name.Name}}
+{{ end }} + +{{ end }} diff --git a/hack/generate.sh b/hack/generate.sh new file mode 100644 index 0000000..39c2330 --- /dev/null +++ b/hack/generate.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +set -o errexit +set -o nounset +set -o pipefail + +if ! which go >/dev/null; then + echo "Error: go not found in path" + exit 1 +fi + +if ! which jq >/dev/null; then + echo "Error: jq not found in path" + exit 1 +fi + +cd $(dirname "${BASH_SOURCE[0]}")/.. + +if [ ! -f go.mod ]; then + echo "Error: this is not a go module, is it?" + exit 1 +fi + +SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. +if [ -z "${CODEGEN_PKG:-}" ]; then + if [ -d ./vendor/k8s.io/code-generator ]; then + CODEGEN_PKG=./vendor/k8s.io/code-generator + else + CODEGEN_PKG=$(go mod download -json k8s.io/code-generator | jq -r '.Dir //empty') + fi +fi + +if [ -z "${GEN_PKG_PATH:-}" ]; then + GEN_PKG_PATH=$(go list -m)/pkg +fi + +echo "PWD: ${PWD}" +echo "SCRIPT_ROOT: ${SCRIPT_ROOT}" +echo "CODEGEN_PKG: ${CODEGEN_PKG}" +echo "GEN_PKG_PATH: ${GEN_PKG_PATH}" + +source "${CODEGEN_PKG}/kube_codegen.sh" + +kube::codegen::gen_helpers \ + --input-pkg-root "${GEN_PKG_PATH}"/apis \ + --output-base "${PWD}"/../../.. \ + --boilerplate ./hack/LICENSE_BOILERPLATE.txt + +kube::codegen::gen_client \ + --with-watch \ + --with-applyconfig \ + --input-pkg-root "${GEN_PKG_PATH}"/apis \ + --output-pkg-root "${GEN_PKG_PATH}"/client \ + --output-base "${PWD}"/../../.. \ + --boilerplate ./hack/LICENSE_BOILERPLATE.txt \ No newline at end of file diff --git a/hack/helm-reference/generate.sh b/hack/helm-reference/generate.sh new file mode 100644 index 0000000..639b55b --- /dev/null +++ b/hack/helm-reference/generate.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -eo pipefail + +# Change dir to the root dir of this repo (should point to cap-operator) +cd $(dirname "${BASH_SOURCE[0]}")/../.. + +echo "PWD: ${PWD}" + +TEMPDIR=$(mktemp -d) +trap 'rm -rf "$TEMPDIR"' EXIT + +cp -r "$PWD"/../cap-operator-lifecycle/chart "$TEMPDIR" + +helm-docs -c "$TEMPDIR"/chart -s file +cp "$TEMPDIR"/chart/README.md "$PWD"/../cap-operator-lifecycle/chart + +cat > "$TEMPDIR"/chart/README.md.gotmpl < we simply skip reconciliation w/o errors + t.Error("no expected resources provided (no error from reconciliation)") + } + }) + + return err +} + +func verifyItemsForRequeue(expected map[int][]NamespacedResourceKey, result *ReconcileResult) error { + if result == nil && expected == nil { + return nil + } + if (result == nil || result.requeueResources == nil) && expected != nil { + return errors.New("expected items for requeue, found none") + } + if result != nil && expected == nil { + return errors.New("did not expect items for requeue") + } + for rid, ev := range expected { + if len(ev) == 0 { + continue + } + av, ok := result.requeueResources[rid] + if !ok { + return fmt.Errorf("expected items for requeue of type %s", KindMap[rid]) + } + avm := convertRequeueItemSliceToMap(av) + for _, i := range ev { + k := fmt.Sprintf("%s.%s", i.Namespace, i.Name) + if _, ok := avm[k]; !ok { + return fmt.Errorf("expected item %s of type %s for requeue", k, KindMap[rid]) + } + delete(avm, k) + } + if len(avm) > 0 { + return fmt.Errorf("did not expect the following items of type %s to be requeued: %s", KindMap[rid], getComaSeparatedKeys(avm, nil)) + } + delete(result.requeueResources, rid) + } + if len(result.requeueResources) > 0 { + return fmt.Errorf("did not expect the following item types to be requeued: %s", getComaSeparatedKeys(result.requeueResources, func(i int) string { return KindMap[i] })) + } + return nil +} + +func getComaSeparatedKeys[K constraints.Ordered, T any](m map[K]T, stringer func(key K) string) string { + s := []string{} + for k := range m { + var n string + if stringer == nil { + n = fmt.Sprintf("%v", k) + } else { + n = stringer(k) + } + s = append(s, n) + } + return strings.Join(s, ", ") +} + +func convertRequeueItemSliceToMap(s []RequeueItem) map[string]struct{} { + m := map[string]struct{}{} + for _, i := range s { + m[fmt.Sprintf("%s.%s", i.resourceKey.Namespace, i.resourceKey.Name)] = struct{}{} + } + return m +} + +func processTestData(t *testing.T, c *Controller, data TestData, dataType TestDataType) { + files := make([]string, 0) + if dataType == TestDataTypeInitial { + files = append(files, data.initialResources...) + } else { + files = append(files, data.expectedResources) + } + + var wg sync.WaitGroup + + var processFile = func(file string) { + defer wg.Done() + i, err := os.ReadFile(file) + if err != nil { + t.Error(err.Error()) + } + + fileContents := string(i) + splits := strings.Split(fileContents, "---") + for _, part := range splits { + if part == "\n" || part == "" { + continue + } + + if dataType == TestDataTypeInitial { + err = addInitialObjectToStore(t, []byte(part), c) + } else { + err = compareExpectedWithStore(t, []byte(part), c) + } + if err != nil { + t.Error(err.Error()) + } + } + } + + for _, f := range files { + wg.Add(1) + go processFile(f) + } + wg.Wait() +} + +func addInitialObjectToStore(t *testing.T, resource []byte, c *Controller) error { + decoder := scheme.Codecs.UniversalDeserializer().Decode + obj, _, err := decoder(resource, nil, nil) + if err != nil { + return err + } + + switch obj.(type) { + case *corev1.Secret, *corev1.Pod, *corev1.Namespace, *corev1.Service: + fakeClient, ok := c.kubeClient.(*k8sfake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + switch obj.(type) { + case *corev1.Secret: + err = c.kubeInformerFactory.Core().V1().Secrets().Informer().GetIndexer().Add(obj) + case *corev1.Pod: + err = c.kubeInformerFactory.Core().V1().Pods().Informer().GetIndexer().Add(obj) + case *corev1.Namespace: + err = c.kubeInformerFactory.Core().V1().Namespaces().Informer().GetIndexer().Add(obj) + case *corev1.Service: + err = c.kubeInformerFactory.Core().V1().Services().Informer().GetIndexer().Add(obj) + } + case *batchv1.Job: + fakeClient, ok := c.kubeClient.(*k8sfake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + err = c.kubeInformerFactory.Batch().V1().Jobs().Informer().GetIndexer().Add(obj) + case *gardenercertv1alpha1.Certificate: + fakeClient, ok := c.gardenerCertificateClient.(*gardenercertfake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + err = c.gardenerCertInformerFactory.Cert().V1alpha1().Certificates().Informer().GetIndexer().Add(obj) + case *certManagerv1.Certificate: + fakeClient, ok := c.certManagerCertificateClient.(*certManagerFake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + err = c.certManagerInformerFactory.Certmanager().V1().Certificates().Informer().GetIndexer().Add(obj) + case *gardenerdnsv1alpha1.DNSEntry: + fakeClient, ok := c.gardenerDNSClient.(*gardenerdnsfake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + err = c.gardenerDNSInformerFactory.Dns().V1alpha1().DNSEntries().Informer().GetIndexer().Add(obj) + case *istionwv1beta1.Gateway, *istionwv1beta1.VirtualService, *istionwv1beta1.DestinationRule: + fakeClient, ok := c.istioClient.(*istiofake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + metaObj, ok := getMetaObject(obj) + if !ok { + return fmt.Errorf("could not type cast event object to meta object") + } + switch obj.(type) { + case *istionwv1beta1.VirtualService: + fakeClient.Tracker().Create(schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1beta1", Resource: "virtualservices"}, obj, metaObj.GetNamespace()) + err = c.istioInformerFactory.Networking().V1beta1().VirtualServices().Informer().GetIndexer().Add(obj) + case *istionwv1beta1.Gateway: + fakeClient.Tracker().Create(schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1beta1", Resource: "gateways"}, obj, metaObj.GetNamespace()) + err = c.istioInformerFactory.Networking().V1beta1().Gateways().Informer().GetIndexer().Add(obj) + case *istionwv1beta1.DestinationRule: + fakeClient.Tracker().Create(schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1beta1", Resource: "destinationrules"}, obj, metaObj.GetNamespace()) + err = c.istioInformerFactory.Networking().V1beta1().DestinationRules().Informer().GetIndexer().Add(obj) + } + case *v1alpha1.CAPApplication, *v1alpha1.CAPApplicationVersion, *v1alpha1.CAPTenant, *v1alpha1.CAPTenantOperation: + fakeClient, ok := c.crdClient.(*copfake.Clientset) + if !ok { + return fmt.Errorf("controller is not using a fake clientset") + } + fakeClient.Tracker().Add(obj) + switch obj.(type) { + case *v1alpha1.CAPApplication: + err = c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Informer().GetIndexer().Add(obj) + case *v1alpha1.CAPApplicationVersion: + err = c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Informer().GetIndexer().Add(obj) + case *v1alpha1.CAPTenant: + err = c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Informer().GetIndexer().Add(obj) + case *v1alpha1.CAPTenantOperation: + err = c.crdInformerFactory.Sme().V1alpha1().CAPTenantOperations().Informer().GetIndexer().Add(obj) + } + default: + return fmt.Errorf("unknown object type") + } + + return err +} + +func compareExpectedWithStore(t *testing.T, resource []byte, c *Controller) error { + decoder := scheme.Codecs.UniversalDeserializer().Decode + expected, gvk, err := decoder(resource, nil, nil) + if err != nil { + return err + } + + mo, ok := expected.(metav1.Object) + if !ok { + return fmt.Errorf("expected object is not a meta object") + } + + var actual runtime.Object + switch expected.(type) { + case *corev1.Secret: + actual, err = c.kubeClient.(*k8sfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("secrets"), mo.GetNamespace(), mo.GetName()) + case *corev1.Service: + actual, err = c.kubeClient.(*k8sfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("services"), mo.GetNamespace(), mo.GetName()) + case *batchv1.Job: + actual, err = c.kubeClient.(*k8sfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("jobs"), mo.GetNamespace(), mo.GetName()) + case *appsv1.Deployment: + actual, err = c.kubeClient.(*k8sfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("deployments"), mo.GetNamespace(), mo.GetName()) + case *networkingv1.NetworkPolicy: + actual, err = c.kubeClient.(*k8sfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("networkpolicies"), mo.GetNamespace(), mo.GetName()) + case *gardenercertv1alpha1.Certificate: + actual, err = c.gardenerCertificateClient.(*gardenercertfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("certificates.cert.gardener.cloud"), mo.GetNamespace(), mo.GetName()) + case *certManagerv1.Certificate: + actual, err = c.certManagerCertificateClient.(*certManagerFake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("certificates.cert.gardener.cloud"), mo.GetNamespace(), mo.GetName()) + case *gardenerdnsv1alpha1.DNSEntry: + actual, err = c.gardenerDNSClient.(*gardenerdnsfake.Clientset).Tracker().Get(gvk.GroupVersion().WithResource("dnsentries"), mo.GetNamespace(), mo.GetName()) + case *istionwv1beta1.Gateway, *istionwv1beta1.VirtualService, *istionwv1beta1.DestinationRule: + fakeClient := c.istioClient.(*istiofake.Clientset) + switch expected.(type) { + case *istionwv1beta1.VirtualService: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("virtualservices"), mo.GetNamespace(), mo.GetName()) + case *istionwv1beta1.DestinationRule: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("destinationrules"), mo.GetNamespace(), mo.GetName()) + case *istionwv1beta1.Gateway: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("gateways"), mo.GetNamespace(), mo.GetName()) + } + case *v1alpha1.CAPApplication, *v1alpha1.CAPApplicationVersion, *v1alpha1.CAPTenant, *v1alpha1.CAPTenantOperation: + fakeClient := c.crdClient.(*copfake.Clientset) + switch expected.(type) { + case *v1alpha1.CAPApplication: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("capapplications"), mo.GetNamespace(), mo.GetName()) + case *v1alpha1.CAPApplicationVersion: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("capapplicationversions"), mo.GetNamespace(), mo.GetName()) + case *v1alpha1.CAPTenant: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("captenants"), mo.GetNamespace(), mo.GetName()) + case *v1alpha1.CAPTenantOperation: + actual, err = fakeClient.Tracker().Get(gvk.GroupVersion().WithResource("captenantoperations"), mo.GetNamespace(), mo.GetName()) + } + default: + return fmt.Errorf("unknown expected object type") + } + + if err == nil { + compareResourceFields(actual, expected, t, gvk.Kind, mo.GetNamespace(), mo.GetName()) + } else { + t.Error(err.Error()) + } + + return err +} + +func compareResourceFields(actual runtime.Object, expected runtime.Object, t *testing.T, kind string, namespace string, name string) { + if diff := cmp.Diff( + actual, expected, + cmp.FilterPath(func(p cmp.Path) bool { + // NOTE: do not compare the type metadata as this is not guaranteed to be filled from the fake client + return p.String() == "TypeMeta" + }, cmp.Ignore()), + cmp.FilterPath(func(p cmp.Path) bool { + // Ignore relevant Unexported fields introduced recently by istio in Spec + ps := p.String() + return ps == "Spec" || strings.HasPrefix(ps, "Spec.") + }, cmpopts.IgnoreUnexported( + networkingv1beta1.PortSelector{}, + networkingv1beta1.Destination{}, + networkingv1beta1.HTTPRouteDestination{}, + networkingv1beta1.StringMatch{}, + networkingv1beta1.HTTPMatchRequest{}, + networkingv1beta1.HTTPRoute{}, + networkingv1beta1.VirtualService{}, + networkingv1beta1.Server{}, + networkingv1beta1.Port{}, + networkingv1beta1.DestinationRule{}, + networkingv1beta1.TrafficPolicy{}, + networkingv1beta1.LoadBalancerSettings{}, + networkingv1beta1.LoadBalancerSettings_ConsistentHashLB{}, + networkingv1beta1.LoadBalancerSettings_ConsistentHashLB_HTTPCookie{}, + durationpb.Duration{}, + )), + cmp.FilterPath(func(p cmp.Path) bool { + // Ignore relevant Unexported fields introduced recently by istio in Status + ps := p.String() + return ps == "Status" || strings.HasPrefix(ps, "Status.") + }, cmpopts.IgnoreUnexported( + istiometav1alpha1.IstioStatus{}, + )), + ); diff != "" { + t.Errorf("expected and actual resource differs for %s %s.%s", kind, namespace, name) + t.Error(diff) + } +} diff --git a/internal/controller/controller.go b/internal/controller/controller.go new file mode 100644 index 0000000..73df7da --- /dev/null +++ b/internal/controller/controller.go @@ -0,0 +1,277 @@ +package controller + +import ( + "context" + "errors" + "fmt" + "reflect" + "sync" + "time" + + certManager "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned" + certManagerInformers "github.com/cert-manager/cert-manager/pkg/client/informers/externalversions" + gardenerCert "github.com/gardener/cert-management/pkg/client/cert/clientset/versioned" + gardenerCertInformers "github.com/gardener/cert-management/pkg/client/cert/informers/externalversions" + gardenerDNS "github.com/gardener/external-dns-management/pkg/client/dns/clientset/versioned" + gardenerDNSInformers "github.com/gardener/external-dns-management/pkg/client/dns/informers/externalversions" + "github.com/sap/cap-operator/pkg/client/clientset/versioned" + v1alpha1scheme "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + crdInformers "github.com/sap/cap-operator/pkg/client/informers/externalversions" + istio "istio.io/client-go/pkg/clientset/versioned" + istioscheme "istio.io/client-go/pkg/clientset/versioned/scheme" + istioInformers "istio.io/client-go/pkg/informers/externalversions" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/informers" + "k8s.io/client-go/kubernetes" + kubescheme "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/tools/events" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" +) + +type Controller struct { + kubeClient kubernetes.Interface + crdClient versioned.Interface + istioClient istio.Interface + gardenerCertificateClient gardenerCert.Interface + certManagerCertificateClient certManager.Interface + gardenerDNSClient gardenerDNS.Interface + kubeInformerFactory informers.SharedInformerFactory + crdInformerFactory crdInformers.SharedInformerFactory + istioInformerFactory istioInformers.SharedInformerFactory + gardenerCertInformerFactory gardenerCertInformers.SharedInformerFactory + certManagerInformerFactory certManagerInformers.SharedInformerFactory + gardenerDNSInformerFactory gardenerDNSInformers.SharedInformerFactory + queues map[int]workqueue.RateLimitingInterface + eventBroadcaster events.EventBroadcaster + eventRecorder events.EventRecorder +} + +func NewController(client kubernetes.Interface, crdClient versioned.Interface, istioClient istio.Interface, gardenerCertificateClient gardenerCert.Interface, certManagerCertificateClient certManager.Interface, gardenerDNSClient gardenerDNS.Interface) *Controller { + queues := map[int]workqueue.RateLimitingInterface{ + ResourceCAPApplication: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + ResourceCAPApplicationVersion: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + ResourceCAPTenant: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + ResourceCAPTenantOperation: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + ResourceOperatorDomains: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()), + } + + // Use 30mins as the default Resync interval for kube / proprietary resources + kubeInformerFactory := informers.NewSharedInformerFactory(client, 30*time.Minute) + istioInformerFactory := istioInformers.NewSharedInformerFactory(istioClient, 30*time.Minute) + + var gardenerCertInformerFactory gardenerCertInformers.SharedInformerFactory + var gardenerDNSInformerFactory gardenerDNSInformers.SharedInformerFactory + var certManagerInformerFactory certManagerInformers.SharedInformerFactory + switch certificateManager() { + case certManagerGardener: + gardenerCertInformerFactory = gardenerCertInformers.NewSharedInformerFactory(gardenerCertificateClient, 30*time.Minute) + case certManagerCertManagerIO: + certManagerInformerFactory = certManagerInformers.NewSharedInformerFactory(certManagerCertificateClient, 30*time.Minute) + } + switch dnsManager() { + case dnsManagerGardener: + gardenerDNSInformerFactory = gardenerDNSInformers.NewSharedInformerFactory(gardenerDNSClient, 30*time.Minute) + case dnsManagerKubernetes: + // no activity needed on our side so far + } + + // Use 60 as the default Resync interval for our custom resources (CAP CROs) + crdInformerFactory := crdInformers.NewSharedInformerFactory(crdClient, 60*time.Second) + + // initialize event recorder + scheme := runtime.NewScheme() + kubescheme.AddToScheme(scheme) + v1alpha1scheme.AddToScheme(scheme) + istioscheme.AddToScheme(scheme) + eventBroadcaster := events.NewBroadcaster(&events.EventSinkImpl{Interface: client.EventsV1()}) + eventBroadcaster.StartStructuredLogging(klog.Level(1)) + recorder := eventBroadcaster.NewRecorder(scheme, "cap-controller.sme.sap.com") + + c := &Controller{ + kubeClient: client, + crdClient: crdClient, + istioClient: istioClient, + gardenerCertificateClient: gardenerCertificateClient, + certManagerCertificateClient: certManagerCertificateClient, + gardenerDNSClient: gardenerDNSClient, + kubeInformerFactory: kubeInformerFactory, + crdInformerFactory: crdInformerFactory, + istioInformerFactory: istioInformerFactory, + gardenerCertInformerFactory: gardenerCertInformerFactory, + certManagerInformerFactory: certManagerInformerFactory, + gardenerDNSInformerFactory: gardenerDNSInformerFactory, + queues: queues, + eventBroadcaster: eventBroadcaster, + eventRecorder: recorder, + } + return c +} + +func throwInformerStartError(resources map[reflect.Type]bool) { + for resource, ok := range resources { + if !ok { + klog.Error("could not start informer for resource ", resource.String()) + } + } +} + +func (c *Controller) Start(ctx context.Context) { + // ensure queue shutdown + go func() { + <-ctx.Done() + for _, q := range c.queues { + q.ShutDown() + } + }() + + c.initializeInformers() + + // start event recorder + c.eventBroadcaster.StartRecordingToSink(ctx.Done()) + + // start informers and wait for cache sync + c.kubeInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.kubeInformerFactory.WaitForCacheSync(ctx.Done())) + + c.crdInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.crdInformerFactory.WaitForCacheSync(ctx.Done())) + + c.istioInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.istioInformerFactory.WaitForCacheSync(ctx.Done())) + + switch certificateManager() { + case certManagerGardener: + c.gardenerCertInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.gardenerCertInformerFactory.WaitForCacheSync(ctx.Done())) + case certManagerCertManagerIO: + c.certManagerInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.certManagerInformerFactory.WaitForCacheSync(ctx.Done())) + } + + switch dnsManager() { + case dnsManagerGardener: + c.gardenerDNSInformerFactory.Start(ctx.Done()) + throwInformerStartError(c.gardenerDNSInformerFactory.WaitForCacheSync(ctx.Done())) + case dnsManagerKubernetes: + // no activity needed on our side so far + } + + // create context for worker queues + qCxt, qCancel := context.WithCancel(ctx) + defer qCancel() + + var wg sync.WaitGroup + for k := range c.queues { + wg.Add(1) + go func(key int) { + defer wg.Done() + err := c.processQueue(qCxt, key) + if err != nil { + klog.Error("worker queue ", key, " ended with error: ", err.Error()) + } + qCancel() // cancel context to inform other workers + }(k) + } + + // wait for workers + wg.Wait() +} + +func (c *Controller) processQueue(ctx context.Context, key int) error { + klog.Info("starting to process queue ", getResourceKindFromKey(key)) + for { + select { + case <-ctx.Done(): + klog.Info("context done; ending processing of queue ", getResourceKindFromKey(key)) + return nil + default: // fall through - to avoid blocking + err := c.processQueueItem(ctx, key) + if err != nil { + return err + } + } + } +} + +func (c *Controller) processQueueItem(ctx context.Context, key int) error { + q, ok := c.queues[key] + if !ok { + return fmt.Errorf("unknown queue; ending worker %d", key) + } + + klog.V(2).Info("current work queue (", getResourceKindFromKey(key), ") length: ", q.Len()) + + i, shutdown := q.Get() + if shutdown { + return fmt.Errorf("queue (%d) shutdown", key) // stop processing when the queue has been shutdown + } + + // [IMPORTANT] always mark the item as done (after processing it) + defer q.Done(i) + + var ( + err error + skipItem bool + result *ReconcileResult + ) + item, ok := i.(QueueItem) + if !ok { + klog.Error("unknown item found in queue ", getResourceKindFromKey(key)) + return nil // process next item + } + + attempts := q.NumRequeues(item) + klog.Info("processing ", item.ResourceKey.Namespace, ".", item.ResourceKey.Name, " of type ", getResourceKindFromKey(key), " (attempt ", attempts, ")") + + switch item.Key { + case ResourceCAPApplication: + result, err = c.reconcileCAPApplication(ctx, item, attempts) + case ResourceCAPApplicationVersion: + result, err = c.reconcileCAPApplicationVersion(ctx, item, attempts) + case ResourceCAPTenant: + result, err = c.reconcileCAPTenant(ctx, item, attempts) + case ResourceCAPTenantOperation: + result, err = c.reconcileCAPTenantOperation(ctx, item, attempts) + case ResourceOperatorDomains: + err = c.reconcileOperatorDomains(ctx, item, attempts) + default: + err = errors.New("unidentified queue item") + skipItem = true + } + // Handle reconcile errors + if err != nil { + klog.Error("queue processing error (", getResourceKindFromKey(key), "): ", err.Error()) + if !skipItem { + // add back to queue for re-processing + q.AddRateLimited(i) + return nil + } + } + + // Forget the item after processing it + // This just clears the rate limiter from tracking the item + q.Forget(i) + + if result != nil { + // requeue resources specified in the reconciliation result + c.processReconcileResult(result) + } + + return nil +} + +func (c *Controller) processReconcileResult(result *ReconcileResult) { + for i, items := range result.requeueResources { + q, ok := c.queues[i] + if !ok { + klog.Errorf("could not identify a resource queue with key %v", i) + return + } + for _, item := range items { + klog.Infof("(re)queueing %s.%s as %s after %s", item.resourceKey.Namespace, item.resourceKey.Name, KindMap[i], item.requeueAfter.String()) + // add back item to queue w/o rate limits for re-processing after specified duration + q.AddAfter(QueueItem{Key: i, ResourceKey: item.resourceKey}, item.requeueAfter) + } + } +} diff --git a/internal/controller/controller_test.go b/internal/controller/controller_test.go new file mode 100644 index 0000000..4105101 --- /dev/null +++ b/internal/controller/controller_test.go @@ -0,0 +1,288 @@ +package controller + +import ( + "context" + "reflect" + "strings" + "testing" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/informers" + "k8s.io/client-go/informers/batch" + "k8s.io/client-go/informers/internalinterfaces" + "k8s.io/client-go/tools/cache" + "k8s.io/client-go/tools/events" + "k8s.io/client-go/util/workqueue" + "k8s.io/klog/v2" +) + +type dummyInformerFactoryType struct { + informers.SharedInformerFactory + namespace string + tweakListOptions func(*metav1.ListOptions) +} + +func (f *dummyInformerFactoryType) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + //Simulate error + return map[reflect.Type]bool{reflect.TypeOf(metav1.TypeMeta{}): false} +} + +func (f *dummyInformerFactoryType) Batch() batch.Interface { + return f.SharedInformerFactory.Batch() +} + +func (f *dummyInformerFactoryType) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + return f.SharedInformerFactory.InformerFor(obj, newFunc) +} + +func TestController_processQueue(t *testing.T) { + tests := []struct { + name string + resource int + resourceName string + resourceNamespace string + earlyShutDown bool + expectError bool + errorString string + }{ + { + name: "Test Controller Start - process queue CAPApplication", + resource: ResourceCAPApplication, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: true, + errorString: "shutdown", + }, + { + name: "Test Controller Start - process queue Unknown resource", + resource: 9999, + expectError: true, + errorString: "unknown queue;", + }, + { + name: "Test Controller Start - process queue CAPApplication - queue shutdown", + resource: ResourceCAPApplication, + resourceName: "test-ca", + resourceNamespace: metav1.NamespaceDefault, + earlyShutDown: true, + expectError: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := getTestController(testResources{preventStart: true}) + + dummyKubeInformerFactory := &dummyInformerFactoryType{c.kubeInformerFactory, tt.resourceNamespace, nil} + + testC := &Controller{ + kubeClient: c.kubeClient, + crdClient: c.crdClient, + istioClient: c.istioClient, + gardenerCertificateClient: c.gardenerCertificateClient, + gardenerDNSClient: c.gardenerDNSClient, + kubeInformerFactory: dummyKubeInformerFactory, + crdInformerFactory: c.crdInformerFactory, + istioInformerFactory: c.istioInformerFactory, + gardenerCertInformerFactory: c.gardenerCertInformerFactory, + gardenerDNSInformerFactory: c.gardenerDNSInformerFactory, + queues: c.queues, + eventBroadcaster: c.eventBroadcaster, + eventRecorder: events.NewFakeRecorder(10), + } + + // Create a background context that gets cancelled once the test run completes + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + testC.Start(ctx) + + // Manual API checks + var expectedRes error + if tt.earlyShutDown { + expectedRes = testC.processQueue(ctx, tt.resource) + } else { + expectedRes = testC.processQueue(context.TODO(), tt.resource) + } + + if !tt.expectError && expectedRes != nil { + t.Error("Unexpected result", expectedRes) + } else if tt.expectError && expectedRes == nil { + t.Error("Unexpected result", "error is nil") + } else if tt.expectError && expectedRes != nil { + res := strings.Count(expectedRes.Error(), tt.errorString) + if res < 1 { + t.Error("Unexpected result", expectedRes, "; expected to contain", tt.errorString) + } + } + }) + } +} + +func TestController_processQueueItem(t *testing.T) { + tests := []struct { + name string + createCA bool + createCAPTenant bool + resource int + resourceName string + resourceNamespace string + earlyShutDown bool + expectError bool + errorString string + expectRequeue bool + }{ + { + name: "Test Controller Start - process queue item CAPApplication", + resource: ResourceCAPApplication, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item CAPApplication (Requeue)", + createCA: true, + resource: ResourceCAPApplication, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item CAPApplicationVersion", + resource: ResourceCAPApplicationVersion, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item CAPTenant", + resource: ResourceCAPTenant, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item CAPTenantOperation", + resource: ResourceCAPTenantOperation, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item unidentified queue item", + resource: 9, + resourceName: "test-res", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + }, + { + name: "Test Controller Start - process queue item Unknown item", + resource: 99, + expectError: false, + }, + { + name: "Test Controller Start - process queue item Unknown resource", + resource: 999, + expectError: true, + errorString: "unknown queue;", + }, + { + name: "Test Controller Start - process queue item CAPApplication - queue shutdown", + resource: ResourceCAPApplication, + resourceName: "test-ca", + resourceNamespace: metav1.NamespaceDefault, + earlyShutDown: true, + expectError: true, + errorString: "shutdown", + }, + { + name: "Test Controller Start - process queue item CAPTenant - reconciliation error and requeue", + createCAPTenant: true, + resource: ResourceCAPTenant, + resourceName: "ca-does-not-exist-provider", + resourceNamespace: metav1.NamespaceDefault, + expectError: false, + expectRequeue: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var ( + ca *v1alpha1.CAPApplication + cat *v1alpha1.CAPTenant + ) + if tt.createCA { + ca = createCaCRO(tt.resourceName, true) + } + if tt.createCAPTenant { + cat = createCatCRO("ca-does-not-exist", "provider", true) + } + + c := getTestController(testResources{cas: []*v1alpha1.CAPApplication{ca}, cats: []*v1alpha1.CAPTenant{cat}, preventStart: true}) + if tt.resource == 9 || tt.resource == 99 { + c.queues[tt.resource] = workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + } + + dummyKubeInformerFactory := &dummyInformerFactoryType{c.kubeInformerFactory, tt.resourceNamespace, nil} + + testC := &Controller{ + kubeClient: c.kubeClient, + crdClient: c.crdClient, + istioClient: c.istioClient, + gardenerCertificateClient: c.gardenerCertificateClient, + gardenerDNSClient: c.gardenerDNSClient, + kubeInformerFactory: dummyKubeInformerFactory, + crdInformerFactory: c.crdInformerFactory, + istioInformerFactory: c.istioInformerFactory, + gardenerCertInformerFactory: c.gardenerCertInformerFactory, + gardenerDNSInformerFactory: c.gardenerDNSInformerFactory, + queues: c.queues, + } + + // Create a background context that gets cancelled once the test run completes + ctx, cancel := context.WithCancel(context.Background()) + + item := QueueItem{Key: tt.resource, ResourceKey: NamespacedResourceKey{Namespace: tt.resourceNamespace, Name: tt.resourceName}} + + q := c.queues[tt.resource] + + // Manual API checks + var expectedRes error + if tt.earlyShutDown { + q.ShutDown() + cancel() + expectedRes = testC.processQueueItem(ctx, tt.resource) + } else { + if tt.resource < 4 || tt.resource == 9 { + q.Add(item) + } else if tt.resource == 99 { + q.Add(tt.resource) + } + expectedRes = testC.processQueueItem(context.TODO(), tt.resource) + } + + if !tt.expectError && expectedRes != nil { + t.Error("Unexpected result", expectedRes) + } else if tt.expectError && expectedRes == nil { + t.Error("Unexpected result", "error is nil") + } else if tt.expectError && expectedRes != nil { + res := strings.Count(expectedRes.Error(), tt.errorString) + if res < 1 { + t.Error("Unexpected result", expectedRes, "; expected to contain", tt.errorString) + } else { + klog.Info("Error res", expectedRes, " expected result: ", tt.errorString) + } + } else { + if tt.expectRequeue { + if q.NumRequeues(item) < 1 { + t.Errorf("expected item to be requeued after reconciliation error") + } + } + } + cancel() + }) + } +} diff --git a/internal/controller/informers.go b/internal/controller/informers.go new file mode 100644 index 0000000..ffe8593 --- /dev/null +++ b/internal/controller/informers.go @@ -0,0 +1,240 @@ +package controller + +import ( + "reflect" + "time" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/tools/cache" + "k8s.io/klog/v2" +) + +const ( + ResourceCAPTenant = iota + ResourceCAPApplicationVersion + ResourceCAPApplication + ResourceCAPTenantOperation + ResourceJob + ResourceSecret + ResourceGateway + ResourceCertificate + ResourceDNSEntry + ResourceOperatorDomains + ResourceVirtualService + ResourceDestinationRule +) + +const ( + OperatorDomains = "OperatorDomains" +) + +const queuing = "queuing " + +var ( + KindMap = map[int]string{ + ResourceCAPTenant: v1alpha1.CAPTenantKind, + ResourceCAPApplicationVersion: v1alpha1.CAPApplicationVersionKind, + ResourceCAPApplication: v1alpha1.CAPApplicationKind, + ResourceCAPTenantOperation: v1alpha1.CAPTenantOperationKind, + ResourceOperatorDomains: OperatorDomains, + } +) + +type NamespacedResourceKey struct { + Namespace string + Name string +} + +var QueueMapping map[int]map[int]string = map[int]map[int]string{ + ResourceCAPTenantOperation: {ResourceCAPTenantOperation: v1alpha1.CAPTenantOperationKind, ResourceCAPTenant: v1alpha1.CAPTenantKind}, + ResourceJob: {ResourceCAPTenantOperation: v1alpha1.CAPTenantOperationKind, ResourceCAPApplicationVersion: v1alpha1.CAPApplicationVersionKind}, + ResourceSecret: {ResourceCAPApplication: v1alpha1.CAPApplicationKind, ResourceCAPApplicationVersion: v1alpha1.CAPApplicationVersionKind}, + ResourceGateway: {ResourceCAPApplication: v1alpha1.CAPApplicationKind}, + ResourceCertificate: {ResourceCAPApplication: v1alpha1.CAPApplicationKind}, + ResourceDNSEntry: {ResourceCAPApplication: v1alpha1.CAPApplicationKind, ResourceCAPTenant: v1alpha1.CAPTenantKind}, + ResourceCAPTenant: {ResourceCAPTenant: v1alpha1.CAPTenantKind, ResourceCAPApplication: v1alpha1.CAPApplicationKind}, + ResourceVirtualService: {ResourceCAPTenant: v1alpha1.CAPTenantKind}, + ResourceDestinationRule: {ResourceCAPTenant: v1alpha1.CAPTenantKind}, + ResourceCAPApplicationVersion: {ResourceCAPApplicationVersion: v1alpha1.CAPApplicationVersionKind, ResourceCAPApplication: v1alpha1.CAPApplicationKind}, + ResourceCAPApplication: {ResourceCAPApplication: v1alpha1.CAPApplicationKind}, + ResourceOperatorDomains: {ResourceOperatorDomains: OperatorDomains}, +} + +type QueueItem struct { + Key int + ResourceKey NamespacedResourceKey +} + +func (c *Controller) initializeInformers() { + c.registerCAPTenantListeners() + c.registerCAPApplicationListeners() + c.registerCAPApplicationVersionListeners() + c.registerCAPTenantOperationListeners() + c.registerJobListeners() + c.registerSecretListeners() + c.registerGatewayListeners() + c.registerVirtualServiceListeners() + c.registerDestinationRuleListeners() + switch certificateManager() { + case certManagerGardener: + c.registerGardenerCertificateListeners() + case certManagerCertManagerIO: + c.registerCertManagerCertificateListeners() + } + switch dnsManager() { + case dnsManagerGardener: + c.registerGardenerDNSEntrytListeners() + case dnsManagerKubernetes: + // no activity needed on our side so far + } + klog.Info("informers initialized") +} + +func (c *Controller) getEventHandlerFuncsForResource(res int) cache.ResourceEventHandlerFuncs { + return cache.ResourceEventHandlerFuncs{ + AddFunc: func(new interface{}) { + c.enqueueModifiedResource(res, new, nil) + }, + UpdateFunc: func(old, new interface{}) { + c.enqueueModifiedResource(res, new, old) + }, + DeleteFunc: func(old interface{}) { + c.enqueueModifiedResource(res, old, nil) + }, + } +} + +func (c *Controller) registerCAPApplicationListeners() { + c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCAPApplication)) +} + +func (c *Controller) registerCAPApplicationVersionListeners() { + c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCAPApplicationVersion)) +} + +func (c *Controller) registerCAPTenantListeners() { + c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCAPTenant)) +} + +func (c *Controller) registerCAPTenantOperationListeners() { + c.crdInformerFactory.Sme().V1alpha1().CAPTenantOperations().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCAPTenantOperation)) +} + +func (c *Controller) registerJobListeners() { + c.kubeInformerFactory.Batch().V1().Jobs().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceJob)) +} + +func (c *Controller) registerVirtualServiceListeners() { + c.istioInformerFactory.Networking().V1beta1().VirtualServices().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceVirtualService)) +} + +func (c *Controller) registerDestinationRuleListeners() { + c.istioInformerFactory.Networking().V1beta1().DestinationRules().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceDestinationRule)) +} + +func (c *Controller) registerSecretListeners() { + c.kubeInformerFactory.Core().V1().Secrets().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceSecret)) +} + +func (c *Controller) registerGatewayListeners() { + c.istioInformerFactory.Networking().V1beta1().Gateways().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceGateway)) +} + +func (c *Controller) registerGardenerCertificateListeners() { + c.gardenerCertInformerFactory.Cert().V1alpha1().Certificates().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCertificate)) +} + +func (c *Controller) registerCertManagerCertificateListeners() { + c.certManagerInformerFactory.Certmanager().V1().Certificates().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceCertificate)) +} + +func (c *Controller) registerGardenerDNSEntrytListeners() { + c.gardenerDNSInformerFactory.Dns().V1alpha1().DNSEntries().Informer(). + AddEventHandler(c.getEventHandlerFuncsForResource(ResourceDNSEntry)) +} + +func (c *Controller) enqueueModifiedResource(sourceKey int, new, old interface{}) { + newObj, ok := getMetaObject(new) + if !ok { + return + } + + oldObj, ok := getMetaObject(old) + if ok && oldObj.GetResourceVersion() == newObj.GetResourceVersion() { + return // no changes in update + } + + mapping, ok := QueueMapping[sourceKey] + if !ok { + klog.Error("could not map modification event to a work queue for key: ", sourceKey) + return + } + + for dependentKey, dependentKind := range mapping { + q := c.queues[dependentKey] + + if dependentKey == sourceKey { + // when the change is directly on the CRO check for spec and annotation changes - omits status changes + if oldObj != nil && !hasReconciliationRelevantChanges(newObj, oldObj) { + continue // do not enqueue + } + klog.Info(queuing, newObj.GetNamespace(), ".", newObj.GetName(), " as ", dependentKind) + q.Add(QueueItem{Key: dependentKey, ResourceKey: NamespacedResourceKey{Name: newObj.GetName(), Namespace: newObj.GetNamespace()}}) + } else if owner, ok := getOwnerByKind(newObj.GetOwnerReferences(), dependentKind); ok { + klog.Info(queuing, newObj.GetNamespace(), ".", owner.Name, " as ", dependentKind) + q.Add(QueueItem{Key: dependentKey, ResourceKey: NamespacedResourceKey{Name: owner.Name, Namespace: newObj.GetNamespace()}}) + } else if owner, ok := getOwnerFromObjectMetadata(newObj, dependentKind); ok { + klog.Info(queuing, owner.Namespace, ".", owner.Name, " as ", dependentKind) + q.Add(QueueItem{Key: dependentKey, ResourceKey: NamespacedResourceKey{Name: owner.Name, Namespace: owner.Namespace}}) + } + } + + // Reconcile OperatorDomains just after all CAPApplication updates + if sourceKey == ResourceCAPApplication { + klog.Info(queuing, "all.domains", " as ", KindMap[ResourceOperatorDomains]) + // Reconcile Secondary domains via a dummy resource (separate reconciliation) after 1s + c.queues[ResourceOperatorDomains].AddAfter(QueueItem{Key: ResourceOperatorDomains, ResourceKey: NamespacedResourceKey{Namespace: metav1.NamespaceAll, Name: ""}}, 1*time.Second) + } +} + +func getMetaObject(obj interface{}) (metav1.Object, bool) { + if obj == nil { + return nil, false + } + + ok := true + metaObj, err := meta.Accessor(obj) + if err != nil { + klog.Error("could not type cast event object to meta object: ", err.Error()) + ok = false + } + return metaObj, ok +} + +func hasReconciliationRelevantChanges(newObj metav1.Object, oldObj metav1.Object) bool { + if oldObj.GetGeneration() != newObj.GetGeneration() { + // generation change denotes a change in the object spec + return true + } + + // annotation changes + if !reflect.DeepEqual(oldObj.GetAnnotations(), newObj.GetAnnotations()) { + return true + } + + // changes in owner reference + return !reflect.DeepEqual(oldObj.GetOwnerReferences(), newObj.GetOwnerReferences()) +} diff --git a/internal/controller/informers_test.go b/internal/controller/informers_test.go new file mode 100644 index 0000000..224a93a --- /dev/null +++ b/internal/controller/informers_test.go @@ -0,0 +1,145 @@ +package controller + +import ( + "testing" + "time" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/util/workqueue" +) + +var expectedResult = false + +type dummyType struct { + workqueue.RateLimitingInterface +} + +func (q *dummyType) Add(item interface{}) { + expectedResult = true +} + +func (q *dummyType) AddAfter(item interface{}, duration time.Duration) { + expectedResult = true +} + +func TestController_initializeInformers(t *testing.T) { + tests := []struct { + name string + expectedResult bool + invalidOwnerRef bool + res int + itemName string + itemNamespace string + }{ + { + name: "Test enqueueModifiedResource (ResourceCAPApplication)", + res: ResourceCAPApplication, + expectedResult: true, + itemName: "test-ca", + itemNamespace: corev1.NamespaceDefault, + }, + { + name: "Test enqueueModifiedResource (ResourceCAPApplicationVersion)", + res: ResourceCAPApplicationVersion, + expectedResult: true, + itemName: "test-cav", + itemNamespace: corev1.NamespaceDefault, + }, + { + name: "Test enqueueModifiedResource (ResourceCertificate) valid owner", + res: ResourceCertificate, + expectedResult: true, + itemName: "test-cert", + itemNamespace: corev1.NamespaceDefault, + }, + { + name: "Test enqueueModifiedResource (ResourceCertificate) invalid owner", + res: ResourceCertificate, + expectedResult: false, + invalidOwnerRef: true, + itemName: "test-cert", + itemNamespace: corev1.NamespaceDefault, + }, + { + name: "Test enqueueModifiedResource (unknown resource)", + res: 99, + expectedResult: false, + itemName: "test-unknown-resource", + itemNamespace: corev1.NamespaceDefault, + }, + { + name: "Test enqueueModifiedResource (invalid queue key)", + res: 999, + expectedResult: false, + itemName: "test-unknown-key", + itemNamespace: corev1.NamespaceDefault, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + c := getTestController(testResources{}) + expectedResult = false + + queues := map[int]workqueue.RateLimitingInterface{ + ResourceCAPApplication: &dummyType{}, + ResourceCAPApplicationVersion: &dummyType{}, + ResourceCAPTenant: &dummyType{}, + ResourceCAPTenantOperation: &dummyType{}, + ResourceOperatorDomains: &dummyType{}, + } + + testC := &Controller{ + kubeClient: c.kubeClient, + crdClient: c.crdClient, + istioClient: c.istioClient, + gardenerCertificateClient: c.gardenerCertificateClient, + gardenerDNSClient: c.gardenerDNSClient, + kubeInformerFactory: c.kubeInformerFactory, + crdInformerFactory: c.crdInformerFactory, + istioInformerFactory: c.istioInformerFactory, + gardenerCertInformerFactory: c.gardenerCertInformerFactory, + gardenerDNSInformerFactory: c.gardenerDNSInformerFactory, + queues: queues, + } + + testC.initializeInformers() + var res interface{} + switch tt.res { + case ResourceCAPApplication: + res = createCaCRO(tt.itemName, false) + case ResourceCAPApplicationVersion: + ca := createCaCRO(tt.itemName, false) + cav := createCavCRO(tt.itemName, v1alpha1.CAPApplicationVersionStateReady, defaultVersion) + cav.ObjectMeta.OwnerReferences = []metav1.OwnerReference{*metav1.NewControllerRef(ca, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationKind))} + res = cav + case ResourceCertificate: + // set label on a pod to simulate certificate in a different namespace + cert := &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: tt.itemName, Annotations: map[string]string{ + AnnotationOwnerIdentifier: KindMap[ResourceCAPApplication] + "." + tt.itemNamespace + "." + tt.itemName, + }, Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(KindMap[ResourceCAPApplication], tt.itemNamespace, tt.itemName), + }}} + // Invalid label + if tt.invalidOwnerRef { + cert.Annotations[AnnotationOwnerIdentifier] = tt.itemNamespace + "." + tt.itemName + cert.Labels[LabelOwnerIdentifierHash] = sha1Sum(tt.itemNamespace, tt.itemName) + } + res = cert + case 999: + res = &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: tt.itemName}} + } + // Add/delete + testC.enqueueModifiedResource(tt.res, res, nil) + if expectedResult != tt.expectedResult { + t.Error("Unexpected result", expectedResult) + } + // Update + testC.enqueueModifiedResource(tt.res, res, res) + if expectedResult != tt.expectedResult { + t.Error("Unexpected result", expectedResult) + } + }) + } +} diff --git a/internal/controller/reconcile-capapplication.go b/internal/controller/reconcile-capapplication.go new file mode 100644 index 0000000..9dd916d --- /dev/null +++ b/internal/controller/reconcile-capapplication.go @@ -0,0 +1,404 @@ +package controller + +import ( + "context" + "fmt" + "strings" + "time" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + corev1 "k8s.io/api/core/v1" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/klog/v2" +) + +const ( + CAPApplicationEventMissingSecrets = "MissingSecrets" + CAPApplicationEventPrimaryGatewayModified = "PrimaryGatewayModified" + CAPApplicationEventMissingIngressGatewayInfo = "MissingIngressGatewayInfo" + CAPApplicationEventProviderTenantCreated = "ProviderTenantCreated" + CAPApplicationEventNewCAVTriggeredTenantUpgrade = "NewCAVTriggeredTenantUpgrade" +) + +const ( + EventActionProcessingSecrets = "ProcessingSecrets" + EventActionProcessingDomainResources = "ProcessingDomainResources" + EventActionProviderTenantProcessing = "ProviderTenantProcessing" + EventActionCheckForVersion = "CheckForVersion" +) + +func (c *Controller) reconcileCAPApplication(ctx context.Context, item QueueItem, attempts int) (result *ReconcileResult, err error) { + lister := c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Lister() + cached, err := lister.CAPApplications(item.ResourceKey.Namespace).Get(item.ResourceKey.Name) + if err != nil { + return nil, handleOperatorResourceErrors(err) + } + ca := cached.DeepCopy() + + // prepare annotations, labels, finalizers + if c.prepareCAPApplication(ctx, ca) { + if err = c.updateCAPApplication(ctx, ca); err == nil { + result = NewReconcileResultWithResource(ResourceCAPApplication, ca.Name, ca.Namespace, 0) + } + return + } + + defer func() { + if statusErr := c.updateCAPApplicationStatus(ctx, ca); statusErr != nil && err == nil { + err = statusErr + } + }() + + // check for deletion + if ca.DeletionTimestamp != nil { + return c.handleCAPApplicationDeletion(ctx, ca) + } + + if genChanged := (ca.Status.State == "Consistent" && ca.Status.ObservedGeneration != ca.Generation); ca.Status.State == "" || genChanged { + reason := "ApplicationProcessing" + message := "" + if genChanged { + reason = "ResourceDefinitionChanged" + message = "re-processing after spec update" + } + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, reason, message) + result = NewReconcileResultWithResource(ResourceCAPApplication, ca.Name, ca.Namespace, 0) + } else { + result, err = c.handleCAPApplicationDependentResources(ctx, ca, attempts) + } + + return c.checkAdditonalConditions(ctx, ca, result, err) +} + +func (c *Controller) handleCAPApplicationDependentResources(ctx context.Context, ca *v1alpha1.CAPApplication, attempts int) (requeue *ReconcileResult, err error) { + var processing bool + defer func() { + if processing { + if requeue == nil { + requeue = NewReconcileResult() + } + // requeue after 30s to check for consistency + requeue.AddResource(ResourceCAPApplication, ca.Name, ca.Namespace, 30*time.Second) + } + }() + + // step 1 - validate BTPServices + if processing, err = c.validateSecrets(ctx, ca, attempts); err != nil || processing { + return + } + + // step 2 - check for valid versions + cav, err := c.getLatestReadyCAPApplicationVersion(ctx, ca, true) + if err != nil { + // do not update the CAPApplication status - this is not an error reported by the version, but error while fetching the version + return + } + if cav == nil { + processing = true + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, "WaitingForReadyCAPApplicationVersion", "") + // Update additional condition `LatestVersionReady` to False + ca.SetStatusCondition(string(v1alpha1.ConditionTypeLatestVersionReady), metav1.ConditionFalse, "WaitingForReadyCAPApplicationVersion", "") + return + } + // We can already update LatestVersionReady to "true" at this point in time, but as this method is called several times, we do not do it here (during initial Provisioning as CA itself is may not be Consistent) + + // step 3 - queue domain handling + if requeue, err = c.handleDomains(ctx, ca); requeue != nil || err != nil { + return + } + + // step 4 - validate provider tenant, create if not available + if processing, err = c.reconcileCAPApplicationProviderTenant(ctx, ca, cav); err != nil || processing { + return + } + + // step 5 - check state of dependant resources + if processing, err = c.checkPrimaryDomainResources(ctx, ca); err != nil || processing { + return + } + + // step 6 - check and set consistent status + return c.verifyApplicationConsistent(ctx, ca) +} + +func (c *Controller) verifyApplicationConsistent(ctx context.Context, ca *v1alpha1.CAPApplication) (requeue *ReconcileResult, err error) { + if ca.Status.State != v1alpha1.CAPApplicationStateConsistent { + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateConsistent, metav1.ConditionTrue, "VersionExists", "") + // Update additional condition `LatestVersionReady` to True + ca.SetStatusCondition(string(v1alpha1.ConditionTypeLatestVersionReady), metav1.ConditionTrue, "VersionExists", "") + // Update additional condition `AllTenantsReady` to True + ca.SetStatusCondition(string(v1alpha1.ConditionTypeAllTenantsReady), metav1.ConditionTrue, "ProviderTenantReady", "") + } + + // Check for newer CAPApplicationVersion + return nil, c.checkNewCAPApplicationVersion(ctx, ca) +} + +func (c *Controller) checkNewCAPApplicationVersion(ctx context.Context, ca *v1alpha1.CAPApplication) error { + cav, err := c.getLatestReadyCAPApplicationVersion(ctx, ca, false) + if err != nil { + return err + } + + // Get all relevant tenants + tenants, err := c.getRelevantTenantsForCA(ca) + if err != nil || len(tenants) == 0 { + return err + } + updated := false + for _, tenant := range tenants { + if tenant.Spec.VersionUpgradeStrategy == v1alpha1.VersionUpgradeStrategyTypeNever { + // Skip non relevant tenants + continue + } + // Assume we may have to update the tenant and prepare a copy + cat := tenant.DeepCopy() + + // Check version of tenant + if cat.Spec.Version != cav.Spec.Version { + // update CAPTenant Spec to point to the latest version + cat.Spec.Version = cav.Spec.Version + // Trigger update on CAPTenant (modifies Generation) --> which would reconcile the tenant + if _, err = c.crdClient.SmeV1alpha1().CAPTenants(ca.Namespace).Update(ctx, cat, metav1.UpdateOptions{}); err != nil { + return fmt.Errorf("could not update %s %s.%s: %w", v1alpha1.CAPTenantKind, cat.Namespace, cat.Name, err) + } + c.Event(tenant, ca, corev1.EventTypeNormal, CAPTenantEventAutoVersionUpdate, EventActionUpgrade, fmt.Sprintf("version updated to %s for initiating tenant upgrade", cav.Spec.Version)) + updated = true + } + } + if updated { + msg := fmt.Sprintf("new version %s.%s was used to trigger tenant upgrades", cav.Namespace, cav.Name) + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, CAPApplicationEventNewCAVTriggeredTenantUpgrade, msg) + ca.SetStatusCondition(string(v1alpha1.ConditionTypeLatestVersionReady), metav1.ConditionTrue, string(v1alpha1.ConditionTypeLatestVersionReady), "") + ca.SetStatusCondition(string(v1alpha1.ConditionTypeAllTenantsReady), metav1.ConditionFalse, "UpgradingTenants", "") + c.Event(ca, nil, corev1.EventTypeNormal, CAPApplicationEventNewCAVTriggeredTenantUpgrade, EventActionCheckForVersion, msg) + } + return nil +} + +func (c *Controller) checkAdditonalConditions(ctx context.Context, ca *v1alpha1.CAPApplication, result *ReconcileResult, err error) (*ReconcileResult, error) { + // In case of explicit Reconcile or errors return back with the original result + if result != nil || err != nil { + return result, err + } + + // Check and update additional status conditions + // Set ready Condition and Reason for Version check LatestVersionNotReady = True + readyCondition := metav1.ConditionTrue + readyReason := string(v1alpha1.ConditionTypeLatestVersionReady) + + // Get latest CAV (incl. ones that may not be ready) + cav, err := c.getLatestCAPApplicationVersion(ctx, ca) + if err != nil { + return nil, err + } + // When the latest CAV is not Ready --> LatestVersionNotReady = False + if cav.Status.State != v1alpha1.CAPApplicationVersionStateReady { + readyCondition = metav1.ConditionFalse + readyReason = "LatestVersionNotReady" + } + + // Update `LatestVersionReady` status condition + ca.SetStatusCondition(string(v1alpha1.ConditionTypeLatestVersionReady), readyCondition, readyReason, "") + + // Reset ready Condition and Reason for Tenant check AllTenantsReady --> True + readyCondition = metav1.ConditionTrue + readyReason = string(v1alpha1.ConditionTypeAllTenantsReady) + + // Get all relevant tenants + tenants, err := c.getRelevantTenantsForCA(ca) + if err != nil { + return nil, err + } + for _, tenant := range tenants { + // When a Tenant state is not Ready -or- when version of tenant (with VersionUpgradeStrategy = always) does not match the latest CAV version --> AllTenantsReady = False + if tenant.Status.State != v1alpha1.CAPTenantStateReady || (tenant.Spec.VersionUpgradeStrategy == v1alpha1.VersionUpgradeStrategyTypeAlways && cav.Spec.Version != tenant.Spec.Version) { + readyCondition = metav1.ConditionFalse + readyReason = "NotAllTenantsReady" + break + } + } + // Update `AllTenantsReady` status condition + ca.SetStatusCondition(string(v1alpha1.ConditionTypeAllTenantsReady), readyCondition, readyReason, "") + + return nil, nil +} + +func (c *Controller) updateCAPApplication(ctx context.Context, ca *v1alpha1.CAPApplication) error { + caUpdated, err := c.crdClient.SmeV1alpha1().CAPApplications(ca.Namespace).Update(ctx, ca, metav1.UpdateOptions{}) + // Update reference to the resource + if caUpdated != nil { + *ca = *caUpdated + } + return err +} + +func (c *Controller) updateCAPApplicationStatus(ctx context.Context, ca *v1alpha1.CAPApplication) error { + if isDeletionImminent(&ca.ObjectMeta) { + return nil + } + caUpdated, err := c.crdClient.SmeV1alpha1().CAPApplications(ca.Namespace).UpdateStatus(ctx, ca, metav1.UpdateOptions{}) + // update reference to the resource + if caUpdated != nil { + *ca = *caUpdated + } + return err +} + +// TODO: remove this entirely from CA soon +func (c *Controller) validateSecrets(ctx context.Context, ca *v1alpha1.CAPApplication, attempts int) (bool, error) { + err := c.checkSecretsExist(ca.Spec.BTP.Services, ca.Namespace) + + if err == nil { + return false, nil + } else if !k8sErrors.IsNotFound(err) { + // TODO -> clarify whether we need to set this in the status, as this is an error probably caused via api-server unavailability / connection issues + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateError, metav1.ConditionFalse, "ProcessingSecretsError", err.Error()) + return false, err + } + + // waiting for secrets + message := fmt.Sprintf("waiting for secrets to get ready for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Name, ca.Namespace) + klog.V(2).Info(message) + c.Event(ca, nil, corev1.EventTypeWarning, CAPApplicationEventMissingSecrets, EventActionProcessingSecrets, message) + ca.SetStatusWithReadyCondition(ca.Status.State, metav1.ConditionFalse, EventActionProcessingSecrets, message) + return true, nil +} + +func (c *Controller) getRelevantTenantsForCA(ca *v1alpha1.CAPApplication) ([]*v1alpha1.CAPTenant, error) { + tenantLabels := map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(ca.Spec.GlobalAccountId, ca.Spec.BTPAppName), + } + selector, err := labels.ValidatedSelectorFromSet(tenantLabels) + if err != nil { + return nil, err + } + + return c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Lister().List(selector) +} + +func (c *Controller) reconcileCAPApplicationProviderTenant(ctx context.Context, ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) (bool, error) { + providerTenantName := strings.Join([]string{ca.Name, ProviderTenantType}, "-") + tenant, err := c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Lister().CAPTenants(ca.Namespace).Get(providerTenantName) + if err != nil { + if !k8sErrors.IsNotFound(err) { + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateError, metav1.ConditionFalse, "ProviderTenantError", err.Error()) + return false, err + } + + // Create provider tenant + if tenant, err = c.crdClient.SmeV1alpha1().CAPTenants(ca.Namespace).Create( + ctx, &v1alpha1.CAPTenant{ + ObjectMeta: metav1.ObjectMeta{ + Name: providerTenantName, + Namespace: ca.Namespace, + Annotations: map[string]string{ + AnnotationBTPApplicationIdentifier: ca.Spec.GlobalAccountId + "." + ca.Spec.BTPAppName, + }, + Labels: map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(ca.Spec.GlobalAccountId, ca.Spec.BTPAppName), + LabelTenantType: ProviderTenantType, + LabelTenantId: ca.Spec.Provider.TenantId, + }, + }, + Spec: v1alpha1.CAPTenantSpec{ + CAPApplicationInstance: ca.Name, + BTPTenantIdentification: v1alpha1.BTPTenantIdentification{ + SubDomain: ca.Spec.Provider.SubDomain, + TenantId: ca.Spec.Provider.TenantId, + }, + Version: cav.Spec.Version, + }, + }, metav1.CreateOptions{}); err != nil { + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateError, metav1.ConditionFalse, "ProviderTenantError", err.Error()) + return false, err + } + c.Event(ca, tenant, corev1.EventTypeNormal, CAPApplicationEventProviderTenantCreated, EventActionProviderTenantProcessing, fmt.Sprintf("created provider tenant %s.%s", tenant.Namespace, tenant.Name)) + } + if !isCROConditionReady(tenant.Status.GenericStatus) { + // Upgrade errors also handled + if tenant.Status.State == v1alpha1.CAPTenantStateProvisioningError || tenant.Status.State == v1alpha1.CAPTenantStateUpgradeError { + err = fmt.Errorf("provider %s in state %s for %s %s.%s", v1alpha1.CAPTenantKind, tenant.Status.State, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateError, metav1.ConditionFalse, "ProviderTenantError", err.Error()) + return false, err + } + + msg := fmt.Sprintf("provider %v not ready for %v %v.%v; waiting for it to be ready", v1alpha1.CAPTenantKind, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + klog.Info(msg) + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, EventActionProviderTenantProcessing, msg) + return true, nil + } + + return false, nil +} + +func (c *Controller) handleCAPApplicationDeletion(ctx context.Context, ca *v1alpha1.CAPApplication) (*ReconcileResult, error) { + var err error + if ca.Status.State != v1alpha1.CAPApplicationStateDeleting { + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateDeleting, metav1.ConditionFalse, "DeleteTriggered", "") + return NewReconcileResultWithResource(ResourceCAPApplication, ca.Name, ca.Namespace, 0), nil + } + + // TODO: cleanup domain resources via reconciliation + if err = c.deletePrimaryDomainCertificate(ctx, ca); err != nil && !k8sErrors.IsNotFound(err) { + return nil, err + } + + // delete CAPTenants - return if found in this loop, to verify deletion + var tenantFound bool + if tenantFound, err = c.deleteTenants(ctx, ca); tenantFound || err != nil { + return nil, err + } + + // delete CAPApplication + if removeFinalizer(&ca.Finalizers, FinalizerCAPApplication) { + return nil, c.updateCAPApplication(ctx, ca) + } + + return nil, nil +} + +func (c *Controller) deleteTenants(ctx context.Context, ca *v1alpha1.CAPApplication) (bool, error) { + tenants, err := c.getRelevantTenantsForCA(ca) + if err != nil { + return false, err + } + + // delete tenants - if not triggered yet + for _, tenant := range tenants { + if tenant.DeletionTimestamp == nil { + if err = c.crdClient.SmeV1alpha1().CAPTenants(ca.Namespace).Delete(ctx, tenant.Name, metav1.DeleteOptions{}); err != nil { + return true, err + } + } + } + + return len(tenants) > 0, nil +} + +func (c *Controller) prepareCAPApplication(ctx context.Context, ca *v1alpha1.CAPApplication) (update bool) { + // Do nothing when object is deleted + if ca.DeletionTimestamp != nil { + return false + } + // add Finalizer to prevent direct deletion + if ca.Finalizers == nil { + ca.Finalizers = []string{} + } + if addFinalizer(&ca.Finalizers, FinalizerCAPApplication) { + update = true + } + + // add Label/Annotation for BTP App + appMetadata := appMetadataIdentifiers{ + globalAccountId: ca.Spec.GlobalAccountId, + appName: ca.Spec.BTPAppName, + } + if updateLabelAnnotationMetadata(&ca.ObjectMeta, &appMetadata) { + update = true + } + + return update +} diff --git a/internal/controller/reconcile-capapplication_test.go b/internal/controller/reconcile-capapplication_test.go new file mode 100644 index 0000000..61a42fc --- /dev/null +++ b/internal/controller/reconcile-capapplication_test.go @@ -0,0 +1,1124 @@ +package controller + +import ( + "context" + "os" + "testing" +) + +func TestCAPApplicationWithoutPreExistingLabelAndNilInitialState(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Initial test without pre-existing label and nil initial state", + initialResources: []string{ + "testdata/capapplication/ca-01.initial.yaml", + }, + expectedResources: "testdata/capapplication/ca-01.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestCAPApplicationWithLabelsAndFinalizersEmptyState(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "application labels and finalizers set, empty state - expect processing state", + initialResources: []string{ + "testdata/capapplication/ca-42.initial.yaml", + }, + expectedResources: "testdata/capapplication/ca-42.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestCAPApplicationWithPreExistingLabelAndProcessingInitialState(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Initial test with pre-existing label, processing initial state and invalid secret", + initialResources: []string{ + "testdata/capapplication/ca-02.initial.yaml", + }, + expectedResources: "testdata/capapplication/ca-02.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestCAPApplicationWithValidSecret(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Test with pre-existing label, processing state and valid secret", + initialResources: []string{ + "testdata/capapplication/ca-03.initial.yaml", + "testdata/common/credential-secrets.yaml", + }, + expectedResources: "testdata/capapplication/ca-03.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestValidationOfBtpServicesWithoutSecrets(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Invalid BTPServices with high attempts", + initialResources: []string{ + "testdata/capapplication/ca-02.initial.yaml", + }, + expectedResources: "testdata/capapplication/ca-02.expected.yaml", + attempts: 9999, + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestValidationOfBtpServicesWithSecrets(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Valid BTPServices with high attempts", + initialResources: []string{ + "testdata/capapplication/ca-03.initial.yaml", + "testdata/common/credential-secrets.yaml", + }, + expectedResources: "testdata/capapplication/ca-03.expected.yaml", + attempts: 9999, + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestCavCatGateway_Case1(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - provisioning, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-04.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-04.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestCavCatGateway_Case2(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - error, CAPTenant - provisioning, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-05.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/capapplication/cav-error.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-05.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestCavCatGateway_Case3(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-06.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-06.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestCavCatGateway_Case4(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - NA, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-07.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/common/istio-ingress.yaml", + }, + expectedResources: "testdata/capapplication/ca-07.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceOperatorDomains: {{Namespace: "", Name: ""}}, + ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}, + ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}, + }, + }, + ) +} + +func TestCavCatGateway_Case5(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-08.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/common/istio-ingress.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-08.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceOperatorDomains: {{Namespace: "", Name: ""}}, + ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}, + ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}, + }, + }, + ) +} + +func TestCavCatGateway_Case6(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - error, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-09.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-error.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-09.expected.yaml", + expectError: true, + }, + ) + + if err.Error() != "provider CAPTenant in state ProvisioningError for CAPApplication default.test-cap-01" { + t.Error("Wrong error message") + } +} + +func TestCavCatGateway_Case7(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - error, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-10.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert-error.yaml", + }, + expectedResources: "testdata/capapplication/ca-10.expected.yaml", + expectError: true, + }, + ) + + if err.Error() != "Certificate in state Error for CAPApplication default.test-cap-01: cert message" { + t.Error("Wrong error message") + } +} + +func TestCavCatGateway_Case8(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - error", + initialResources: []string{ + "testdata/capapplication/ca-11.initial.yaml", + "testdata/capapplication/ca-dns-error.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-11.expected.yaml", + expectError: true, + }, + ) + + if err.Error() != "DNSEntry in state Error for CAPApplication default.test-cap-01: dns message" { + t.Error("Wrong error message") + } +} + +func TestCavCatGateway_Case9(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - upgrade error, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-12.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-upgrade-error.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-12.expected.yaml", + expectError: true, + }, + ) + + if err.Error() != "provider CAPTenant in state UpgradeError for CAPApplication default.test-cap-01" { + t.Error("Wrong error message") + } +} + +func TestDeletion_Case1(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Without deletionTimestamp and without finalizer set", + initialResources: []string{ + "testdata/capapplication/ca-13.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-13.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestDeletion_Case2(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletionTimestamp and without finalizer set", + initialResources: []string{ + "testdata/capapplication/ca-14.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-14.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestDeletion_Case3(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletionTimestamp and with finalizer set", + initialResources: []string{ + "testdata/capapplication/ca-15.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-15.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestDeletion_Case4(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletion triggered, no finalizer on certificate & provider tenant doesn't exist", + initialResources: []string{ + "testdata/capapplication/ca-16.initial.yaml", + "testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-16.expected.yaml", + }, + ) +} + +func TestDeletion_Case5(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletion triggered, no finalizer on certificate & provider tenant exists", + initialResources: []string{ + "testdata/capapplication/ca-17.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-17.expected.yaml", + }, + ) +} + +func TestDeletion_Case6(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletion triggered, no certificate & provider tenant exists", + initialResources: []string{ + "testdata/capapplication/ca-18.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/istio-ingress.yaml", + }, + expectedResources: "testdata/capapplication/ca-18.expected.yaml", + }, + ) +} + +func TestDeletion_Case7(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletion triggered, finalizer on certificate & provider tenant doesn't exist", + initialResources: []string{ + "testdata/capapplication/ca-19.initial.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-19.expected.yaml", + }, + ) +} + +func TestDeletion_Case8(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "With deletion triggered, finalizer on certificate & provider tenant exists", + initialResources: []string{ + "testdata/capapplication/ca-20.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-20.expected.yaml", + }, + ) +} + +func TestCertManagerCavCatGateway_Case1(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - provisioning, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-21.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-21.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) + + os.Setenv(certManagerEnv, "") +} + +func TestCertManagerCavCatGateway_Case2(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - error, CAPTenant - provisioning, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-22.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/capapplication/cav-error.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-22.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) + + os.Setenv(certManagerEnv, "") +} + +func TestCertManagerCavCatGateway_Case3(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-23.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-23.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) + + os.Setenv(certManagerEnv, "") +} + +func TestCertManagerCavCatGateway_Case4(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - NA, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-24.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/common/istio-ingress.yaml", + }, + expectedResources: "testdata/capapplication/ca-24.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceOperatorDomains: {{Namespace: "", Name: ""}}, + ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}, + ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}, + }, + }, + ) + + os.Setenv(certManagerEnv, "") +} + +func TestCertManagerCavCatGateway_Case5(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-25.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-25.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceOperatorDomains: {{Namespace: "", Name: ""}}, + ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}, + ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}, + }, + }, + ) + + os.Setenv(certManagerEnv, "") +} + +func TestCertManagerCavCatGateway_Case6(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - error, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-26.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-error.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-26.expected.yaml", + expectError: true, + }, + ) + + os.Setenv(certManagerEnv, "") + + if err.Error() != "provider CAPTenant in state ProvisioningError for CAPApplication default.test-cap-01" { + t.Error("Wrong error message") + } +} + +func TestCertManagerCavCatGateway_Case7(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - error, dnsEntry - NA", + initialResources: []string{ + "testdata/capapplication/ca-27.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager-error.yaml", + }, + expectedResources: "testdata/capapplication/ca-27.expected.yaml", + expectError: true, + }, + ) + + os.Setenv(certManagerEnv, "") + + if err.Error() != "Certificate in state not ready for CAPApplication default.test-cap-01: cert message" { + t.Error("Wrong error message") + } +} + +func TestCertManagerCavCatGateway_Case8(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - error", + initialResources: []string{ + "testdata/capapplication/ca-28.initial.yaml", + "testdata/capapplication/ca-dns-error.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-28.expected.yaml", + expectError: true, + }, + ) + + os.Setenv(certManagerEnv, "") + + if err.Error() != "DNSEntry in state Error for CAPApplication default.test-cap-01: dns message" { + t.Error("Wrong error message") + } +} + +func TestCertManagerDeletion_Case1(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - false, finalizer set - false, certificate - ready, certificate finalizer - true, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-34.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-34.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-3351", + }, + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case2(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - false, certificate - ready, certificate finalizer - true, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-35.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-35.expected.yaml", + expectedRequeue: nil, //When no finalizer is set --> do not expect requeue + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case3(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - ready, certificate finalizer - false, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-36.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-36.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case4(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - ready, certificate finalizer - false, Provider & Consumer tenant with no finalizers - NA", + initialResources: []string{ + "testdata/capapplication/ca-37.initial.yaml", + "testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-37.expected.yaml", + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case5(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - ready, certificate finalizer - false, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-38.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml", + }, + expectedResources: "testdata/capapplication/ca-38.expected.yaml", + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case6(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - NA, certificate finalizer - false, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-39.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/istio-ingress.yaml", + }, + expectedResources: "testdata/capapplication/ca-39.expected.yaml", + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case7(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - ready, certificate finalizer - true, Provider & Consumer tenant with no finalizers - NA", + initialResources: []string{ + "testdata/capapplication/ca-40.initial.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-40.expected.yaml", + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestCertManagerDeletion_Case8(t *testing.T) { + + os.Setenv(certManagerEnv, certManagerCertManagerIO) + + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When deletionTimestamp - true, finalizer set - true, certificate - ready, certificate finalizer - true, Provider & Consumer tenant with no finalizers - ready", + initialResources: []string{ + "testdata/capapplication/ca-41.initial.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/capapplication/istio-ingress-with-certManager.yaml", + }, + expectedResources: "testdata/capapplication/ca-41.expected.yaml", + }, + ) + + os.Setenv(certManagerEnv, "") + +} + +func TestController_handleCAPApplicationConsistent_Case1(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state", + initialResources: []string{ + "testdata/capapplication/ca-29.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-29.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestController_handleCAPApplicationConsistent_Case2(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with Generation mismatch", + initialResources: []string{ + "testdata/capapplication/ca-30.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + }, + expectedResources: "testdata/capapplication/ca-30.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestController_handleCAPApplicationConsistent_Case3(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with a CAV name update; one tenant with fixed version and never upgrade", + initialResources: []string{ + "testdata/capapplication/ca-31.initial.yaml", + "testdata/capapplication/cav-name-modified-ready.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-upg-never-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-31.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestController_handleCAPApplicationConsistent_Case4(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with a CAV name update", + initialResources: []string{ + "testdata/capapplication/ca-32.initial.yaml", + "testdata/capapplication/cav-name-modified-ready.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-32.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestController_handleCAPApplicationConsistent_Case5(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with a CAV name update", + initialResources: []string{ + "testdata/capapplication/ca-33.initial.yaml", + "testdata/capapplication/cav-33-version-updated-ready.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-33.expected.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestController_handleCAPApplicationConsistent_Case6(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with no certificate", + initialResources: []string{ + "testdata/capapplication/ca-29.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/capapplication/cat-consumer-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-no-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-29.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2976", + "ERP4SMEPREPWORKAPPPLAT-2881", + }, + }, + ) +} + +func TestProviderTenantCreationError(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - n/a, gateway - available, certificate - ready, dnsEntry - ready", + initialResources: []string{ + "testdata/capapplication/ca-43.initial.yaml", + "testdata/capapplication/ca-dns.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-43.expected.yaml", + expectError: true, + mockErrorForResources: []ResourceAction{{Verb: "create", Group: "sme.sap.com", Version: "v1alpha1", Resource: "captenants", Namespace: "*", Name: "*"}}, + }, + ) + + if err.Error() != "mocked api error (captenants.sme.sap.com/v1alpha1)" { + t.Error("Wrong error message") + } +} + +func TestCAPApplicationPrimaryDomainDNSEntryNotReady(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "When CAPApplicationVersion - ready, CAPTenant - ready, gateway - available, certificate - ready, dnsEntry - not ready", + initialResources: []string{ + "testdata/capapplication/ca-06.initial.yaml", + "testdata/capapplication/ca-dns-not-ready.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + }, + expectedResources: "testdata/capapplication/ca-44.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplication: {{Namespace: "default", Name: "test-cap-01"}}}, + }, + ) +} + +func TestCAPApplicationConsistentWithNewCAPApplicationVersionTenantUpdateError(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "Consistent state with a new CAV (ready); tenant update failure", + initialResources: []string{ + "testdata/capapplication/ca-31.initial.yaml", + "testdata/capapplication/cav-name-modified-ready.yaml", + "testdata/capapplication/cat-provider-no-finalizers-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectError: true, + mockErrorForResources: []ResourceAction{{Verb: "update", Group: "sme.sap.com", Version: "v1alpha1", Resource: "captenants", Namespace: "*", Name: "*"}}, + }, + ) + if err.Error() != "could not update CAPTenant default.test-cap-01-provider: mocked api error (captenants.sme.sap.com/v1alpha1)" { + t.Error("error message is different from expected") + } +} + +func TestAdditionalConditionsTenantReadyUpgradeStrategyNever(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "test additional conditions with tenant having upgrade strategy never - and not on latest version", + initialResources: []string{ + "testdata/capapplication/ca-45.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/common/captenant-provider-upgraded-ready.yaml", + "testdata/capapplication/cat-consumer-upg-never-ready.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-29.expected.yaml", // expect - AllTenantsReady is "True" + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2881"}, + }, + ) +} + +func TestAdditionalConditionsWithTenantDeletingUpgradeStrategyNever(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplication, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01"}}, + TestData{ + description: "test additional conditions with tenant having upgrade strategy never, not on latest version and deleting", + initialResources: []string{ + "testdata/capapplication/ca-45.initial.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/common/captenant-provider-upgraded-ready.yaml", + "testdata/capapplication/cat-consumer-upg-never-deleting.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplication/gateway.yaml", + "testdata/capapplication/istio-ingress-with-cert.yaml", + "testdata/capapplication/ca-dns.yaml", + }, + expectedResources: "testdata/capapplication/ca-45.expected.yaml", // expect - AllTenantsReady is "False" + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2881"}, + }, + ) +} diff --git a/internal/controller/reconcile-capapplicationversion.go b/internal/controller/reconcile-capapplicationversion.go new file mode 100644 index 0000000..0176deb --- /dev/null +++ b/internal/controller/reconcile-capapplicationversion.go @@ -0,0 +1,834 @@ +package controller + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + "strings" + "time" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "golang.org/x/exp/slices" + appsv1 "k8s.io/api/apps/v1" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + networkingv1 "k8s.io/api/networking/v1" + k8sErrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/klog/v2" +) + +const ( + App = "app" +) + +const ( + CategoryWorkload = "Workload" + CategoryService = "Service" +) + +const ( + defaultServerPort = 4004 + defaultRouterPort = 5000 +) + +var trueVal = true + +type DeploymentParameters struct { + CA *v1alpha1.CAPApplication + CAV *v1alpha1.CAPApplicationVersion + OwnerRef *metav1.OwnerReference + WorkloadDetails v1alpha1.WorkloadDetails + VCAPSecretName string +} + +func (c *Controller) reconcileCAPApplicationVersion(ctx context.Context, item QueueItem, attempts int) (*ReconcileResult, error) { + lister := c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Lister() + cached, err := lister.CAPApplicationVersions(item.ResourceKey.Namespace).Get(item.ResourceKey.Name) + if err != nil { + return nil, handleOperatorResourceErrors(err) + } + cav := cached.DeepCopy() + + // prepare owner refs, labels, finalizers + if update, err := c.prepareCAPApplicationVersion(ctx, cav); err != nil { + return nil, err + } else if update { + err := c.updateCAPApplicationVersion(ctx, cav) + if err != nil { + return nil, err + } + } + + // Handle Deletion + if cav.DeletionTimestamp != nil { + return c.deleteCAPApplicationVersion(ctx, cav) + } + + return c.handleCAPApplicationVersion(ctx, cav) +} + +func (c *Controller) updateCAPApplicationVersionStatus(ctx context.Context, cav *v1alpha1.CAPApplicationVersion, state v1alpha1.CAPApplicationVersionState, condition metav1.Condition) error { + cav.SetStatusWithReadyCondition(state, condition.Status, condition.Reason, condition.Message) + + cavUpdated, statusErr := c.crdClient.SmeV1alpha1().CAPApplicationVersions(cav.Namespace).UpdateStatus(ctx, cav, metav1.UpdateOptions{}) + // Update reference to the resource + if cavUpdated != nil { + *cav = *cavUpdated + } + if statusErr != nil { + klog.Error("could not update status of %s %s.%s: ", v1alpha1.CAPApplicationVersionKind, cav.Namespace, cav.Name, statusErr.Error()) + } + + return statusErr +} + +func (c *Controller) updateCAPApplicationVersion(ctx context.Context, cav *v1alpha1.CAPApplicationVersion) error { + cavUpdated, err := c.crdClient.SmeV1alpha1().CAPApplicationVersions(cav.Namespace).Update(ctx, cav, metav1.UpdateOptions{}) + // Update reference to the resource + if cavUpdated != nil { + *cav = *cavUpdated + } + return err +} + +func (c *Controller) handleCAPApplicationVersion(ctx context.Context, cav *v1alpha1.CAPApplicationVersion) (*ReconcileResult, error) { + ca, _ := c.getCachedCAPApplication(cav.Namespace, cav.Spec.CAPApplicationInstance) + + // Check for valid secrets + err := c.checkSecretsExist(ca.Spec.BTP.Services, ca.Namespace) + + if err != nil { + // Requeue after 10s to check if secrets exist + return NewReconcileResultWithResource(ResourceCAPApplicationVersion, cav.Name, cav.Namespace, 10*time.Second), c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateProcessing, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "WaitingForSecrets"}) + } + + // If Valid secrets exists proceed with processing deployment + var statusErr error + switch cav.Status.State { + case "": + statusErr = c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateProcessing, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ReadyForProcessing"}) + case v1alpha1.CAPApplicationVersionStateError: + var errorCondition metav1.Condition + if len(cav.Status.Conditions) > 0 { + errorCondition = *cav.Status.Conditions[0].DeepCopy() // keep the error condition while re-processing + } else { + errorCondition = metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "RetryProcessing"} + } + statusErr = c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateProcessing, errorCondition) + } + + if statusErr != nil { + return nil, statusErr + } + + return nil, c.processDeployments(ctx, ca, cav) +} + +func (c *Controller) processDeployments(ctx context.Context, ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + // TODO: handle create/update of individual deployments/jobs (so far these are just created and never updated, as we expect secrets don't change!) + + // Handle Content job + err := c.handleContentDeployJob(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInContentDeploymentJob", Message: err.Error()}) + return err + } + + // Create AppRouter Deployment + err = c.updateApprouterDeployment(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInAppRouterDeployment", Message: err.Error()}) + return err + } + + // Create Server Deployment + err = c.updateServerDeployment(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInServerDeployment", Message: err.Error()}) + return err + } + + // Create All Services + err = c.updateServices(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInServerService", Message: err.Error()}) + return err + } + + // Create Additional Deployments + err = c.updateAdditionalDeployment(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInJobWorkerDeployment", Message: err.Error()}) + return err + } + + // Create NetworkPolicy + err = c.updateNetworkPolicies(ca, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInNetworkPolicy", Message: err.Error()}) + return err + } + + // Check for status of the Workloads + processing, err := c.checkWorkloadStatus(ctx, cav) + if err != nil { + c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateError, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False", Reason: "ErrorInWorkloadStatus", Message: err.Error()}) + return err + } else if processing { + return nil + } + + // TODO: wait until the deployments are actually "Ready"! + return c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateReady, metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "True", Reason: "CreatedDeployments"}) +} + +// #region Content Deploy Job +func (c *Controller) handleContentDeployJob(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + workload := getRelevantJob(v1alpha1.JobContent, cav) + if res := validateEnv(workload.JobDefinition.Env, restrictedEnvNames); res != "" { + return errorEnv(workload.Name, res) + } + + var vcapSecretName string + jobName := cav.Name + "-" + strings.ToLower(string(workload.JobDefinition.Type)) + // If Job has already executed --> exit + if cav.CheckFinishedJobs(jobName) { + return nil + } + // Get the contentDeploy job with the name expected for this CAV instance + contentDeployJob, err := c.kubeInformerFactory.Batch().V1().Jobs().Lister().Jobs(cav.Namespace).Get(jobName) + // If the resource doesn't exist, we'll create it + if k8sErrors.IsNotFound(err) { + // Get ServiceInfos for consumed BTP services + consumedServiceInfos := getConsumedServiceInfos(getConsumedServiceMap(workload.ConsumedBTPServices), ca.Spec.BTP.Services) + + // Create ownerRef to CAV + ownerRef := *metav1.NewControllerRef(cav, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationVersionKind)) + + // Get VCAP secret name + vcapSecretName, err = createVCAPSecret(jobName, cav.Namespace, ownerRef, consumedServiceInfos, c.kubeClient) + + if err == nil { + contentDeployJob, err = c.kubeClient.BatchV1().Jobs(cav.Namespace).Create(context.TODO(), newContentDeploymentJob(ca, cav, workload, ownerRef, vcapSecretName), metav1.CreateOptions{}) + } + } + + return doChecks(err, contentDeployJob, cav, workload.Name) +} + +// newContentDeploymentJob creates a Content Deployment Job for the CAV resource. It also sets the appropriate OwnerReferences. +func newContentDeploymentJob(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, workload *v1alpha1.WorkloadDetails, ownerRef metav1.OwnerReference, vcapSecretName string) *batchv1.Job { + labels := copyMaps(workload.Labels, map[string]string{ + LabelDisableKarydia: "true", + }) + + annotations := copyMaps(workload.Annotations, map[string]string{ + AnnotationIstioSidecarInject: "false", + }) + + return &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{ + Name: cav.Name + "-" + strings.ToLower(string(workload.JobDefinition.Type)), + Namespace: cav.Namespace, + Annotations: workload.Annotations, + OwnerReferences: []metav1.OwnerReference{ + ownerRef, + }, + }, + Spec: batchv1.JobSpec{ + BackoffLimit: workload.JobDefinition.BackoffLimit, + TTLSecondsAfterFinished: workload.JobDefinition.TTLSecondsAfterFinished, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: annotations, + Labels: labels, + }, + Spec: corev1.PodSpec{ + Containers: []corev1.Container{ + { + Name: workload.Name, + Image: workload.JobDefinition.Image, + ImagePullPolicy: workload.JobDefinition.ImagePullPolicy, + Command: workload.JobDefinition.Command, + Env: append([]corev1.EnvVar{ + {Name: EnvCAPOpAppVersion, Value: cav.Spec.Version}, + }, workload.JobDefinition.Env...), + EnvFrom: getEnvFrom(vcapSecretName), + Resources: workload.JobDefinition.Resources, + SecurityContext: workload.JobDefinition.SecurityContext, + }, + }, + SecurityContext: workload.JobDefinition.PodSecurityContext, + ImagePullSecrets: convertToLocalObjectReferences(cav.Spec.RegistrySecrets), + RestartPolicy: corev1.RestartPolicyOnFailure, + }, + }, + }, + } +} + +//#endregion + +// #region Server +func (c *Controller) updateServerDeployment(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + serverWorkloads := getDeployments(v1alpha1.DeploymentCAP, cav) + for _, serverWorkload := range serverWorkloads { + err := c.updateDeployment(ca, cav, &serverWorkload) + if err != nil { + return err + } + } + return nil +} + +//#endregion + +// #region AppRouter +func (c *Controller) updateApprouterDeployment(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + routerWorkload := getRelevantDeployment(v1alpha1.DeploymentRouter, cav) + return c.updateDeployment(ca, cav, routerWorkload) +} + +//#endregion + +// #region JobWorker +func (c *Controller) updateAdditionalDeployment(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + additionalWorkloads := getDeployments(v1alpha1.DeploymentAdditional, cav) + for _, workload := range additionalWorkloads { + err := c.updateDeployment(ca, cav, &workload) + if err != nil { + return err + } + } + return nil +} + +//#endregion + +// #region Service +func (c *Controller) updateServices(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + workloadServicePortInfos := getRelevantServicePortInfo(cav) + for _, workloadServicePortInfo := range workloadServicePortInfos { + // Get the Service with the name specified in CustomDeployment.spec + service, err := c.kubeClient.CoreV1().Services(cav.Namespace).Get(context.TODO(), workloadServicePortInfo.WorkloadName+ServiceSuffix, metav1.GetOptions{}) + // If the resource doesn't exist, we'll create it + if k8sErrors.IsNotFound(err) { + service, err = c.kubeClient.CoreV1().Services(cav.Namespace).Create(context.TODO(), newService(ca, cav, workloadServicePortInfo), metav1.CreateOptions{}) + } + + err = doChecks(err, service, cav, workloadServicePortInfo.WorkloadName+ServiceSuffix) + if err != nil { + return err + } + } + return nil +} + +// newService creates a new Service for a CAV resource. It also sets the appropriate OwnerReferences. +func newService(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, workloadServicePortInfo servicePortInfo) *corev1.Service { + var ports []corev1.ServicePort + + for _, port := range workloadServicePortInfo.Ports { + ports = append(ports, corev1.ServicePort{Name: port.Name, Port: port.Port, AppProtocol: port.AppProtocol}) + } + + matchlabels := getLabels(ca, cav, CategoryWorkload, workloadServicePortInfo.DeploymentType, workloadServicePortInfo.WorkloadName, false) + + workload := getWorkloadByName(workloadServicePortInfo.WorkloadName[len(cav.Name)+1:], cav) + + annotations := copyMaps(workload.Annotations, getAnnotations(ca, cav, true)) + + labels := copyMaps(workload.Labels, getLabels(ca, cav, CategoryService, workloadServicePortInfo.DeploymentType, workloadServicePortInfo.WorkloadName+ServiceSuffix, true)) + + return &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: workloadServicePortInfo.WorkloadName + ServiceSuffix, + Namespace: cav.Namespace, + Labels: labels, + Annotations: annotations, + OwnerReferences: []metav1.OwnerReference{ + *metav1.NewControllerRef(cav, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationVersionKind)), + }, + }, + Spec: corev1.ServiceSpec{ + Ports: ports, + Selector: matchlabels, + }, + } +} + +// #endregion Service + +// #region NetworkPolicy +func (c *Controller) updateNetworkPolicies(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) error { + var ( + spec networkingv1.NetworkPolicySpec + err error + ) + + // The app pod specific NetworkPolicy + spec = getAppPodNetworkPolicySpec(ca, cav) + err = c.createNetworkPolicy(cav.Name, spec, cav) + if err != nil { + return err + } + + // The app ingress (to router) NetworkPolicy + spec = getAppIngressNetworkPolicySpec(ca, cav) + err = c.createNetworkPolicy(cav.Name+"--in", spec, cav) + if err != nil { + return err + } + + // (Tech)Port specific network policy (just clusterWide for now) + // Get all the relevant service info (that includes ports exposed clusterwide) + workloadServicePortInfos := getRelevantServicePortInfo(cav) + for _, workloadServicePortInfo := range workloadServicePortInfos { + if len(workloadServicePortInfo.ClusterPorts) > 0 { + // Create a network policy for the workload if at least 1 clusterwide exposed port exists. + spec = getPortSpecificNetworkPolicySpec(workloadServicePortInfo, ca, cav) + err = c.createNetworkPolicy(workloadServicePortInfo.WorkloadName, spec, cav) + if err != nil { + return err + } + } + } + return nil +} + +// check and create a new NetworkPolicy for the given workload/CAV resource. It also sets the appropriate OwnerReferences. +func (c *Controller) createNetworkPolicy(name string, spec networkingv1.NetworkPolicySpec, cav *v1alpha1.CAPApplicationVersion) error { + networkPolicy, err := c.kubeClient.NetworkingV1().NetworkPolicies(cav.Namespace).Get(context.TODO(), name, metav1.GetOptions{}) + // If the resource doesn't exist, we'll create it + if k8sErrors.IsNotFound(err) { + networkPolicy, err = c.kubeClient.NetworkingV1().NetworkPolicies(cav.Namespace).Create(context.TODO(), &networkingv1.NetworkPolicy{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: cav.Namespace, + OwnerReferences: []metav1.OwnerReference{ + *metav1.NewControllerRef(cav, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationVersionKind)), + }, + }, + Spec: spec, + }, metav1.CreateOptions{}) + } + return doChecks(err, networkPolicy, cav, "NetworkPolicy") +} + +func getAppPodNetworkPolicySpec(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) networkingv1.NetworkPolicySpec { + return networkingv1.NetworkPolicySpec{ + PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeIngress}, + Ingress: []networkingv1.NetworkPolicyIngressRule{{ + From: []networkingv1.NetworkPolicyPeer{ + // Enable communication across all workload pods with the same version + { + PodSelector: &metav1.LabelSelector{MatchLabels: getLabels(ca, cav, CategoryWorkload, "", "", false)}, + }, + }, + }}, + // Target all workloads of the app + PodSelector: metav1.LabelSelector{MatchLabels: getLabels(ca, cav, CategoryWorkload, "", "", false)}, + } +} + +func getAppIngressNetworkPolicySpec(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) networkingv1.NetworkPolicySpec { + return networkingv1.NetworkPolicySpec{ + PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeIngress}, + Ingress: []networkingv1.NetworkPolicyIngressRule{{ + From: []networkingv1.NetworkPolicyPeer{ + // Enable ingress traffic to the router via istio-ingress gateway + { + NamespaceSelector: &metav1.LabelSelector{}, + PodSelector: &metav1.LabelSelector{MatchLabels: getIngressGatewayLabels(ca)}, + }, + }, + }}, + // Target all workloads of the app + PodSelector: metav1.LabelSelector{MatchLabels: getLabels(ca, cav, CategoryWorkload, string(v1alpha1.DeploymentRouter), "", false)}, + } +} + +func getPortSpecificNetworkPolicySpec(workloadServicePortInfo servicePortInfo, ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion) networkingv1.NetworkPolicySpec { + ports := []networkingv1.NetworkPolicyPort{} + for _, port := range workloadServicePortInfo.ClusterPorts { + ports = append(ports, networkingv1.NetworkPolicyPort{Port: &intstr.IntOrString{IntVal: port}}) + } + return networkingv1.NetworkPolicySpec{ + PolicyTypes: []networkingv1.PolicyType{networkingv1.PolicyTypeIngress}, + Ingress: []networkingv1.NetworkPolicyIngressRule{{ + Ports: ports, + From: []networkingv1.NetworkPolicyPeer{ + // Enable ingress traffic to these ports from any pod in the cluster + { + NamespaceSelector: &metav1.LabelSelector{}, + PodSelector: &metav1.LabelSelector{}, + }, + }, + }}, + // Target the relevant workload whose port(s) needs to be exposed cluster wide + PodSelector: metav1.LabelSelector{MatchLabels: getLabels(ca, cav, CategoryWorkload, workloadServicePortInfo.DeploymentType, workloadServicePortInfo.WorkloadName, false)}, + } +} + +// #endregion NetworkPolicy + +// #region Deployments + +func (c *Controller) updateDeployment(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, workload *v1alpha1.WorkloadDetails) error { + if res := validateEnv(workload.DeploymentDefinition.Env, restrictedEnvNames); res != "" { + return errorEnv(workload.Name, res) + } + + var vcapSecretName string + deploymentName := cav.Name + "-" + strings.ToLower(string(workload.Name)) + // Get the workloadDeployment with the name specified in CustomDeployment.spec + workloadDeployment, err := c.kubeClient.AppsV1().Deployments(cav.Namespace).Get(context.TODO(), deploymentName, metav1.GetOptions{}) + // If the resource doesn't exist, we'll create it + if k8sErrors.IsNotFound(err) { + // Get ServiceInfos for consumed BTP services + consumedServiceInfos := getConsumedServiceInfos(getConsumedServiceMap(workload.ConsumedBTPServices), ca.Spec.BTP.Services) + + // Create ownerRef to CAV + ownerRef := *metav1.NewControllerRef(cav, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationVersionKind)) + + // Get VCAP secret name + vcapSecretName, err = createVCAPSecret(deploymentName, cav.Namespace, ownerRef, consumedServiceInfos, c.kubeClient) + + if err == nil { + workloadDeployment, err = c.kubeClient.AppsV1().Deployments(cav.Namespace).Create(context.TODO(), newDeployment(ca, cav, workload, ownerRef, vcapSecretName), metav1.CreateOptions{}) + } + } + + return doChecks(err, workloadDeployment, cav, workload.Name) +} + +// newDeployment creates a new generic Deployment for a CAV resource based on the type. It also sets the appropriate OwnerReferences. +func newDeployment(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, workload *v1alpha1.WorkloadDetails, ownerRef metav1.OwnerReference, vcapSecretName string) *appsv1.Deployment { + params := &DeploymentParameters{ + CA: ca, + CAV: cav, + OwnerRef: &ownerRef, + WorkloadDetails: *workload, + VCAPSecretName: vcapSecretName, + } + + return createDeployment(params) +} + +func createDeployment(params *DeploymentParameters) *appsv1.Deployment { + workloadName := params.CAV.Name + "-" + strings.ToLower(params.WorkloadDetails.Name) + annotations := copyMaps(params.WorkloadDetails.Annotations, getAnnotations(params.CA, params.CAV, true)) + labels := copyMaps(params.WorkloadDetails.Labels, getLabels(params.CA, params.CAV, CategoryWorkload, string(params.WorkloadDetails.DeploymentDefinition.Type), workloadName, true)) + + return &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: workloadName, + Namespace: params.CAV.Namespace, + OwnerReferences: []metav1.OwnerReference{ + *params.OwnerRef, + }, + Annotations: annotations, + Labels: labels, + }, + Spec: appsv1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: labels, + }, + Replicas: params.WorkloadDetails.DeploymentDefinition.Replicas, // will automatically default to 1 (if pointer is nil) + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Annotations: annotations, + Labels: labels, + }, + Spec: corev1.PodSpec{ + ImagePullSecrets: convertToLocalObjectReferences(params.CAV.Spec.RegistrySecrets), + Containers: getContainer(params), + SecurityContext: params.WorkloadDetails.DeploymentDefinition.PodSecurityContext, + }, + }, + }, + } +} + +func getContainer(params *DeploymentParameters) []corev1.Container { + container := corev1.Container{ + Name: params.WorkloadDetails.Name, + Image: params.WorkloadDetails.DeploymentDefinition.Image, + ImagePullPolicy: params.WorkloadDetails.DeploymentDefinition.ImagePullPolicy, + Command: params.WorkloadDetails.DeploymentDefinition.Command, + Env: getEnv(params), + EnvFrom: getEnvFrom(params.VCAPSecretName), + LivenessProbe: params.WorkloadDetails.DeploymentDefinition.LivenessProbe, + ReadinessProbe: params.WorkloadDetails.DeploymentDefinition.ReadinessProbe, + Resources: params.WorkloadDetails.DeploymentDefinition.Resources, + SecurityContext: params.WorkloadDetails.DeploymentDefinition.SecurityContext, + } + return []corev1.Container{container} +} + +func getEnv(params *DeploymentParameters) []corev1.EnvVar { + env := []corev1.EnvVar{ + {Name: EnvCAPOpAppVersion, Value: params.CAV.Spec.Version}, + } + env = append(env, params.WorkloadDetails.DeploymentDefinition.Env...) + + if params.WorkloadDetails.DeploymentDefinition.Type == v1alpha1.DeploymentRouter { + // Add destinations env for `Router` + appendDestinationsEnv(params.CAV, &env) + } + + return env +} + +func appendDestinationsEnv(cav *v1alpha1.CAPApplicationVersion, env *[]corev1.EnvVar) { + var ( + destEnvIndex int = -1 + destMap map[string]RouterDestination = map[string]RouterDestination{} + ) + + destEnvIndex = slices.IndexFunc(*env, func(currentEnv corev1.EnvVar) bool { return currentEnv.Name == "destinations" }) + + if destEnvIndex > -1 { + if destinations, err := util.ParseJSON[[]RouterDestination]([]byte((*env)[destEnvIndex].Value)); err == nil { + for _, d := range *destinations { + destMap[d.Name] = d + } + } // else -> in case of parsing error continue with only the workload destinations + } + + destinations := []RouterDestination{} + portInfos := getRelevantServicePortInfo(cav) + for _, portInfo := range portInfos { + for _, destinationInfo := range portInfo.Destinations { + dest := getDestination(destMap, destinationInfo, portInfo) + destinations = append(destinations, dest) + delete(destMap, destinationInfo.DestinationName) + } + } + + for _, d := range destMap { + destinations = append(destinations, d) + } + serialized, _ := json.Marshal(destinations) + if destEnvIndex > -1 { + (*env)[destEnvIndex].Value = string(serialized) + } else { + *env = append(*env, corev1.EnvVar{Name: "destinations", Value: string(serialized)}) + } +} + +func getDestination(destMap map[string]RouterDestination, destinationInfo destinationInfo, portInfo servicePortInfo) RouterDestination { + dest, ok := destMap[destinationInfo.DestinationName] + if !ok { + dest = RouterDestination{ + Name: destinationInfo.DestinationName, + URL: "http://" + portInfo.WorkloadName + ServiceSuffix + ":" + strconv.Itoa(int(destinationInfo.Port)), + ForwardAuthToken: true, + } + } else { + // Overwrite just the URL from existing destination configuration + dest.URL = "http://" + portInfo.WorkloadName + ServiceSuffix + ":" + strconv.Itoa(int(destinationInfo.Port)) + } + return dest +} + +// endregion Deployments + +func getEnvFrom(vcapServiceName string) []corev1.EnvFromSource { + return []corev1.EnvFromSource{ + { + SecretRef: &corev1.SecretEnvSource{ + LocalObjectReference: corev1.LocalObjectReference{ + Name: vcapServiceName, + }, + Optional: &trueVal, + }, + }, + } +} + +func (c *Controller) prepareCAPApplicationVersion(ctx context.Context, cav *v1alpha1.CAPApplicationVersion) (update bool, err error) { + // Do nothing when object is deleted + if cav.DeletionTimestamp != nil { + return false, nil + } + ca, err := c.getCachedCAPApplication(cav.Namespace, cav.Spec.CAPApplicationInstance) + if err != nil { + return false, err + } + if _, ok := getOwnerByKind(cav.OwnerReferences, v1alpha1.CAPApplicationKind); !ok { + // create owner reference - CAPApplication + cav.OwnerReferences = append(cav.OwnerReferences, *metav1.NewControllerRef(ca, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationKind))) + update = true + } + + if addCAPApplicationVersionLabels(cav, ca) { + update = true + } + + if cav.DeletionTimestamp == nil { + // Finalizer to prevent direct deletion of CAPApplicationVersion + if cav.Finalizers == nil { + cav.Finalizers = []string{} + } + if addFinalizer(&cav.Finalizers, FinalizerCAPApplicationVersion) { + update = true + } + } + + return update, nil +} + +// Annotations +func getAnnotations(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, ownerInfo bool) map[string]string { + annotations := map[string]string{ + AnnotationBTPApplicationIdentifier: strings.Join([]string{ca.Spec.GlobalAccountId, ca.Spec.BTPAppName}, "."), + } + + if ownerInfo { + annotations[AnnotationOwnerIdentifier] = cav.Namespace + "." + cav.Name + + } + + return annotations +} + +// Labels +func getLabels(ca *v1alpha1.CAPApplication, cav *v1alpha1.CAPApplicationVersion, category string, workloadType string, workloadName string, additionalDetails bool) map[string]string { + labels := map[string]string{ + App: ca.Spec.BTPAppName, + LabelBTPApplicationIdentifierHash: sha1Sum(ca.Spec.GlobalAccountId, ca.Spec.BTPAppName), + LabelCAVVersion: cav.Spec.Version, + LabelResourceCategory: category, + } + + addIfNotEmpty := func(k, v string) { + if v != "" { + labels[k] = v + } + } + addIfNotEmpty(LabelWorkloadType, workloadType) + addIfNotEmpty(LabelWorkloadName, workloadName) + + if additionalDetails { + labels[LabelOwnerIdentifierHash] = sha1Sum(cav.Namespace, cav.Name) + labels[LabelOwnerGeneration] = strconv.FormatInt(cav.Generation, 10) + } + + return labels +} + +func addCAPApplicationVersionLabels(cav *v1alpha1.CAPApplicationVersion, ca *v1alpha1.CAPApplication) (updated bool) { + appMetadata := appMetadataIdentifiers{ + globalAccountId: ca.Spec.GlobalAccountId, + appName: ca.Spec.BTPAppName, + ownerInfo: &ownerInfo{ + ownerNamespace: ca.Namespace, + ownerName: ca.Name, + ownerGeneration: ca.Generation, + }, + } + if updateLabelAnnotationMetadata(&cav.ObjectMeta, &appMetadata) { + updated = true + } + return updated +} + +// Check if an error occured or if owner references are correct +func doChecks(err error, obj metav1.Object, cav *v1alpha1.CAPApplicationVersion, res string) error { + // If an error occurs during Get/Create, we'll requeue the item so we can + // attempt processing again later. This could have been caused by a + // temporary network failure, or any other transient reason. + if err != nil { + return err + } + + // Check if the Deployment is not controlled by this CustomDeployment resource + _, ok := getOwnerByKind(obj.GetOwnerReferences(), v1alpha1.CAPApplicationVersionKind) + if !ok { + return fmt.Errorf("%s could not be identified for the resource %s %s: %s.%s", v1alpha1.CAPApplicationVersionKind, res, obj.GetName(), cav.Namespace, cav.Name) + } + + return nil +} + +// checkWorkloadStatus --> This just checks the contentDeployJob status for now +// TODO: Checks for issues with Deployment(s)! +func (c *Controller) checkWorkloadStatus(ctx context.Context, cav *v1alpha1.CAPApplicationVersion) (bool, error) { + workload := getRelevantJob(v1alpha1.JobContent, cav) + job := cav.Name + "-" + strings.ToLower(string(workload.JobDefinition.Type)) + + // Get the contentDeploy job with the name expected for this CAV instance + contentDeployJob, err := c.kubeInformerFactory.Batch().V1().Jobs().Lister().Jobs(cav.Namespace).Get(job) + if err != nil { + return false, err + } + + // check for completion or failure and accordingly set the cav state by returning error msg + for _, condition := range contentDeployJob.Status.Conditions { + if condition.Type == batchv1.JobComplete && condition.Status == corev1.ConditionTrue { + cav.SetStatusFinishedJobs(job) + return false, nil + } else if condition.Type == batchv1.JobFailed && condition.Status == corev1.ConditionTrue { + cav.SetStatusFinishedJobs(job) + return false, fmt.Errorf("%s", condition.Message) + } + } + + // Assume Job is being processed! + return true, nil +} + +func (c *Controller) getRelevantTenantsForCAV(cav *v1alpha1.CAPApplicationVersion) []*v1alpha1.CAPTenant { + var tenants []*v1alpha1.CAPTenant + // Get CAPApplication instance + ca, _ := c.getCachedCAPApplication(cav.Namespace, cav.Spec.CAPApplicationInstance) + if ca != nil { + // Get all tenants in the namespace for the CAPApplication + allTenants, _ := c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Lister().CAPTenants(cav.Namespace).List(labels.SelectorFromSet(map[string]string{LabelBTPApplicationIdentifierHash: sha1Sum(ca.Spec.GlobalAccountId, ca.Spec.BTPAppName)})) + // Filter out relevant tenants for the CAPApplicationVersion + for _, tenant := range allTenants { + // If a tenant is already on a given version -or- is being provisioned/upgraded to a version, it is relevant for this CAPApplicationVersion + if tenant.Status.CurrentCAPApplicationVersionInstance == cav.Name || tenant.Spec.Version == cav.Spec.Version { + tenants = append(tenants, tenant) + } + } + } + return tenants +} + +func (c *Controller) deleteCAPApplicationVersion(ctx context.Context, cav *v1alpha1.CAPApplicationVersion) (*ReconcileResult, error) { + // Update State if it is not set yet + if cav.Status.State != v1alpha1.CAPApplicationVersionStateDeleting { + var deleteCondition metav1.Condition + if len(cav.Status.Conditions) > 0 { + deleteCondition = *cav.Status.Conditions[0].DeepCopy() // Reuse the existing condition during deletion + } else { + deleteCondition = metav1.Condition{Type: string(v1alpha1.ConditionTypeReady), Status: "False"} + } + // Set the reason for Deletion + deleteCondition.Reason = "DeleteTriggered" + err := c.updateCAPApplicationVersionStatus(ctx, cav, v1alpha1.CAPApplicationVersionStateDeleting, deleteCondition) + if err != nil { + return nil, err + } + } + + tenants := c.getRelevantTenantsForCAV(cav) + + // Check if tenants exists + if len(tenants) > 0 { + // Requeue after 10s to check if all tenants are gone + return NewReconcileResultWithResource(ResourceCAPApplicationVersion, cav.Name, cav.Namespace, 10*time.Second), nil + } else if removeFinalizer(&cav.Finalizers, FinalizerCAPApplicationVersion) { // All tenants are gone --> remove finalizer and process deletion + return nil, c.updateCAPApplicationVersion(ctx, cav) + } + + // No finalizer exists + return nil, nil +} diff --git a/internal/controller/reconcile-capapplicationversion_test.go b/internal/controller/reconcile-capapplicationversion_test.go new file mode 100644 index 0000000..bd37d8a --- /dev/null +++ b/internal/controller/reconcile-capapplicationversion_test.go @@ -0,0 +1,536 @@ +package controller + +import ( + "context" + "testing" +) + +func TestCAV_WithoutCAPApplicationAndVersion(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid capapplication and deleted capapplicationversion reference", + expectResourceNotFound: true, + expectError: false, //No errors when no CAV to skip requeues + }, + ) +} + +func TestCAV_WithoutCAPApplication(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid capapplication reference", + initialResources: []string{"testdata/capapplicationversion/cav-invalid-ca.yaml"}, + expectError: true, + }, + ) +} + +func TestCAV_MissingSecrets(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with missing secrets", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/capapplicationversion/cav-empty-status.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-missing-secrets.yaml", + expectError: false, // CAV is requeued + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplicationVersion: {{Namespace: "default", Name: "test-cap-01-cav-v1"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-3351", + }, + }, + ) +} + +func TestCAV_EmptyStatusProcessing(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with empty status", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-empty-status.yaml", + "testdata/capapplicationversion/content-job-pending.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-processing.yaml", + }, + ) +} + +func TestCAV_ErrorStatusProcessing(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with error (e.g. api-server error) status to processing", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-error-status.yaml", + "testdata/capapplicationversion/content-job-pending.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-error-processing.yaml", + }, + ) +} + +func TestCAV_ErrorWithConditionStatusProcessing(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with unknown error condition (e.g. api-server error) status to processing", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-error-condition-status.yaml", + "testdata/capapplicationversion/content-job-pending.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-error-condition-processing.yaml", + }, + ) +} + +func TestCAV_ContentJobMissing(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with content job missing", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-processing.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-missing-content-job.yaml", + expectError: true, // job.batch "test-cap-01-cav-v1-content-job" not found + }, + ) +} + +func TestCAV_ContentJobPending(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with pending content job", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-processing.yaml", + "testdata/capapplicationversion/content-job-pending.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-processing.yaml", + }, + ) +} + +func TestCAV_ContentJobFailed(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with failed content job", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-processing.yaml", + "testdata/capapplicationversion/content-job-failed.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-failed-content-job.yaml", + expectError: true, + }, + ) +} + +func TestCAV_ContentJobFailedReconcilation(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "Reconcile error capapplication version with failed content job", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-failed-content-job.yaml", + "testdata/capapplicationversion/content-job-failed.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-failed-content-job.yaml", + expectError: true, + }, + ) +} + +func TestCAV_ContentJobCompletedFromProcessing(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with completed content job", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-processing.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-content-job.yaml", + }, + ) +} + +func TestCAV_ContentJobCompletedExisting(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with completed content job", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-processing-job-finished.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-content-job.yaml", + }, + ) +} + +func TestCAV_InvalidEnvConfigContent(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid content env config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-invalid-env-content.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-failed-env-content.yaml", + expectError: true, + }, + ) +} + +func TestCAV_WithRouterDestinationsEnv(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid router env config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-merged-destinations-router.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-merged-destinations-router.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-3386", // merge existing `destinations` operator workload configuration by just overwriting the URL! + }, + }, + ) +} + +func TestCAV_InvalidEnvConfigCAPServer(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid cap server env config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-invalid-env-cap.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-failed-env-cap.yaml", + expectError: true, + }, + ) +} + +func TestCAV_InvalidEnvConfigJobWorker(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with invalid job worker env config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/cav-invalid-env-job-worker.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-failed-env-job-worker.yaml", + expectError: true, + }, + ) +} + +func TestCAV_ValidEnvConfigOverall(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with valid overall env config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-valid-env-config.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-valid-env-config.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2048", // Overall the generic workloads should run fine with this change + "ERP4SMEPREPWORKAPPPLAT-3226", // imagePullPolicy + }, + }, + ) +} + +func TestCAV_CustomLabels(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with valid overall config with custom labels", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-custom-labels.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-custom-labels-config.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2187", // Custom labels also tested here + }, + }, + ) +} + +func TestCAV_CustomDestinationConfig(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with custom destination config", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-custom-destination-config.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-custom-destination-config.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-1843", + }, + }, + ) +} + +func TestCAV_DeletingWithReadyTenants(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication deleting with valid ready tenants", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/capapplicationversion/cav-ready-deleting.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-deleting.yaml", + expectError: false, // cav is requeued until dependants are gone + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplicationVersion: {{Namespace: "default", Name: "test-cap-01-cav-v1"}}}, + }, + ) +} + +func TestCAV_DeletingWithUpgradingVersionTenants(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication deleting with valid upgrading (version dependant) tenants", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cat-provider-version.yaml", + "testdata/capapplicationversion/cav-ready-deleting.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-deleting.yaml", + expectError: false, // cav is requeued until dependants are gone + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPApplicationVersion: {{Namespace: "default", Name: "test-cap-01-cav-v1"}}}, + }, + ) +} + +func TestCAV_DeletedWithNoTenants(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication deleting with no relevant tenants", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-ready-deleting.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-deleted.yaml", //finalizers removed + }, + ) +} + +func TestCAV_DeletedWithUnknownStatusNoFinalizers(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication deleting with unknown status and no finalizers", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cat-provider-version.yaml", + "testdata/capapplicationversion/cav-unknown-deleting.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-deleted-unknown.yaml", //finalizers not existing + }, + ) +} + +func TestCAV_ProbesResources(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with probes and resources", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-probes-and-resources.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-probes-and-resources.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2237", // Probes and resources should be applied to deployments and jobs + }, + }, + ) +} + +func TestCAV_AppNetworkPolicy(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with default network policies", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-probes-and-resources.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-app-netpol.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2638", // Default network policy w/o cluster type ports + "ERP4SMEPREPWORKAPPPLAT-2707", //No N/w policies exist + "ERP4SMEPREPWORKAPPPLAT-2707", // Split n/w policies + }, + }, + ) +} + +func TestCAV_ClusterPortNetworkPolicy(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with cluster network policy ports", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-cluster-netpol-port.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-cluster-netpol-port.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2638", // Network policy for cluster-wide "tech" ports + "ERP4SMEPREPWORKAPPPLAT-2707", // No fallback cluster network policy + "ERP4SMEPREPWORKAPPPLAT-2707", // Split n/w policies + }, + }, + ) +} + +func TestCAV_SecurityContext(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with container security context", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-security-context.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-security-context.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2573", // Security Context for containers + }, + }, + ) +} + +func TestCAV_PodSecurityContext(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with pod security context", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-pod-security-context.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-pod-security-context.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2573", // Security Context for containers + }, + }, + ) +} + +func TestCAV_Annotations(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPApplicationVersion, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-cav-v1"}}, + TestData{ + description: "capapplication version with annotations", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/capapplicationversion/content-job-completed.yaml", + "testdata/capapplicationversion/cav-annotations.yaml", + }, + expectedResources: "testdata/capapplicationversion/expected/cav-ready-annotations.yaml", + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2885", // Annotations supported + }, + }, + ) +} diff --git a/internal/controller/reconcile-captenant.go b/internal/controller/reconcile-captenant.go new file mode 100644 index 0000000..f600a28 --- /dev/null +++ b/internal/controller/reconcile-captenant.go @@ -0,0 +1,693 @@ +package controller + +import ( + "context" + "fmt" + "strconv" + "time" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/klog/v2" +) + +type IdentifiedCAPTenantOperations struct { + active []v1alpha1.CAPTenantOperation + processed []v1alpha1.CAPTenantOperation +} + +type CAPTenantOperationTypeSelector string + +type CAPTenantStateHandlerFunc func(ctx context.Context, c *Controller, cat *v1alpha1.CAPTenant, target StateCondition, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) + +type StateCondition struct { + state v1alpha1.CAPTenantState + conditionReason string + conditionStatus metav1.ConditionStatus +} + +type TargetStateHandler struct { + target StateCondition + handler CAPTenantStateHandlerFunc +} + +type StatusInfo struct { + failed TargetStateHandler + completed TargetStateHandler + processing TargetStateHandler +} + +const ( + CAPTenantOperationTypeSelectorAll CAPTenantOperationTypeSelector = "All" + CAPTenantOperationTypeSelectorUpgrade CAPTenantOperationTypeSelector = CAPTenantOperationTypeSelector(v1alpha1.CAPTenantOperationTypeUpgrade) + CAPTenantOperationTypeSelectorProvisioning CAPTenantOperationTypeSelector = CAPTenantOperationTypeSelector(v1alpha1.CAPTenantOperationTypeProvisioning) + CAPTenantOperationTypeSelectorDeprovisioning CAPTenantOperationTypeSelector = CAPTenantOperationTypeSelector(v1alpha1.CAPTenantOperationTypeDeprovisioning) +) + +const ( + CAPTenantEventProcessingStarted = "ProcessingStarted" + CAPTenantEventProvisioningFailed = "ProvisioningFailed" + CAPTenantEventProvisioningCompleted = "ProvisioningCompleted" + CAPTenantEventProvisioningOperationCreated = "ProvisioningOperationCreated" + CAPTenantEventDeprovisioningFailed = "DeprovisioningFailed" + CAPTenantEventDeprovisioningCompleted = "DeprovisioningCompleted" + CAPTenantEventDeprovisioningOperationCreated = "DeprovisioningOperationCreated" + CAPTenantEventUpgradeFailed = "UpgradeFailed" + CAPTenantEventUpgradeCompleted = "UpgradeCompleted" + CAPTenantEventUpgradeOperationCreated = "UpgradeOperationCreated" + CAPTenantEventTenantNetworkingModified = "TenantNetworkingModified" + CAPTenantEventVirtualServiceModificationFailed = "VirtualServiceModificationFailed" + CAPTenantEventDestinationRuleModificationFailed = "DestinationRuleModificationFailed" + CAPTenantEventInvalidReference = "InvalidReference" + CAPTenantEventAutoVersionUpdate = "AutoVersionUpdate" +) + +const ( + EventActionReconcileTenantNetworking = "ReconcileTenantNetworking" + EventActionPrepare = "Prepare" + EventActionUpgrade = "Upgrade" +) + +// maps tenant operation types (and their status) to CAPTenant status changes +var TenantOperationStatusMap = map[v1alpha1.CAPTenantOperationType]StatusInfo{ + v1alpha1.CAPTenantOperationTypeProvisioning: { + failed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateProvisioningError, conditionReason: CAPTenantEventProvisioningFailed, conditionStatus: metav1.ConditionFalse}, + handler: handleFailingTenantOperation, + }, + completed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateReady, conditionReason: CAPTenantEventProvisioningCompleted, conditionStatus: metav1.ConditionTrue}, + handler: handleCompletedProvisioningUpgradeOperation, + }, + processing: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateProvisioning, conditionReason: CAPTenantEventProvisioningOperationCreated, conditionStatus: metav1.ConditionFalse}, + handler: handleWaitingForTenantOperation, + }, + }, + v1alpha1.CAPTenantOperationTypeUpgrade: { // NOTE: during upgrades the ready condition status remains "True" as the tenant is in use + failed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateUpgradeError, conditionReason: CAPTenantEventUpgradeFailed, conditionStatus: metav1.ConditionTrue}, + handler: handleFailingTenantOperation, + }, + completed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateReady, conditionReason: CAPTenantEventUpgradeCompleted, conditionStatus: metav1.ConditionTrue}, + handler: handleCompletedProvisioningUpgradeOperation, + }, + processing: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateUpgrading, conditionReason: CAPTenantEventUpgradeOperationCreated, conditionStatus: metav1.ConditionTrue}, + handler: handleWaitingForTenantOperation, + }, + }, + v1alpha1.CAPTenantOperationTypeDeprovisioning: { + failed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateDeleting, conditionReason: CAPTenantEventDeprovisioningFailed, conditionStatus: metav1.ConditionFalse}, + handler: handleFailingTenantOperation, + }, + completed: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateDeleting, conditionReason: CAPTenantEventDeprovisioningCompleted, conditionStatus: metav1.ConditionFalse}, + handler: removeTenantFinalizers, + }, + processing: TargetStateHandler{ + target: StateCondition{state: v1alpha1.CAPTenantStateDeleting, conditionReason: CAPTenantEventDeprovisioningOperationCreated, conditionStatus: metav1.ConditionFalse}, + handler: handleWaitingForTenantOperation, + }, + }, +} + +func getTenantReconcileResultConsideringDeletion(cat *v1alpha1.CAPTenant, fallback *ReconcileResult) *ReconcileResult { + if cat.DeletionTimestamp != nil && cat.Status.State != v1alpha1.CAPTenantStateDeleting { + return NewReconcileResultWithResource(ResourceCAPTenant, cat.Name, cat.Namespace, 15*time.Second) + } + return fallback +} + +var handleWaitingForTenantOperation = func(ctx context.Context, c *Controller, cat *v1alpha1.CAPTenant, target StateCondition, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) { + // NOTE: not returning a requeue item is ok, as changes in CAPTenantOperation status will queue the item via the informer + cat.SetStatusWithReadyCondition(target.state, target.conditionStatus, target.conditionReason, fmt.Sprintf("waiting for %s %s.%s of type %s to complete", v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name, ctop.Spec.Operation)) + return NewReconcileResultWithResource(ResourceCAPTenant, cat.Name, cat.Namespace, 15*time.Second), nil // requeue while the tenant operation is being processed +} + +var handleCompletedProvisioningUpgradeOperation = func(ctx context.Context, c *Controller, cat *v1alpha1.CAPTenant, target StateCondition, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) { + message := fmt.Sprintf("%s %s.%s successfully completed", v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + c.Event(cat, ctop, corev1.EventTypeNormal, target.conditionReason, string(target.state), message) + + ca, err := c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Lister().CAPApplications(cat.Namespace).Get(cat.Spec.CAPApplicationInstance) + if err != nil { + return nil, err + } + // check for dns entries only when there are secondary domains + if len(ca.Spec.Domains.Secondary) > 0 { + // Check if all Tenant DNSEntries are Ready + processing, err := c.checkTenantDNSEntries(ctx, cat) + if err != nil { + klog.Error("error with DNS Entries for CAPTenant ", cat.Namespace, ".", cat.Name) + return nil, err + } + if processing { + // requeue to iterate this check after a delay + return NewReconcileResultWithResource(ResourceCAPTenant, cat.Name, cat.Namespace, 10*time.Second), nil + } + } + + // check and reconcile tenant virtual service + // adjust virtual service only when tenant is finalizing (after provisioning or upgrade) + requeue, err := c.reconcileTenantNetworking(ctx, cat, ctop.Spec.CAPApplicationVersionInstance, ca) + if err != nil || requeue != nil { + return requeue, err + } + + // the ObservedGeneration of the tenant should be updated here (when Ready) + cat.SetStatusWithReadyCondition(target.state, target.conditionStatus, target.conditionReason, message) + cat.SetStatusCAPApplicationVersion(ctop.Spec.CAPApplicationVersionInstance) + return getTenantReconcileResultConsideringDeletion(cat, nil), nil +} + +var handleFailingTenantOperation = func(ctx context.Context, c *Controller, cat *v1alpha1.CAPTenant, target StateCondition, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) { + var ( + message string + related runtime.Object = nil + ) + if ctop == nil { + message = fmt.Sprintf("could not identify %s for tenant state %s", v1alpha1.CAPTenantOperationKind, cat.Status.State) + } else { + message = fmt.Sprintf("%s %s.%s failed", v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + related = ctop + } + + c.Event(cat, related, corev1.EventTypeWarning, target.conditionReason, string(target.state), message) + cat.SetStatusWithReadyCondition(target.state, target.conditionStatus, target.conditionReason, message) + return getTenantReconcileResultConsideringDeletion(cat, nil), nil +} + +var removeTenantFinalizers = func(ctx context.Context, c *Controller, cat *v1alpha1.CAPTenant, target StateCondition, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) { + if ctop != nil { + c.Event(cat, ctop, corev1.EventTypeNormal, target.conditionReason, string(target.state), fmt.Sprintf("%s of %s %s.%s successfully completed; attempting to remove finalizers", ctop.Spec.Operation, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name)) + } + + // remove known finalizer + if removeFinalizer(&cat.Finalizers, FinalizerCAPTenant) { + return c.updateCAPTenant(ctx, cat, false) + } + return nil, nil +} + +func (c *Controller) reconcileCAPTenant(ctx context.Context, item QueueItem, attempts int) (requeue *ReconcileResult, err error) { + cached, err := c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Lister().CAPTenants(item.ResourceKey.Namespace).Get(item.ResourceKey.Name) + if err != nil { + return nil, handleOperatorResourceErrors(err) + } + cat := cached.DeepCopy() + + defer func() { + if statusErr := c.updateCAPTenantStatus(ctx, cat); statusErr != nil && err != nil { + err = statusErr + } + }() + + // prepare owner refs, labels, finalizers + if update, err := c.prepareCAPTenant(ctx, cat); err != nil { + return nil, err + } else if update { + return c.updateCAPTenant(ctx, cat, true) + } + + // Skip processing until the right version is set on the CAPTenant (via CAPApplication) + // This indirectly ensures that we do not create duplicate tenant operations for consumer tenant provisioning scenarios! + if cat.Spec.Version == "" { + klog.Info(v1alpha1.CAPTenantKind, " without version detected, skip processing until version is set on ", cat.Namespace, ".", cat.Name) + return requeue, nil + } + + if cat.DeletionTimestamp == nil { + // Create relevant DNSEntries for this tenant. DNS entries are checked before setting the tenant as ready + if err = c.reconcileTenantDNSEntries(ctx, cat); err != nil { + return + } + } + + // create and track CAPTenantOperations based on state, deletion timestamp, version change etc. + requeue, err = c.handleTenantOperationsForCAPTenant(ctx, cat) + if err != nil || requeue != nil { + return + } + + if cat.DeletionTimestamp == nil && cat.Status.CurrentCAPApplicationVersionInstance != "" { + requeue, err = c.reconcileTenantNetworking(ctx, cat, cat.Status.CurrentCAPApplicationVersionInstance, nil) + } + + return +} + +func (c *Controller) updateCAPTenant(ctx context.Context, cat *v1alpha1.CAPTenant, requeue bool) (result *ReconcileResult, err error) { + var catUpdated *v1alpha1.CAPTenant + catUpdated, err = c.crdClient.SmeV1alpha1().CAPTenants(cat.Namespace).Update(ctx, cat, metav1.UpdateOptions{}) + // Update reference to the resource + if catUpdated != nil { + *cat = *catUpdated + } + if requeue { + result = NewReconcileResultWithResource(ResourceCAPTenant, cat.Name, cat.Namespace, 0) + } + return +} + +func findLatestCreatedTenantOperation(ops []v1alpha1.CAPTenantOperation, selector CAPTenantOperationTypeSelector) (latest *v1alpha1.CAPTenantOperation) { + for _, op := range ops { + // workaround to fix pointer resolution after loop -> https://stackoverflow.com/questions/45967305/copying-the-address-of-a-loop-variable-in-go + ctop := op + if selector != CAPTenantOperationTypeSelectorAll && CAPTenantOperationTypeSelector(ctop.Spec.Operation) != selector { + continue + } + if latest == nil || ctop.CreationTimestamp.After(latest.CreationTimestamp.Time) { + latest = &ctop + } + } + + return latest +} + +func findCAPTenantOperationTypeFromProcessingState(state v1alpha1.CAPTenantState) v1alpha1.CAPTenantOperationType { + var opType v1alpha1.CAPTenantOperationType + for k, v := range TenantOperationStatusMap { + if v.processing.target.state == state { + opType = k + break + } + } + return opType +} + +func isTenantOperationConditionFailed(ctop *v1alpha1.CAPTenantOperation) bool { + ready := ctop.Status.GenericStatus.Conditions[0] + // NOTE: check reason != StepCompleted, instead of == StepFailed (operation could fail because of multiple reasons) + if ready.Status == metav1.ConditionTrue && ready.Reason != CAPTenantOperationConditionReasonStepCompleted { + return true + } + return false +} + +func (c *Controller) handleTenantOperationsForCAPTenant(ctx context.Context, cat *v1alpha1.CAPTenant) (*ReconcileResult, error) { + ops, err := c.getCAPTenantOperationsByType(ctx, cat, CAPTenantOperationTypeSelectorAll) + if err != nil { + return nil, err + } + + // [1] wait for active operations to complete + if len(ops.active) > 0 { + if len(ops.active) > 1 { + klog.Warningf("identified multiple active CAPTenantOperations for %s %s.%s", v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) + } + ctop := findLatestCreatedTenantOperation(ops.active, CAPTenantOperationTypeSelectorAll) + targetInfo := TenantOperationStatusMap[ctop.Spec.Operation].processing + return targetInfo.handler(ctx, c, cat, targetInfo.target, ctop) + } + + // [2] look for operations which have recently finished and set status accordingly + if cat.Status.State == v1alpha1.CAPTenantStateProvisioning || cat.Status.State == v1alpha1.CAPTenantStateUpgrading || cat.Status.State == v1alpha1.CAPTenantStateDeleting { + opType := findCAPTenantOperationTypeFromProcessingState(cat.Status.State) + ctop := findLatestCreatedTenantOperation(ops.processed, CAPTenantOperationTypeSelector(opType)) + var targetInfo TargetStateHandler + if ctop != nil { + if isTenantOperationConditionFailed(ctop) { // operation state is failed or the operation does not exist + targetInfo = TenantOperationStatusMap[opType].failed + } else { // operation state is completed + targetInfo = TenantOperationStatusMap[opType].completed + } + return targetInfo.handler(ctx, c, cat, targetInfo.target, ctop) + } // else => fall through to create new operation - also for deprovisioning + } + + // [3] create new tenant operations when necessary + return c.handleNewTenantOperations(ctx, cat, ops) +} + +func (c *Controller) handleNewTenantOperations(ctx context.Context, cat *v1alpha1.CAPTenant, ops *IdentifiedCAPTenantOperations) (*ReconcileResult, error) { + // (1)) process deletion when Deletion timestamp is set + if cat.DeletionTimestamp != nil { + if cat.Status.CurrentCAPApplicationVersionInstance == "" { + // there is no valid version so far -> deprovisioning is not required + return removeTenantFinalizers(ctx, c, cat, TenantOperationStatusMap[v1alpha1.CAPTenantOperationTypeDeprovisioning].completed.target, nil) + } else { + return c.triggerTenantOperation(ctx, cat, v1alpha1.CAPTenantOperationTypeDeprovisioning) + } + } + + // (2) Check whether a new tenant operation is required (in case of ProvisioningError / UpgradeError) + if isRequired, err := c.isNewTenantOperationRequired(ctx, cat, ops); err != nil || !isRequired { + return nil, err + } + + // (3) start provisioning when there is no current version + if cat.Status.CurrentCAPApplicationVersionInstance == "" { + return c.triggerTenantOperation(ctx, cat, v1alpha1.CAPTenantOperationTypeProvisioning) + } + + // (4) check for newer version to upgrade + return c.tryForTenantUpgrade(ctx, cat) +} + +func (c *Controller) isNewTenantOperationRequired(ctx context.Context, cat *v1alpha1.CAPTenant, ops *IdentifiedCAPTenantOperations) (bool, error) { + if cat.Status.State != v1alpha1.CAPTenantStateProvisioningError && cat.Status.State != v1alpha1.CAPTenantStateUpgradeError { + return true, nil + } + + // find existing operation (processed) - there can be no active operations at this point in the code (active operations have already been considered) + var opType v1alpha1.CAPTenantOperationType + if cat.Status.State == v1alpha1.CAPTenantStateProvisioningError { + opType = v1alpha1.CAPTenantOperationTypeProvisioning + } else { + opType = v1alpha1.CAPTenantOperationTypeUpgrade + } + ctop := findLatestCreatedTenantOperation(ops.processed, CAPTenantOperationTypeSelector(opType)) + if ctop == nil { + // a new tenant operation is to be created when there are none existing (or older ones have been deleted manually) + return true, nil + } + + cav, err := c.getCAPApplicationVersionForTenantOperationType(ctx, cat, opType) + if err != nil || cav == nil { + return false, err + } + + // a new tenant operation needs to be created when there is a different CAPApplicationVersion available for the lifecycle operation + return ctop.Spec.CAPApplicationVersionInstance != cav.Name, nil +} + +// create a CAPTenantOperation instance of a specific type (provisioning/deprovisioning/upgrade) +func (c *Controller) createCAPTenantOperation(ctx context.Context, cat *v1alpha1.CAPTenant, opType v1alpha1.CAPTenantOperationType) (*v1alpha1.CAPTenantOperation, error) { + // delete all previous tenant operations of the current type + labelsMap := map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(cat.Namespace, cat.Name), + LabelTenantOperationType: string(opType), + } + selector, err := labels.ValidatedSelectorFromSet(labelsMap) + if err != nil { + return nil, err + } + err = c.crdClient.SmeV1alpha1().CAPTenantOperations(cat.Namespace).DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: selector.String()}) + if err != nil { + return nil, fmt.Errorf("deletion of previous %ss of type %s failed: %s", v1alpha1.CAPTenantOperationKind, opType, err.Error()) + } + + // get CAPApplicationVersion to be used for the TenantOperation job + cav, err := c.getCAPApplicationVersionForTenantOperationType(ctx, cat, opType) + if err != nil { + return nil, err + } + + // determine operation steps + steps, err := deriveStepsForTenantOperation(cav, opType) + if err != nil { + return nil, err + } + + // create CAPTenantOperation + ctop := &v1alpha1.CAPTenantOperation{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: cat.Namespace, + GenerateName: cat.Name + "-", + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))}, + Finalizers: []string{FinalizerCAPTenantOperation}, + }, + Spec: v1alpha1.CAPTenantOperationSpec{ + Operation: opType, + BTPTenantIdentification: v1alpha1.BTPTenantIdentification{SubDomain: cat.Spec.SubDomain, TenantId: cat.Spec.TenantId}, + CAPApplicationVersionInstance: cav.Name, + Steps: steps, + }, + } + addCAPTenantOperationLabels(ctop, cat) // NOTE: this is very important to do here as subsequent reconciliation of tenant will be inconsistent otherwise + return c.crdClient.SmeV1alpha1().CAPTenantOperations(cat.Namespace).Create(ctx, ctop, metav1.CreateOptions{}) +} + +func deriveStepsForTenantOperation(cav *v1alpha1.CAPApplicationVersion, opType v1alpha1.CAPTenantOperationType) (steps []v1alpha1.CAPTenantOperationStep, err error) { + defaultSteps := func() { + // if there are no specified steps, add only one step of type TenantOperation + workload := getRelevantJob(v1alpha1.JobTenantOperation, cav) + if workload == nil { // fallback to CAP workload + workload = getRelevantDeployment(v1alpha1.DeploymentCAP, cav) + } + if workload == nil { + // cannot proceed further without an identified workload + err = fmt.Errorf("could not find workload of type %s or %s in %s %s.%s", v1alpha1.JobTenantOperation, v1alpha1.DeploymentCAP, v1alpha1.CAPApplicationVersionKind, cav.Namespace, cav.Name) + } else { + steps = []v1alpha1.CAPTenantOperationStep{{Name: workload.Name, Type: v1alpha1.JobTenantOperation}} + } + } + + if cav.Spec.TenantOperations == nil { + defaultSteps() + return + } + + var ops []v1alpha1.TenantOperationWorkloadReference + switch opType { + case v1alpha1.CAPTenantOperationTypeProvisioning: + ops = cav.Spec.TenantOperations.Provisioning + case v1alpha1.CAPTenantOperationTypeDeprovisioning: + ops = cav.Spec.TenantOperations.Deprovisioning + case v1alpha1.CAPTenantOperationTypeUpgrade: + ops = cav.Spec.TenantOperations.Upgrade + } + + if len(ops) == 0 { + defaultSteps() + return + } + + steps = []v1alpha1.CAPTenantOperationStep{} + addedTenantOprJob := false + for _, entry := range ops { + workload := getWorkloadByName(entry.WorkloadName, cav) + switch workload.JobDefinition.Type { + case v1alpha1.JobTenantOperation: + addedTenantOprJob = true + fallthrough + case v1alpha1.JobCustomTenantOperation: + // continuing the tenant operation on failure is not possible for tenant operation jobs + continueOnFailure := (workload.JobDefinition.Type != v1alpha1.JobTenantOperation) && entry.ContinueOnFailure + steps = append(steps, v1alpha1.CAPTenantOperationStep{Name: entry.WorkloadName, Type: workload.JobDefinition.Type, ContinueOnFailure: continueOnFailure}) + default: + continue // ignore all other types (even if specified) + } + } + if !addedTenantOprJob { // ensure step of type TenantOperation is added + return nil, fmt.Errorf("specified steps for operation %s does not contain a step of type %s", opType, v1alpha1.JobTenantOperation) + } + return +} + +// trigger CAPTenantOperation creation and change status of tenant +func (c *Controller) triggerTenantOperation(ctx context.Context, cat *v1alpha1.CAPTenant, opType v1alpha1.CAPTenantOperationType) (*ReconcileResult, error) { + // Create CAPTenantOperation + ctop, err := c.createCAPTenantOperation(ctx, cat, opType) + if err != nil { + return nil, err + } + + // call status handler + targetInfo := TenantOperationStatusMap[opType].processing + c.Event(cat, ctop, corev1.EventTypeNormal, targetInfo.target.conditionReason, string(targetInfo.target.state), fmt.Sprintf("%s %s.%s of type %s created", v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name, ctop.Spec.Operation)) + return targetInfo.handler(ctx, c, cat, targetInfo.target, ctop) +} + +func (c *Controller) getCAPTenantOperationsByType(ctx context.Context, cat *v1alpha1.CAPTenant, operationTypeSelector CAPTenantOperationTypeSelector) (*IdentifiedCAPTenantOperations, error) { + labelsMap := map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(cat.Namespace, cat.Name), + } + if operationTypeSelector != CAPTenantOperationTypeSelectorAll { + labelsMap[LabelTenantOperationType] = string(operationTypeSelector) + } + selector, err := labels.ValidatedSelectorFromSet(labelsMap) + if err != nil { + return nil, err + } + + // NOTE: do not use cache for listing (this is not a very frequent operation) + ops, err := c.crdClient.SmeV1alpha1().CAPTenantOperations(cat.Namespace).List(ctx, metav1.ListOptions{LabelSelector: selector.String()}) + if err != nil { + return nil, err + } + + var results = IdentifiedCAPTenantOperations{active: []v1alpha1.CAPTenantOperation{}, processed: []v1alpha1.CAPTenantOperation{}} + for _, ctop := range ops.Items { + if isCROConditionReady(ctop.Status.GenericStatus) { + results.processed = append(results.processed, ctop) + } else { + results.active = append(results.active, ctop) + } + } + + return &results, nil +} + +func (c *Controller) getCAPApplicationVersionForTenantOperationType(ctx context.Context, cat *v1alpha1.CAPTenant, opType v1alpha1.CAPTenantOperationType) (*v1alpha1.CAPApplicationVersion, error) { + // get owning CAPApplication + ca, _ := c.getCachedCAPApplication(cat.Namespace, cat.Spec.CAPApplicationInstance) + + // get CAPApplication version + switch opType { + case v1alpha1.CAPTenantOperationTypeProvisioning, v1alpha1.CAPTenantOperationTypeUpgrade: // for provisioning or upgrade - use the relevant CAPApplicationVersion + // get relevant CAPApplicationVersion + cav, err := c.getRelevantCAPApplicationVersion(ctx, ca, cat.Spec.Version) + if err != nil { + return nil, err + } + klog.V(2).Info("identified CAPApplicationVersion ", cav.Namespace, ".", cav.Name, " (", cav.Spec.Version, ") for ", opType, " of CAPTenant ", cat.Namespace, ".", cat.Name) + return cav, nil + case v1alpha1.CAPTenantOperationTypeDeprovisioning: // for deletion - use the current CAPApplicationVersion (from status) + if cat.Status.CurrentCAPApplicationVersionInstance == "" { + return nil, fmt.Errorf("cannot identify %s for %s %s.%s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) + } + cav, err := c.crdClient.SmeV1alpha1().CAPApplicationVersions(cat.Namespace).Get(ctx, cat.Status.CurrentCAPApplicationVersionInstance, metav1.GetOptions{}) + if err != nil { + return nil, err + } + // verify status of CAPApplicationVersion + if !isCROConditionReady(cav.Status.GenericStatus) { + return nil, fmt.Errorf("%s %s.%s is not %s to be used for %s", v1alpha1.CAPApplicationVersionKind, cav.Namespace, cav.Name, v1alpha1.CAPApplicationVersionStateReady, opType) + } + // verify owner reference + if cav.Spec.CAPApplicationInstance != ca.Name { + return nil, fmt.Errorf("found deviating owner references for %s %s.%s and %s %s.%s", v1alpha1.CAPApplicationVersionKind, cav.Namespace, cav.Name, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) + } + return cav, nil + } + return nil, fmt.Errorf("unknown error when resolving %s for %s %s.%s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) +} + +func addCAPTenantLabels(cat *v1alpha1.CAPTenant, ca *v1alpha1.CAPApplication) (updated bool) { + appMetadata := appMetadataIdentifiers{ + globalAccountId: ca.Spec.GlobalAccountId, + appName: ca.Spec.BTPAppName, + ownerInfo: &ownerInfo{ + ownerNamespace: ca.Namespace, + ownerName: ca.Name, + ownerGeneration: ca.Generation, + }, + } + if updateLabelAnnotationMetadata(&cat.ObjectMeta, &appMetadata) { + updated = true + } + if _, ok := cat.ObjectMeta.Labels[LabelTenantId]; !ok { + cat.ObjectMeta.Labels[LabelTenantId] = cat.Spec.TenantId + updated = true + } + if _, ok := cat.ObjectMeta.Labels[LabelTenantType]; !ok { + if ca.Spec.Provider.TenantId == cat.Spec.TenantId { + cat.ObjectMeta.Labels[LabelTenantType] = ProviderTenantType + } else { + cat.ObjectMeta.Labels[LabelTenantType] = ConsumerTenantType + } + updated = true + } + return updated +} + +func (c *Controller) prepareCAPTenant(ctx context.Context, cat *v1alpha1.CAPTenant) (update bool, err error) { + // Do nothing when object is deleted + if cat.DeletionTimestamp != nil { + return false, nil + } + ca, err := c.getCachedCAPApplication(cat.Namespace, cat.Spec.CAPApplicationInstance) + if err != nil { + msg := fmt.Sprintf("invalid %s reference", v1alpha1.CAPApplicationKind) + c.Event(cat, nil, corev1.EventTypeWarning, CAPTenantEventInvalidReference, EventActionPrepare, msg) + return false, err + } + + // create owner reference - CAPApplication + if _, ok := getOwnerByKind(cat.OwnerReferences, v1alpha1.CAPApplicationKind); !ok { + cat.OwnerReferences = append(cat.OwnerReferences, *metav1.NewControllerRef(ca, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationKind))) + update = true + } + + if addCAPTenantLabels(cat, ca) { + update = true + } + + if cat.DeletionTimestamp == nil { + // set finalizers if not added + if cat.Finalizers == nil { + cat.Finalizers = []string{} + } + if addFinalizer(&cat.Finalizers, FinalizerCAPTenant) { + update = true + } + } + return update, nil +} + +func (c *Controller) tryForTenantUpgrade(ctx context.Context, cat *v1alpha1.CAPTenant) (*ReconcileResult, error) { + // try for upgrade only when upgrade strategy is not 'never' + if cat.Spec.VersionUpgradeStrategy == v1alpha1.VersionUpgradeStrategyTypeNever { + return nil, nil + } + + ca, err := c.getCachedCAPApplication(cat.Namespace, cat.Spec.CAPApplicationInstance) + if err != nil { + return nil, err + } + + // fetch CAPApplicationVersion as per current tenant spec + cav, err := c.getRelevantCAPApplicationVersion(ctx, ca, cat.Spec.Version) + if err != nil { + return nil, err + } + + // compare with current version + if cat.Status.CurrentCAPApplicationVersionInstance != cav.Name { + // update status of the CAPTenant - ready for upgrade + return c.triggerTenantOperation(ctx, cat, v1alpha1.CAPTenantOperationTypeUpgrade) + } + + return nil, nil +} + +func (c *Controller) updateCAPTenantStatus(ctx context.Context, cat *v1alpha1.CAPTenant) error { + if isDeletionImminent(&cat.ObjectMeta) { + return nil + } + + if len(cat.Status.Conditions) == 0 { + // initialize conditions - with processing status + cat.SetStatusWithReadyCondition(cat.Status.State, metav1.ConditionFalse, CAPTenantEventProcessingStarted, "") + } + catUpdated, err := c.crdClient.SmeV1alpha1().CAPTenants(cat.Namespace).UpdateStatus(ctx, cat, metav1.UpdateOptions{}) + // update reference to the resource + if catUpdated != nil { + *cat = *catUpdated + } + return err +} + +func (*Controller) enforceTenantResourceOwnership(objMeta *metav1.ObjectMeta, typeMeta *metav1.TypeMeta, cat *v1alpha1.CAPTenant) (bool, error) { + var update bool + // verify owner references + if owner, ok := getOwnerByKind(objMeta.OwnerReferences, v1alpha1.CAPTenantKind); !ok { + // set owner reference + if objMeta.OwnerReferences == nil { + objMeta.OwnerReferences = []metav1.OwnerReference{} + } + objMeta.OwnerReferences = append(objMeta.OwnerReferences, *metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))) + update = true + } else if owner.Name != cat.Name { + return false, fmt.Errorf("invalid owner reference found for %s %s.%s", typeMeta.Kind, objMeta.Namespace, objMeta.Name) + } + + // set labels, but do not set update to true (set based on owner reference or spec changes) + if objMeta.Labels == nil { + objMeta.Labels = map[string]string{} + } + objMeta.Labels[LabelOwnerIdentifierHash] = sha1Sum(cat.Namespace, cat.Name) + objMeta.Labels[LabelOwnerGeneration] = strconv.FormatInt(cat.Generation, 10) + if objMeta.Annotations == nil { + objMeta.Annotations = map[string]string{} + } + objMeta.Annotations[AnnotationOwnerIdentifier] = cat.Namespace + "." + cat.Name + + return update, nil +} diff --git a/internal/controller/reconcile-captenant_test.go b/internal/controller/reconcile-captenant_test.go new file mode 100644 index 0000000..898388d --- /dev/null +++ b/internal/controller/reconcile-captenant_test.go @@ -0,0 +1,591 @@ +package controller + +import ( + "context" + "os" + "testing" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" +) + +func TestInvalidCAPApplication(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "new captenant with invalid capapplication reference", + initialResources: []string{"testdata/captenant/cat-01.initial.yaml"}, + expectError: true, + }, + ) +} + +func TestLabelsOwnerRefs(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-consumer"}}, + TestData{ + description: "new captenant without labels, finalizers and owner references", + initialResources: []string{"testdata/common/capapplication.yaml", "testdata/captenant/cat-02.initial.yaml"}, + expectedResources: "testdata/captenant/cat-02.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Name: "test-cap-01-consumer", Namespace: "default"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-3351", + }, + }, + ) +} + +func TestWithoutSpecVersion(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-consumer"}}, + TestData{ + description: "new captenant with labels, finalizers and owner references and no version in spec", + initialResources: []string{"testdata/common/capapplication.yaml", "testdata/captenant/cat-with-no-version.yaml"}, + expectedResources: "testdata/captenant/cat-with-no-version.yaml", + }, + ) +} + +func TestInvalidVersion(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-consumer"}}, + TestData{ + description: "new captenant with invalid version", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/captenant/cat-14.initial.yaml", + }, + expectError: true, + }, + ) + + if err.Error() != "could not find a CAPApplicationVersion with status Ready for CAPApplication default.test-cap-01 and version 5.6.7" { + t.Error("error message did not match expected") + } +} + +func TestCAPTenantStartProvisioning(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-consumer"}}, + TestData{ + description: "new captenant start provisioning (with secondary domains)", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-03.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-03.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-consumer"}}}, + }, + ) +} + +func TestCAPTenantProvisioningCompletedDNSEntriesNotReady(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation completed dns entries not ready", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/provider-tenant-dnsentry-not-ready.yaml", + "testdata/captenant/cat-04.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-04.initial.yaml", // expect the same resource state + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantProvisioningCompleted(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation completed (creates virtual service and destination rule)", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-04.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-04.expected.yaml", + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2811"}, + }, + ) +} + +func TestCAPTenantProvisioningCompletedDestinationRuleModificationFailure(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation completed (destination rule creation fails)", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-04.initial.yaml", + }, + expectError: true, + mockErrorForResources: []ResourceAction{{Verb: "create", Group: "networking.istio.io", Version: "v1beta1", Resource: "destinationrules", Namespace: "default", Name: "test-cap-01-provider"}}, + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2811"}, + }, + ) + if err.Error() != "mocked api error (destinationrules.networking.istio.io/v1beta1)" { + t.Error("error message is different from expected") + } +} + +func TestCAPTenantProvisioningFailed(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation failed", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-05.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-05.expected.yaml", + }, + ) +} + +func TestCAPTenantProvisioningRequestFailedWithInvalidEnv(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation failed due to invalid env (status reason)", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-invalid-env.yaml", + "testdata/captenant/cat-26.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-05.expected.yaml", + }, + ) +} + +func TestCAPTenantProvisioningRequestDeleted(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant provisioning operation deleted while tenant is provisioning", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-20.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-20.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantWaitingForProvisioning(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant waiting for provisioning operation", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-06.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-06.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantStartUpgradeWithStrategyAlways(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant start upgrade from ready state with strategy always", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/cat-07.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-07.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantStartUpgradeWithStrategyNever(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant start upgrade from ready state with strategy never ", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/cat-08.initial.yaml", + "testdata/captenant/provider-tenant-vs-v1.yaml", + "testdata/captenant/provider-tenant-dr-v1.yaml", + }, + expectedResources: "testdata/captenant/cat-08.expected.yaml", + }, + ) +} + +func TestCAPTenantDeprovisioningFromReady(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant deprovisioning from ready", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/cat-09.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-09.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantDeprovisioningCompleted(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant deprovisioning completed", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-10.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-10.expected.yaml", + }, + ) +} + +func TestCAPTenantDeprovisioningFromProvisioningError(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant deprovisioning from provisioning error", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/captenant/cat-11.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-11.expected.yaml", + }, + ) +} + +func TestCAPTenantUpgradeOperationCompleted(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant upgrade operation completed expecting virtual service, destination rule adjustments", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/provider-tenant-vs-v1.yaml", + "testdata/captenant/provider-tenant-dr-v1.yaml", + "testdata/captenant/cat-13.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-13.expected.yaml", + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2811", "ERP4SMEPREPWORKAPPPLAT-3206"}, + }, + ) +} + +func TestCAPTenantUpgradeOperationCompletedPreviousVersionsLimited(t *testing.T) { + os.Setenv(v1alpha1.EnvMaxTenantVersionHistory, "3") + defer os.Unsetenv(v1alpha1.EnvMaxTenantVersionHistory) + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant upgrade operation completed expecting limited previous versions in status to be adjusted", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/provider-tenant-vs-v1.yaml", + "testdata/captenant/provider-tenant-dr-v1.yaml", + "testdata/captenant/cat-29.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-29.expected.yaml", + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-3206"}, + }, + ) +} + +func TestCAPTenantUpgradeRequestCompletedIncorrectVirtualServiceOwner(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant upgrade operation completed, existing virtual service owner wrong", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-22.initial.yaml", + }, + expectError: true, + }, + ) + if err.Error() != "invalid owner reference found for VirtualService default.test-cap-01-provider" { + t.Error("wrong error message") + } +} + +func TestCAPTenantUpgradeRequestCompletedWithDeletionTriggered(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "captenant upgrade operation completed and deletion timestamp set", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-21.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-21.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantSubdomainChange(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "update captenant subdomain (no existing destination rule)", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/changed-provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-15.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-15.expected.yaml", + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2811"}, + }, + ) +} + +func TestAdjustVirtualServiceWithoutOperatorGateway(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "reconcile virtual service (subdomain change) when operator gateway is not ready", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/changed-provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-15.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-16.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantDNSEntryModified(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "reconcile DNS Entry (subdomain change) update from existing DNSEntry", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/to-be-updated-provider-tenant-dnsentry.yaml", + "testdata/captenant/cat-17.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-17.expected.yaml", + // DeleteCollection does not work for fake test client - the common_test framework currently mocks it by matching (only) labels + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-1817", "ERP4SMEPREPWORKAPPPLAT-2707", "ERP4SMEPREPWORKAPPPLAT-2811"}, + }, + ) +} + +func TestCAPTenantDNSEntryDeletedInCluster(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "reconcile DNS Entry (subdomain change) when existing DNSEntry was deleted in cluster", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/captenant/cat-15.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-17.expected.yaml", + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-1817", "ERP4SMEPREPWORKAPPPLAT-2707"}, + }, + ) +} + +func TestCAPTenantWithUpgradeErrorSameVersion(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "tenant in UpgradeError state, no spec update, failed mtxrequest exists - expect no new mtxrequest", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/operator-gateway.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/common/capapplicationversion-v3.yaml", + "testdata/captenant/cat-23.initial.yaml", + "testdata/captenant/provider-tenant-vs-v1.yaml", + "testdata/captenant/provider-tenant-dr-v1.yaml", + }, + expectedResources: "testdata/captenant/cat-23.expected.yaml", + }, + ) +} + +func TestCAPTenantWithUpgradeErrorUpdatedVersion(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "tenant in UpgradeError state, spec version incremented, failed mtxrequest exists - expect new mtxrequest to be created", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/common/capapplicationversion-v3.yaml", + "testdata/captenant/cat-24.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-24.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2977", // `Ready` condition stays `True` through upgrades + }, + }, + ) +} + +func TestCAPTenantWithUpgradeErrorSameVersionMTXRequestRemoved(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + description: "tenant in UpgradeError state, no spec update, failed mtxrequest removed - expect new mtxrequest", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2.yaml", + "testdata/common/capapplicationversion-v3.yaml", + "testdata/captenant/cat-25.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-25.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantUpgradeWithoutTenantOperationWorkloadInVersion(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "captenant start upgrade deriving TenantOperation workload from CAP workload", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/capapplicationversion-v2-no-mtx-workload.yaml", + "testdata/captenant/cat-07.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-27.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-provider"}}}, + }, + ) +} + +func TestCAPTenantStartProvisioningWithMultipleOperationSteps(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenant, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-consumer"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "captenant start provisioning with version containing multiple operation steps", + initialResources: []string{ + "testdata/common/istio-ingress.yaml", + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/captenant/cat-28.initial.yaml", + }, + expectedResources: "testdata/captenant/cat-28.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ResourceCAPTenant: {{Namespace: "default", Name: "test-cap-01-consumer"}}}, + }, + ) +} diff --git a/internal/controller/reconcile-captenantoperation.go b/internal/controller/reconcile-captenantoperation.go new file mode 100644 index 0000000..c30d211 --- /dev/null +++ b/internal/controller/reconcile-captenantoperation.go @@ -0,0 +1,678 @@ +package controller + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "os" + "regexp" + "strconv" + "strings" + "time" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "golang.org/x/exp/slices" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" +) + +type ProvisioningPayload struct { + SubscribedSubdomain string `json:"subscribedSubdomain"` + EventType string `json:"eventType"` +} + +type UpgradePayload struct { + Tenants []string `json:"tenants"` + AutoUnDeploy bool `json:"autoUndeploy"` +} + +type tentantOperationWorkload struct { + image string + imagePullPolicy corev1.PullPolicy + command []string + env []corev1.EnvVar + resources corev1.ResourceRequirements + securityContext *corev1.SecurityContext + podSecurityContext *corev1.PodSecurityContext + backoffLimit *int32 + ttlSecondsAfterFinished *int32 +} + +const ( + CAPTenantOperationEventInvalidReference = "InvalidReference" +) + +const ( + EnvMTXJobImage = "MTX_JOB_IMAGE" + MTXJobImageAllowedPattern = "^ghcr.io/sap/" + MTXJobImageDefault = "ghcr.io/sap/cap-operator/mtx-job" + EnvIsMTXSEnabled = "IS_MTXS_ENABLED" +) + +type cros struct { + CAPTenant *v1alpha1.CAPTenant + CAPApplication *v1alpha1.CAPApplication + CAPApplicationVersion *v1alpha1.CAPApplicationVersion +} + +const ( + CAPTenantOperationConditionReasonStepProcessing string = "StepProcessing" + CAPTenantOperationConditionReasonStepCompleted string = "StepCompleted" + CAPTenantOperationConditionReasonStepFailed string = "StepFailed" + CAPTenantOperationConditionReasonStepInitiated string = "StepInitiated" + CAPTenantOperationConditionReasonStepProcessingError string = "StepProcessingError" +) + +const ( + EventActionCreateJob = "CreateJob" + EventActionTrackJob = "TrackJob" +) + +func (c *Controller) reconcileCAPTenantOperation(ctx context.Context, item QueueItem, attempts int) (result *ReconcileResult, err error) { + // cached, err := c.crdInformerFactory.Sme().V1alpha1().CAPTenantOperations().Lister().CAPTenantOperations(item.ResourceKey.Namespace).Get(item.ResourceKey.Name) + cached, err := c.crdClient.SmeV1alpha1().CAPTenantOperations(item.ResourceKey.Namespace).Get(ctx, item.ResourceKey.Name, metav1.GetOptions{}) + + if err != nil { + return nil, handleOperatorResourceErrors(err) + } + ctop := cached.DeepCopy() + + defer func() { + if statusErr := c.updateCAPTenantOperationStatus(ctx, ctop); err == nil { + err = statusErr + } + }() + + // prepare owner refs, labels, finalizers + if update, err := c.prepareCAPTenantOperation(ctop); err != nil { + return nil, err + } else if update { + return c.updateCAPTenantOperation(ctx, ctop, true) + } + + if !isCROConditionReady(ctop.Status.GenericStatus) { + return c.reconcileTenantOperationSteps(ctx, ctop) + } else if ctop.DeletionTimestamp != nil { + return c.handleCAPTenantOperationDeletion(ctx, ctop) + } + + return result, err +} + +func (c *Controller) updateCAPTenantOperationStatus(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) error { + if isDeletionImminent(&ctop.ObjectMeta) { + return nil + } + + if ctop.DeletionTimestamp != nil { + // set appropriate state for deletion + ctop.Status.State = v1alpha1.CAPTenantOperationStateDeleting + } else if ctop.Status.State == "" { + // start processing + ctop.Status.State = v1alpha1.CAPTenantOperationStateProcessing + } + + ctopUpdated, err := c.crdClient.SmeV1alpha1().CAPTenantOperations(ctop.Namespace).UpdateStatus(ctx, ctop, metav1.UpdateOptions{}) + // update reference to the resource + if ctopUpdated != nil { + *ctop = *ctopUpdated + } + return err +} + +func (c *Controller) prepareCAPTenantOperation(ctop *v1alpha1.CAPTenantOperation) (update bool, err error) { + // Do nothing when object is deleted + if ctop.DeletionTimestamp != nil { + return false, nil + } + cat, err := c.getCachedCAPTenant(ctop.Namespace, ctop.Spec.TenantId, true) + if err != nil { + msg := fmt.Sprintf("invalid %s reference", v1alpha1.CAPTenantKind) + c.Event(ctop, nil, corev1.EventTypeWarning, CAPTenantOperationEventInvalidReference, EventActionPrepare, msg) + return false, err + } + + // create owner reference - CAPTenant + if _, ok := getOwnerByKind(ctop.OwnerReferences, v1alpha1.CAPTenantKind); !ok { + ctop.OwnerReferences = append(ctop.OwnerReferences, *metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))) + update = true + } + + if addCAPTenantOperationLabels(ctop, cat) { + update = true + } + + if ctop.DeletionTimestamp == nil { + // set finalizers if not added + if ctop.Finalizers == nil { + ctop.Finalizers = []string{} + } + if addFinalizer(&ctop.Finalizers, FinalizerCAPTenantOperation) { + update = true + } + } + + return +} + +func (c *Controller) getCachedCAPTenantFromOwnerReferences(refs []metav1.OwnerReference, namespace string) (*v1alpha1.CAPTenant, error) { + // get owning CAPTenant + owner, ok := getOwnerByKind(refs, v1alpha1.CAPTenantKind) + if !ok { + return nil, fmt.Errorf("could not find %s as owner reference", v1alpha1.CAPTenantKind) + } + return c.getCachedCAPTenant(namespace, owner.Name, false) +} + +func (c *Controller) updateCAPTenantOperation(ctx context.Context, ctop *v1alpha1.CAPTenantOperation, requeue bool) (result *ReconcileResult, err error) { + var ctopUpdated *v1alpha1.CAPTenantOperation + ctopUpdated, err = c.crdClient.SmeV1alpha1().CAPTenantOperations(ctop.Namespace).Update(ctx, ctop, metav1.UpdateOptions{}) + // Update reference to the resource + if ctopUpdated != nil { + *ctop = *ctopUpdated + } + if requeue { + result = NewReconcileResultWithResource(ResourceCAPTenantOperation, ctop.Name, ctop.Namespace, 1*time.Second) + } + return +} + +func (c *Controller) handleCAPTenantOperationDeletion(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) (*ReconcileResult, error) { + // remove finalizer + update := removeFinalizer(&ctop.Finalizers, FinalizerCAPTenantOperation) + if update { + return c.updateCAPTenantOperation(ctx, ctop, false) + } + return nil, nil +} + +func (c *Controller) reconcileTenantOperationSteps(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) (result *ReconcileResult, err error) { + /* NOTE REGARDING STEPS: + * - Initially the the first step (1) is identified and updated in the status + * - the job for the current step is created only in the next pass, which ensures that the current step in the status is always consistent + * - when the job for the current step gets completed the current step is incremented in the status (a job created in the subsequent pass) + * - the steps are sequentially executed till the end + */ + + defer func() { + if err != nil { + c.Event(ctop, nil, corev1.EventTypeWarning, CAPTenantOperationConditionReasonStepProcessingError, EventActionTrackJob, err.Error()) + } + }() + + if ctop.Status.CurrentStep == nil { // set initial step + if len(ctop.Spec.Steps) == 0 { + err = fmt.Errorf("operation steps missing in %s %s.%s", v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + ctop.SetStatusWithReadyCondition(v1alpha1.CAPTenantOperationStateFailed, metav1.ConditionTrue, CAPTenantOperationConditionReasonStepProcessingError, err.Error()) + return + } + var initStep uint32 = 1 + ctop.SetStatusCurrentStep(&initStep, nil) + return NewReconcileResultWithResource(ResourceCAPTenantOperation, ctop.Name, ctop.Namespace, 0), nil + } + + defer func() { + if err != nil { // set step processing error in status + ctop.SetStatusWithReadyCondition(ctop.Status.State, metav1.ConditionFalse, CAPTenantOperationConditionReasonStepProcessingError, err.Error()) + } + }() + + // try to fetch active job + job, err := c.getActiveCAPTenantOperationJob(ctx, ctop) + if err != nil { + return + } + + if job == nil { // create job for step + result, err = c.initiateJobForCAPTenantOperationStep(ctx, ctop) + } else { // track the job + if ctop.Status.ActiveJob == nil || job.Name != *ctop.Status.ActiveJob { // check whether status is in sync. + ctop.SetStatusCurrentStep(ctop.Status.CurrentStep, &job.Name) + } + result = c.setCAPTenantOperationStatusFromJob(ctop, job) + } + + return +} + +func (c *Controller) getActiveCAPTenantOperationJob(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) (*batchv1.Job, error) { + // NOTE: read using label selector from the api server (not the cache) + currentStep := ctop.Spec.Steps[*ctop.Status.CurrentStep-1] + labelsMap := map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(ctop.Namespace, ctop.Name), + LabelTenantOperationType: string(ctop.Spec.Operation), + LabelTenantOperationStep: strconv.FormatInt(int64(*ctop.Status.CurrentStep), 10), // NOTE: step is required to read the job + LabelWorkloadType: string(currentStep.Type), // NOTE: use step type and not workload type as TenantOperation could be derived from CAP + LabelWorkloadName: currentStep.Name, + } + selector := labels.SelectorFromSet(labelsMap) + jobs, err := c.kubeClient.BatchV1().Jobs(ctop.Namespace).List(ctx, metav1.ListOptions{LabelSelector: selector.String()}) + if err != nil { + return nil, err + } + + switch len(jobs.Items) { + case 0: + return nil, nil + case 1: + return &jobs.Items[0], nil + default: + return nil, fmt.Errorf("multiple jobs exist for step %v of %s %s.%s", *ctop.Status.CurrentStep, v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + } +} + +func (c *Controller) setCAPTenantOperationStatusFromJob(ctop *v1alpha1.CAPTenantOperation, job *batchv1.Job) (result *ReconcileResult) { + var requeueAfter time.Duration = 1 * time.Second + status := struct { + state v1alpha1.CAPTenantOperationState + conditionReason string + conditionStatus metav1.ConditionStatus + conditionMessage string + eventType string + }{} + + isFinalStep := false + if *ctop.Status.CurrentStep == uint32(len(ctop.Spec.Steps)) { + isFinalStep = true + } + + processStepCompletion := func() { + status.conditionReason = CAPTenantOperationConditionReasonStepCompleted + if isFinalStep { + status.state = v1alpha1.CAPTenantOperationStateCompleted + status.conditionStatus = metav1.ConditionTrue + ctop.SetStatusCurrentStep(nil, nil) + } else { + status.state = v1alpha1.CAPTenantOperationStateProcessing + status.conditionStatus = metav1.ConditionFalse + nxtStep := *ctop.Status.CurrentStep + 1 + ctop.SetStatusCurrentStep(&nxtStep, nil) + } + } + + jobState := getJobState(job) + switch jobState { + case JobStateComplete: + status.conditionMessage = fmt.Sprintf("step %v/%v : job %s.%s completed", *ctop.Status.CurrentStep, len(ctop.Spec.Steps), job.Namespace, job.Name) + status.eventType = corev1.EventTypeNormal + processStepCompletion() + case JobStateFailed: + status.conditionMessage = fmt.Sprintf("step %v/%v : job %s.%s failed", *ctop.Status.CurrentStep, len(ctop.Spec.Steps), job.Namespace, job.Name) + status.eventType = corev1.EventTypeWarning + if step := ctop.Spec.Steps[*ctop.Status.CurrentStep-1]; step.ContinueOnFailure { + status.conditionMessage = status.conditionMessage + "; continuing operation" + processStepCompletion() // NOTE: condition.reason needs to be set to StepCompleted in this case, as this is looked up by the CAPTenant + } else { + status.conditionReason = CAPTenantOperationConditionReasonStepFailed + status.state = v1alpha1.CAPTenantOperationStateFailed + status.conditionStatus = metav1.ConditionTrue + ctop.SetStatusCurrentStep(nil, nil) + } + case JobStateProcessing: + status.conditionReason = CAPTenantOperationConditionReasonStepProcessing + status.conditionMessage = fmt.Sprintf("step %v/%v : waiting for job %s.%s", *ctop.Status.CurrentStep, len(ctop.Spec.Steps), job.Namespace, job.Name) + status.state = v1alpha1.CAPTenantOperationStateProcessing + status.conditionStatus = metav1.ConditionFalse + requeueAfter = 15 * time.Second + } + + ctop.SetStatusWithReadyCondition(status.state, status.conditionStatus, status.conditionReason, status.conditionMessage) + if status.eventType != "" { + c.Event(ctop, job, status.eventType, status.conditionReason, EventActionTrackJob, status.conditionMessage) + } + + return NewReconcileResultWithResource(ResourceCAPTenantOperation, ctop.Name, ctop.Namespace, requeueAfter) +} + +func (c *Controller) getCAPResourcesFromCAPTenantOperation(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) (*cros, error) { + // get owning CAPTenant + cat, err := c.getCachedCAPTenantFromOwnerReferences(ctop.OwnerReferences, ctop.Namespace) + if err != nil { + return nil, err + } + + // get owning CAPApplication + owner, ok := getOwnerByKind(cat.OwnerReferences, v1alpha1.CAPApplicationKind) + if !ok { + return nil, fmt.Errorf("%s could not be identified for %s %s.%s", v1alpha1.CAPApplicationKind, v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + } + ca, err := c.getCachedCAPApplication(cat.Namespace, owner.Name) + if err != nil { + return nil, err + } + + // get specified CAPApplicationVersion + cav, err := c.crdClient.SmeV1alpha1().CAPApplicationVersions(ca.Namespace).Get(ctx, ctop.Spec.CAPApplicationVersionInstance, metav1.GetOptions{}) + if err != nil { + return nil, err + } + // verify status of CAPApplicationVersion + if !isCROConditionReady(cav.Status.GenericStatus) { + return nil, fmt.Errorf("%s %s is not %s to be used in %s %s.%s", v1alpha1.CAPApplicationVersionKind, cav.Name, v1alpha1.CAPApplicationVersionStateReady, v1alpha1.CAPTenantOperationKind, ctop.Namespace, ctop.Name) + } + + return &cros{ + CAPApplication: ca, + CAPTenant: cat, + CAPApplicationVersion: cav, + }, nil +} + +func (c *Controller) initiateJobForCAPTenantOperationStep(ctx context.Context, ctop *v1alpha1.CAPTenantOperation) (result *ReconcileResult, err error) { + relatedResources, err := c.getCAPResourcesFromCAPTenantOperation(ctx, ctop) + if err != nil { + return nil, err + } + + // get workload + step := ctop.Spec.Steps[*ctop.Status.CurrentStep-1] + workload := getWorkloadByName(step.Name, relatedResources.CAPApplicationVersion) + if workload == nil { + return nil, fmt.Errorf("could not find workload %s in %s %s.%s", step.Name, v1alpha1.CAPApplicationVersionKind, relatedResources.CAPApplicationVersion.Namespace, relatedResources.CAPApplicationVersion.Name) + } + + // create VCAP secret from consumed BTP services + consumedServiceInfos := getConsumedServiceInfos(getConsumedServiceMap(workload.ConsumedBTPServices), relatedResources.CAPApplication.Spec.BTP.Services) + vcapSecretName, err := createVCAPSecret(ctop.Name+"-"+strings.ToLower(workload.Name), ctop.Namespace, *metav1.NewControllerRef(ctop, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantOperationKind)), consumedServiceInfos, c.kubeClient) + if err != nil { + return nil, err + } + + annotations := copyMaps(workload.Annotations, map[string]string{ + AnnotationIstioSidecarInject: "false", + AnnotationBTPApplicationIdentifier: relatedResources.CAPApplication.Spec.GlobalAccountId + "." + relatedResources.CAPApplication.Spec.BTPAppName, + AnnotationOwnerIdentifier: ctop.Namespace + "." + ctop.Name, + }) + + labels := copyMaps(workload.Labels, map[string]string{ + App: relatedResources.CAPApplication.Spec.BTPAppName, + LabelBTPApplicationIdentifierHash: sha1Sum(relatedResources.CAPApplication.Spec.GlobalAccountId, relatedResources.CAPApplication.Spec.BTPAppName), + LabelOwnerIdentifierHash: sha1Sum(ctop.Namespace, ctop.Name), + LabelOwnerGeneration: strconv.FormatInt(ctop.Generation, 10), + LabelTenantOperationType: string(ctop.Spec.Operation), + LabelTenantOperationStep: strconv.FormatInt(int64(*ctop.Status.CurrentStep), 10), // NOTE: step is required to read the job + LabelWorkloadName: step.Name, + LabelWorkloadType: string(step.Type), // NOTE: use step type and not workload type as TenantOperation could be derived from CAP + LabelResourceCategory: CategoryWorkload, + }) + + params := &jobCreateParams{ + namePrefix: relatedResources.CAPTenant.Name + "-" + workload.Name + "-", + labels: labels, + annotations: annotations, + envFromVCAPSecret: getEnvFrom(vcapSecretName), + imagePullSecrets: convertToLocalObjectReferences(relatedResources.CAPApplicationVersion.Spec.RegistrySecrets), + version: relatedResources.CAPApplicationVersion.Spec.Version, + } + + var job *batchv1.Job + if ctop.Spec.Steps[*ctop.Status.CurrentStep-1].Type == v1alpha1.JobTenantOperation { + if params.xsuaaInstanceName, err = getXSUAAInstanceName(consumedServiceInfos, relatedResources, c.kubeClient); err != nil { + return + } + job, err = c.createTenantOperationJob(ctx, ctop, workload, params) + } else { // custom tenant operation + job, err = c.createCustomTenantOperationJob(ctx, ctop, workload, params) + } + if err != nil { + return + } + + msg := fmt.Sprintf("step %v/%v : job %s.%s created", *ctop.Status.CurrentStep, len(ctop.Spec.Steps), job.Namespace, job.Name) + ctop.SetStatusWithReadyCondition(v1alpha1.CAPTenantOperationStateProcessing, metav1.ConditionFalse, CAPTenantOperationConditionReasonStepInitiated, msg) + ctop.SetStatusCurrentStep(ctop.Status.CurrentStep, &job.Name) + c.Event(ctop, job, corev1.EventTypeNormal, CAPTenantOperationConditionReasonStepInitiated, EventActionCreateJob, msg) + + return NewReconcileResultWithResource(ResourceCAPTenantOperation, ctop.Name, ctop.Namespace, 15*time.Second), nil +} + +type jobCreateParams struct { + namePrefix string + labels map[string]string + annotations map[string]string + envFromVCAPSecret []corev1.EnvFromSource + imagePullSecrets []corev1.LocalObjectReference + version string + xsuaaInstanceName string +} + +func (c *Controller) createTenantOperationJob(ctx context.Context, ctop *v1alpha1.CAPTenantOperation, workload *v1alpha1.WorkloadDetails, params *jobCreateParams) (*batchv1.Job, error) { + // prepare payload request + var ( + payload []byte + err error + ) + if ctop.Spec.Operation == v1alpha1.CAPTenantOperationTypeProvisioning { + payload, err = json.Marshal(ProvisioningPayload{SubscribedSubdomain: ctop.Spec.SubDomain, EventType: "CREATE"}) + } else if ctop.Spec.Operation == v1alpha1.CAPTenantOperationTypeUpgrade { + payload, err = json.Marshal(UpgradePayload{Tenants: []string{ctop.Spec.TenantId}, AutoUnDeploy: true}) + } else { // deprovisioning + payload, err = json.Marshal(struct{}{}) + } + if err != nil { + return nil, err + } + + derivedWorkload := deriveWorkloadForTenantOperation(workload) + + // create job for tenant operation (provisioning / upgrade / deprovisioning) + job := &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: params.namePrefix, // generate name for each step + Namespace: ctop.Namespace, + Labels: params.labels, + Annotations: params.annotations, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(ctop, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantOperationKind))}, + }, + Spec: batchv1.JobSpec{ + BackoffLimit: derivedWorkload.backoffLimit, + TTLSecondsAfterFinished: derivedWorkload.ttlSecondsAfterFinished, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: params.labels, + Annotations: params.annotations, + }, + Spec: corev1.PodSpec{ + RestartPolicy: corev1.RestartPolicyNever, + ImagePullSecrets: params.imagePullSecrets, + Containers: getContainers(payload, ctop, derivedWorkload, workload, params), + SecurityContext: derivedWorkload.podSecurityContext, + }, + }, + }, + } + + return c.kubeClient.BatchV1().Jobs(ctop.Namespace).Create(ctx, job, metav1.CreateOptions{}) +} + +func isMTXSDisabled(envVars []corev1.EnvVar) bool { + return slices.ContainsFunc(envVars, func(env corev1.EnvVar) bool { return env.Name == EnvIsMTXSEnabled && env.Value == "false" }) +} + +func getContainers(payload []byte, ctop *v1alpha1.CAPTenantOperation, derivedWorkload tentantOperationWorkload, workload *v1alpha1.WorkloadDetails, params *jobCreateParams) []corev1.Container { + if !isMTXSDisabled(derivedWorkload.env) { + var operation string + container := &corev1.Container{ + Name: workload.Name, + Image: derivedWorkload.image, + ImagePullPolicy: derivedWorkload.imagePullPolicy, + Env: append([]corev1.EnvVar{ + {Name: EnvCAPOpAppVersion, Value: params.version}, {Name: EnvCAPOpTenantID, Value: ctop.Spec.TenantId}, {Name: EnvCAPOpTenantOperation, Value: string(ctop.Spec.Operation)}, {Name: EnvCAPOpTenantSubDomain, Value: string(ctop.Spec.SubDomain)}, + }, derivedWorkload.env...), + EnvFrom: params.envFromVCAPSecret, + Resources: derivedWorkload.resources, + SecurityContext: derivedWorkload.securityContext, + } + + if ctop.Spec.Operation == v1alpha1.CAPTenantOperationTypeProvisioning { + operation = "subscribe" + } else if ctop.Spec.Operation == v1alpha1.CAPTenantOperationTypeUpgrade { + operation = "upgrade" + } else { // deprovisioning + operation = "unsubscribe" + } + + if derivedWorkload.command != nil { + container.Command = derivedWorkload.command + } else { + container.Command = []string{"node", "./node_modules/@sap/cds-mtxs/bin/cds-mtx", operation, ctop.Spec.TenantId} + } + + return append([]corev1.Container{}, *container) + } + + return []corev1.Container{ + { + Name: "trigger", // TODO: get rid of this --> hopefully with mtxs cli where we start a single container image + Image: getMTXJobImage(), + Env: []corev1.EnvVar{ + {Name: "WAIT_FOR_SIDECAR", Value: "false"}, + {Name: "XSUAA_INSTANCE_NAME", Value: params.xsuaaInstanceName}, + {Name: "MTX_SERVICE_URL", Value: "http://localhost:" + strconv.Itoa(defaultServerPort)}, + {Name: "MTX_REQUEST_TYPE", Value: string(ctop.Spec.Operation)}, + {Name: "MTX_TENANT_ID", Value: ctop.Spec.TenantId}, + {Name: "MTX_REQUEST_PAYLOAD", Value: string(payload)}, + }, + EnvFrom: params.envFromVCAPSecret, + }, + { + Name: workload.Name, + Image: derivedWorkload.image, + ImagePullPolicy: derivedWorkload.imagePullPolicy, + Env: append([]corev1.EnvVar{ + {Name: EnvCAPOpAppVersion, Value: params.version}, {Name: EnvCAPOpTenantID, Value: ctop.Spec.TenantId}, {Name: EnvCAPOpTenantOperation, Value: string(ctop.Spec.Operation)}, {Name: EnvCAPOpTenantSubDomain, Value: string(ctop.Spec.SubDomain)}, + }, derivedWorkload.env...), + EnvFrom: params.envFromVCAPSecret, + Resources: derivedWorkload.resources, + SecurityContext: derivedWorkload.securityContext, + Command: []string{"/bin/sh", "-c"}, + Args: []string{"node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080"}, + }, + } +} + +func deriveWorkloadForTenantOperation(workload *v1alpha1.WorkloadDetails) tentantOperationWorkload { + result := tentantOperationWorkload{} + if workload.JobDefinition == nil { + // this must be a reference to CAP workload + result.image = workload.DeploymentDefinition.Image + result.imagePullPolicy = workload.DeploymentDefinition.ImagePullPolicy + result.env = workload.DeploymentDefinition.Env + result.resources = workload.DeploymentDefinition.Resources + result.backoffLimit = &backoffLimitValue + result.ttlSecondsAfterFinished = &tTLSecondsAfterFinishedValue + result.securityContext = workload.DeploymentDefinition.SecurityContext + result.podSecurityContext = workload.DeploymentDefinition.PodSecurityContext + } else { + // use job definition + result.image = workload.JobDefinition.Image + result.imagePullPolicy = workload.JobDefinition.ImagePullPolicy + result.command = workload.JobDefinition.Command + result.env = workload.JobDefinition.Env + result.resources = workload.JobDefinition.Resources + result.securityContext = workload.JobDefinition.SecurityContext + result.podSecurityContext = workload.JobDefinition.PodSecurityContext + if workload.JobDefinition.BackoffLimit != nil { + result.backoffLimit = workload.JobDefinition.BackoffLimit + } + if workload.JobDefinition.TTLSecondsAfterFinished != nil { + result.ttlSecondsAfterFinished = workload.JobDefinition.TTLSecondsAfterFinished + } + } + return result +} + +func (c *Controller) createCustomTenantOperationJob(ctx context.Context, ctop *v1alpha1.CAPTenantOperation, workload *v1alpha1.WorkloadDetails, params *jobCreateParams) (*batchv1.Job, error) { + // create job for custom tenant operation + job := &batchv1.Job{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: params.namePrefix, // generate name for each step + Namespace: ctop.Namespace, + Labels: params.labels, + Annotations: params.annotations, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(ctop, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantOperationKind))}, + }, + Spec: batchv1.JobSpec{ + BackoffLimit: workload.JobDefinition.BackoffLimit, + TTLSecondsAfterFinished: workload.JobDefinition.TTLSecondsAfterFinished, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: params.labels, + Annotations: params.annotations, + }, + Spec: corev1.PodSpec{ + RestartPolicy: corev1.RestartPolicyNever, + SecurityContext: workload.JobDefinition.PodSecurityContext, + ImagePullSecrets: params.imagePullSecrets, + Containers: []corev1.Container{ + { + Name: workload.Name, + Image: workload.JobDefinition.Image, + ImagePullPolicy: workload.JobDefinition.ImagePullPolicy, + Env: append([]corev1.EnvVar{ + {Name: EnvCAPOpAppVersion, Value: params.version}, {Name: EnvCAPOpTenantID, Value: ctop.Spec.TenantId}, {Name: EnvCAPOpTenantOperation, Value: string(ctop.Spec.Operation)}, {Name: EnvCAPOpTenantSubDomain, Value: string(ctop.Spec.SubDomain)}, + }, workload.JobDefinition.Env...), + EnvFrom: params.envFromVCAPSecret, + Command: workload.JobDefinition.Command, + Resources: workload.JobDefinition.Resources, + SecurityContext: workload.JobDefinition.SecurityContext, + }, + }, + }, + }, + }, + } + + return c.kubeClient.BatchV1().Jobs(ctop.Namespace).Create(ctx, job, metav1.CreateOptions{}) +} + +func getMTXJobImage() string { + mtxJobImageUri := os.Getenv(EnvMTXJobImage) + allowedUri, _ := regexp.MatchString(MTXJobImageAllowedPattern, mtxJobImageUri) + if !allowedUri { + klog.Warning("MTX Job Image URI '", mtxJobImageUri, "' not given in environment, or not allowed. Falling back to default.") + mtxJobImageUri = MTXJobImageDefault + } + + return mtxJobImageUri +} + +func getXSUAAInstanceName(consumedServiceInfos []v1alpha1.ServiceInfo, relatedResources *cros, kubeClient kubernetes.Interface) (string, error) { + info := util.GetXSUAAInfo(consumedServiceInfos, relatedResources.CAPApplication) + if info.Secret == "" { + return "", errors.New("missing XSUAA service information") + } + entry, err := util.CreateVCAPEntryFromSecret(info, relatedResources.CAPApplication.Namespace, kubeClient) + if err != nil { + return "", err + } + return entry["name"].(string), nil +} + +func addCAPTenantOperationLabels(ctop *v1alpha1.CAPTenantOperation, cat *v1alpha1.CAPTenant) (updated bool) { + appMetadata := appMetadataIdentifiers{ + ownerInfo: &ownerInfo{ + ownerNamespace: cat.Namespace, + ownerName: cat.Name, + ownerGeneration: cat.Generation, + }, + } + if updateLabelAnnotationMetadata(&ctop.ObjectMeta, &appMetadata) { + updated = true + } + + if _, ok := ctop.Labels[LabelTenantOperationType]; !ok { + ctop.Labels[LabelTenantOperationType] = string(ctop.Spec.Operation) + if ctop.Spec.Operation == v1alpha1.CAPTenantOperationTypeUpgrade { + ctop.Labels[LabelCAVVersion] = cat.Spec.Version + } + updated = true + } + return updated +} diff --git a/internal/controller/reconcile-captenantoperation_test.go b/internal/controller/reconcile-captenantoperation_test.go new file mode 100644 index 0000000..9bea058 --- /dev/null +++ b/internal/controller/reconcile-captenantoperation_test.go @@ -0,0 +1,651 @@ +package controller + +import ( + "context" + "os" + "testing" +) + +func TestPrepareCAPTenantOperationProvisioning(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136", "ERP4SMEPREPWORKAPPPLAT-3351"}, + description: "new captenantoperation type provisioning - prepare", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-01.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-01.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestTenantOperationInitializeStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - initialize current step", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-02.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-02.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestTenantOperationWithNoSteps(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation w/o valid capapplicationversion", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-03.initial.yaml", + }, + expectError: true, + expectedResources: "testdata/captenantoperation/ctop-03.expected.yaml", + }, + ) + if err.Error() != "operation steps missing in CAPTenantOperation default.test-cap-01-provider-abcd" { + t.Error("unexpected error") + } +} + +func TestTenantOperationStepProcessingWithoutVersion(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - initialize current step", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-04.initial.yaml", + }, + expectError: true, + }, + ) + if err.Error() != "capapplicationversions.sme.sap.com \"test-cap-01-cav-v1\" not found" { + t.Error("unexpected error") + } +} + +func TestProvisioningOperationTriggerStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - initialize current step", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-04.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-04.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestPrepareCAPTenantOperationUpgrade(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "new captenantoperation type upgrade - prepare", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-05.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-05.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationDeriveFromCAPWorkload(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - tenant operation step deriving from cap workload", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-no-mtx-workload.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-06.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-06.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsInitiateFirstStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136", "ERP4SMEPREPWORKAPPPLAT-3226"}, + description: "prepared captenantoperation - multiple steps - start custom operation", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-07.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-07.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsStepCompleted(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136", "ERP4SMEPREPWORKAPPPLAT-3226"}, + description: "prepared captenantoperation - multiple steps - custom step completed", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-08.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-08.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsInitiateSubsequentStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - multiple steps - initiate subsequent step", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-09.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-09.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsStepFailure(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - multiple steps - step failure", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-10.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-10.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsFinalStepCompleted(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - multiple steps - final step completed", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-11.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-11.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsStepCompletedWithDeletion(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - multiple steps - custom step completed with deletion timestamp set", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-12.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-12.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationMultipleStepsStepFailureWithDeletion(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - multiple steps - step failure with deletion timestamp set", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-13.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-13.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeOperationFailedWithDeletion(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation - failed condition - with deletion timestamp set", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-14.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-14.expected.yaml", + }, + ) +} + +func TestPrepareCAPTenantOperationDeprovisioningInvalidReference(t *testing.T) { + err := reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-invalid-tenant-op"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "new captenantoperation type deprovisioning - prepare with invalid reference", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-15.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-15.expected.yaml", + expectError: true, + }, + ) + if err.Error() != "could not find CAPTenant with tenant id tenant-id-invalid" { + t.Errorf("unexpected error: %s", err.Error()) + } +} + +func TestTenantOperationDeprovisioningInitiateStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "prepared captenantoperation type deprovisioning - initiate step processing", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-16.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-16.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestTenantOperationDeprovisioningTrackStep(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2136"}, + description: "captenantoperation type deprovisioning - track step progress", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-17.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-17.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestProvisioningWithMTXSEnabled(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2236", "ERP4SMEPREPWORKAPPPLAT-2379", "ERP4SMEPREPWORKAPPPLAT-3226", "ERP4SMEPREPWORKAPPPLAT-3807"}, + description: "Provisioning - With MTXS enabled", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1-mtxs.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-18.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-18.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestUpgradeWithMTXSEnabled(t *testing.T) { + reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2379", "ERP4SMEPREPWORKAPPPLAT-3226", "ERP4SMEPREPWORKAPPPLAT-3807"}, + description: "Upgrade - With MTXS enabled", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1-mtxs.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-20.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-20.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestDeprovisioningWithMTXSEnabled(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2236", "ERP4SMEPREPWORKAPPPLAT-2379", "ERP4SMEPREPWORKAPPPLAT-3226", "ERP4SMEPREPWORKAPPPLAT-3807"}, + description: "Deprovisioning - With MTXS enabled", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/capapplicationversion-v1-mtxs.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/captenantoperation/ctop-19.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-19.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestProvisioningWithMTXSEnabledAndCustomCommand(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{ + "ERP4SMEPREPWORKAPPPLAT-2747", // Custom command for Tenant Operation + "ERP4SMEPREPWORKAPPPLAT-2885", // Annotations for Tenant Operation + "ERP4SMEPREPWORKAPPPLAT-3807", // MTXS is made default + }, + description: "Provisioning - With MTXS enabled and custom command", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1-mtxs-custom-cmd.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-24.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-24.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestGetMTXJobImage(t *testing.T) { + const ( + jiraBLI = "(ERP4SMEPREPWORKAPPPLAT-1647)" + ) + + const ( + imageAllowed = "ghcr.io/sap/some-repo/another-mtx-job" + imageNotAllowed1 = "unwanted.external.repositories.cloud/cap-operator/mtx-job" + imageNotAllowed2 = "ghcr.io/sapfake/cap-operator/mtx-job" + ) + + tests := []struct { + id string + setEnvironment string + expectedImage string + }{ + { + id: "not given environment leads to default image", // which is a special case of 'not matching image pattern' + setEnvironment: "", + expectedImage: MTXJobImageDefault, + }, + { + id: "not matching image pattern leads to default image, subdomain", + setEnvironment: imageNotAllowed1, + expectedImage: MTXJobImageDefault, + }, + { + id: "not matching image pattern leads to default image, ensures .sap/", + setEnvironment: imageNotAllowed2, + expectedImage: MTXJobImageDefault, + }, + { + id: "matching image pattern is passing", + setEnvironment: imageAllowed, + expectedImage: imageAllowed, + }, + } + + activeEnvironment := os.Getenv(EnvMTXJobImage) + defer func() { + os.Setenv(EnvMTXJobImage, activeEnvironment) + }() + + for _, tt := range tests { + t.Run(tt.id+" "+jiraBLI, func(t *testing.T) { + if tt.setEnvironment == "" { + os.Unsetenv(EnvMTXJobImage) + } else { + os.Setenv(EnvMTXJobImage, tt.setEnvironment) + } + + actualImage := getMTXJobImage() + if actualImage != tt.expectedImage { + t.Errorf("expected image '%q', got '%q", tt.expectedImage, actualImage) + } + }) + } +} + +func TestProvisioningWithResources(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2237"}, + description: "Provisioning - With Resources", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1-resources.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-21.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-21.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestProvisioningWithSecurityContext(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2573"}, + description: "Provisioning - With securityContext for Container", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v1-security-context.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-22.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-22.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestProvisioningWithPodSecurityContext(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2573"}, + description: "Provisioning - With securityContext for Pod", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-pod-security-context.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-23.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-23.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestProvisioningWithAnnotations(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2885"}, + description: "Provisioning - With annotations", + initialResources: []string{ + "testdata/common/capapplication.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-annotations.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-25.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-25.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} + +func TestMultiXSUAAWithAnnotation(t *testing.T) { + _ = reconcileTestItem( + context.TODO(), t, + QueueItem{Key: ResourceCAPTenantOperation, ResourceKey: NamespacedResourceKey{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + TestData{ + backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-3773"}, + description: "prepared captenantoperation - tenant operation with multiple xsuaa usage", + initialResources: []string{ + "testdata/common/capapplication-multi-xsuaa.yaml", + "testdata/common/captenant-provider-ready.yaml", + "testdata/common/capapplicationversion-v2-multi-xsuaa.yaml", + "testdata/common/credential-secrets.yaml", + "testdata/captenantoperation/ctop-26.initial.yaml", + }, + expectedResources: "testdata/captenantoperation/ctop-26.expected.yaml", + expectedRequeue: map[int][]NamespacedResourceKey{ + ResourceCAPTenantOperation: {{Namespace: "default", Name: "test-cap-01-provider-abcd"}}, + }, + }, + ) +} diff --git a/internal/controller/reconcile-domains.go b/internal/controller/reconcile-domains.go new file mode 100644 index 0000000..01a6f26 --- /dev/null +++ b/internal/controller/reconcile-domains.go @@ -0,0 +1,1270 @@ +package controller + +import ( + "context" + "encoding/json" + "fmt" + "strconv" + "strings" + "time" + + certManagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certManagermetav1 "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + certv1alpha1 "github.com/gardener/cert-management/pkg/apis/cert/v1alpha1" + dnsv1alpha1 "github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "google.golang.org/protobuf/types/known/durationpb" + networkingv1beta1 "istio.io/api/networking/v1beta1" + istionwv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/klog/v2" +) + +// TODO: ignore duplicates reconciliation calls for same dnsTarget, Finalizers... and a whole lot more! + +const PrimaryDnsSuffix = "primary-dns" + +const ( + CAPOperator = "CAPOperator" + OperatorDomainLabel = CAPOperator + "." + OperatorDomains + OperatorDomainNamePrefix = "cap-operator-domains-" +) + +var ( + cNameLookup = int64(30) + ttl = int64(600) +) + +const ( + formatResourceState = "%s in state %s for %s %s.%s" + formatResourceStateErr = formatResourceState + ": %s" +) + +func (c *Controller) handleDomains(ctx context.Context, ca *v1alpha1.CAPApplication) (*ReconcileResult, error) { + domains, err := json.Marshal(ca.Spec.Domains) + if err != nil { + return nil, fmt.Errorf("error occurred while encoding domains to json: %w", err) + } + domainsHash := sha256Sum(string(domains)) + + requeue := NewReconcileResult() + + commonName := strings.Join([]string{"*", ca.Spec.Domains.Primary}, ".") + secretName := strings.Join([]string{strings.Join([]string{ca.Namespace, ca.Name}, "--"), SecretSuffix}, "-") + c.handlePrimaryDomainGateway(ctx, ca, secretName, ca.Namespace) + + istioIngressGatewayInfo, err := c.getIngressGatewayInfo(ctx, ca) + if err != nil { + return nil, err + } + + c.handlePrimaryDomainCertificate(ctx, ca, commonName, secretName, istioIngressGatewayInfo.Namespace) + c.handlePrimaryDomainDNSEntry(ctx, ca, commonName, ca.Namespace, istioIngressGatewayInfo.DNSTarget) + + if domainsHash != ca.Status.DomainSpecHash { + + // Reconcile Secondary domains via a dummy resource (separate reconciliation) + requeue.AddResource(ResourceOperatorDomains, "", metav1.NamespaceAll, 0) + requeue.AddResource(ResourceCAPApplication, ca.Name, ca.Namespace, 3*time.Second) // requeue CAPApplication for further processing + + // notify tenants of domain specification change (dns entries, virtual services) + cats, err := c.getRelevantTenantsForCA(ca) + if err != nil { + return nil, err + } + for _, cat := range cats { + requeue.AddResource(ResourceCAPTenant, cat.Name, cat.Namespace, 2*time.Second) + } + + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, EventActionProcessingDomainResources, "") + ca.SetStatusDomainSpecHash(domainsHash) + return requeue, nil + } + + return nil, nil +} + +func (c *Controller) handlePrimaryDomainGateway(ctx context.Context, ca *v1alpha1.CAPApplication, secretName string, namespace string) error { + gwName := getResourceName(ca.Spec.BTPAppName, GatewaySuffix) + ingressGWLabels := getIngressGatewayLabels(ca) + gwSpec := networkingv1beta1.Gateway{ + Selector: ingressGWLabels, + Servers: []*networkingv1beta1.Server{ + getGatewayServerSpec(ca.Spec.Domains.Primary, secretName), + }, + } + // Calculate sha256 sum for GW spec + hash := sha256Sum(ca.Spec.Domains.Primary, secretName, fmt.Sprintf("%v", ingressGWLabels)) + + // check for existing gateway + gw, err := c.istioInformerFactory.Networking().V1beta1().Gateways().Lister().Gateways(namespace).Get(gwName) + + // create gateway + if errors.IsNotFound(err) { + _, err = c.istioClient.NetworkingV1beta1().Gateways(namespace).Create( + ctx, &istionwv1beta1.Gateway{ + ObjectMeta: metav1.ObjectMeta{ + Name: gwName, + Namespace: namespace, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationBTPApplicationIdentifier: ca.Spec.GlobalAccountId + "." + ca.Spec.BTPAppName, + }, + Labels: map[string]string{ + LabelBTPApplicationIdentifierHash: sha1Sum(ca.Spec.GlobalAccountId, ca.Spec.BTPAppName), + }, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(ca, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationKind))}, + }, + Spec: gwSpec, + }, metav1.CreateOptions{}, + ) + } else if err == nil && gw != nil && gw.Annotations[AnnotationResourceHash] != hash { + // Update the relevant gw parts, if there are changes (detected via sha256 sum) + gw.Spec = gwSpec + + // Update hash value on annotation + updateResourceAnnotation(&gw.ObjectMeta, hash) + + // Trigger the actual update on the resource + _, err = c.istioClient.NetworkingV1beta1().Gateways(namespace).Update(ctx, gw, metav1.UpdateOptions{}) + } + + if err == nil { + c.Event(ca, nil, corev1.EventTypeNormal, CAPApplicationEventPrimaryGatewayModified, EventActionProcessingDomainResources, fmt.Sprintf("primary gateway %s has been modified", gwName)) + } + return err +} + +func (c *Controller) handlePrimaryDomainCertificate(ctx context.Context, ca *v1alpha1.CAPApplication, commonName string, secretName string, istioNamespace string) error { + var err error + certName := getResourceName(ca.Spec.BTPAppName, CertificateSuffix) + // Calculate sha256 sum for Cert spec + hash := sha256Sum(commonName, secretName) + switch certificateManager() { + case certManagerGardener: + // check for existing certificate + gardenerCert, err := c.gardenerCertificateClient.CertV1alpha1().Certificates(istioNamespace).Get(context.TODO(), certName, metav1.GetOptions{}) + gardenerCertSpec := getGardenerCertificateSpec(commonName, secretName) + if errors.IsNotFound(err) { + // create certificate + _, err = c.gardenerCertificateClient.CertV1alpha1().Certificates(istioNamespace).Create( + ctx, &certv1alpha1.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: certName, + Namespace: istioNamespace, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: KindMap[ResourceCAPApplication] + "." + ca.Namespace + "." + ca.Name, + }, + Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(KindMap[ResourceCAPApplication], ca.Namespace, ca.Name), + LabelOwnerGeneration: strconv.FormatInt(ca.Generation, 10), + }, + Finalizers: []string{FinalizerCAPApplication}, + }, + Spec: gardenerCertSpec, + }, metav1.CreateOptions{}, + ) + } else if err == nil && gardenerCert != nil && gardenerCert.Annotations[AnnotationResourceHash] != hash { + // Update the certificate spec + gardenerCert.Spec = gardenerCertSpec + + // Update hash value on annotation + updateResourceAnnotation(&gardenerCert.ObjectMeta, hash) + + // Trigger the actual update on the resource + _, err = c.gardenerCertificateClient.CertV1alpha1().Certificates(istioNamespace).Update(ctx, gardenerCert, metav1.UpdateOptions{}) + } + + case certManagerCertManagerIO: + // check for existing certificate + certManagerCert, err := c.certManagerCertificateClient.CertmanagerV1().Certificates(istioNamespace).Get(context.TODO(), certName, metav1.GetOptions{}) + certManagerCertSpec := getCertManagerCertificateSpec(commonName, secretName) + + if errors.IsNotFound(err) { + // create certificate + _, err = c.certManagerCertificateClient.CertmanagerV1().Certificates(istioNamespace).Create( + ctx, &certManagerv1.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: certName, + Namespace: istioNamespace, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: KindMap[ResourceCAPApplication] + "." + ca.Namespace + "." + ca.Name, + }, + Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(KindMap[ResourceCAPApplication], ca.Namespace, ca.Name), + LabelOwnerGeneration: strconv.FormatInt(ca.Generation, 10), + }, + Finalizers: []string{FinalizerCAPApplication}, + }, + Spec: certManagerCertSpec, + }, metav1.CreateOptions{}, + ) + } else if err == nil && certManagerCert != nil && certManagerCert.Annotations[AnnotationResourceHash] != hash { + // Update the certificate spec + certManagerCert.Spec = certManagerCertSpec + + // Update hash value on annotation + updateResourceAnnotation(&certManagerCert.ObjectMeta, hash) + + // Trigger the actual update on the resource + _, err = c.certManagerCertificateClient.CertmanagerV1().Certificates(istioNamespace).Update(ctx, certManagerCert, metav1.UpdateOptions{}) + } + } + return err +} + +func (c *Controller) handlePrimaryDomainDNSEntry(ctx context.Context, ca *v1alpha1.CAPApplication, commonName string, namespace string, dnsTarget string) error { + // nothing to do here for non-gardener scenario because external-dns handles istio gateways automatically + if dnsManager() == dnsManagerGardener { + dnsEntryName := getResourceName(ca.Spec.BTPAppName, PrimaryDnsSuffix) + dnsEntrySpec := dnsv1alpha1.DNSEntrySpec{ + CNameLookupInterval: &cNameLookup, + DNSName: commonName, + Targets: []string{ + dnsTarget, + }, + TTL: &ttl, + } + // Calculate sha256 sum for DNSEntry spec + hash := sha256Sum(commonName, dnsTarget) + // check for existing DNSEntry + dnsEntry, err := c.gardenerDNSClient.DnsV1alpha1().DNSEntries(namespace).Get(context.TODO(), dnsEntryName, metav1.GetOptions{}) + + if errors.IsNotFound(err) { + // create DNSEntry + _, err = c.gardenerDNSClient.DnsV1alpha1().DNSEntries(namespace).Create( + ctx, &dnsv1alpha1.DNSEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: dnsEntryName, + Namespace: namespace, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + GardenerDNSClassIdentifier: GardenerDNSClassValue, + AnnotationOwnerIdentifier: KindMap[ResourceCAPApplication] + "." + ca.Namespace + "." + ca.Name, + }, + Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(KindMap[ResourceCAPApplication], ca.Namespace, ca.Name), + }, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(ca, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPApplicationKind))}, + }, + Spec: dnsEntrySpec, + }, metav1.CreateOptions{}, + ) + } else if err == nil && dnsEntry != nil && dnsEntry.Annotations[AnnotationResourceHash] != hash { + // Update the DnsEntry spec + dnsEntry.Spec = dnsEntrySpec + + // Update hash value on annotation + updateResourceAnnotation(&dnsEntry.ObjectMeta, hash) + + // Trigger the actual update on the resource + _, err = c.gardenerDNSClient.DnsV1alpha1().DNSEntries(namespace).Update(ctx, dnsEntry, metav1.UpdateOptions{}) + } + return err + } + return nil +} + +func (c *Controller) checkPrimaryDomainResources(ctx context.Context, ca *v1alpha1.CAPApplication) (processing bool, err error) { + defer func() { + if err != nil { + // set CAPApplication status - with error + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateError, metav1.ConditionFalse, "DomainResourcesError", err.Error()) + } + }() + + // check for existing gateway + _, err = c.istioClient.NetworkingV1beta1().Gateways(ca.Namespace).Get(ctx, getResourceName(ca.Spec.BTPAppName, GatewaySuffix), metav1.GetOptions{}) + if err != nil { + return false, err + } + + var istioIngressGatewayInfo *ingressGatewayInfo + istioIngressGatewayInfo, err = c.getIngressGatewayInfo(ctx, ca) + if err != nil { + return false, err + } + + certName := getResourceName(ca.Spec.BTPAppName, CertificateSuffix) + // check for certificate status + if processing, err := c.checkCertificateStatus(ctx, ca, istioIngressGatewayInfo.Namespace, certName); err != nil || processing { + return processing, err + } + + dnsEntryName := strings.Join([]string{ca.Spec.BTPAppName, PrimaryDnsSuffix}, "-") + if dnsManager() == dnsManagerGardener { + // check for existing DNSEntry + dnsEntry, err := c.gardenerDNSClient.DnsV1alpha1().DNSEntries(ca.Namespace).Get(context.TODO(), dnsEntryName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + // check for ready state + if dnsEntry.Status.State == dnsv1alpha1.STATE_ERROR { + return false, fmt.Errorf(formatResourceStateErr, dnsv1alpha1.DNSEntryKind, dnsv1alpha1.STATE_ERROR, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name, *dnsEntry.Status.Message) + } else if dnsEntry.Status.State != dnsv1alpha1.STATE_READY { + klog.Infof(formatResourceState, dnsv1alpha1.DNSEntryKind, dnsEntry.Status.State, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + ca.SetStatusWithReadyCondition(v1alpha1.CAPApplicationStateProcessing, metav1.ConditionFalse, "DomainResourcesProcessing", "") + return true, nil + } + } + + return +} + +func (c *Controller) deletePrimaryDomainCertificate(ctx context.Context, ca *v1alpha1.CAPApplication) error { + var err error + ingressGatewayInfo, err := c.getIngressGatewayInfo(ctx, ca) + if err != nil { + return err + } + certName := getResourceName(ca.Spec.BTPAppName, CertificateSuffix) + // delete Certificate + switch certificateManager() { + case certManagerGardener: + err = c.deleteGardenerCertificate(ingressGatewayInfo, certName, ctx) + case certManagerCertManagerIO: + err = c.deleteCertManagerCertificate(ingressGatewayInfo, certName, ctx) + } + return err +} + +func (c *Controller) deleteGardenerCertificate(ingressGatewayInfo *ingressGatewayInfo, certName string, ctx context.Context) error { + certificate, err := c.gardenerCertInformerFactory.Cert().V1alpha1().Certificates().Lister().Certificates(ingressGatewayInfo.Namespace).Get(certName) + if err != nil { + return err + } + // remove Finalizer from Certificate + if removeFinalizer(&certificate.Finalizers, FinalizerCAPApplication) { + if _, err = c.gardenerCertificateClient.CertV1alpha1().Certificates(ingressGatewayInfo.Namespace).Update(ctx, certificate, metav1.UpdateOptions{}); err != nil { + return err + } + } + // delete Certificate + if err = c.gardenerCertificateClient.CertV1alpha1().Certificates(ingressGatewayInfo.Namespace).Delete(ctx, certName, metav1.DeleteOptions{}); err != nil { + return err + } + + return nil +} + +func (c *Controller) deleteCertManagerCertificate(ingressGatewayInfo *ingressGatewayInfo, certName string, ctx context.Context) error { + certificate, err := c.certManagerInformerFactory.Certmanager().V1().Certificates().Lister().Certificates(ingressGatewayInfo.Namespace).Get(certName) + if err != nil { + return err + } + // remove Finalizer from Certificate + if removeFinalizer(&certificate.Finalizers, FinalizerCAPApplication) { + if _, err = c.certManagerCertificateClient.CertmanagerV1().Certificates(ingressGatewayInfo.Namespace).Update(ctx, certificate, metav1.UpdateOptions{}); err != nil { + return err + } + } + // delete Certificate + if err = c.certManagerCertificateClient.CertmanagerV1().Certificates(ingressGatewayInfo.Namespace).Delete(ctx, certName, metav1.DeleteOptions{}); err != nil { + return err + } + + return nil +} + +func getResourceName(btpAppName string, resourceSuffix string) string { + return strings.Join([]string{btpAppName, resourceSuffix}, "-") +} + +func (c *Controller) checkCertificateStatus(ctx context.Context, ca *v1alpha1.CAPApplication, certNamespace string, certName string) (bool, error) { + switch certificateManager() { + case certManagerGardener: + // check for existing certificate + certificate, err := c.gardenerCertificateClient.CertV1alpha1().Certificates(certNamespace).Get(context.TODO(), certName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + // check for ready state + if certificate.Status.State == certv1alpha1.StateError { + return false, fmt.Errorf(formatResourceStateErr, certv1alpha1.CertificateKind, certv1alpha1.StateError, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name, *certificate.Status.Message) + } else if certificate.Status.State != certv1alpha1.StateReady { + klog.Infof(formatResourceState, certv1alpha1.CertificateKind, certificate.Status.State, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + return true, nil + } + case certManagerCertManagerIO: + // check for existing certificate + certificate, err := c.certManagerCertificateClient.CertmanagerV1().Certificates(certNamespace).Get(context.TODO(), certName, metav1.GetOptions{}) + if err != nil { + return false, err + } + + // get ready condition + readyCond := getCertManagerReadyCondition(certificate) + // check for ready state + if readyCond == nil || readyCond.Status == certManagermetav1.ConditionUnknown { + klog.Infof(formatResourceState, certManagerv1.CertificateKind, "unknown", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + return true, nil + } else if readyCond.Status == certManagermetav1.ConditionFalse { + return false, fmt.Errorf(formatResourceStateErr, certManagerv1.CertificateKind, "not ready", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name, readyCond.Message) + } + } + // Cert is Ready + return false, nil +} + +func getCertManagerReadyCondition(certificate *certManagerv1.Certificate) *certManagerv1.CertificateCondition { + var readyCond *certManagerv1.CertificateCondition + for _, cond := range certificate.Status.Conditions { + if cond.Type == certManagerv1.CertificateConditionReady { + readyCond = &cond + break + } + } + return readyCond +} + +func getGatewayServerSpec(domain string, credentialName string) *networkingv1beta1.Server { + return &networkingv1beta1.Server{ + Hosts: []string{"*." + domain}, + Port: &networkingv1beta1.Port{ + Number: 443, + Protocol: "HTTPS", + Name: domain, + }, + Tls: &networkingv1beta1.ServerTLSSettings{ + CredentialName: credentialName, + Mode: networkingv1beta1.ServerTLSSettings_SIMPLE, + }, + } +} + +func getGardenerCertificateSpec(commonName string, secretName string) certv1alpha1.CertificateSpec { + return certv1alpha1.CertificateSpec{ + CommonName: &commonName, + SecretName: &secretName, + } +} + +func getCertManagerCertificateSpec(commonName string, secretName string) certManagerv1.CertificateSpec { + return certManagerv1.CertificateSpec{ + CommonName: commonName, + DNSNames: []string{commonName}, + SecretName: secretName, + IssuerRef: certManagermetav1.ObjectReference{ + // TODO: make this configurable + Kind: certManagerv1.ClusterIssuerKind, + Name: "cluster-ca", + }, + } +} + +func (c *Controller) detectTenantDNSEntryChanges(ctx context.Context, cat *v1alpha1.CAPTenant, ca *v1alpha1.CAPApplication, hash string) (bool, error) { + labelOwner := map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(v1alpha1.CAPTenantKind, cat.Namespace, cat.Name), + } + dnsEntries, err := c.gardenerDNSClient.DnsV1alpha1().DNSEntries(ca.Namespace).List(ctx, metav1.ListOptions{LabelSelector: labels.SelectorFromSet(labelOwner).String()}) + if err != nil { + return false, err + } + // When no DNSEntry exists --> assume we might have to create some + if len(dnsEntries.Items) == 0 { + return true, nil + } + + // Detect changes on DNSEntry based on known mismatches (hash / length) + changeDetected := false + // length check + if len(dnsEntries.Items) != len(ca.Spec.Domains.Secondary) { + changeDetected = true + } + // hash check + if !changeDetected { + for _, dnsEntry := range dnsEntries.Items { + if dnsEntry.Annotations[AnnotationResourceHash] != hash { + changeDetected = true + break + } + } + } + // Delete all existing DNSEntries + if changeDetected { + // Delete all existing DNSEntries + err = c.gardenerDNSClient.DnsV1alpha1().DNSEntries(ca.Namespace).DeleteCollection(ctx, metav1.DeleteOptions{}, metav1.ListOptions{LabelSelector: labels.SelectorFromSet(labelOwner).String()}) + if err != nil { + return false, err + } + } + + return changeDetected, nil +} + +func (c *Controller) reconcileTenantDNSEntries(ctx context.Context, cat *v1alpha1.CAPTenant) error { + if dnsManager() != dnsManagerGardener { + // Not a gardener managed cluster -> return + return nil + } + // get owning CAPApplication + ca, _ := c.getCachedCAPApplication(cat.Namespace, cat.Spec.CAPApplicationInstance) + ingressGatewayInfo, err := c.getIngressGatewayInfo(ctx, ca) + if err != nil { + return err + } + hash := sha256Sum(ingressGatewayInfo.DNSTarget, cat.Spec.SubDomain, strings.Join(ca.Spec.Domains.Secondary, "")) + changeDetected, err := c.detectTenantDNSEntryChanges(ctx, cat, ca, hash) + if err != nil || !changeDetected { + return err + } + + // Create DNS Entries + for index, domain := range ca.Spec.Domains.Secondary { + dnsEntryName := cat.Name + strconv.Itoa(index) + _, err = c.gardenerDNSClient.DnsV1alpha1().DNSEntries(ca.Namespace).Create( + ctx, &dnsv1alpha1.DNSEntry{ + ObjectMeta: metav1.ObjectMeta{ + Name: dnsEntryName, + Annotations: map[string]string{ + GardenerDNSClassIdentifier: GardenerDNSClassValue, + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: v1alpha1.CAPTenantKind + "." + cat.Namespace + "." + cat.Name, + }, + Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(v1alpha1.CAPTenantKind, cat.Namespace, cat.Name), + }, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))}, + }, + Spec: dnsv1alpha1.DNSEntrySpec{ + DNSName: cat.Spec.SubDomain + "." + domain, + Targets: []string{ + ingressGatewayInfo.DNSTarget, + }, + }, + }, metav1.CreateOptions{}, + ) + // Unknown error --> break loop + if err != nil { + break + } + } + return err +} + +func (c *Controller) checkTenantDNSEntries(ctx context.Context, cat *v1alpha1.CAPTenant) (bool, error) { + // TODO: ensure that the CAPTenant is set to Ready only once all these DNSEntries are actually ready + if dnsManager() == dnsManagerGardener { + // get relevant DNSEntries + dnsEntries, err := c.gardenerDNSClient.DnsV1alpha1().DNSEntries(cat.Namespace).List(ctx, metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(KindMap[ResourceCAPTenant], cat.Namespace, cat.Name)}).String()}) + if err != nil { + return false, err + } + + if len(dnsEntries.Items) == 0 { + return false, fmt.Errorf("could not find dnsentries for %s %s.%s", v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) + } + + for _, dnsEntry := range dnsEntries.Items { + // check for ready state + if dnsEntry.Status.State == dnsv1alpha1.STATE_ERROR { + return false, fmt.Errorf(formatResourceStateErr, dnsv1alpha1.DNSEntryKind, dnsv1alpha1.STATE_ERROR, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name, *dnsEntry.Status.Message) + } else if dnsEntry.Status.State != dnsv1alpha1.STATE_READY { + klog.Infof(formatResourceState, dnsv1alpha1.DNSEntryKind, dnsEntry.Status.State, v1alpha1.CAPTenantKind, cat.Namespace, cat.Name) + return true, nil + } + } + } + // Not a gardener managed cluster -or- DNSEntries Ready -> return + return false, nil +} + +func (c *Controller) reconcileTenantNetworking(ctx context.Context, cat *v1alpha1.CAPTenant, cavName string, ca *v1alpha1.CAPApplication) (requeue *ReconcileResult, err error) { + var ( + reason, message string + drModified, vsModified bool + eventType string = corev1.EventTypeNormal + ) + + defer func() { + if err != nil { + eventType = corev1.EventTypeWarning + message = err.Error() + if _, ok := err.(*OperatorGatewayMissingError); ok { + err = nil + requeue = NewReconcileResultWithResource(ResourceCAPTenant, cat.Name, cat.Namespace, 10*time.Second) + } + } + if reason != "" { // raise event only when there is a modification or problem + c.Event(cat, nil, eventType, reason, EventActionReconcileTenantNetworking, message) + } + }() + + if drModified, err = c.reconcileTenantDestinationRule(ctx, cat, cavName, ca); err != nil { + reason = CAPTenantEventDestinationRuleModificationFailed + return + } + + if vsModified, err = c.reconcileTenantVirtualService(ctx, cat, cavName, ca); err != nil { + reason = CAPTenantEventVirtualServiceModificationFailed + return + } + + // update tenant status + if drModified || vsModified { + message = fmt.Sprintf("VirtualService (and DestinationRule) %s.%s was reconciled", cat.Namespace, cat.Name) + reason = CAPTenantEventTenantNetworkingModified + conditionStatus := metav1.ConditionFalse + if isCROConditionReady(cat.Status.GenericStatus) { + conditionStatus = metav1.ConditionTrue + } + cat.SetStatusWithReadyCondition(cat.Status.State, conditionStatus, CAPTenantEventTenantNetworkingModified, message) + } + + return +} + +func (c *Controller) reconcileTenantDestinationRule(ctx context.Context, cat *v1alpha1.CAPTenant, cavName string, ca *v1alpha1.CAPApplication) (modified bool, err error) { + var ( + create, update bool + dr *istionwv1beta1.DestinationRule + ) + dr, err = c.istioClient.NetworkingV1beta1().DestinationRules(cat.Namespace).Get(ctx, cat.Name, metav1.GetOptions{}) + if errors.IsNotFound(err) { + dr = &istionwv1beta1.DestinationRule{ + ObjectMeta: metav1.ObjectMeta{ + Name: cat.Name, // keep the same name as CAPTenant to avoid duplicates + Namespace: cat.Namespace, + Labels: map[string]string{}, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))}, + }, + } + create = true + } else if err != nil { + return + } + + if update, err = c.getUpdatedTenantDestinationRuleObject(ctx, cat, dr, cavName); err != nil { + return + } + + if create { + _, err = c.istioClient.NetworkingV1beta1().DestinationRules(cat.Namespace).Create(ctx, dr, metav1.CreateOptions{}) + } else if update { + _, err = c.istioClient.NetworkingV1beta1().DestinationRules(cat.Namespace).Update(ctx, dr, metav1.UpdateOptions{}) + } + + return create || update, err +} + +func (c *Controller) getUpdatedTenantDestinationRuleObject(ctx context.Context, cat *v1alpha1.CAPTenant, dr *istionwv1beta1.DestinationRule, cavName string) (modified bool, err error) { + // verify owner reference + modified, err = c.enforceTenantResourceOwnership(&dr.ObjectMeta, &dr.TypeMeta, cat) + if err != nil { + return modified, err + } + + routerPortInfo, err := c.getRouterServicePortInfo(cavName, cat.Namespace) + if err != nil { + return modified, err + } + + spec := &networkingv1beta1.DestinationRule{ + Host: routerPortInfo.WorkloadName + ServiceSuffix + "." + cat.Namespace + ".svc.cluster.local", + TrafficPolicy: &networkingv1beta1.TrafficPolicy{ + LoadBalancer: &networkingv1beta1.LoadBalancerSettings{ + LbPolicy: &networkingv1beta1.LoadBalancerSettings_ConsistentHash{ + ConsistentHash: &networkingv1beta1.LoadBalancerSettings_ConsistentHashLB{ + HashKey: &networkingv1beta1.LoadBalancerSettings_ConsistentHashLB_HttpCookie{ + HttpCookie: &networkingv1beta1.LoadBalancerSettings_ConsistentHashLB_HTTPCookie{ + Name: HttpCookieName, + Ttl: durationpb.New(0 * time.Second), + Path: "/", + }, + }, + }, + }, + }, + }, + } + + // check whether changes have to be applied using hash comparison + serializedSpec, err := json.Marshal(spec) + if err != nil { + return modified, fmt.Errorf("error serializing destination rule spec: %s", err.Error()) + } + hash := sha256Sum(string(serializedSpec)) + if dr.Annotations[AnnotationResourceHash] != hash { + dr.Spec = *spec + updateResourceAnnotation(&dr.ObjectMeta, hash) + modified = true + } + + return modified, err +} + +func (c *Controller) reconcileTenantVirtualService(ctx context.Context, cat *v1alpha1.CAPTenant, cavName string, ca *v1alpha1.CAPApplication) (modified bool, err error) { + var ( + create, update bool + vs *istionwv1beta1.VirtualService + ) + + vs, err = c.istioClient.NetworkingV1beta1().VirtualServices(cat.Namespace).Get(ctx, cat.Name, metav1.GetOptions{}) + if errors.IsNotFound(err) { + vs = &istionwv1beta1.VirtualService{ + ObjectMeta: metav1.ObjectMeta{ + Name: cat.Name, // keep the same name as CAPTenant to avoid duplicates + Namespace: cat.Namespace, + Labels: map[string]string{}, + OwnerReferences: []metav1.OwnerReference{*metav1.NewControllerRef(cat, v1alpha1.SchemeGroupVersion.WithKind(v1alpha1.CAPTenantKind))}, + }, + } + create = true + } else if err != nil { + return + } + + if update, err = c.getUpdatedTenantVirtualServiceObject(ctx, cat, vs, cavName, ca); err != nil { + return + } + + if create { + _, err = c.istioClient.NetworkingV1beta1().VirtualServices(cat.Namespace).Create(ctx, vs, metav1.CreateOptions{}) + } else if update { + _, err = c.istioClient.NetworkingV1beta1().VirtualServices(cat.Namespace).Update(ctx, vs, metav1.UpdateOptions{}) + } + + return create || update, err +} + +func (c *Controller) getUpdatedTenantVirtualServiceObject(ctx context.Context, cat *v1alpha1.CAPTenant, vs *istionwv1beta1.VirtualService, cavName string, ca *v1alpha1.CAPApplication) (modified bool, err error) { + if ca == nil { + ca, err = c.getCachedCAPApplication(cat.Namespace, cat.Spec.CAPApplicationInstance) + if err != nil { + return modified, err + } + } + + // verify owner reference + modified, err = c.enforceTenantResourceOwnership(&vs.ObjectMeta, &vs.TypeMeta, cat) + if err != nil { + return modified, err + } + + routerPortInfo, err := c.getRouterServicePortInfo(cavName, ca.Namespace) + if err != nil { + return modified, err + } + + spec := &networkingv1beta1.VirtualService{ + Gateways: []string{ca.Spec.BTPAppName + "-gw"}, + Hosts: []string{cat.Spec.SubDomain + "." + ca.Spec.Domains.Primary}, + Http: []*networkingv1beta1.HTTPRoute{{ + Match: []*networkingv1beta1.HTTPMatchRequest{ + {Uri: &networkingv1beta1.StringMatch{MatchType: &networkingv1beta1.StringMatch_Prefix{Prefix: "/"}}}, + }, + Route: []*networkingv1beta1.HTTPRouteDestination{{ + Destination: &networkingv1beta1.Destination{ + Host: routerPortInfo.WorkloadName + ServiceSuffix + "." + cat.Namespace + ".svc.cluster.local", + Port: &networkingv1beta1.PortSelector{Number: uint32(routerPortInfo.Ports[0].Port)}, + }, + Weight: 100, + }}, + }}, + } + err = c.updateTenantVirtualServiceSpecWithSecondaryDomains(ctx, spec, cat, ca) + if err != nil { + return modified, err + } + + // check whether changes have to be applied using hash comparison + serializedSpec, err := json.Marshal(spec) + if err != nil { + return modified, fmt.Errorf("error serializing virtual service spec: %s", err.Error()) + } + hash := sha256Sum(string(serializedSpec)) + if vs.Annotations[AnnotationResourceHash] != hash { + vs.Spec = *spec + updateResourceAnnotation(&vs.ObjectMeta, hash) + modified = true + } + + return modified, err +} + +type OperatorGatewayMissingError struct{} + +func (err *OperatorGatewayMissingError) Error() string { + return "operator gateway for secondary domains missing" +} + +func (c *Controller) updateTenantVirtualServiceSpecWithSecondaryDomains(ctx context.Context, spec *networkingv1beta1.VirtualService, cat *v1alpha1.CAPTenant, ca *v1alpha1.CAPApplication) error { + secondaryDomainsExist := ca.Spec.Domains.Secondary != nil && len(ca.Spec.Domains.Secondary) > 0 + if !secondaryDomainsExist { + return nil + } + + // add customer specific domains + for _, domain := range ca.Spec.Domains.Secondary { + spec.Hosts = append(spec.Hosts, cat.Spec.SubDomain+"."+domain) + } + + // Determine Ingress GW service for this app + gwInfo, err := c.getIngressGatewayInfo(ctx, ca) + if err != nil { + return err + } + + // Get the relevant central operator GW for this ingress GW + operatorGW, _ := c.getOperatorGateway(ctx, gwInfo.Namespace, sha1Sum(gwInfo.DNSTarget)) + if operatorGW == nil { + // requeue for later reconciliation + return &OperatorGatewayMissingError{} + } + spec.Gateways = append(spec.Gateways, operatorGW.Namespace+"/"+operatorGW.Name) + + return nil +} + +func getIngressGatewayLabels(ca *v1alpha1.CAPApplication) map[string]string { + ingressLabels := map[string]string{} + for _, label := range ca.Spec.Domains.IstioIngressGatewayLabels { + ingressLabels[label.Name] = label.Value + } + return ingressLabels +} + +func (c *Controller) getIngressGatewayInfo(ctx context.Context, ca *v1alpha1.CAPApplication) (ingGwInfo *ingressGatewayInfo, err error) { + // create ingress gateway selector from labels + ingressLabelSelector, err := labels.ValidatedSelectorFromSet(getIngressGatewayLabels(ca)) + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + c.Event(ca, nil, corev1.EventTypeWarning, CAPApplicationEventMissingIngressGatewayInfo, EventActionProcessingDomainResources, err.Error()) + } + }() + + // Get relevant Ingress Gateway pods + ingressPods, err := c.kubeClient.CoreV1().Pods(metav1.NamespaceAll).List(ctx, metav1.ListOptions{LabelSelector: ingressLabelSelector.String()}) + if err != nil { + return nil, err + } + + // Determine relevant istio-ingressgateway namespace + namespace := "" + name := "" + // Create a dummy lookup map for determining relevant pods + relevantPodsNames := map[string]struct{}{} + for _, pod := range ingressPods.Items { + // We only support 1 ingress gateway pod namespace as of now! (Multiple pods e.g. replicas can exist in the same namespace) + if namespace == "" { + namespace = pod.Namespace + name = pod.Name + } else if namespace != pod.Namespace { + return nil, fmt.Errorf("more than one matching ingress gateway pod namespaces found for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + relevantPodsNames[pod.Name] = struct{}{} + } + if namespace == "" { + return nil, fmt.Errorf("no matching ingress gateway pod found for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + + // Get dnsTarget + // First try to use dnsTarget --> if it is set + dnsTarget := ca.Spec.Domains.DnsTarget + // Attempt to get dnsTarget from Service via annotation(s) + if dnsTarget == "" { + ingressGWSvc, err := c.getIngressGatewayService(ctx, namespace, relevantPodsNames, ca) + if err != nil { + return nil, err + } + if ingressGWSvc != nil { + dnsTarget = getDNSTarget(ingressGWSvc) + } + } + // No DNS Target --> Error + if dnsTarget == "" { + return nil, fmt.Errorf("ingress gateway service not annotated with dns target name for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + + // Return ingress Gateway info (Namespace and DNS target) + return &ingressGatewayInfo{Namespace: namespace, Name: name, DNSTarget: dnsTarget}, nil +} + +func getDNSTarget(ingressGWSvc *corev1.Service) string { + var dnsTarget string + switch dnsManager() { + case dnsManagerGardener: + dnsTarget = ingressGWSvc.Annotations[AnnotationGardenerDNSTarget] + case dnsManagerKubernetes: + dnsTarget = ingressGWSvc.Annotations[AnnotationKubernetesDNSTarget] + } + + // Use the 1st value from Comma separated values (if any) + return strings.Split(dnsTarget, ",")[0] +} + +func (c *Controller) getLoadBalancerSvcs(ctx context.Context, istioIngressGWNamespace string) ([]corev1.Service, error) { + // List all services in the same namespace as the istio-ingressgateway pod namespace + allServices, err := c.kubeClient.CoreV1().Services(istioIngressGWNamespace).List(ctx, metav1.ListOptions{}) + if err != nil { + return nil, err + } + // Filter out LoadBalancer services + loadBalancerSvcs := []corev1.Service{} + for _, svc := range allServices.Items { + if svc.Spec.Type == corev1.ServiceTypeLoadBalancer { + loadBalancerSvcs = append(loadBalancerSvcs, svc) + } + } + return loadBalancerSvcs, nil +} + +func (c *Controller) getIngressGatewayService(ctx context.Context, istioIngressGWNamespace string, relevantPodNames map[string]struct{}, ca *v1alpha1.CAPApplication) (*corev1.Service, error) { + loadBalancerSvcs, err := c.getLoadBalancerSvcs(ctx, istioIngressGWNamespace) + if err != nil { + return nil, err + } + // Get Relevant services that match the ingress gw pod via selectors + var ingressGwSvc corev1.Service + for _, svc := range loadBalancerSvcs { + // Get all matching ingress GW pods in the ingress gw namespace via ingress gw service selectors + matchedPods, err := c.kubeClient.CoreV1().Pods(istioIngressGWNamespace).List(ctx, metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(svc.Spec.Selector).String()}) + if err != nil { + return nil, err + } + for _, pod := range matchedPods.Items { + if _, ok := relevantPodNames[pod.Name]; ok { + if ingressGwSvc.Name == "" { + // we only expect 1 ingress gateway service in the cluster + ingressGwSvc = svc + break + } else if ingressGwSvc.Name != svc.Name { + return nil, fmt.Errorf("more than one matching ingress gateway service found for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + } + } + } + + if ingressGwSvc.Name == "" { + return nil, fmt.Errorf("unable to find a matching ingress gateway service for %s %s.%s", v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + return &ingressGwSvc, nil +} + +type operatorDomainInfo struct { + Namespace string + Name string + ingressGWSelector map[string]string + dnsTarget string + Domains []string +} + +// Operator Domains is a dummy resource that is referenced by a DNSTarget (in QueuedItem) to handle "secondary" domains across all relevant CAPApplications +// TODO: ignore duplicate reconciliation calls for same dnsTarget, Finalizers... and a whole lot more! +func (c *Controller) reconcileOperatorDomains(ctx context.Context, item QueueItem, attempts int) error { + // Get Relevant Domain Infos + relevantDomainInfos, err := c.getRelevantOperatorDomainInfo(ctx) + if err != nil { + return err + } + + for dnsTargetSum, relevantDomainInfo := range relevantDomainInfos { + // When no secondary domains exists --> Cleanup and return + if len(relevantDomainInfo.Domains) == 0 { + return c.cleanUpOperatorDomains(ctx, relevantDomainInfo, dnsTargetSum) + } + + // Handle Operator Gateway + gw, err := c.handleOperatorGateway(ctx, relevantDomainInfo, dnsTargetSum) + if err != nil { + return err + } + // Handle Operator Certificate + return c.handleOperatorCertificate(ctx, gw.Name, relevantDomainInfo, dnsTargetSum) + } + return nil +} + +func (c *Controller) getRelevantOperatorDomainInfo(ctx context.Context) (map[string]*operatorDomainInfo, error) { + relevantDomainInfos := map[string]*operatorDomainInfo{} + operatorDomainGWs, err := c.istioInformerFactory.Networking().V1beta1().Gateways().Lister().Gateways(metav1.NamespaceAll).List(labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)})) + if err != nil { + return nil, err + } + // Collect existing operator gateways (without Domains) + for _, operatorDomainGW := range operatorDomainGWs { + dnsTargetSum := operatorDomainGW.Labels[LabelRelevantDNSTarget] + relevantDomainInfos[dnsTargetSum] = &operatorDomainInfo{ + Namespace: operatorDomainGW.Namespace, + Name: operatorDomainGW.Name, + ingressGWSelector: operatorDomainGW.Spec.Selector, + Domains: []string{}, + } + } + + allCAs, err := c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Lister().CAPApplications(metav1.NamespaceAll).List(labels.Everything()) + if err != nil { + return nil, err + } + // Create & Update relevant operator gateways with domains + for _, ca := range allCAs { + // If no secondary domain exists for a CAPApplication --> skip + if len(ca.Spec.Domains.Secondary) == 0 { + continue + } + // Create / Update relevant operator domain info + if gwInfo, err := c.getIngressGatewayInfo(ctx, ca); err == nil { + dnsTarget := trimDNSTarget(gwInfo.DNSTarget) + + dnsTargetSum := sha1Sum(gwInfo.DNSTarget) + + if relevantDomainInfo, ok := relevantDomainInfos[dnsTargetSum]; ok { + relevantDomainInfo.Domains = append(relevantDomainInfo.Domains, ca.Spec.Domains.Secondary...) + // Fill dnsTarget + relevantDomainInfo.dnsTarget = dnsTarget + } else { + relevantDomainInfos[dnsTargetSum] = &operatorDomainInfo{ + Namespace: gwInfo.Namespace, + Name: OperatorDomainNamePrefix, + ingressGWSelector: getIngressGatewayLabels(ca), + dnsTarget: dnsTarget, + Domains: ca.Spec.Domains.Secondary, + } + } + } else { + return nil, err + } + } + + return relevantDomainInfos, nil +} + +func (c *Controller) getOperatorGateway(ctx context.Context, gwNamespace string, dnsTargetSum string) (*istionwv1beta1.Gateway, error) { + gwSelector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }) + if err != nil { + return nil, err + } + gwList, err := c.istioInformerFactory.Networking().V1beta1().Gateways().Lister().Gateways(gwNamespace).List(gwSelector) + if err != nil { + return nil, err + } + if len(gwList) == 0 { + return nil, nil + } + return gwList[0], nil +} + +func (c *Controller) handleOperatorGateway(ctx context.Context, relevantDomainInfo *operatorDomainInfo, dnsTargetSum string) (*istionwv1beta1.Gateway, error) { + gw, err := c.getOperatorGateway(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return nil, err + } + hash := sha256Sum(fmt.Sprintf("%v", relevantDomainInfo)) + // If no Gateway exists yet --> create one + if gw == nil { + gw = &istionwv1beta1.Gateway{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: relevantDomainInfo.Name, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: OperatorDomainLabel, + }, + Labels: map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }, + }, + Spec: networkingv1beta1.Gateway{ + Selector: relevantDomainInfo.ingressGWSelector, + }, + } + c.updateServerInfo(gw, relevantDomainInfo, relevantDomainInfo.dnsTarget) + gw, err = c.istioClient.NetworkingV1beta1().Gateways(relevantDomainInfo.Namespace).Create(ctx, gw, metav1.CreateOptions{}) + } else if gw.Annotations[AnnotationResourceHash] != hash { // Check if update is needed + // Update the relevant gw parts, if there are changes (detected via sha256 sum) + gw = gw.DeepCopy() + c.updateServerInfo(gw, relevantDomainInfo, relevantDomainInfo.dnsTarget) + // Update hash value on annotation + updateResourceAnnotation(&gw.ObjectMeta, hash) + // Trigger the actual update on the resource + gw, err = c.istioClient.NetworkingV1beta1().Gateways(relevantDomainInfo.Namespace).Update(ctx, gw, metav1.UpdateOptions{}) + } + return gw, err +} + +func (c *Controller) updateServerInfo(gw *istionwv1beta1.Gateway, relevantDomainInfo *operatorDomainInfo, dnsTarget string) { + gw.Spec.Servers = []*networkingv1beta1.Server{} + for _, domain := range relevantDomainInfo.Domains { + gw.Spec.Servers = append(gw.Spec.Servers, getGatewayServerSpec(domain, dnsTarget)) + } +} + +func (c *Controller) handleOperatorCertificate(ctx context.Context, certName string, relevantDomainInfo *operatorDomainInfo, dnsTargetSum string) error { + hash := sha256Sum(fmt.Sprintf("%v", relevantDomainInfo)) + dnsTarget := trimDNSTarget(relevantDomainInfo.dnsTarget) + switch certificateManager() { + case certManagerGardener: + cert, err := c.getGardenerOperatorCertificate(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return err + } + // If no certiicate exists yet --> create one + if cert == nil { + cert := &certv1alpha1.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: certName, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: OperatorDomainLabel, + }, + Labels: map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }, + }, + Spec: getGardenerCertificateSpec(dnsTarget, dnsTarget), + } + cert.Spec.DNSNames = getCertificateDNSNames(relevantDomainInfo) + _, err = c.gardenerCertificateClient.CertV1alpha1().Certificates(relevantDomainInfo.Namespace).Create(ctx, cert, metav1.CreateOptions{}) + } else if cert.Annotations[AnnotationResourceHash] != hash { + // Update the relevant certificate parts, if there are changes (detected via sha256 sum) + cert = cert.DeepCopy() + cert.Spec.DNSNames = getCertificateDNSNames(relevantDomainInfo) + // Update hash value on annotation + updateResourceAnnotation(&cert.ObjectMeta, hash) + // Trigger the actual update on the resource + _, err = c.gardenerCertificateClient.CertV1alpha1().Certificates(relevantDomainInfo.Namespace).Update(ctx, cert, metav1.UpdateOptions{}) + } + return err + case certManagerCertManagerIO: + cert, err := c.getCertManagerOperatorCertificate(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return err + } + // If no certiicate exists yet --> create one + if cert == nil { + cert := &certManagerv1.Certificate{ + ObjectMeta: metav1.ObjectMeta{ + Name: certName, + Annotations: map[string]string{ + AnnotationResourceHash: hash, + AnnotationOwnerIdentifier: OperatorDomainLabel, + }, + Labels: map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }, + }, + Spec: getCertManagerCertificateSpec("*."+dnsTarget, dnsTarget), + } + cert.Spec.DNSNames = getCertificateDNSNames(relevantDomainInfo) + _, err = c.certManagerCertificateClient.CertmanagerV1().Certificates(relevantDomainInfo.Namespace).Create(ctx, cert, metav1.CreateOptions{}) + } else if cert.Annotations[AnnotationResourceHash] != hash { + // Update the relevant certificate parts, if there are changes (detected via sha256 sum) + cert = cert.DeepCopy() + cert.Spec.DNSNames = getCertificateDNSNames(relevantDomainInfo) + // Update hash value on annotation + updateResourceAnnotation(&cert.ObjectMeta, hash) + // Trigger the actual update on the resource + _, err = c.certManagerCertificateClient.CertmanagerV1().Certificates(relevantDomainInfo.Namespace).Update(ctx, cert, metav1.UpdateOptions{}) + } + return err + } + return nil +} + +func (c *Controller) getGardenerOperatorCertificate(ctx context.Context, gwNamespace string, dnsTargetSum string) (*certv1alpha1.Certificate, error) { + certSelector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }) + if err != nil { + return nil, err + } + + certList, err := c.gardenerCertInformerFactory.Cert().V1alpha1().Certificates().Lister().Certificates(gwNamespace).List(certSelector) + if err != nil { + return nil, err + } + + if len(certList) == 0 { + return nil, nil + } + return certList[0], nil +} + +func (c *Controller) getCertManagerOperatorCertificate(ctx context.Context, gwNamespace string, dnsTargetSum string) (*certManagerv1.Certificate, error) { + certSelector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelRelevantDNSTarget: dnsTargetSum, + LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains), + }) + if err != nil { + return nil, err + } + + certList, err := c.certManagerInformerFactory.Certmanager().V1().Certificates().Lister().Certificates(gwNamespace).List(certSelector) + if err != nil { + return nil, err + } + + if len(certList) == 0 { + return nil, nil + } + return certList[0], nil +} + +func (c *Controller) cleanUpOperatorDomains(ctx context.Context, relevantDomainInfo *operatorDomainInfo, dnsTargetSum string) error { + // Delete Operator Gateway (if any) + gw, err := c.getOperatorGateway(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return err + } + if gw != nil { + err := c.istioClient.NetworkingV1beta1().Gateways(relevantDomainInfo.Namespace).Delete(ctx, gw.Name, metav1.DeleteOptions{}) + if err != nil { + return err + } + } + + // Delete Operator certificate (if any) + switch certificateManager() { + case certManagerGardener: + cert, err := c.getGardenerOperatorCertificate(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return err + } + if cert != nil { + return c.gardenerCertificateClient.CertV1alpha1().Certificates(relevantDomainInfo.Namespace).Delete(ctx, cert.Name, metav1.DeleteOptions{}) + } + case certManagerCertManagerIO: + cert, err := c.getCertManagerOperatorCertificate(ctx, relevantDomainInfo.Namespace, dnsTargetSum) + if err != nil { + return err + } + if cert != nil { + return c.certManagerCertificateClient.CertmanagerV1().Certificates(relevantDomainInfo.Namespace).Delete(ctx, cert.Name, metav1.DeleteOptions{}) + } + } + return nil +} + +func getCertificateDNSNames(relevantDomainInfo *operatorDomainInfo) []string { + dnsNames := []string{} + for _, domain := range relevantDomainInfo.Domains { + dnsNames = append(dnsNames, "*."+domain) + } + return dnsNames +} + +func trimDNSTarget(dnsTarget string) string { + // Trim dnsTarget to under 64 chars --> TODO: Also handle this in webhook/crd spec + for len(dnsTarget) > 64 { + dnsTarget = dnsTarget[strings.Index(dnsTarget, ".")+1:] + } + // Fix for domain gw/creds secret name (Replace *.domain with x.domain for secret name) + return strings.ReplaceAll(dnsTarget, "*", "x") +} diff --git a/internal/controller/reconcile-domains_test.go b/internal/controller/reconcile-domains_test.go new file mode 100644 index 0000000..5700b94 --- /dev/null +++ b/internal/controller/reconcile-domains_test.go @@ -0,0 +1,280 @@ +package controller + +import ( + "context" + "os" + "testing" + + certManagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certv1alpha1 "github.com/gardener/cert-management/pkg/apis/cert/v1alpha1" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + istionwv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" +) + +func TestController_reconcileOperatorDomains(t *testing.T) { + tests := []struct { + name string + createCA bool + createCA2 bool + updateCA bool + createIngress bool + cleanUpDomains bool + wantErr bool + expectDomainResources bool + enableCertManagerEnv bool + }{ + { + name: "Test without CAPApplication", + wantErr: false, + expectDomainResources: false, + }, + { + name: "Test with CAPApplication but without Ingress GW", + createCA: true, + wantErr: true, + expectDomainResources: false, + }, + { + name: "Test with CAPApplication and Ingress GW", + createCA: true, + createIngress: true, + wantErr: false, + expectDomainResources: true, + }, + { + name: "Test cleanup after creation", + createCA: true, + createIngress: true, + wantErr: false, + cleanUpDomains: true, + expectDomainResources: false, + }, + { + name: "Test with multiple CAPApplications and Ingress GW", + createCA: true, + createCA2: true, + createIngress: true, + wantErr: false, + expectDomainResources: true, + }, + // { + // name: "Test cleanup with multiple CAPApplications and Ingress GW", + // createCA: true, + // createCA2: true, + // createIngress: true, + // cleanUpDomains: true, + // wantErr: false, + // expectDomainResources: true, + // }, + { + name: "Test update with CAPApplication and Ingress GW", + createCA: true, + updateCA: true, + createIngress: true, + wantErr: false, + expectDomainResources: true, + }, + { + name: "Test with CAPApplication and Ingress GW (enableCertManagerEnv)", + createCA: true, + createIngress: true, + enableCertManagerEnv: true, + wantErr: false, + expectDomainResources: true, + }, + { + name: "Test cleanup after creation (enableCertManagerEnv)", + createCA: true, + createIngress: true, + enableCertManagerEnv: true, + wantErr: false, + cleanUpDomains: true, + expectDomainResources: false, + }, + { + name: "Test with multiple CAPApplications and Ingress GW (enableCertManagerEnv)", + createCA: true, + createCA2: true, + createIngress: true, + enableCertManagerEnv: true, + wantErr: false, + expectDomainResources: true, + }, + // { + // name: "Test cleanup with multiple CAPApplications and Ingress GW (enableCertManagerEnv)", + // createCA: true, + // createCA2: true, + // createIngress: true, + // cleanUpDomains: true, + // enableCertManagerEnv: true, + // wantErr: false, + // expectDomainResources: true, + // }, + { + name: "Test update with CAPApplication and Ingress GW (enableCertManagerEnv)", + createCA: true, + updateCA: true, + createIngress: true, + enableCertManagerEnv: true, + wantErr: false, + expectDomainResources: true, + }, + } + defer os.Setenv(certManagerEnv, "") + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if tt.enableCertManagerEnv { + os.Setenv(certManagerEnv, certManagerCertManagerIO) + } else { + os.Setenv(certManagerEnv, certManagerGardener) + } + var c *Controller + var ca *v1alpha1.CAPApplication + var ca2 *v1alpha1.CAPApplication + var ingressRes *ingressResources + if tt.createCA { + ca = createCaCRO(caCroName, false) + if tt.createCA2 { + ca2 = ca.DeepCopy() + ca2.Name += "2" + ca2.Spec.Domains.Secondary = []string{"2" + secondaryDomain, "3" + secondaryDomain} + } + } + + if tt.createIngress { + ingressRes = createIngressResource(ingressGWName, ca, dnsTarget) + } + + c = getTestController(testResources{ + cas: []*v1alpha1.CAPApplication{ca, ca2}, + ingressGW: []*ingressResources{ingressRes}, + }) + + q := QueueItem{ + Key: ResourceOperatorDomains, + ResourceKey: NamespacedResourceKey{ + Namespace: metav1.NamespaceAll, + Name: "", + }, + } + err := c.reconcileOperatorDomains(context.TODO(), q, 0) + if (err != nil) != tt.wantErr { + t.Errorf("Controller.reconcileOperatorDomains() error = %v, wantErr %v", err, tt.wantErr) + } + + if tt.updateCA { + var gw *istionwv1beta1.Gateway + listGWs, _ := c.istioClient.NetworkingV1beta1().Gateways(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(listGWs.Items) > 0 { + gw = listGWs.Items[0] + generateMetaObjName(gw) + } + var gardenerCert *certv1alpha1.Certificate + var certManagerCert *certManagerv1.Certificate + if tt.enableCertManagerEnv { + certManagerCertList, _ := c.certManagerCertificateClient.CertmanagerV1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(certManagerCertList.Items) > 0 { + certManagerCert = &certManagerCertList.Items[0] + certManagerCert.Name = gw.Name + } + } else { + gardenerCertList, _ := c.gardenerCertificateClient.CertV1alpha1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(gardenerCertList.Items) > 0 { + gardenerCert = &gardenerCertList.Items[0] + gardenerCert.Name = gw.Name + } + } + ca.Spec.Domains.Secondary = []string{"2" + secondaryDomain, "3" + secondaryDomain} + c = getTestController(testResources{ + cas: []*v1alpha1.CAPApplication{ca, ca2}, + gateway: gw, + gardenerCert: gardenerCert, + certManagerCert: certManagerCert, + ingressGW: []*ingressResources{ingressRes}, + }) + err = c.reconcileOperatorDomains(context.TODO(), q, 0) + if (err != nil) != tt.wantErr { + t.Errorf("Controller.reconcileOperatorDomains() error = %v, wantErr %v", err, tt.wantErr) + } + } + + if tt.cleanUpDomains { + var gw *istionwv1beta1.Gateway + var ingressGW2 *ingressResources + listGWs, _ := c.istioClient.NetworkingV1beta1().Gateways(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(listGWs.Items) > 0 { + gw = listGWs.Items[0] + generateMetaObjName(gw) + } + var gardenerCert *certv1alpha1.Certificate + var certManagerCert *certManagerv1.Certificate + if tt.enableCertManagerEnv { + certManagerCertList, _ := c.certManagerCertificateClient.CertmanagerV1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(certManagerCertList.Items) > 0 { + certManagerCert = &certManagerCertList.Items[0] + certManagerCert.Name = gw.Name + } + } else { + gardenerCertList, _ := c.gardenerCertificateClient.CertV1alpha1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(gardenerCertList.Items) > 0 { + gardenerCert = &gardenerCertList.Items[0] + gardenerCert.Name = gw.Name + } + } + ca.Spec.Domains.Secondary = []string{} + if tt.createCA2 { + ca2.Spec.Domains.IstioIngressGatewayLabels[0].Value += "2" + ca2.Spec.Domains.IstioIngressGatewayLabels[1].Value += "2" + ingressGW2 = createIngressResource(ingressGWName+"2", ca2, "Something.that.surely.exceeds.the.64char.limit."+dnsTarget) + } + c = getTestController(testResources{ + cas: []*v1alpha1.CAPApplication{ca, ca2}, + gateway: gw, + gardenerCert: gardenerCert, + certManagerCert: certManagerCert, + ingressGW: []*ingressResources{ingressRes, ingressGW2}, + }) + err = c.reconcileOperatorDomains(context.TODO(), q, 0) + if (err != nil) != tt.wantErr { + t.Errorf("Controller.reconcileOperatorDomains() error = %v, wantErr %v", err, tt.wantErr) + } + } + + var gw *istionwv1beta1.Gateway + listGWs, _ := c.istioClient.NetworkingV1beta1().Gateways(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(listGWs.Items) > 0 { + gw = listGWs.Items[0] + } + var cert interface{} + if tt.enableCertManagerEnv { + certManagerCertList, _ := c.certManagerCertificateClient.CertmanagerV1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(certManagerCertList.Items) > 0 { + cert = &certManagerCertList.Items[0] + } + } else { + gardenerCertList, _ := c.gardenerCertificateClient.CertV1alpha1().Certificates(metav1.NamespaceAll).List(context.TODO(), metav1.ListOptions{LabelSelector: labels.SelectorFromValidatedSet(map[string]string{LabelOwnerIdentifierHash: sha1Sum(CAPOperator, OperatorDomains)}).String()}) + if len(gardenerCertList.Items) > 0 { + cert = &gardenerCertList.Items[0] + } + } + + if tt.expectDomainResources { + if gw == nil { + t.Errorf("Controller.reconcileOperatorDomains() error = Expected OperatorDomain Gateway missing") + } + if cert == nil { + t.Errorf("Controller.reconcileOperatorDomains() error = Expected OperatorDomain Certificate missing") + } + } else { + if gw != nil { + t.Errorf("Controller.reconcileOperatorDomains() error = Unexpected OperatorDomain Gateway: %v", gw) + } + if cert != nil { + t.Errorf("Controller.reconcileOperatorDomains() error = Unexpected OperatorDomain Certificate: %v", cert) + } + } + }) + } +} diff --git a/internal/controller/reconcile.go b/internal/controller/reconcile.go new file mode 100644 index 0000000..75132fd --- /dev/null +++ b/internal/controller/reconcile.go @@ -0,0 +1,515 @@ +package controller + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/sap/cap-operator/internal/util" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "golang.org/x/mod/semver" + batchv1 "k8s.io/api/batch/v1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes" + "k8s.io/klog/v2" +) + +const ( + LabelOwnerIdentifierHash = "sme.sap.com/owner-identifier-hash" + LabelOwnerGeneration = "sme.sap.com/owner-generation" + LabelWorkloadName = "sme.sap.com/workload-name" + LabelWorkloadType = "sme.sap.com/workload-type" + LabelResourceCategory = "sme.sap.com/category" + LabelBTPApplicationIdentifierHash = "sme.sap.com/btp-app-identifier-hash" + LabelTenantType = "sme.sap.com/tenant-type" + LabelTenantId = "sme.sap.com/btp-tenant-id" + LabelTenantOperationType = "sme.sap.com/tenant-operation-type" + LabelTenantOperationStep = "sme.sap.com/tenant-operation-step" + LabelCAVVersion = "sme.sap.com/cav-version" + LabelRelevantDNSTarget = "sme.sap.com/relevant-dns-target-hash" + LabelDisableKarydia = "x4.sap.com/disable-karydia" + AnnotationOwnerIdentifier = "sme.sap.com/owner-identifier" + AnnotationBTPApplicationIdentifier = "sme.sap.com/btp-app-identifier" + AnnotationResourceHash = "sme.sap.com/resource-hash" + AnnotationControllerClass = "sme.sap.com/controller-class" + AnnotationIstioSidecarInject = "sidecar.istio.io/inject" + AnnotationGardenerDNSTarget = "dns.gardener.cloud/dnsnames" + AnnotationKubernetesDNSTarget = "external-dns.alpha.kubernetes.io/hostname" + FinalizerCAPApplication = "sme.sap.com/capapplication" + FinalizerCAPApplicationVersion = "sme.sap.com/capapplicationversion" + FinalizerCAPTenant = "sme.sap.com/captenant" + FinalizerCAPTenantOperation = "sme.sap.com/captenantoperation" + GardenerDNSClassIdentifier = "dns.gardener.cloud/class" +) + +const ( + CertificateSuffix = "certificate" + GardenerDNSClassValue = "garden" + GatewaySuffix = "gw" + IstioSystemNamespace = "istio-system" + SecretSuffix = "secret" +) + +var ( + backoffLimitValue int32 = 2 + tTLSecondsAfterFinishedValue int32 = 300 +) + +const ( + ProviderTenantType = "provider" + ConsumerTenantType = "consumer" +) + +// Use same name as default cookie from approuter used for session stickiness +const HttpCookieName = "JSESSIONID" + +const ( + EnvCAPOpAppVersion = "CAPOP_APP_VERSION" + EnvCAPOpTenantID = "CAPOP_TENANT_ID" + EnvCAPOpTenantSubDomain = "CAPOP_TENANT_SUBDOMAIN" + EnvCAPOpTenantOperation = "CAPOP_TENANT_OPERATION" + EnvVCAPServices = "VCAP_SERVICES" +) + +type JobState string + +const ( + JobStateComplete JobState = "Complete" + JobStateFailed JobState = "Failed" + JobStateProcessing JobState = "Processing" +) + +type ingressGatewayInfo struct { + Namespace string + Name string + DNSTarget string +} + +type servicePortInfo struct { + WorkloadName string + DeploymentType string + Ports []corev1.ServicePort + ClusterPorts []int32 + Destinations []destinationInfo +} + +type destinationInfo struct { + DestinationName string + Port int32 +} + +const ( + ServiceSuffix = "-svc" +) + +var restrictedEnvNames = map[string]struct{}{ + EnvCAPOpAppVersion: {}, + EnvVCAPServices: {}, +} + +// See https://www.npmjs.com/package/@sap/approuter#destinations +type RouterDestination struct { + Name string `json:"name"` + URL string `json:"url"` + ProxyHost string `json:"proxyHost,omitempty"` + ProxyPort string `json:"proxyPort,omitempty"` + ForwardAuthToken bool `json:"forwardAuthToken,omitempty"` + StrictSSL bool `json:"strictSSL,omitempty"` + Timeout *int64 `json:"timeout,omitempty"` + SetXForwardedHeaders bool `json:"setXForwardedHeaders,omitempty"` + ProxyType string `json:"proxyType,omitempty"` +} + +func (c *Controller) Event(main runtime.Object, related runtime.Object, eventType, reason, action, message string) { + defer func() { + // do not let the routine dump due to event recording errors + if r := recover(); r != nil { + klog.Errorf("error when recording event: ", r) + } + }() + c.eventRecorder.Eventf(main, related, eventType, reason, action, message) +} + +func (c *Controller) getCachedCAPApplication(namespace string, name string) (*v1alpha1.CAPApplication, error) { + lister := c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Lister() + return lister.CAPApplications(namespace).Get(name) +} + +func (c *Controller) getCachedCAPTenant(namespace string, value string, valueIsTenantId bool) (*v1alpha1.CAPTenant, error) { + lister := c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Lister() + if !valueIsTenantId { + // fetch with name + return lister.CAPTenants(namespace).Get(value) + } + + // fetch with label selector + set := map[string]string{LabelTenantId: value} + selector, err := labels.ValidatedSelectorFromSet(set) + if err != nil { + return nil, err + } + + cats, err := lister.CAPTenants(namespace).List(selector) + if err != nil { + return nil, err + } + if len(cats) == 0 { + return nil, fmt.Errorf("could not find CAPTenant with tenant id %s", value) + } + return cats[0], nil // expect only one matching tenant +} + +/* +fetch the latest CAPApplicationVersion in Ready state, for a specified CAPApplication +*/ +func (c *Controller) getLatestReadyCAPApplicationVersion(ctx context.Context, ca *v1alpha1.CAPApplication, avoidNotFound bool) (*v1alpha1.CAPApplicationVersion, error) { + cavs, err := c.getCachedCAPApplicationVersions(ctx, ca) + if err != nil { + return nil, err + } + + var latestCav *v1alpha1.CAPApplicationVersion + for _, cav := range cavs { + // determine the latest semantic version + if isCROConditionReady(cav.Status.GenericStatus) && + (latestCav == nil || semver.Compare("v"+cav.Spec.Version, "v"+latestCav.Spec.Version) == 1) { + latestCav = cav + } + } + + if latestCav == nil && !avoidNotFound { + err = fmt.Errorf("could not find a %s with status %s for %s %s.%s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPApplicationVersionStateReady, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + + return latestCav, err +} + +/* +fetch the latest CAPApplicationVersion, for a specified CAPApplication +*/ +func (c *Controller) getLatestCAPApplicationVersion(ctx context.Context, ca *v1alpha1.CAPApplication) (*v1alpha1.CAPApplicationVersion, error) { + cavs, err := c.getCachedCAPApplicationVersions(ctx, ca) + if err != nil { + return nil, err + } + + var latestCav *v1alpha1.CAPApplicationVersion + for _, cav := range cavs { + // determine the latest semantic version + if latestCav == nil || semver.Compare("v"+cav.Spec.Version, "v"+latestCav.Spec.Version) == 1 { + latestCav = cav + } + } + + if latestCav == nil { + err = fmt.Errorf("could not find a %s for %s %s.%s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name) + } + + return latestCav, err +} + +/* +* + + fetch the relevant CAPApplicationVersion in Ready state, for a specified CAPApplication and version string +*/ +func (c *Controller) getRelevantCAPApplicationVersion(ctx context.Context, ca *v1alpha1.CAPApplication, version string) (*v1alpha1.CAPApplicationVersion, error) { + cavs, err := c.getCachedCAPApplicationVersions(ctx, ca) + if err != nil { + return nil, err + } + + var latestCav *v1alpha1.CAPApplicationVersion + for _, cav := range cavs { + // determine the matching semantic version and return + if isCROConditionReady(cav.Status.GenericStatus) && cav.Spec.Version == version { + latestCav = cav + break + } + } + + if latestCav == nil { + err = fmt.Errorf("could not find a %s with status %s for %s %s.%s and version %s", v1alpha1.CAPApplicationVersionKind, v1alpha1.CAPApplicationVersionStateReady, v1alpha1.CAPApplicationKind, ca.Namespace, ca.Name, version) + } + + return latestCav, err +} + +func (c *Controller) getCachedCAPApplicationVersions(ctx context.Context, ca *v1alpha1.CAPApplication) ([]*v1alpha1.CAPApplicationVersion, error) { + selector, err := labels.ValidatedSelectorFromSet(map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(ca.Namespace, ca.Name), + }) + + if err != nil { + return nil, err + } + + return c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Lister().List(selector) +} + +func (c *Controller) checkSecretsExist(serviceInfos []v1alpha1.ServiceInfo, namespace string) error { + var err error + secretLister := c.kubeInformerFactory.Core().V1().Secrets().Lister() + + for _, service := range serviceInfos { + secretName := service.Secret + if _, err = secretLister.Secrets(namespace).Get(secretName); err != nil { + break + } + } + return err +} + +// This method is called to handle NotFound error at the beginning of reconciliation to skip requeue on errors due to deletion of resource +func handleOperatorResourceErrors(err error) error { + // Handle NotFound errors (object was most likely deleted) + if errors.IsNotFound(err) { + return nil // No error, to skips requeue of the resource + } + return err +} + +func getConsumedServiceMap(consumedServices []string) map[string]string { + // Create a Map of consumedServices + consumedServicesMap := make(map[string]string) + for _, consumedService := range consumedServices { + consumedServicesMap[consumedService] = consumedService + } + return consumedServicesMap +} + +func getConsumedServiceInfos(consumedServicesMap map[string]string, serviceInfos []v1alpha1.ServiceInfo) []v1alpha1.ServiceInfo { + consumedServiceInfo := []v1alpha1.ServiceInfo{} + + for _, serviceInfo := range serviceInfos { + if serviceInfo.Name == consumedServicesMap[serviceInfo.Name] { + consumedServiceInfo = append(consumedServiceInfo, serviceInfo) + } + } + return consumedServiceInfo +} + +func generateVCAPEnv(ns string, serviceInfos []v1alpha1.ServiceInfo, kubeClient kubernetes.Interface) ([]byte, error) { + envVCAPServices := map[string][]map[string]any{} + for _, serviceInfo := range serviceInfos { + entry, err := util.CreateVCAPEntryFromSecret(&serviceInfo, ns, kubeClient) + if err != nil { + return nil, err + } + + // Generate vcap_service info for the class + if envVCAPServices[serviceInfo.Class] == nil { + envVCAPServices[serviceInfo.Class] = []map[string]any{} + } + // Simulate attributes that describe a bound service (@TODO: consider adding tags, binding_name, plan etc..) + envVCAPServices[serviceInfo.Class] = append(envVCAPServices[serviceInfo.Class], entry) + } + + // Return stringified vcap env + return json.Marshal(envVCAPServices) +} + +func createVCAPSecret(namePrefix string, ns string, ownerRef metav1.OwnerReference, serviceInfos []v1alpha1.ServiceInfo, kubeClient kubernetes.Interface) (string, error) { + // Generate VCAP_SERVICES env. variable + vcapEnv, err := generateVCAPEnv(ns, serviceInfos, kubeClient) + if err != nil { + return "", err + } + + // Create a secret for VCAP_SERVICES for the given workload + secret, err := kubeClient.CoreV1().Secrets(ns).Create(context.TODO(), + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: namePrefix + "-", + OwnerReferences: []metav1.OwnerReference{ownerRef}, + }, + StringData: map[string]string{ + EnvVCAPServices: string(vcapEnv), + }, + }, + metav1.CreateOptions{}, + ) + if err != nil { + return "", err + } + // Successfully created deployment secret --> return name + // @TODO: Reconcile CAV once we expect secrets/credentials to be updated + return secret.Name, nil +} + +func validateEnv(envConfig []corev1.EnvVar, restrictedNames map[string]struct{}) string { + for _, envConfigEntry := range envConfig { + if _, ok := restrictedNames[envConfigEntry.Name]; ok { + return envConfigEntry.Name + } + } + // No restricted entries found + return "" +} + +func errorEnv(workloadType string, entry string) error { + return fmt.Errorf("invalid env configuration for workload: %s, remove entry: %s from configuration", workloadType, entry) +} + +func getRelevantJob(workloadType v1alpha1.JobType, cav *v1alpha1.CAPApplicationVersion) *v1alpha1.WorkloadDetails { + for _, workload := range cav.Spec.Workloads { + if workload.JobDefinition != nil && workload.JobDefinition.Type == workloadType { + return &workload + } + } + return nil +} + +func getRelevantDeployment(workloadType v1alpha1.DeploymentType, cav *v1alpha1.CAPApplicationVersion) *v1alpha1.WorkloadDetails { + workloads := getDeployments(workloadType, cav) + if len(workloads) == 0 { + return nil + } + return &workloads[0] +} + +func getDeployments(workloadType v1alpha1.DeploymentType, cav *v1alpha1.CAPApplicationVersion) []v1alpha1.WorkloadDetails { + deployments := []v1alpha1.WorkloadDetails{} + for _, workload := range cav.Spec.Workloads { + if workload.DeploymentDefinition != nil && workload.DeploymentDefinition.Type == workloadType { + deployments = append(deployments, workload) + } + } + return deployments +} + +func getWorkloadByName(name string, cav *v1alpha1.CAPApplicationVersion) *v1alpha1.WorkloadDetails { + for _, workload := range cav.Spec.Workloads { + if workload.Name == name { + return &workload + } + } + return nil +} + +func getJobState(job *batchv1.Job) JobState { + // check for completion + for _, condition := range job.Status.Conditions { + if condition.Status == corev1.ConditionTrue { + var state JobState + switch condition.Type { + case batchv1.JobComplete: + state = JobStateComplete + case batchv1.JobFailed: + state = JobStateFailed + default: + continue + } + return state + } + } + + // probably the job is still in process + return JobStateProcessing +} + +func isDeletionImminent(m *metav1.ObjectMeta) bool { + if m.DeletionTimestamp == nil { + return false + } + return len(m.Finalizers) == 0 +} + +func getRelevantServicePortInfo(cav *v1alpha1.CAPApplicationVersion) []servicePortInfo { + overallPortInfos := []servicePortInfo{} + for _, workload := range cav.Spec.Workloads { + var workloadPortInfo *servicePortInfo + if workload.DeploymentDefinition != nil { + workloadPortInfo = getWorkloadPortInfo(workload, cav.Name) + } + + if workloadPortInfo != nil { + overallPortInfos = append(overallPortInfos, *workloadPortInfo) + } + } + return overallPortInfos +} + +func getWorkloadPortInfo(workload v1alpha1.WorkloadDetails, cavName string) *servicePortInfo { + var servicePorts []corev1.ServicePort + var destinationDetails []destinationInfo + var clusterPorts []int32 + if len(workload.DeploymentDefinition.Ports) > 0 { + servicePorts = []corev1.ServicePort{} + destinationDetails = []destinationInfo{} + clusterPorts = []int32{} + for _, port := range workload.DeploymentDefinition.Ports { + servicePorts = append(servicePorts, corev1.ServicePort{Name: port.Name, Port: port.Port, AppProtocol: port.AppProtocol}) + if port.RouterDestinationName != "" { + destinationDetails = append(destinationDetails, destinationInfo{ + DestinationName: port.RouterDestinationName, + Port: port.Port, + }) + } + if port.NetworkPolicy == v1alpha1.PortNetworkPolicyTypeCluster { + clusterPorts = append(clusterPorts, port.Port) + } + } + } + workloadPortInfo := updateWorkloadPortInfo(cavName, workload.Name, workload.DeploymentDefinition.Type, servicePorts, destinationDetails, clusterPorts) + return workloadPortInfo +} + +func updateWorkloadPortInfo(cavName string, workloadName string, deploymentType v1alpha1.DeploymentType, servicePorts []corev1.ServicePort, destinationDetails []destinationInfo, clusterPorts []int32) *servicePortInfo { + var workloadPortInfo *servicePortInfo + if len(servicePorts) == 0 { + // Use fallback defaults + if deploymentType == v1alpha1.DeploymentRouter { + servicePorts = []corev1.ServicePort{ + {Name: "router-svc-port", Port: defaultRouterPort}, + } + } else if deploymentType == v1alpha1.DeploymentCAP { + servicePorts = []corev1.ServicePort{ + {Name: "server-svc-port", Port: defaultServerPort}, + } + // When there are no ports there can be no destinations, just create a default one for CAP backend + destinationDetails = append([]destinationInfo{}, destinationInfo{ + DestinationName: "srv-api", + Port: defaultServerPort, + }) + } + } + + if len(servicePorts) > 0 { + workloadPortInfo = &servicePortInfo{ + WorkloadName: cavName + "-" + workloadName, + DeploymentType: string(deploymentType), + Ports: servicePorts, + Destinations: destinationDetails, + ClusterPorts: clusterPorts, + } + } + + return workloadPortInfo +} + +func (c *Controller) getRouterServicePortInfo(cavName string, namespace string) (*servicePortInfo, error) { + cav, err := c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Lister().CAPApplicationVersions(namespace).Get(cavName) + if err != nil { + return nil, err + } + + routerWorkload := getRelevantDeployment(v1alpha1.DeploymentRouter, cav) + + return getWorkloadPortInfo(*routerWorkload, cavName), nil +} + +func copyMaps(originalMap map[string]string, additionalMap map[string]string) map[string]string { + newMap := map[string]string{} + for key, value := range originalMap { + newMap[key] = value + } + for key, value := range additionalMap { + newMap[key] = value + } + return newMap +} diff --git a/internal/controller/reconcile_test.go b/internal/controller/reconcile_test.go new file mode 100644 index 0000000..b27dfeb --- /dev/null +++ b/internal/controller/reconcile_test.go @@ -0,0 +1,581 @@ +package controller + +import ( + "context" + "os" + "reflect" + "strconv" + "strings" + "testing" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/rand" + k8sfake "k8s.io/client-go/kubernetes/fake" + k8stesting "k8s.io/client-go/testing" + + certManagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + certManagerFake "github.com/cert-manager/cert-manager/pkg/client/clientset/versioned/fake" + certv1alpha1 "github.com/gardener/cert-management/pkg/apis/cert/v1alpha1" + certfake "github.com/gardener/cert-management/pkg/client/cert/clientset/versioned/fake" + dnsv1alpha1 "github.com/gardener/external-dns-management/pkg/apis/dns/v1alpha1" + dnsfake "github.com/gardener/external-dns-management/pkg/client/dns/clientset/versioned/fake" + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "github.com/sap/cap-operator/pkg/client/clientset/versioned/fake" + istionwv1beta1 "istio.io/client-go/pkg/apis/networking/v1beta1" + istiofake "istio.io/client-go/pkg/clientset/versioned/fake" +) + +const ( + caCroName = "ca-test-name" + providerSubDomain = "provider-subdomain" + consumerSubDomain = "consumer-subdomain" + providerTenantId = "provider-tenant-id" + consumerTenantId = "consumer-tenant-id" + cavCroName = "cav-test-name" + btpApplicationName = "some-app-name" + globalAccountId = "global-id-test" + primaryDomain = "app.sme.sap.com" + secondaryDomain = "sec.sme.sap.com" + dnsTarget = "public-ingress.some.cluster.sap" + defaultVersion = "0.0.1" +) + +const ( + ingressGWName = "ingressGw" + istioSystemNamespace = "istio-system" + gatewayName = btpApplicationName + "-" + GatewaySuffix + certificateName = btpApplicationName + "-" + CertificateSuffix + dnsEntryName = btpApplicationName + "-" + PrimaryDnsSuffix +) + +type ingressResources struct { + service *corev1.Service + pod *corev1.Pod +} + +type testResources struct { + cas []*v1alpha1.CAPApplication + cavs []*v1alpha1.CAPApplicationVersion + cats []*v1alpha1.CAPTenant + ingressGW []*ingressResources + gateway *istionwv1beta1.Gateway + gardenerCert *certv1alpha1.Certificate + certManagerCert *certManagerv1.Certificate + dnsEntry *dnsv1alpha1.DNSEntry + preventStart bool +} + +func createIngressResource(name string, ca *v1alpha1.CAPApplication, dnsTarget string) *ingressResources { + ingressLabelSelector := map[string]string{} + svcName := "istioingress-gateway" + namespace := istioSystemNamespace + if name != ingressGWName { + svcName = name + namespace = metav1.NamespaceDefault + } + for _, label := range ca.Spec.Domains.IstioIngressGatewayLabels { + ingressLabelSelector[label.Name] = label.Value + } + + return &ingressResources{ + pod: &corev1.Pod{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: namespace, + Labels: ingressLabelSelector, + }, + }, + service: &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Name: svcName, + Namespace: namespace, + Annotations: map[string]string{ + AnnotationGardenerDNSTarget: dnsTarget, + }, + }, + Spec: corev1.ServiceSpec{ + Type: corev1.ServiceTypeLoadBalancer, + Selector: ingressLabelSelector, + }, + }, + } +} + +func createCaCRO(name string, withFinalizer bool) *v1alpha1.CAPApplication { + ca := &v1alpha1.CAPApplication{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + }, + Spec: v1alpha1.CAPApplicationSpec{ + Domains: v1alpha1.ApplicationDomains{ + Primary: primaryDomain, + Secondary: []string{secondaryDomain}, + IstioIngressGatewayLabels: []v1alpha1.NameValue{ + { + Name: "istio", + Value: "ingressgateway", + }, + { + Name: "app", + Value: "istio-ingressgateway", + }, + }, + }, + GlobalAccountId: globalAccountId, + BTPAppName: btpApplicationName, + Provider: v1alpha1.BTPTenantIdentification{ + SubDomain: providerSubDomain, + TenantId: providerTenantId, + }, + BTP: v1alpha1.BTP{ + Services: []v1alpha1.ServiceInfo{ + { + Class: "xsuaa", + Name: "test-xsuaa", + Secret: "test-xsuaa-sec", + }, + { + Class: "saas-registry", + Name: "test-saas", + Secret: "test-saas-sec", + }, + { + Class: "service-manager", + Name: "test-sm", + Secret: "test-sm-sec", + }, + { + Class: "destination", + Name: "test-dest", + Secret: "test-dest-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-host", + Secret: "test-html-host-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-rt", + Secret: "test-html-rt-sec", + }, + }, + }, + }, + } + + if withFinalizer { + ca.Finalizers = []string{FinalizerCAPApplication} + } + + return ca +} + +func createCavCRO(name string, state v1alpha1.CAPApplicationVersionState, version string) *v1alpha1.CAPApplicationVersion { + status := metav1.ConditionFalse + if state == v1alpha1.CAPApplicationVersionStateReady || state == v1alpha1.CAPApplicationVersionStateDeleting { + status = metav1.ConditionTrue + } + return &v1alpha1.CAPApplicationVersion{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: metav1.NamespaceDefault, + Labels: map[string]string{ + LabelOwnerIdentifierHash: sha1Sum(metav1.NamespaceDefault, caCroName), + }, + }, + Spec: v1alpha1.CAPApplicationVersionSpec{ + CAPApplicationInstance: caCroName, + Version: version, + Workloads: []v1alpha1.WorkloadDetails{ + { + Name: "cap-backend-server", + ConsumedBTPServices: []string{ + "test-xsuaa", + "test-saas", + }, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + Type: v1alpha1.DeploymentCAP, + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "test://image", + }, + }, + }, + { + Name: "app-router", + ConsumedBTPServices: []string{}, + DeploymentDefinition: &v1alpha1.DeploymentDetails{ + ContainerDetails: v1alpha1.ContainerDetails{ + Image: "test://image", + }, + }, + }, + }, + }, + Status: v1alpha1.CAPApplicationVersionStatus{ + GenericStatus: v1alpha1.GenericStatus{ + Conditions: []metav1.Condition{ + { + Status: status, + Type: string(v1alpha1.ConditionTypeReady), + }, + }, + }, + State: state, + }, + } +} + +// Replace GenerateName logic from k8s as fake clients do not generate a name +func generateName(namePrefix string) string { + return namePrefix + rand.String(5) +} + +func generateMetaObjName(obj interface{}) { + metaObj, _ := meta.Accessor(obj) + if metaObj.GetName() == "" && metaObj.GetGenerateName() != "" { + metaObj.SetName(generateName(metaObj.GetGenerateName())) + } +} + +func createCatCRO(caName string, tenantType string, withFinalizers bool) *v1alpha1.CAPTenant { + cat := &v1alpha1.CAPTenant{ + ObjectMeta: metav1.ObjectMeta{ + Name: strings.Join([]string{caName, tenantType}, "-"), + Namespace: metav1.NamespaceDefault, + }, + Spec: v1alpha1.CAPTenantSpec{ + CAPApplicationInstance: caCroName, + BTPTenantIdentification: v1alpha1.BTPTenantIdentification{}, + Version: defaultVersion, + }, + Status: v1alpha1.CAPTenantStatus{ + CurrentCAPApplicationVersionInstance: cavCroName, + }, + } + + if tenantType == ProviderTenantType { + cat.Spec.BTPTenantIdentification.TenantId = providerTenantId + cat.Spec.BTPTenantIdentification.SubDomain = providerSubDomain + } else { + cat.Spec.BTPTenantIdentification.TenantId = consumerTenantId + cat.Spec.BTPTenantIdentification.SubDomain = consumerSubDomain + } + + if withFinalizers { + cat.Finalizers = []string{FinalizerCAPTenant} + } + return cat +} + +func addRuntimeObjects(objects *[]runtime.Object, object runtime.Object) { + if reflect.ValueOf(object).Elem().IsValid() { + *objects = append(*objects, object) + } +} + +func getTestController(resources testResources) *Controller { + crdObjects := []runtime.Object{} + coreObjects := []runtime.Object{} + istioObjects := []runtime.Object{} + gardenerCertObjects := []runtime.Object{} + certManagerCertObjects := []runtime.Object{} + dnsObjects := []runtime.Object{} + + for _, ca := range resources.cas { + addRuntimeObjects(&crdObjects, ca) + } + + for _, cav := range resources.cavs { + addRuntimeObjects(&crdObjects, cav) + } + + for _, cat := range resources.cats { + addRuntimeObjects(&crdObjects, cat) + } + + for _, ingressGW := range resources.ingressGW { + if ingressGW != nil { + addRuntimeObjects(&coreObjects, ingressGW.service) + addRuntimeObjects(&coreObjects, ingressGW.pod) + } + } + + addRuntimeObjects(&istioObjects, resources.gateway) + addRuntimeObjects(&gardenerCertObjects, resources.gardenerCert) + addRuntimeObjects(&certManagerCertObjects, resources.certManagerCert) + addRuntimeObjects(&dnsObjects, resources.dnsEntry) + + coreClient := k8sfake.NewSimpleClientset(coreObjects...) + coreClient.PrependReactor("create", "*", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { + act := action.(k8stesting.CreateAction) + obj := act.GetObject() + generateMetaObjName(obj) + return false, obj, nil + }) + + crdClient := fake.NewSimpleClientset(crdObjects...) + + istioClient := istiofake.NewSimpleClientset(istioObjects...) + + certClient := certfake.NewSimpleClientset(gardenerCertObjects...) + + certManagerCertClient := certManagerFake.NewSimpleClientset(certManagerCertObjects...) + + dnsClient := dnsfake.NewSimpleClientset(dnsObjects...) + + c := NewController(coreClient, crdClient, istioClient, certClient, certManagerCertClient, dnsClient) + + for _, ca := range resources.cas { + if ca != nil { + c.crdInformerFactory.Sme().V1alpha1().CAPApplications().Informer().GetIndexer().Add(ca) + } + } + + for _, cav := range resources.cavs { + if cav != nil { + c.crdInformerFactory.Sme().V1alpha1().CAPApplicationVersions().Informer().GetIndexer().Add(cav) + } + } + + for _, cat := range resources.cats { + if cat != nil { + c.crdInformerFactory.Sme().V1alpha1().CAPTenants().Informer().GetIndexer().Add(cat) + } + } + + if resources.gateway != nil { + c.istioClient.NetworkingV1beta1().Gateways(resources.gateway.Namespace).Create(context.TODO(), resources.gateway, metav1.CreateOptions{}) + c.istioInformerFactory.Networking().V1beta1().Gateways().Informer().GetIndexer().Add(resources.gateway) + } + + if resources.gardenerCert != nil { + c.gardenerCertInformerFactory.Cert().V1alpha1().Certificates().Informer().GetIndexer().Add(resources.gardenerCert) + } + + if resources.certManagerCert != nil { + c.certManagerInformerFactory.Certmanager().V1().Certificates().Informer().GetIndexer().Add(resources.certManagerCert) + } + + if resources.dnsEntry != nil { + c.gardenerDNSInformerFactory.Dns().V1alpha1().DNSEntries().Informer().GetIndexer().Add(resources.dnsEntry) + } + + for _, ingressGW := range resources.ingressGW { + if ingressGW != nil { + c.kubeInformerFactory.Core().V1().Services().Informer().GetIndexer().Add(ingressGW.service) + c.kubeInformerFactory.Core().V1().Pods().Informer().GetIndexer().Add(ingressGW.pod) + } + } + if !resources.preventStart { + stopCh := make(chan struct{}) + defer close(stopCh) + + c.crdInformerFactory.Start(stopCh) + c.kubeInformerFactory.Start(stopCh) + c.istioInformerFactory.Start(stopCh) + switch certificateManager() { + case certManagerGardener: + c.gardenerCertInformerFactory.Start(stopCh) + case certManagerCertManagerIO: + c.certManagerInformerFactory.Start(stopCh) + } + c.gardenerDNSInformerFactory.Start(stopCh) + } + + return c +} + +func TestMain(m *testing.M) { + os.Setenv(certManagerEnv, "gardener") + os.Setenv(dnsManagerEnv, "gardener") + defer os.Setenv(certManagerEnv, "") + defer os.Setenv(dnsManagerEnv, "") + m.Run() +} + +func TestGetLatestReadyCAPApplicationVersion(t *testing.T) { + tests := []struct { + testName string + status v1alpha1.CAPApplicationVersionState + number int + expectedVersion string + }{ + { + testName: "when getLatestReadyCAPApplicationVersion() is called with no CAVs", + status: "", + number: 0, + expectedVersion: "", + }, + { + testName: "when getLatestReadyCAPApplicationVersion() is called with one CAV in ready state", + status: v1alpha1.CAPApplicationVersionStateReady, + number: 1, + expectedVersion: "0.0.1", + }, + { + testName: "when getLatestReadyCAPApplicationVersion() is called with one CAV in processing (not ready) state", + status: v1alpha1.CAPApplicationVersionStateProcessing, + number: 9, + expectedVersion: "", + }, + { + testName: "when getLatestReadyCAPApplicationVersion() is called with multiple CAVs in ready states", + status: v1alpha1.CAPApplicationVersionStateReady, + number: 18, + expectedVersion: "0.9.0", + }, + { + testName: "when getLatestReadyCAPApplicationVersion() is called with multiple CAVs in mixed states", + status: "mixed", + number: 18, + expectedVersion: "0.0.9", + }, + } + for _, test := range tests { + t.Run(test.testName, func(t *testing.T) { + ca := createCaCRO(caCroName, true) + var cavs []*v1alpha1.CAPApplicationVersion + + for i := 1; i <= test.number; i++ { + var state v1alpha1.CAPApplicationVersionState + // for mixed states - mark the latest versions in processing (not-ready) state + if test.status == "mixed" { + if i > 9 { + state = v1alpha1.CAPApplicationVersionStateProcessing + } else { + state = v1alpha1.CAPApplicationVersionStateReady + } + } else { + state = test.status + } + + indexString := strconv.Itoa(i) + var version string + if i > 9 && i < 20 { + version = "0." + strconv.Itoa((i+1)-10) + ".0" // 0.1.0 - 0.9.0 + } else { + version = "0.0." + indexString // 0.0.1 - 0.0.9 + } + cav := createCavCRO(cavCroName+version, state, version) + + cavs = append(cavs, cav) + } + + c := getTestController(testResources{ + cas: []*v1alpha1.CAPApplication{ca}, + cavs: cavs, + }) + + latestCav, err := c.getLatestReadyCAPApplicationVersion(context.TODO(), ca, false) + + if test.status == v1alpha1.CAPApplicationVersionStateReady || test.status == "mixed" { + if err != nil { + t.Fatal("Error should not be thrown") + } + + if latestCav.Spec.Version != test.expectedVersion { + t.Fatal("Expected version not returned") + } + } else if err == nil { + t.Fatal("Error should be thrown") + } + }) + } +} + +func TestGetLatestCAPApplicationVersion(t *testing.T) { + tests := []struct { + testName string + expectError bool + status string + number int + expectedVersion string + }{ + { + testName: "when getLatestCAPApplicationVersion() is called with no CAVs", + expectError: true, + number: 0, + expectedVersion: "", + }, + { + testName: "when getLatestCAPApplicationVersion() is called with one CAV in ready state", + expectError: false, + number: 1, + expectedVersion: "0.0.1", + }, + { + testName: "when getLatestCAPApplicationVersion() is called with one CAV in processing (not ready) state", + expectError: false, + status: "mixed", + number: 10, + expectedVersion: "0.1.0", + }, + { + testName: "when getLatestCAPApplicationVersion() is called with multiple CAVs in ready states", + expectError: false, + number: 18, + expectedVersion: "0.9.0", + }, + { + testName: "when getLatestCAPApplicationVersion() is called with multiple CAVs in mixed states", + status: "mixed", + number: 18, + expectedVersion: "0.9.0", + }, + } + for _, test := range tests { + t.Run(test.testName, func(t *testing.T) { + ca := createCaCRO(caCroName, true) + var cavs []*v1alpha1.CAPApplicationVersion + + for i := 1; i <= test.number; i++ { + var state v1alpha1.CAPApplicationVersionState + // for mixed states - mark the latest versions in processing (not-ready) state + if test.status == "mixed" { + if i > 9 { + state = v1alpha1.CAPApplicationVersionStateProcessing + } else { + state = v1alpha1.CAPApplicationVersionStateReady + } + } else { + state = v1alpha1.CAPApplicationVersionStateReady + } + + indexString := strconv.Itoa(i) + var version string + if i > 9 && i < 20 { + version = "0." + strconv.Itoa((i+1)-10) + ".0" // 0.1.0 - 0.9.0 + } else { + version = "0.0." + indexString // 0.0.1 - 0.0.9 + } + cav := createCavCRO(cavCroName+version, state, version) + + cavs = append(cavs, cav) + } + + c := getTestController(testResources{ + cas: []*v1alpha1.CAPApplication{ca}, + cavs: cavs, + }) + + latestCav, err := c.getLatestCAPApplicationVersion(context.TODO(), ca) + + if test.expectError == false { + if err != nil { + t.Fatal("Error should not be thrown") + } + + if latestCav.Spec.Version != test.expectedVersion { + t.Fatal("Expected version not returned") + } + } else if err == nil { + t.Fatal("Error should be thrown") + } + }) + } +} diff --git a/internal/controller/reconciliation-result.go b/internal/controller/reconciliation-result.go new file mode 100644 index 0000000..c8f8ee7 --- /dev/null +++ b/internal/controller/reconciliation-result.go @@ -0,0 +1,42 @@ +package controller + +import ( + "time" +) + +type ReconcileResult struct { + // the key in this map is a value which corresponds to a specific resource type + requeueResources map[int][]RequeueItem +} + +type RequeueItem struct { + resourceKey NamespacedResourceKey + // requeueAfter tells the Controller to re-queue the item after the specified duration. Defaults to 0s (immediate re-queue) + requeueAfter time.Duration +} + +func NewReconcileResult() *ReconcileResult { + return &ReconcileResult{} +} + +func NewReconcileResultWithResource(rid int, resourceName string, resourceNamespace string, requeueAfter time.Duration) *ReconcileResult { + reconResult := NewReconcileResult() + reconResult.AddResource(rid, resourceName, resourceNamespace, requeueAfter) + return reconResult +} + +func (r *ReconcileResult) AddResource(rid int, resourceName string, resourceNamespace string, after time.Duration) { + resource := NamespacedResourceKey{Namespace: resourceNamespace, Name: resourceName} + if r.requeueResources == nil { + r.requeueResources = map[int][]RequeueItem{ + rid: {{resourceKey: resource, requeueAfter: after}}, + } + return + } + items, ok := r.requeueResources[rid] + if !ok { + r.requeueResources[rid] = []RequeueItem{{resourceKey: resource, requeueAfter: after}} + } else { + r.requeueResources[rid] = append(items, RequeueItem{resourceKey: resource, requeueAfter: after}) + } +} diff --git a/internal/controller/testdata/capapplication/ca-01.expected.yaml b/internal/controller/testdata/capapplication/ca-01.expected.yaml new file mode 100644 index 0000000..4aeaab1 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-01.expected.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "" diff --git a/internal/controller/testdata/capapplication/ca-01.initial.yaml b/internal/controller/testdata/capapplication/ca-01.initial.yaml new file mode 100644 index 0000000..e25a1f5 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-01.initial.yaml @@ -0,0 +1,38 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-02.expected.yaml b/internal/controller/testdata/capapplication/ca-02.expected.yaml new file mode 100644 index 0000000..f025fd2 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-02.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingSecrets + message: waiting for secrets to get ready for CAPApplication test-cap-01.default + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + state: Processing \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-02.initial.yaml b/internal/controller/testdata/capapplication/ca-02.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-02.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-03.expected.yaml b/internal/controller/testdata/capapplication/ca-03.expected.yaml new file mode 100644 index 0000000..1bb1958 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-03.expected.yaml @@ -0,0 +1,52 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: WaitingForReadyCAPApplicationVersion + observedGeneration: 2 + status: "False" + type: Ready + - type: LatestVersionReady + reason: WaitingForReadyCAPApplicationVersion + observedGeneration: 2 + status: "False" + observedGeneration: 2 + state: Processing \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-03.initial.yaml b/internal/controller/testdata/capapplication/ca-03.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-03.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-04.expected.yaml b/internal/controller/testdata/capapplication/ca-04.expected.yaml new file mode 100644 index 0000000..0e739ce --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-04.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantProcessing + message: "provider CAPTenant not ready for CAPApplication default.test-cap-01; waiting for it to be ready" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-04.initial.yaml b/internal/controller/testdata/capapplication/ca-04.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-04.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-05.expected.yaml b/internal/controller/testdata/capapplication/ca-05.expected.yaml new file mode 100644 index 0000000..1bb1958 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-05.expected.yaml @@ -0,0 +1,52 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: WaitingForReadyCAPApplicationVersion + observedGeneration: 2 + status: "False" + type: Ready + - type: LatestVersionReady + reason: WaitingForReadyCAPApplicationVersion + observedGeneration: 2 + status: "False" + observedGeneration: 2 + state: Processing \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-05.initial.yaml b/internal/controller/testdata/capapplication/ca-05.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-05.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-06.expected.yaml b/internal/controller/testdata/capapplication/ca-06.expected.yaml new file mode 100644 index 0000000..7875d03 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-06.expected.yaml @@ -0,0 +1,57 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: VersionExists + observedGeneration: 2 + status: "True" + type: Ready + - reason: LatestVersionReady + observedGeneration: 2 + status: "True" + type: LatestVersionReady + - reason: AllTenantsReady + observedGeneration: 2 + status: "True" + type: AllTenantsReady + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Consistent diff --git a/internal/controller/testdata/capapplication/ca-06.initial.yaml b/internal/controller/testdata/capapplication/ca-06.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-06.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-07.expected.yaml b/internal/controller/testdata/capapplication/ca-07.expected.yaml new file mode 100644 index 0000000..ca1aba5 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-07.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingDomainResources + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-07.initial.yaml b/internal/controller/testdata/capapplication/ca-07.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-07.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-08.expected.yaml b/internal/controller/testdata/capapplication/ca-08.expected.yaml new file mode 100644 index 0000000..ca1aba5 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-08.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingDomainResources + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-08.initial.yaml b/internal/controller/testdata/capapplication/ca-08.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-08.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-09.expected.yaml b/internal/controller/testdata/capapplication/ca-09.expected.yaml new file mode 100644 index 0000000..6396dc8 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-09.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantError + message: "provider CAPTenant in state ProvisioningError for CAPApplication default.test-cap-01" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-09.initial.yaml b/internal/controller/testdata/capapplication/ca-09.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-09.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-10.expected.yaml b/internal/controller/testdata/capapplication/ca-10.expected.yaml new file mode 100644 index 0000000..3fdd810 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-10.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DomainResourcesError + message: "Certificate in state Error for CAPApplication default.test-cap-01: cert message" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-10.initial.yaml b/internal/controller/testdata/capapplication/ca-10.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-10.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-11.expected.yaml b/internal/controller/testdata/capapplication/ca-11.expected.yaml new file mode 100644 index 0000000..d52d485 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-11.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DomainResourcesError + message: "DNSEntry in state Error for CAPApplication default.test-cap-01: dns message" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-11.initial.yaml b/internal/controller/testdata/capapplication/ca-11.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-11.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-12.expected.yaml b/internal/controller/testdata/capapplication/ca-12.expected.yaml new file mode 100644 index 0000000..25ed51a --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-12.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantError + message: "provider CAPTenant in state UpgradeError for CAPApplication default.test-cap-01" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-12.initial.yaml b/internal/controller/testdata/capapplication/ca-12.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-12.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-13.expected.yaml b/internal/controller/testdata/capapplication/ca-13.expected.yaml new file mode 100644 index 0000000..04d2204 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-13.expected.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-13.initial.yaml b/internal/controller/testdata/capapplication/ca-13.initial.yaml new file mode 100644 index 0000000..bfe51cf --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-13.initial.yaml @@ -0,0 +1,40 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-14.expected.yaml b/internal/controller/testdata/capapplication/ca-14.expected.yaml new file mode 100644 index 0000000..2fbdbe2 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-14.expected.yaml @@ -0,0 +1,41 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-14.initial.yaml b/internal/controller/testdata/capapplication/ca-14.initial.yaml new file mode 100644 index 0000000..4234d73 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-14.initial.yaml @@ -0,0 +1,41 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-15.expected.yaml b/internal/controller/testdata/capapplication/ca-15.expected.yaml new file mode 100644 index 0000000..b102df5 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-15.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DeleteTriggered + message: "" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + state: Deleting \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-15.initial.yaml b/internal/controller/testdata/capapplication/ca-15.initial.yaml new file mode 100644 index 0000000..4fbc4b3 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-15.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-16.expected.yaml b/internal/controller/testdata/capapplication/ca-16.expected.yaml new file mode 100644 index 0000000..d88e0d7 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-16.expected.yaml @@ -0,0 +1,46 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: [] + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Deleting + conditions: + - type: Ready + reason: DeleteTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-16.initial.yaml b/internal/controller/testdata/capapplication/ca-16.initial.yaml new file mode 100644 index 0000000..a9d588e --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-16.initial.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Deleting" + conditions: + - type: Ready + reason: DeleteTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-17.expected.yaml b/internal/controller/testdata/capapplication/ca-17.expected.yaml new file mode 100644 index 0000000..ea6f53d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-17.expected.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-17.initial.yaml b/internal/controller/testdata/capapplication/ca-17.initial.yaml new file mode 100644 index 0000000..aae4a74 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-17.initial.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-18.expected.yaml b/internal/controller/testdata/capapplication/ca-18.expected.yaml new file mode 100644 index 0000000..ea6f53d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-18.expected.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-18.initial.yaml b/internal/controller/testdata/capapplication/ca-18.initial.yaml new file mode 100644 index 0000000..aae4a74 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-18.initial.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-19.expected.yaml b/internal/controller/testdata/capapplication/ca-19.expected.yaml new file mode 100644 index 0000000..5c263ac --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-19.expected.yaml @@ -0,0 +1,46 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: [] + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-19.initial.yaml b/internal/controller/testdata/capapplication/ca-19.initial.yaml new file mode 100644 index 0000000..aae4a74 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-19.initial.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-20.expected.yaml b/internal/controller/testdata/capapplication/ca-20.expected.yaml new file mode 100644 index 0000000..923c348 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-20.expected.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Deleting + conditions: + - type: Ready + reason: DeleteTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-20.initial.yaml b/internal/controller/testdata/capapplication/ca-20.initial.yaml new file mode 100644 index 0000000..a9d588e --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-20.initial.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Deleting" + conditions: + - type: Ready + reason: DeleteTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-21.expected.yaml b/internal/controller/testdata/capapplication/ca-21.expected.yaml new file mode 100644 index 0000000..0e739ce --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-21.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantProcessing + message: "provider CAPTenant not ready for CAPApplication default.test-cap-01; waiting for it to be ready" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-21.initial.yaml b/internal/controller/testdata/capapplication/ca-21.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-21.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-22.expected.yaml b/internal/controller/testdata/capapplication/ca-22.expected.yaml new file mode 100644 index 0000000..76ed81b --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-22.expected.yaml @@ -0,0 +1,53 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: WaitingForReadyCAPApplicationVersion + message: "" + observedGeneration: 2 + status: "False" + type: Ready + - type: LatestVersionReady + reason: WaitingForReadyCAPApplicationVersion + observedGeneration: 2 + status: "False" + observedGeneration: 2 + state: Processing \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-22.initial.yaml b/internal/controller/testdata/capapplication/ca-22.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-22.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-23.expected.yaml b/internal/controller/testdata/capapplication/ca-23.expected.yaml new file mode 100644 index 0000000..deb8a7d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-23.expected.yaml @@ -0,0 +1,58 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: VersionExists + message: "" + observedGeneration: 2 + status: "True" + type: Ready + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 2 + status: "True" + - type: AllTenantsReady + reason: AllTenantsReady + observedGeneration: 2 + status: "True" + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Consistent diff --git a/internal/controller/testdata/capapplication/ca-23.initial.yaml b/internal/controller/testdata/capapplication/ca-23.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-23.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-24.expected.yaml b/internal/controller/testdata/capapplication/ca-24.expected.yaml new file mode 100644 index 0000000..c859a3d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-24.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingDomainResources + message: "" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-24.initial.yaml b/internal/controller/testdata/capapplication/ca-24.initial.yaml new file mode 100644 index 0000000..74de667 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-24.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-25.expected.yaml b/internal/controller/testdata/capapplication/ca-25.expected.yaml new file mode 100644 index 0000000..c859a3d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-25.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingDomainResources + message: "" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-25.initial.yaml b/internal/controller/testdata/capapplication/ca-25.initial.yaml new file mode 100644 index 0000000..6a8e125 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-25.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: oudated-hash diff --git a/internal/controller/testdata/capapplication/ca-26.expected.yaml b/internal/controller/testdata/capapplication/ca-26.expected.yaml new file mode 100644 index 0000000..6396dc8 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-26.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantError + message: "provider CAPTenant in state ProvisioningError for CAPApplication default.test-cap-01" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-26.initial.yaml b/internal/controller/testdata/capapplication/ca-26.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-26.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-27.expected.yaml b/internal/controller/testdata/capapplication/ca-27.expected.yaml new file mode 100644 index 0000000..b196f9a --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-27.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DomainResourcesError + message: "Certificate in state not ready for CAPApplication default.test-cap-01: cert message" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-27.initial.yaml b/internal/controller/testdata/capapplication/ca-27.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-27.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-28.expected.yaml b/internal/controller/testdata/capapplication/ca-28.expected.yaml new file mode 100644 index 0000000..d52d485 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-28.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DomainResourcesError + message: "DNSEntry in state Error for CAPApplication default.test-cap-01: dns message" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-28.initial.yaml b/internal/controller/testdata/capapplication/ca-28.initial.yaml new file mode 100644 index 0000000..bb22196 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-28.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-29.expected.yaml b/internal/controller/testdata/capapplication/ca-29.expected.yaml new file mode 100644 index 0000000..de70616 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-29.expected.yaml @@ -0,0 +1,55 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Consistent + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + conditions: + - type: Ready + observedGeneration: 0 + status: "True" + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 0 + status: "True" + - type: AllTenantsReady + reason: AllTenantsReady + observedGeneration: 0 + status: "True" diff --git a/internal/controller/testdata/capapplication/ca-29.initial.yaml b/internal/controller/testdata/capapplication/ca-29.initial.yaml new file mode 100644 index 0000000..7dc67e4 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-29.initial.yaml @@ -0,0 +1,52 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + conditions: + - type: Ready + status: "True" + - type: LatestVersionReady + reason: LatestVersionReady + status: "True" + - type: AllTenantsReady + reason: AllTenantsReady + status: "True" diff --git a/internal/controller/testdata/capapplication/ca-30.expected.yaml b/internal/controller/testdata/capapplication/ca-30.expected.yaml new file mode 100644 index 0000000..b44507e --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-30.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ResourceDefinitionChanged + message: "re-processing after spec update" + observedGeneration: 0 + status: "False" + type: Ready + observedGeneration: 0 + state: Processing + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-30.initial.yaml b/internal/controller/testdata/capapplication/ca-30.initial.yaml new file mode 100644 index 0000000..dc0f678 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-30.initial.yaml @@ -0,0 +1,45 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: [] + observedGeneration: 999 + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-31.expected.yaml b/internal/controller/testdata/capapplication/ca-31.expected.yaml new file mode 100644 index 0000000..2572052 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-31.expected.yaml @@ -0,0 +1,58 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: NewCAVTriggeredTenantUpgrade + message: "new version default.test-cap-01-cav-v1-modified was used to trigger tenant upgrades" + observedGeneration: 0 + status: "False" + type: Ready + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 0 + status: "True" + - type: AllTenantsReady + reason: NotAllTenantsReady + observedGeneration: 0 + status: "False" + observedGeneration: 0 + state: Processing + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-31.initial.yaml b/internal/controller/testdata/capapplication/ca-31.initial.yaml new file mode 100644 index 0000000..8ad6b34 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-31.initial.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-32.expected.yaml b/internal/controller/testdata/capapplication/ca-32.expected.yaml new file mode 100644 index 0000000..2572052 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-32.expected.yaml @@ -0,0 +1,58 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: NewCAVTriggeredTenantUpgrade + message: "new version default.test-cap-01-cav-v1-modified was used to trigger tenant upgrades" + observedGeneration: 0 + status: "False" + type: Ready + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 0 + status: "True" + - type: AllTenantsReady + reason: NotAllTenantsReady + observedGeneration: 0 + status: "False" + observedGeneration: 0 + state: Processing + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-32.initial.yaml b/internal/controller/testdata/capapplication/ca-32.initial.yaml new file mode 100644 index 0000000..8ad6b34 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-32.initial.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-33.expected.yaml b/internal/controller/testdata/capapplication/ca-33.expected.yaml new file mode 100644 index 0000000..5f386a2 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-33.expected.yaml @@ -0,0 +1,58 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: NewCAVTriggeredTenantUpgrade + message: "new version default.test-cap-01-cav-v1 was used to trigger tenant upgrades" + observedGeneration: 0 + status: "False" + type: Ready + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 0 + status: "True" + - type: AllTenantsReady + reason: NotAllTenantsReady + observedGeneration: 0 + status: "False" + observedGeneration: 0 + state: Processing + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 diff --git a/internal/controller/testdata/capapplication/ca-33.initial.yaml b/internal/controller/testdata/capapplication/ca-33.initial.yaml new file mode 100644 index 0000000..8ad6b34 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-33.initial.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-34.expected.yaml b/internal/controller/testdata/capapplication/ca-34.expected.yaml new file mode 100644 index 0000000..e2dc6b7 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-34.expected.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-34.initial.yaml b/internal/controller/testdata/capapplication/ca-34.initial.yaml new file mode 100644 index 0000000..6fd0396 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-34.initial.yaml @@ -0,0 +1,41 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-35.expected.yaml b/internal/controller/testdata/capapplication/ca-35.expected.yaml new file mode 100644 index 0000000..d167f20 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-35.expected.yaml @@ -0,0 +1,47 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DeletionTriggered + observedGeneration: 0 + status: "False" + type: Ready + observedGeneration: 0 + state: Deleting diff --git a/internal/controller/testdata/capapplication/ca-35.initial.yaml b/internal/controller/testdata/capapplication/ca-35.initial.yaml new file mode 100644 index 0000000..61f5f77 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-35.initial.yaml @@ -0,0 +1,46 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DeletionTriggered + status: "False" + type: Ready + observedGeneration: 0 + state: Deleting \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-36.expected.yaml b/internal/controller/testdata/capapplication/ca-36.expected.yaml new file mode 100644 index 0000000..2e286cf --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-36.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DeleteTriggered + message: "" + observedGeneration: 0 + status: "False" + type: Ready + observedGeneration: 0 + state: Deleting \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-36.initial.yaml b/internal/controller/testdata/capapplication/ca-36.initial.yaml new file mode 100644 index 0000000..49dfdd0 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-36.initial.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Processing" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/ca-37.expected.yaml b/internal/controller/testdata/capapplication/ca-37.expected.yaml new file mode 100644 index 0000000..aa89b85 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-37.expected.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: [] + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-37.initial.yaml b/internal/controller/testdata/capapplication/ca-37.initial.yaml new file mode 100644 index 0000000..3630b65 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-37.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-38.expected.yaml b/internal/controller/testdata/capapplication/ca-38.expected.yaml new file mode 100644 index 0000000..1a4863d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-38.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-38.initial.yaml b/internal/controller/testdata/capapplication/ca-38.initial.yaml new file mode 100644 index 0000000..3630b65 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-38.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-39.expected.yaml b/internal/controller/testdata/capapplication/ca-39.expected.yaml new file mode 100644 index 0000000..1a4863d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-39.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-39.initial.yaml b/internal/controller/testdata/capapplication/ca-39.initial.yaml new file mode 100644 index 0000000..3630b65 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-39.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-40.expected.yaml b/internal/controller/testdata/capapplication/ca-40.expected.yaml new file mode 100644 index 0000000..aa89b85 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-40.expected.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: [] + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-40.initial.yaml b/internal/controller/testdata/capapplication/ca-40.initial.yaml new file mode 100644 index 0000000..3630b65 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-40.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-41.expected.yaml b/internal/controller/testdata/capapplication/ca-41.expected.yaml new file mode 100644 index 0000000..1a4863d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-41.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: Deleting + conditions: + - type: Ready + reason: DeletionTriggered + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-41.initial.yaml b/internal/controller/testdata/capapplication/ca-41.initial.yaml new file mode 100644 index 0000000..3630b65 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-41.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + observedGeneration: 0 + state: "Deleting" + conditions: + - type: Ready + reason: DeletionTriggered + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-42.expected.yaml b/internal/controller/testdata/capapplication/ca-42.expected.yaml new file mode 100644 index 0000000..0577f23 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-42.expected.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Processing" + observedGeneration: 2 + conditions: + - type: Ready + reason: "ApplicationProcessing" + observedGeneration: 2 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-42.initial.yaml b/internal/controller/testdata/capapplication/ca-42.initial.yaml new file mode 100644 index 0000000..4aeaab1 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-42.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "" diff --git a/internal/controller/testdata/capapplication/ca-43.expected.yaml b/internal/controller/testdata/capapplication/ca-43.expected.yaml new file mode 100644 index 0000000..7b329b2 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-43.expected.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProviderTenantError + message: "mocked api error (captenants.sme.sap.com/v1alpha1)" + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Error diff --git a/internal/controller/testdata/capapplication/ca-43.initial.yaml b/internal/controller/testdata/capapplication/ca-43.initial.yaml new file mode 100644 index 0000000..1330a9b --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-43.initial.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: ProcessingDomainResources + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-44.expected.yaml b/internal/controller/testdata/capapplication/ca-44.expected.yaml new file mode 100644 index 0000000..75d67c8 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-44.expected.yaml @@ -0,0 +1,49 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + conditions: + - reason: DomainResourcesProcessing + observedGeneration: 2 + status: "False" + type: Ready + observedGeneration: 2 + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + state: Processing diff --git a/internal/controller/testdata/capapplication/ca-45.expected.yaml b/internal/controller/testdata/capapplication/ca-45.expected.yaml new file mode 100644 index 0000000..414981d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-45.expected.yaml @@ -0,0 +1,55 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: Consistent + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + conditions: + - type: Ready + observedGeneration: 0 + status: "True" + - type: LatestVersionReady + reason: LatestVersionReady + observedGeneration: 0 + status: "True" + - type: AllTenantsReady + reason: NotAllTenantsReady + observedGeneration: 0 + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-45.initial.yaml b/internal/controller/testdata/capapplication/ca-45.initial.yaml new file mode 100644 index 0000000..2e07b2d --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-45.initial.yaml @@ -0,0 +1,52 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 0 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider +status: + state: "Consistent" + domainSpecHash: 84fdeebf558412817f54b17a0158c6b6d53dda98e8bc7a887aaa7170296841f8 + conditions: + - type: Ready + status: "True" + - type: LatestVersionReady + reason: LatestVersionReady + status: "True" + - type: AllTenantsReady + reason: NotAllTenantsReady + status: "False" diff --git a/internal/controller/testdata/capapplication/ca-dns-error.yaml b/internal/controller/testdata/capapplication/ca-dns-error.yaml new file mode 100644 index 0000000..8dbcfcc --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-dns-error.yaml @@ -0,0 +1,27 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: be44dd98e914aa033f04f18a03338da45b40090b55e0e1c935353f088bd7c583 + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-primary-dns + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 +spec: + dnsName: "*.app-domain.test.local" + targets: + - public-ingress.operator.testing.local +status: + state: Error + message: "dns message" + targets: + - public-ingress.operator.testing.local + diff --git a/internal/controller/testdata/capapplication/ca-dns-not-ready.yaml b/internal/controller/testdata/capapplication/ca-dns-not-ready.yaml new file mode 100644 index 0000000..bc82540 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-dns-not-ready.yaml @@ -0,0 +1,23 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: be44dd98e914aa033f04f18a03338da45b40090b55e0e1c935353f088bd7c583 + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-primary-dns + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 +spec: + dnsName: "*.app-domain.test.local" + targets: + - public-ingress.operator.testing.local +status: + state: Pending diff --git a/internal/controller/testdata/capapplication/ca-dns.yaml b/internal/controller/testdata/capapplication/ca-dns.yaml new file mode 100644 index 0000000..55b80c9 --- /dev/null +++ b/internal/controller/testdata/capapplication/ca-dns.yaml @@ -0,0 +1,26 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: be44dd98e914aa033f04f18a03338da45b40090b55e0e1c935353f088bd7c583 + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-primary-dns + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 +spec: + dnsName: "*.app-domain.test.local" + targets: + - public-ingress.operator.testing.local +status: + state: Ready + targets: + - public-ingress.operator.testing.local + diff --git a/internal/controller/testdata/capapplication/cat-consumer-no-finalizers-ready.yaml b/internal/controller/testdata/capapplication/cat-consumer-no-finalizers-ready.yaml new file mode 100644 index 0000000..65fe433 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-consumer-no-finalizers-ready.yaml @@ -0,0 +1,35 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cat-consumer-ready.yaml b/internal/controller/testdata/capapplication/cat-consumer-ready.yaml new file mode 100644 index 0000000..1dbac75 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-consumer-ready.yaml @@ -0,0 +1,38 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cat-consumer-upg-never-deleting.yaml b/internal/controller/testdata/capapplication/cat-consumer-upg-never-deleting.yaml new file mode 100644 index 0000000..3237674 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-consumer-upg-never-deleting.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + sme.sap.com/btp-tenant-id: "provider-tenant-id" + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: never +status: + state: Deleting + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-consumer-xyz1 of type deprovisioning to complete" + reason: DeprovisioningOperationCreated + status: "False" + type: Ready diff --git a/internal/controller/testdata/capapplication/cat-consumer-upg-never-ready.yaml b/internal/controller/testdata/capapplication/cat-consumer-upg-never-ready.yaml new file mode 100644 index 0000000..0a72efc --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-consumer-upg-never-ready.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + sme.sap.com/btp-tenant-id: "provider-tenant-id" + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: never +status: + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + conditions: + - message: "CAPTenantOperation default.test-cap-01-consumer-prvn successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready diff --git a/internal/controller/testdata/capapplication/cat-provider-error.yaml b/internal/controller/testdata/capapplication/cat-provider-error.yaml new file mode 100644 index 0000000..5bd4ed3 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-provider-error.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "Error" + reason: ProvisioningError + status: "False" + type: Ready + state: ProvisioningError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cat-provider-no-finalizers-error.yaml b/internal/controller/testdata/capapplication/cat-provider-no-finalizers-error.yaml new file mode 100644 index 0000000..4881478 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-provider-no-finalizers-error.yaml @@ -0,0 +1,35 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "Error" + reason: ProvisioningError + status: "False" + type: Ready + state: ProvisioningError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cat-provider-no-finalizers-ready.yaml b/internal/controller/testdata/capapplication/cat-provider-no-finalizers-ready.yaml new file mode 100644 index 0000000..af95ca1 --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-provider-no-finalizers-ready.yaml @@ -0,0 +1,35 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cat-provider-upgrade-error.yaml b/internal/controller/testdata/capapplication/cat-provider-upgrade-error.yaml new file mode 100644 index 0000000..786e6cd --- /dev/null +++ b/internal/controller/testdata/capapplication/cat-provider-upgrade-error.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "UpgradeError" + reason: UpgradeError + status: "False" + type: Ready + state: UpgradeError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/capapplication/cav-33-version-updated-ready.yaml b/internal/controller/testdata/capapplication/cav-33-version-updated-ready.yaml new file mode 100644 index 0000000..2c6b77c --- /dev/null +++ b/internal/controller/testdata/capapplication/cav-33-version-updated-ready.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 9.9.9 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/capapplication/cav-error.yaml b/internal/controller/testdata/capapplication/cav-error.yaml new file mode 100644 index 0000000..430f5ba --- /dev/null +++ b/internal/controller/testdata/capapplication/cav-error.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplication/cav-name-modified-ready.yaml b/internal/controller/testdata/capapplication/cav-name-modified-ready.yaml new file mode 100644 index 0000000..fa955f0 --- /dev/null +++ b/internal/controller/testdata/capapplication/cav-name-modified-ready.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1-modified + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 9.9.9 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/capapplication/gateway.yaml b/internal/controller/testdata/capapplication/gateway.yaml new file mode 100644 index 0000000..08b01d2 --- /dev/null +++ b/internal/controller/testdata/capapplication/gateway.yaml @@ -0,0 +1,30 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + name: test-cap-01-gw + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 +spec: + selector: + app: istio-ingressgateway + istio: ingressgateway + servers: + - hosts: + - "*.app-domain.test.local" + port: + name: app-domain.test.local + number: 443 + protocol: HTTPS + tls: + credentialName: default--test-cap-01-secret + mode: SIMPLE diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-cert-error.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-cert-error.yaml new file mode 100644 index 0000000..39f4d67 --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-cert-error.yaml @@ -0,0 +1,65 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert.gardener.cloud/v1alpha1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/btp-app-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + finalizers: + - sme.sap.com/capapplication +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + observedGeneration: 0 + state: Error + message: "cert message" \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml new file mode 100644 index 0000000..cd8c9db --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-cert-no-finalizers.yaml @@ -0,0 +1,62 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert.gardener.cloud/v1alpha1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/btp-app-identifier: default.test-cap-01 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + observedGeneration: 0 + state: Ready \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-cert.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-cert.yaml new file mode 100644 index 0000000..60ef1a0 --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-cert.yaml @@ -0,0 +1,64 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert.gardener.cloud/v1alpha1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/btp-app-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + finalizers: + - sme.sap.com/capapplication +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + observedGeneration: 0 + state: Ready \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-certManager-error.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-certManager-error.yaml new file mode 100644 index 0000000..e96e951 --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-certManager-error.yaml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + finalizers: + - sme.sap.com/capapplication +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + conditions: + - message: "cert message" + reason: "" + status: "False" + type: Ready + observedGeneration: 0 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml new file mode 100644 index 0000000..9082b45 --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-certManager-no-finalizers.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + conditions: + - message: "cert message" + reason: "" + status: "True" + type: Ready + observedGeneration: 0 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-certManager.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-certManager.yaml new file mode 100644 index 0000000..cd2a049 --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-certManager.yaml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: test-cap-01-certificate + namespace: istio-system + annotations: + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + finalizers: + - sme.sap.com/capapplication +spec: + commonname: "*.app-domain.test.local" + secretname: default--test-cap-01-secret +status: + conditions: + - message: "cert message" + reason: "" + status: "True" + type: Ready + observedGeneration: 0 \ No newline at end of file diff --git a/internal/controller/testdata/capapplication/istio-ingress-with-no-cert.yaml b/internal/controller/testdata/capapplication/istio-ingress-with-no-cert.yaml new file mode 100644 index 0000000..f4bb51d --- /dev/null +++ b/internal/controller/testdata/capapplication/istio-ingress-with-no-cert.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer diff --git a/internal/controller/testdata/capapplicationversion/cat-provider-version.yaml b/internal/controller/testdata/capapplicationversion/cat-provider-version.yaml new file mode 100644 index 0000000..3dbffd3 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cat-provider-version.yaml @@ -0,0 +1,31 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 1.2.3 + versionUpgradeStrategy: always +status: + state: Upgrading diff --git a/internal/controller/testdata/capapplicationversion/cav-annotations.yaml b/internal/controller/testdata/capapplicationversion/cav-annotations.yaml new file mode 100644 index 0000000..7a2e0c3 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-annotations.yaml @@ -0,0 +1,170 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + ports: + - name: "app-port" + port: 4004 + routerDestinationName: "srv-api" + appProtocol: http + - name: "app-tech-port" + port: 4005 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + annotations: + foo: "bar" + sme.sap.com/some-custom-annotation: "some value for the annotation: 'sme.sap.com/some-custom-annotation'" + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + fsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-cluster-netpol-port.yaml b/internal/controller/testdata/capapplicationversion/cav-cluster-netpol-port.yaml new file mode 100644 index 0000000..73bc898 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-cluster-netpol-port.yaml @@ -0,0 +1,153 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-custom-destination-config.yaml b/internal/controller/testdata/capapplicationversion/cav-custom-destination-config.yaml new file mode 100644 index 0000000..58bc299 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-custom-destination-config.yaml @@ -0,0 +1,71 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + ports: + - name: server-app-port + port: 4000 + routerDestinationName: custom-srv-api + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-custom-labels.yaml b/internal/controller/testdata/capapplicationversion/cav-custom-labels.yaml new file mode 100644 index 0000000..c977b3b --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-custom-labels.yaml @@ -0,0 +1,101 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + - name: app-router + labels: + foo: bar + sme.sap.com/app-type: my-cap-operator-app + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + labels: + foo: bar + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-empty-status.yaml b/internal/controller/testdata/capapplicationversion/cav-empty-status.yaml new file mode 100644 index 0000000..881987b --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-empty-status.yaml @@ -0,0 +1,48 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-cav-v1 + namespace: default + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation diff --git a/internal/controller/testdata/capapplicationversion/cav-error-condition-status.yaml b/internal/controller/testdata/capapplicationversion/cav-error-condition-status.yaml new file mode 100644 index 0000000..c408ac0 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-error-condition-status.yaml @@ -0,0 +1,55 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-cav-v1 + namespace: default + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: Unknown + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplicationversion/cav-error-status.yaml b/internal/controller/testdata/capapplicationversion/cav-error-status.yaml new file mode 100644 index 0000000..2d8a23f --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-error-status.yaml @@ -0,0 +1,50 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-cav-v1 + namespace: default + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + state: Error diff --git a/internal/controller/testdata/capapplicationversion/cav-failed-content-job.yaml b/internal/controller/testdata/capapplicationversion/cav-failed-content-job.yaml new file mode 100644 index 0000000..b9be919 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-failed-content-job.yaml @@ -0,0 +1,70 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ErrorInWorkloadStatus + status: "False" + type: Ready + message: "content deployer error in job 'test-cap-01-cav-v1-content'" + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Error diff --git a/internal/controller/testdata/capapplicationversion/cav-invalid-ca.yaml b/internal/controller/testdata/capapplicationversion/cav-invalid-ca.yaml new file mode 100644 index 0000000..bcdf5bd --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-invalid-ca.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + name: test-cap-01-cav-v1 + namespace: default + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation diff --git a/internal/controller/testdata/capapplicationversion/cav-invalid-env-cap.yaml b/internal/controller/testdata/capapplicationversion/cav-invalid-env-cap.yaml new file mode 100644 index 0000000..8272340 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-invalid-env-cap.yaml @@ -0,0 +1,69 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: VCAP_SERVICES + value: "{'foo':'bar'}" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + value: "true" + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-invalid-env-content.yaml b/internal/controller/testdata/capapplicationversion/cav-invalid-env-content.yaml new file mode 100644 index 0000000..15e97da --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-invalid-env-content.yaml @@ -0,0 +1,63 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: CAPOP_APP_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-invalid-env-job-worker.yaml b/internal/controller/testdata/capapplicationversion/cav-invalid-env-job-worker.yaml new file mode 100644 index 0000000..0cf6be0 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-invalid-env-job-worker.yaml @@ -0,0 +1,80 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: MISC_ENV + value: "{'foo':'bar'}" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + value: "true" + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: CAPOP_APP_VERSION + value: "1.2.3" +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-merged-destinations-router.yaml b/internal/controller/testdata/capapplicationversion/cav-merged-destinations-router.yaml new file mode 100644 index 0000000..4676909 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-merged-destinations-router.yaml @@ -0,0 +1,66 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: destinations + value: '[{"name": "foo", "url": "http://foo.svc:5000", "strictSSL": true},{"name": "srv-api", "url": "http://some.domain", "timeout": 60000}]' + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-pod-security-context.yaml b/internal/controller/testdata/capapplicationversion/cav-pod-security-context.yaml new file mode 100644 index 0000000..13da048 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-pod-security-context.yaml @@ -0,0 +1,167 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + ports: + - name: "app-port" + port: 4004 + routerDestinationName: "srv-api" + appProtocol: http + - name: "app-tech-port" + port: 4005 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + fsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-probes-and-resources.yaml b/internal/controller/testdata/capapplicationversion/cav-probes-and-resources.yaml new file mode 100644 index 0000000..3d9c2c0 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-probes-and-resources.yaml @@ -0,0 +1,143 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-processing-job-finished.yaml b/internal/controller/testdata/capapplicationversion/cav-processing-job-finished.yaml new file mode 100644 index 0000000..9f6a18e --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-processing-job-finished.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ReadyForProcessing + status: "False" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-processing.yaml b/internal/controller/testdata/capapplicationversion/cav-processing.yaml new file mode 100644 index 0000000..7d0ed17 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-processing.yaml @@ -0,0 +1,66 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ReadyForProcessing + status: "False" + observedGeneration: 1 + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-ready-deleting.yaml b/internal/controller/testdata/capapplicationversion/cav-ready-deleting.yaml new file mode 100644 index 0000000..622efcc --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-ready-deleting.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + deletionTimestamp: "2022-07-18T16:04:15Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/capapplicationversion/cav-security-context.yaml b/internal/controller/testdata/capapplicationversion/cav-security-context.yaml new file mode 100644 index 0000000..7bc8dbc --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-security-context.yaml @@ -0,0 +1,156 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/cav-unknown-deleting.yaml b/internal/controller/testdata/capapplicationversion/cav-unknown-deleting.yaml new file mode 100644 index 0000000..e178d76 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-unknown-deleting.yaml @@ -0,0 +1,59 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + deletionTimestamp: "2022-07-18T16:04:15Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 2.3.4 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation diff --git a/internal/controller/testdata/capapplicationversion/cav-valid-env-config.yaml b/internal/controller/testdata/capapplicationversion/cav-valid-env-config.yaml new file mode 100644 index 0000000..932ca64 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/cav-valid-env-config.yaml @@ -0,0 +1,91 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + imagePullPolicy: Always + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/content-job-completed.yaml b/internal/controller/testdata/capapplicationversion/content-job-completed.yaml new file mode 100644 index 0000000..c48fade --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/content-job-completed.yaml @@ -0,0 +1,71 @@ +apiVersion: batch/v1 +kind: Job +metadata: + creationTimestamp: "2022-07-18T12:16:21Z" + labels: + job-name: test-cap-01-cav-v1-content + name: test-cap-01-cav-v1-content + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1-content + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 + resourceVersion: "150625273" + uid: afb8bcad-72ce-4567-8337-12fc67ef55acb +spec: + backoffLimit: 2 + completions: 1 + parallelism: 1 + selector: + matchLabels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + creationTimestamp: null + labels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + job-name: test-cap-01-cav-v1-content + x4.sap.com/disable-karydia: "true" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "14" + - name: TEST + value: Dummy + - name: HOST_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + envFrom: + - secretRef: + name: test-cap-01-cav-v1-content-gen + optional: true + image: bem.some.repo.example.com/content/bem-content + imagePullPolicy: Always + name: content-deploy + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + imagePullSecrets: + - name: regcred + restartPolicy: OnFailure + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 +status: + completionTime: "2022-07-18T12:16:41Z" + conditions: + - lastProbeTime: "2022-07-18T12:16:41Z" + lastTransitionTime: "2022-07-18T12:16:41Z" + status: "True" + type: Complete + startTime: "2022-07-14T12:16:21Z" + succeeded: 1 diff --git a/internal/controller/testdata/capapplicationversion/content-job-failed.yaml b/internal/controller/testdata/capapplicationversion/content-job-failed.yaml new file mode 100644 index 0000000..9432e0f --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/content-job-failed.yaml @@ -0,0 +1,72 @@ +apiVersion: batch/v1 +kind: Job +metadata: + creationTimestamp: "2022-07-18T12:16:21Z" + labels: + job-name: test-cap-01-cav-v1-content + name: test-cap-01-cav-v1-content + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1-content + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 + resourceVersion: "150625273" + uid: afb8bcad-72ce-4567-8337-12fc67ef55acb +spec: + backoffLimit: 2 + completions: 1 + parallelism: 1 + selector: + matchLabels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + creationTimestamp: null + labels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + job-name: test-cap-01-cav-v1-content + x4.sap.com/disable-karydia: "true" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "14" + - name: TEST + value: Dummy + - name: HOST_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + envFrom: + - secretRef: + name: test-cap-01-cav-v1-content-gen + optional: true + image: bem.some.repo.example.com/content/bem-content + imagePullPolicy: Always + name: content-deploy + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + imagePullSecrets: + - name: regcred + restartPolicy: OnFailure + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 +status: + completionTime: "2022-07-18T12:16:41Z" + conditions: + - lastProbeTime: "2022-07-18T12:16:41Z" + lastTransitionTime: "2022-07-18T12:16:41Z" + status: "True" + type: Failed + message: "content deployer error in job 'test-cap-01-cav-v1-content'" + startTime: "2022-07-14T12:16:21Z" + succeeded: 0 diff --git a/internal/controller/testdata/capapplicationversion/content-job-pending.yaml b/internal/controller/testdata/capapplicationversion/content-job-pending.yaml new file mode 100644 index 0000000..142fe3c --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/content-job-pending.yaml @@ -0,0 +1,69 @@ +apiVersion: batch/v1 +kind: Job +metadata: + creationTimestamp: "2022-07-18T12:16:21Z" + labels: + job-name: test-cap-01-cav-v1-content + name: test-cap-01-cav-v1-content + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1-content + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 + resourceVersion: "150625273" + uid: afb8bcad-72ce-4567-8337-12fc67ef55acb +spec: + backoffLimit: 2 + completions: 1 + parallelism: 1 + selector: + matchLabels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + creationTimestamp: null + labels: + controller-uid: afb8bcad-72ce-4567-8337-12fc67ef55acb + job-name: test-cap-01-cav-v1-content + x4.sap.com/disable-karydia: "true" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "14" + - name: TEST + value: Dummy + - name: HOST_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + envFrom: + - secretRef: + name: test-cap-01-cav-v1-content-gen + optional: true + image: bem.some.repo.example.com/content/bem-content + imagePullPolicy: Always + name: content-deploy + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + dnsPolicy: ClusterFirst + imagePullSecrets: + - name: regcred + restartPolicy: OnFailure + schedulerName: default-scheduler + securityContext: {} + terminationGracePeriodSeconds: 30 +status: + conditions: + - lastProbeTime: "2022-07-18T12:16:41Z" + lastTransitionTime: "2022-07-18T12:16:41Z" + status: "False" + type: "" + startTime: "2022-07-14T12:16:21Z" diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-deleted-unknown.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-deleted-unknown.yaml new file mode 100644 index 0000000..62f3383 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-deleted-unknown.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + deletionTimestamp: "2022-07-18T16:04:15Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 2.3.4 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: DeleteTriggered + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Deleting diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-deleted.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-deleted.yaml new file mode 100644 index 0000000..baee208 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-deleted.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + deletionTimestamp: "2022-07-18T16:04:15Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: [] + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: DeleteTriggered + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + state: Deleting diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-deleting.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-deleting.yaml new file mode 100644 index 0000000..96254e8 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-deleting.yaml @@ -0,0 +1,69 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + deletionTimestamp: "2022-07-18T16:04:15Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: DeleteTriggered + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + state: Deleting diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-error-condition-processing.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-error-condition-processing.yaml new file mode 100644 index 0000000..65cbc43 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-error-condition-processing.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: Unknown + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-error-processing.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-error-processing.yaml new file mode 100644 index 0000000..fdf602a --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-error-processing.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: RetryProcessing + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-failed-content-job.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-failed-content-job.yaml new file mode 100644 index 0000000..c59df00 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-failed-content-job.yaml @@ -0,0 +1,71 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ErrorInWorkloadStatus + observedGeneration: 1 + status: "False" + type: Ready + message: "content deployer error in job 'test-cap-01-cav-v1-content'" + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Error diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-cap.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-cap.yaml new file mode 100644 index 0000000..35442ac --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-cap.yaml @@ -0,0 +1,78 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: VCAP_SERVICES + value: "{'foo':'bar'}" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + value: "true" + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ErrorInServerDeployment + observedGeneration: 1 + message: "invalid env configuration for workload: cap-backend-srv, remove entry: VCAP_SERVICES from configuration" + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-content.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-content.yaml new file mode 100644 index 0000000..b5e421d --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-content.yaml @@ -0,0 +1,72 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: CAPOP_APP_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ErrorInContentDeploymentJob + message: "invalid env configuration for workload: content-job, remove entry: CAPOP_APP_VERSION from configuration" + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-job-worker.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-job-worker.yaml new file mode 100644 index 0000000..49941a1 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-failed-env-job-worker.yaml @@ -0,0 +1,89 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: MISC_ENV + value: "{'foo':'bar'}" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + value: "true" + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: CAPOP_APP_VERSION + value: "1.2.3" +status: + conditions: + - reason: ErrorInJobWorkerDeployment + message: "invalid env configuration for workload: job-worker, remove entry: CAPOP_APP_VERSION from configuration" + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-missing-content-job.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-missing-content-job.yaml new file mode 100644 index 0000000..21dcd80 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-missing-content-job.yaml @@ -0,0 +1,69 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ErrorInWorkloadStatus + message: 'job.batch "test-cap-01-cav-v1-content" not found' + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Error diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-missing-secrets.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-missing-secrets.yaml new file mode 100644 index 0000000..158b840 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-missing-secrets.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: WaitingForSecrets + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-processing.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-processing.yaml new file mode 100644 index 0000000..122d9bd --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-processing.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: ReadyForProcessing + observedGeneration: 1 + status: "False" + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-annotations.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-annotations.yaml new file mode 100644 index 0000000..7aefb67 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-annotations.yaml @@ -0,0 +1,449 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + ports: + - name: "app-port" + port: 4004 + routerDestinationName: "srv-api" + appProtocol: http + - name: "app-tech-port" + port: 4005 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + annotations: + foo: "bar" + sme.sap.com/some-custom-annotation: "some value for the annotation: 'sme.sap.com/some-custom-annotation'" + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + fsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + foo: "bar" + sme.sap.com/some-custom-annotation: "some value for the annotation: 'sme.sap.com/some-custom-annotation'" + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + annotations: + foo: "bar" + sme.sap.com/some-custom-annotation: "some value for the annotation: 'sme.sap.com/some-custom-annotation'" + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + name: app-router + imagePullSecrets: + - name: regcred + securityContext: + runAsUser: 2000 + fsGroup: 2000 +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1--in + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: + matchLabels: + app: istio-ingressgateway + istio: ingressgateway + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4004 + - port: 4007 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-cap-backend-srv + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4005 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-cap-backend-srv + sme.sap.com/workload-type: CAP + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + foo: "bar" + sme.sap.com/some-custom-annotation: "some value for the annotation: 'sme.sap.com/some-custom-annotation'" + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + labels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Service + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router-svc + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + name: test-cap-01-cav-v1-app-router-svc + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ports: + - name: router-port + port: 4000 + appProtocol: "http" + - name: router-tech-port + port: 4004 + - name: router-metrics-port + port: 4007 + selector: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-app-netpol.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-app-netpol.yaml new file mode 100644 index 0000000..1f4041e --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-app-netpol.yaml @@ -0,0 +1,308 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + name: app-router + imagePullSecrets: + - name: regcred +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1--in + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: + matchLabels: + app: istio-ingressgateway + istio: ingressgateway + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-cluster-netpol-port.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-cluster-netpol-port.yaml new file mode 100644 index 0000000..832feb7 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-cluster-netpol-port.yaml @@ -0,0 +1,349 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + name: app-router + imagePullSecrets: + - name: regcred +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1--in + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: + matchLabels: + app: istio-ingressgateway + istio: ingressgateway + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4004 + - port: 4007 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-content-job.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-content-job.yaml new file mode 100644 index 0000000..efcee83 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-content-job.yaml @@ -0,0 +1,70 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-destination-config.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-destination-config.yaml new file mode 100644 index 0000000..5a71c57 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-destination-config.yaml @@ -0,0 +1,153 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + ports: + - name: server-app-port + port: 4000 + routerDestinationName: custom-srv-api + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"custom-srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4000","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + name: app-router + imagePullSecrets: + - name: regcred diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-labels-config.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-labels-config.yaml new file mode 100644 index 0000000..1c6e9dc --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-custom-labels-config.yaml @@ -0,0 +1,189 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + - name: app-router + labels: + foo: bar + sme.sap.com/app-type: my-cap-operator-app + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + labels: + foo: bar + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + labels: + foo: bar + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + foo: bar + sme.sap.com/app-type: my-cap-operator-app + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + foo: bar + sme.sap.com/app-type: my-cap-operator-app + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + foo: bar + sme.sap.com/app-type: my-cap-operator-app + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + name: app-router + imagePullSecrets: + - name: regcred diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-merged-destinations-router.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-merged-destinations-router.yaml new file mode 100644 index 0000000..311cd66 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-merged-destinations-router.yaml @@ -0,0 +1,142 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: destinations + value: '[{"name": "foo", "url": "http://foo.svc:5000", "strictSSL": true},{"name": "srv-api", "url": "http://some.domain", "timeout": 60000}]' + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","timeout":60000},{"name":"foo","url":"http://foo.svc:5000","strictSSL":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + name: app-router + imagePullSecrets: + - name: regcred diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-pod-security-context.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-pod-security-context.yaml new file mode 100644 index 0000000..735b417 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-pod-security-context.yaml @@ -0,0 +1,399 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + ports: + - name: "app-port" + port: 4004 + routerDestinationName: "srv-api" + appProtocol: http + - name: "app-tech-port" + port: 4005 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + fsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + name: app-router + imagePullSecrets: + - name: regcred + securityContext: + runAsUser: 2000 + fsGroup: 2000 +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1--in + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: + matchLabels: + app: istio-ingressgateway + istio: ingressgateway + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4004 + - port: 4007 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-cap-backend-srv + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4005 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-cap-backend-srv + sme.sap.com/workload-type: CAP + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-probes-and-resources.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-probes-and-resources.yaml new file mode 100644 index 0000000..1e39244 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-probes-and-resources.yaml @@ -0,0 +1,248 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + name: app-router + imagePullSecrets: + - name: regcred diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-security-context.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-security-context.yaml new file mode 100644 index 0000000..92a2984 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-security-context.yaml @@ -0,0 +1,355 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4004 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + ports: + - name: "router-port" + port: 4000 + appProtocol: http + - name: "router-tech-port" + port: 4004 + networkPolicy: "Cluster" + - name: "router-metrics-port" + port: 4007 + networkPolicy: "Cluster" + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + resources: + limits: + cpu: 100m + memory: 200Mi + requests: + cpu: 10m + memory: 20Mi + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + name: app-router + imagePullSecrets: + - name: regcred +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1--in + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: + matchLabels: + app: istio-ingressgateway + istio: ingressgateway + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + ingress: + - from: + - namespaceSelector: {} + podSelector: {} + ports: + - port: 4004 + - port: 4007 + podSelector: + matchLabels: + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/cav-version: "1.2.3" + policyTypes: + - Ingress diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready-valid-env-config.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready-valid-env-config.yaml new file mode 100644 index 0000000..152b178 --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready-valid-env-config.yaml @@ -0,0 +1,174 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + env: + - name: HOST_IP + valueFrom: + fieldRef: + fieldPath: status.PodIp + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + imagePullPolicy: "Always" + type: Router + env: + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + env: + - name: SOME_VERSION + value: 0.0.1 + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation + - name: job-worker + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: Additional + env: + - name: TEST_SEC_REF + valueFrom: + secretKeyRef: + key: someKey + name: someSecret + optional: true +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + finishedJobs: + - "test-cap-01-cav-v1-content" + state: Ready +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + name: test-cap-01-cav-v1-app-router + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplicationVersion + name: test-cap-01-cav-v1 + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + selector: + matchLabels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + template: + metadata: + creationTimestamp: null + labels: + app: test-cap-01 + sme.sap.com/category: Workload + sme.sap.com/workload-name: test-cap-01-cav-v1-app-router + sme.sap.com/workload-type: Router + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/cav-version: "1.2.3" + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: "1.2.3" + - name: debug + valueFrom: + configMapKeyRef: + key: someKey + name: someCM + optional: true + - name: destinations + value: '[{"name":"srv-api","url":"http://test-cap-01-cav-v1-cap-backend-srv-svc:4004","forwardAuthToken":true}]' + envFrom: + - secretRef: + name: test-cap-01-cav-v1-app-router-gen + optional: true + image: docker.image.repo/approuter/approuter:latest + imagePullPolicy: "Always" + name: app-router + imagePullSecrets: + - name: regcred diff --git a/internal/controller/testdata/capapplicationversion/expected/cav-ready.yaml b/internal/controller/testdata/capapplicationversion/expected/cav-ready.yaml new file mode 100644 index 0000000..6f9969b --- /dev/null +++ b/internal/controller/testdata/capapplicationversion/expected/cav-ready.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-07-18T06:13:52Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + finalizers: + - "sme.sap.com/capapplicationversion" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 1.2.3 + workloads: + - name: cap-backend-srv + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/srv/server:latest + type: CAP + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + image: docker.image.repo/approuter/approuter:latest + type: Router + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + image: docker.image.repo/content/cap-content:latest + type: Content + - name: mtx-job + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + image: docker.image.repo/srv/server:latest + type: TenantOperation +status: + conditions: + - reason: CreatedDeployments + observedGeneration: 1 + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/captenant/cat-01.initial.yaml b/internal/controller/testdata/captenant/cat-01.initial.yaml new file mode 100644 index 0000000..5391ab6 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-01.initial.yaml @@ -0,0 +1,11 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + name: test-cap-01-provider + namespace: default +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always diff --git a/internal/controller/testdata/captenant/cat-02.expected.yaml b/internal/controller/testdata/captenant/cat-02.expected.yaml new file mode 100644 index 0000000..c6f1db7 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-02.expected.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always +status: + state: "" + conditions: + - type: Ready + status: "False" + reason: "ProcessingStarted" + message: "" diff --git a/internal/controller/testdata/captenant/cat-02.initial.yaml b/internal/controller/testdata/captenant/cat-02.initial.yaml new file mode 100644 index 0000000..81e7b43 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-02.initial.yaml @@ -0,0 +1,11 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + name: test-cap-01-consumer + namespace: default +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always diff --git a/internal/controller/testdata/captenant/cat-03.expected.yaml b/internal/controller/testdata/captenant/cat-03.expected.yaml new file mode 100644 index 0000000..459db89 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-03.expected.yaml @@ -0,0 +1,89 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always +status: + observedGeneration: 0 + state: Provisioning + conditions: + - type: Ready + status: "False" + observedGeneration: 0 + reason: ProvisioningOperationCreated + message: "waiting for CAPTenantOperation default.test-cap-01-consumer-gen of type provisioning to complete" +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-consumer- + name: test-cap-01-consumer-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-consumer + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: a9df2080f99fd77b1b2c7e4cee1e1bff69498511 + sme.sap.com/tenant-operation-type: provisioning + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-consumer +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + operation: provisioning + steps: + - name: mtx + type: TenantOperation +--- +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: c38b79c0bac0cf1b5b8e6757b31d892898fe18472338996f7103adbf0249c79e + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-consumer + labels: + sme.sap.com/owner-identifier-hash: f57a7105fbe1d899a7757ddd04747b6b33dde594 + name: test-cap-01-consumer0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-consumer +spec: + dnsName: my-consumer.foo.bar.local + targets: + - public-ingress.operator.testing.local diff --git a/internal/controller/testdata/captenant/cat-03.initial.yaml b/internal/controller/testdata/captenant/cat-03.initial.yaml new file mode 100644 index 0000000..61b257d --- /dev/null +++ b/internal/controller/testdata/captenant/cat-03.initial.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always +status: + state: "" + conditions: + - type: Ready + status: "False" + reason: "ProcessingStarted" + message: "" diff --git a/internal/controller/testdata/captenant/cat-04.expected.yaml b/internal/controller/testdata/captenant/cat-04.expected.yaml new file mode 100644 index 0000000..cfdbf5f --- /dev/null +++ b/internal/controller/testdata/captenant/cat-04.expected.yaml @@ -0,0 +1,99 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: 2309c27d407c5e1d71529d3448da227ab25f63fb5f9d631d7c8a3e9fd0a1ff34 + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 +--- +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: 5d065e2112f26ad9b5ace902461365ba9cbf539123dea326f060534bc30e22d1 + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s diff --git a/internal/controller/testdata/captenant/cat-04.initial.yaml b/internal/controller/testdata/captenant/cat-04.initial.yaml new file mode 100644 index 0000000..49339c7 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-04.initial.yaml @@ -0,0 +1,72 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "created CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning" + reason: ProvisioningRequestCreated + status: "False" + type: Ready + state: Provisioning +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-s6f4l + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: provisioning + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-s6f4l-abc completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed diff --git a/internal/controller/testdata/captenant/cat-05.expected.yaml b/internal/controller/testdata/captenant/cat-05.expected.yaml new file mode 100644 index 0000000..bbcc316 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-05.expected.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" + reason: ProvisioningFailed + status: "False" + type: Ready + state: ProvisioningError diff --git a/internal/controller/testdata/captenant/cat-05.initial.yaml b/internal/controller/testdata/captenant/cat-05.initial.yaml new file mode 100644 index 0000000..19fe291 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-05.initial.yaml @@ -0,0 +1,72 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" + reason: ProvisioningRequestCreated + status: "False" + type: Ready + state: Provisioning +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-s6f4l + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: provisioning + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-s6f4l-abcs failed + reason: JobFailed + status: "True" + type: Ready + state: Failed diff --git a/internal/controller/testdata/captenant/cat-06.expected.yaml b/internal/controller/testdata/captenant/cat-06.expected.yaml new file mode 100644 index 0000000..a3a1370 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-06.expected.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" + reason: ProvisioningOperationCreated + status: "False" + type: Ready + state: Provisioning diff --git a/internal/controller/testdata/captenant/cat-06.initial.yaml b/internal/controller/testdata/captenant/cat-06.initial.yaml new file mode 100644 index 0000000..d3194da --- /dev/null +++ b/internal/controller/testdata/captenant/cat-06.initial.yaml @@ -0,0 +1,69 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "created CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning" + reason: ProvisioningOperationCreated + status: "False" + type: Ready + state: Provisioning +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-s6f4l + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: provisioning +status: + conditions: + - message: waiting for job default.test-cap-01-provider-s6f4l-abcd + reason: JobRunning + status: "False" + type: Ready + state: Processing diff --git a/internal/controller/testdata/captenant/cat-07.expected.yaml b/internal/controller/testdata/captenant/cat-07.expected.yaml new file mode 100644 index 0000000..cd16b27 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-07.expected.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type upgrade to complete" + reason: UpgradeOperationCreated + status: "True" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenant/cat-07.initial.yaml b/internal/controller/testdata/captenant/cat-07.initial.yaml new file mode 100644 index 0000000..d465dde --- /dev/null +++ b/internal/controller/testdata/captenant/cat-07.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/captenant/cat-08.expected.yaml b/internal/controller/testdata/captenant/cat-08.expected.yaml new file mode 100644 index 0000000..0aba4c6 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-08.expected.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: never +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/captenant/cat-08.initial.yaml b/internal/controller/testdata/captenant/cat-08.initial.yaml new file mode 100644 index 0000000..0aba4c6 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-08.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: never +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/captenant/cat-09.expected.yaml b/internal/controller/testdata/captenant/cat-09.expected.yaml new file mode 100644 index 0000000..a2a3d0c --- /dev/null +++ b/internal/controller/testdata/captenant/cat-09.expected.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type deprovisioning to complete" + reason: DeprovisioningOperationCreated + status: "False" + type: Ready + state: Deleting + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/tenant-operation-type: deprovisioning + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: deprovisioning + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenant/cat-09.initial.yaml b/internal/controller/testdata/captenant/cat-09.initial.yaml new file mode 100644 index 0000000..6eb2a21 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-09.initial.yaml @@ -0,0 +1,38 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/captenant/cat-10.expected.yaml b/internal/controller/testdata/captenant/cat-10.expected.yaml new file mode 100644 index 0000000..47eeb1c --- /dev/null +++ b/internal/controller/testdata/captenant/cat-10.expected.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: [] + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "created CAPTenantOperation default.test-cap-01-provider-gen of type deprovisioning" + reason: DeprovisioningOperationCreated + status: "False" + type: Ready + state: Deleting + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/captenant/cat-10.initial.yaml b/internal/controller/testdata/captenant/cat-10.initial.yaml new file mode 100644 index 0000000..329004c --- /dev/null +++ b/internal/controller/testdata/captenant/cat-10.initial.yaml @@ -0,0 +1,74 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "created CAPTenantOperation default.test-cap-01-provider-gen of type deprovisioning" + reason: DeprovisioningOperationCreated + status: "False" + type: Ready + state: Deleting + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: deprovisioning + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-gen-abcd completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed diff --git a/internal/controller/testdata/captenant/cat-11.expected.yaml b/internal/controller/testdata/captenant/cat-11.expected.yaml new file mode 100644 index 0000000..b3f1422 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-11.expected.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: [] + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" + reason: ProvisioningFailed + status: "False" + type: Ready + state: ProvisioningError diff --git a/internal/controller/testdata/captenant/cat-11.initial.yaml b/internal/controller/testdata/captenant/cat-11.initial.yaml new file mode 100644 index 0000000..650fd05 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-11.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" + reason: ProvisioningFailed + status: "False" + type: Ready + state: ProvisioningError diff --git a/internal/controller/testdata/captenant/cat-13.expected.yaml b/internal/controller/testdata/captenant/cat-13.expected.yaml new file mode 100644 index 0000000..3847064 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-13.expected.yaml @@ -0,0 +1,105 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + observedGeneration: 2 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + previousCAPApplicationVersions: + - test-cap-01-cav-v1 + observedGeneration: 2 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "4973adfd25df6a6ef553c2d02ec88a8165e83bc25cc46d608904ffb7c6a77cbd" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 +--- +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: ca930fa3ab9c0c67bf3d2d948cdacefd93505d6089f56ebcd7cc7cf06e66ad7d + sme.sap.com/owner-identifier: default.test-cap-01-provider + generation: 1 + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s diff --git a/internal/controller/testdata/captenant/cat-13.initial.yaml b/internal/controller/testdata/captenant/cat-13.initial.yaml new file mode 100644 index 0000000..c830e00 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-13.initial.yaml @@ -0,0 +1,75 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-upg of type upgrade to complete" + reason: UpgradeOperationCreated + status: "False" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-abcd completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed diff --git a/internal/controller/testdata/captenant/cat-14.initial.yaml b/internal/controller/testdata/captenant/cat-14.initial.yaml new file mode 100644 index 0000000..5cfcdab --- /dev/null +++ b/internal/controller/testdata/captenant/cat-14.initial.yaml @@ -0,0 +1,29 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 5.6.7 + versionUpgradeStrategy: always diff --git a/internal/controller/testdata/captenant/cat-15.expected.yaml b/internal/controller/testdata/captenant/cat-15.expected.yaml new file mode 100644 index 0000000..ba4fe88 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-15.expected.yaml @@ -0,0 +1,102 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-changed-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "VirtualService (and DestinationRule) default.test-cap-01-provider was reconciled" + reason: TenantNetworkingModified + observedGeneration: 3 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + observedGeneration: 3 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: 45f51780d8501067cf08285170eb13e1fbfbccbfcd3ba57bf7116d026ce98af8 + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-changed-provider.app-domain.test.local + - my-changed-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 +--- +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: ca930fa3ab9c0c67bf3d2d948cdacefd93505d6089f56ebcd7cc7cf06e66ad7d + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s diff --git a/internal/controller/testdata/captenant/cat-15.initial.yaml b/internal/controller/testdata/captenant/cat-15.initial.yaml new file mode 100644 index 0000000..16180a6 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-15.initial.yaml @@ -0,0 +1,74 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-changed-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + observedGeneration: 2 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + observedGeneration: 2 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "6be23b7628815f7a8b5ea532763e4474f0c7b05f7209fcba047cabd0b29d879e" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 4000 + weight: 100 diff --git a/internal/controller/testdata/captenant/cat-16.expected.yaml b/internal/controller/testdata/captenant/cat-16.expected.yaml new file mode 100644 index 0000000..16180a6 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-16.expected.yaml @@ -0,0 +1,74 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-changed-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + observedGeneration: 2 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + observedGeneration: 2 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "6be23b7628815f7a8b5ea532763e4474f0c7b05f7209fcba047cabd0b29d879e" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 4000 + weight: 100 diff --git a/internal/controller/testdata/captenant/cat-17.expected.yaml b/internal/controller/testdata/captenant/cat-17.expected.yaml new file mode 100644 index 0000000..aa4c128 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-17.expected.yaml @@ -0,0 +1,124 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-changed-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "VirtualService (and DestinationRule) default.test-cap-01-provider was reconciled" + reason: TenantNetworkingModified + observedGeneration: 3 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + observedGeneration: 3 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: 45f51780d8501067cf08285170eb13e1fbfbccbfcd3ba57bf7116d026ce98af8 + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-changed-provider.app-domain.test.local + - my-changed-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 +--- +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: ca930fa3ab9c0c67bf3d2d948cdacefd93505d6089f56ebcd7cc7cf06e66ad7d + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s +--- +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: be44dd98e914aa033f04f18a03338da45b40090b55e0e1c935353f088bd7c583 + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-provider0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + dnsName: my-changed-provider.foo.bar.local + targets: + - public-ingress.operator.testing.local diff --git a/internal/controller/testdata/captenant/cat-17.initial.yaml b/internal/controller/testdata/captenant/cat-17.initial.yaml new file mode 100644 index 0000000..d3dfea9 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-17.initial.yaml @@ -0,0 +1,101 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-changed-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + observedGeneration: 2 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "6be23b7628815f7a8b5ea532763e4474f0c7b05f7209fcba047cabd0b29d879e" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-changed-provider.app-domain.test.local + - my-changed-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 4000 + weight: 100 +--- +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: ca930fa3ab9c0c67bf3d2d948cdacefd93505d6089f56ebcd7cc7cf06e66ad7d + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s diff --git a/internal/controller/testdata/captenant/cat-20.expected.yaml b/internal/controller/testdata/captenant/cat-20.expected.yaml new file mode 100644 index 0000000..b7d9d96 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-20.expected.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type provisioning to complete" + reason: ProvisioningOperationCreated + status: "False" + type: Ready + state: Provisioning diff --git a/internal/controller/testdata/captenant/cat-20.initial.yaml b/internal/controller/testdata/captenant/cat-20.initial.yaml new file mode 100644 index 0000000..a3a1370 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-20.initial.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" + reason: ProvisioningOperationCreated + status: "False" + type: Ready + state: Provisioning diff --git a/internal/controller/testdata/captenant/cat-21.expected.yaml b/internal/controller/testdata/captenant/cat-21.expected.yaml new file mode 100644 index 0000000..8f2b9f8 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-21.expected.yaml @@ -0,0 +1,78 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + observedGeneration: 2 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + previousCAPApplicationVersions: + - test-cap-01-cav-v1 + observedGeneration: 2 +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "4973adfd25df6a6ef553c2d02ec88a8165e83bc25cc46d608904ffb7c6a77cbd" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 diff --git a/internal/controller/testdata/captenant/cat-21.initial.yaml b/internal/controller/testdata/captenant/cat-21.initial.yaml new file mode 100644 index 0000000..13af6ea --- /dev/null +++ b/internal/controller/testdata/captenant/cat-21.initial.yaml @@ -0,0 +1,109 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + deletionTimestamp: "2022-03-22T13:24:38Z" + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "created CAPTenantOperation default.test-cap-01-provider-upg of type upgrade" + reason: UpgradeOperationCreated + status: "False" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-abcd completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v2-app-router-svc.default.svc.cluster.local + port: + number: 4000 + weight: 100 diff --git a/internal/controller/testdata/captenant/cat-22.initial.yaml b/internal/controller/testdata/captenant/cat-22.initial.yaml new file mode 100644 index 0000000..e587c4b --- /dev/null +++ b/internal/controller/testdata/captenant/cat-22.initial.yaml @@ -0,0 +1,106 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-upg of type upgrade to complete" + reason: UpgradeOperationCreated + status: "False" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-abcs completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed +--- +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + labels: + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier: default.test-cap-01-wrong-tenant + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-wrong-tenant +spec: + gateways: + - test-cap-01-gw + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v1-router-svc.default.svc.cluster.local + port: + number: 4000 + weight: 100 diff --git a/internal/controller/testdata/captenant/cat-23.expected.yaml b/internal/controller/testdata/captenant/cat-23.expected.yaml new file mode 100644 index 0000000..2d6737c --- /dev/null +++ b/internal/controller/testdata/captenant/cat-23.expected.yaml @@ -0,0 +1,40 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" + reason: UpgradeFailed + observedGeneration: 2 + status: "False" + type: Ready + state: UpgradeError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 2 diff --git a/internal/controller/testdata/captenant/cat-23.initial.yaml b/internal/controller/testdata/captenant/cat-23.initial.yaml new file mode 100644 index 0000000..9c008c7 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-23.initial.yaml @@ -0,0 +1,75 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" + reason: UpgradeFailed + observedGeneration: 2 + status: "False" + type: Ready + state: UpgradeError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 2 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-abcd failed + reason: StepFailed + status: "True" + type: Ready + observedGeneration: 1 + state: Failed diff --git a/internal/controller/testdata/captenant/cat-24.expected.yaml b/internal/controller/testdata/captenant/cat-24.expected.yaml new file mode 100644 index 0000000..0d2e497 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-24.expected.yaml @@ -0,0 +1,70 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 11.12.13 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type upgrade to complete" + reason: UpgradeOperationCreated + observedGeneration: 3 + status: "True" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 3 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "3" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/cav-version: "11.12.13" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v3 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenant/cat-24.initial.yaml b/internal/controller/testdata/captenant/cat-24.initial.yaml new file mode 100644 index 0000000..579c4c9 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-24.initial.yaml @@ -0,0 +1,74 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 3 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 11.12.13 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" + reason: UpgradeFailed + status: "True" + type: Ready + state: UpgradeError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 2 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-xyz failed + reason: StepFailed + status: "True" + type: Ready + observedGeneration: 1 + state: Failed diff --git a/internal/controller/testdata/captenant/cat-25.expected.yaml b/internal/controller/testdata/captenant/cat-25.expected.yaml new file mode 100644 index 0000000..fc05413 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-25.expected.yaml @@ -0,0 +1,70 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type upgrade to complete" + reason: UpgradeOperationCreated + observedGeneration: 2 + status: "True" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 2 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenant/cat-25.initial.yaml b/internal/controller/testdata/captenant/cat-25.initial.yaml new file mode 100644 index 0000000..e9f95cd --- /dev/null +++ b/internal/controller/testdata/captenant/cat-25.initial.yaml @@ -0,0 +1,39 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" + reason: UpgradeFailed + status: "True" + type: Ready + state: UpgradeError + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + observedGeneration: 2 diff --git a/internal/controller/testdata/captenant/cat-26.initial.yaml b/internal/controller/testdata/captenant/cat-26.initial.yaml new file mode 100644 index 0000000..901e775 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-26.initial.yaml @@ -0,0 +1,72 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" + reason: ProvisioningRequestCreated + status: "False" + type: Ready + state: Provisioning +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-s6f4l + namespace: default + finalizers: + - sme.sap.com/mtxrequest + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v1 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: provisioning + steps: + - name: mtx + type: CAPTenantOperation +status: + conditions: + - message: "invalid env configuration for workload: mtx job, remove entry: VCAP_SERVICES from configuration" + reason: InvalidEnv + status: "True" + type: Ready + state: Failed diff --git a/internal/controller/testdata/captenant/cat-27.expected.yaml b/internal/controller/testdata/captenant/cat-27.expected.yaml new file mode 100644 index 0000000..9d9acc4 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-27.expected.yaml @@ -0,0 +1,67 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type upgrade to complete" + reason: UpgradeOperationCreated + status: "True" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + name: test-cap-01-provider-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: cap-backend + type: TenantOperation diff --git a/internal/controller/testdata/captenant/cat-28.expected.yaml b/internal/controller/testdata/captenant/cat-28.expected.yaml new file mode 100644 index 0000000..2709cf5 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-28.expected.yaml @@ -0,0 +1,91 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 8.9.10 + versionUpgradeStrategy: always +status: + observedGeneration: 0 + state: Provisioning + conditions: + - type: Ready + status: "False" + observedGeneration: 0 + reason: ProvisioningOperationCreated + message: "waiting for CAPTenantOperation default.test-cap-01-consumer-gen of type provisioning to complete" +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-consumer- + name: test-cap-01-consumer-gen + namespace: default + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-consumer + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: a9df2080f99fd77b1b2c7e4cee1e1bff69498511 + sme.sap.com/tenant-operation-type: provisioning + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-consumer +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + operation: provisioning + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation +--- +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: c38b79c0bac0cf1b5b8e6757b31d892898fe18472338996f7103adbf0249c79e + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-consumer + labels: + sme.sap.com/owner-identifier-hash: f57a7105fbe1d899a7757ddd04747b6b33dde594 + name: test-cap-01-consumer0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-consumer +spec: + dnsName: my-consumer.foo.bar.local + targets: + - public-ingress.operator.testing.local diff --git a/internal/controller/testdata/captenant/cat-28.initial.yaml b/internal/controller/testdata/captenant/cat-28.initial.yaml new file mode 100644 index 0000000..8b061af --- /dev/null +++ b/internal/controller/testdata/captenant/cat-28.initial.yaml @@ -0,0 +1,36 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + version: 8.9.10 + versionUpgradeStrategy: always +status: + state: "" + conditions: + - type: Ready + status: "False" + reason: "ProcessingStarted" + message: "" diff --git a/internal/controller/testdata/captenant/cat-29.expected.yaml b/internal/controller/testdata/captenant/cat-29.expected.yaml new file mode 100644 index 0000000..5575931 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-29.expected.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" + reason: UpgradeCompleted + observedGeneration: 2 + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 + previousCAPApplicationVersions: + - old-version-2 + - old-version-3 + - test-cap-01-cav-v1 + observedGeneration: 2 diff --git a/internal/controller/testdata/captenant/cat-29.initial.yaml b/internal/controller/testdata/captenant/cat-29.initial.yaml new file mode 100644 index 0000000..0c2b8af --- /dev/null +++ b/internal/controller/testdata/captenant/cat-29.initial.yaml @@ -0,0 +1,79 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + generation: 2 + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "waiting for CAPTenantOperation default.test-cap-01-provider-upg of type upgrade to complete" + reason: UpgradeOperationCreated + status: "False" + type: Ready + state: Upgrading + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 + previousCAPApplicationVersions: + - old-version-1 + - old-version-2 + - old-version-3 +--- +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + generateName: test-cap-01-provider- + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/cav-version: "8.9.10" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider-upg + namespace: default + finalizers: + - sme.sap.com/captenantoperation + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + capApplicationVersionInstance: test-cap-01-cav-v2 + subDomain: my-provider + tenantId: tenant-id-for-provider + operation: upgrade + steps: + - name: mtx + type: TenantOperation +status: + conditions: + - message: job default.test-cap-01-provider-upg-abcd completed + reason: StepCompleted + status: "True" + type: Ready + state: Completed diff --git a/internal/controller/testdata/captenant/cat-with-no-version.yaml b/internal/controller/testdata/captenant/cat-with-no-version.yaml new file mode 100644 index 0000000..dc21039 --- /dev/null +++ b/internal/controller/testdata/captenant/cat-with-no-version.yaml @@ -0,0 +1,35 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-consumer + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: consumer + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + name: test-cap-01-consumer + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-consumer + tenantId: tenant-id-for-consumer + versionUpgradeStrategy: always +status: + state: "" + conditions: + - type: Ready + status: "False" + reason: "ProcessingStarted" + message: "" diff --git a/internal/controller/testdata/captenant/changed-provider-tenant-dnsentry.yaml b/internal/controller/testdata/captenant/changed-provider-tenant-dnsentry.yaml new file mode 100644 index 0000000..f4922ae --- /dev/null +++ b/internal/controller/testdata/captenant/changed-provider-tenant-dnsentry.yaml @@ -0,0 +1,27 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: be44dd98e914aa033f04f18a03338da45b40090b55e0e1c935353f088bd7c583 + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-provider0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + dnsName: my-provider.foo.bar.local + targets: + - public-ingress.operator.testing.local +status: + message: dns entry active + state: Ready + targets: + - public-ingress.operator.testing.local + ttl: 300 diff --git a/internal/controller/testdata/captenant/provider-tenant-dnsentry-not-ready.yaml b/internal/controller/testdata/captenant/provider-tenant-dnsentry-not-ready.yaml new file mode 100644 index 0000000..d9f7ce5 --- /dev/null +++ b/internal/controller/testdata/captenant/provider-tenant-dnsentry-not-ready.yaml @@ -0,0 +1,27 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: 8a2ffda0d9efb285c9653316b443d8f6a40246532eb5aee009e65a8a8389e8fe + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-provider0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + dnsName: my-provider.foo.bar.local + targets: + - public-ingress.operator.testing.local +status: + message: processing + state: Processing + targets: + - public-ingress.operator.testing.local + ttl: 300 diff --git a/internal/controller/testdata/captenant/provider-tenant-dnsentry.yaml b/internal/controller/testdata/captenant/provider-tenant-dnsentry.yaml new file mode 100644 index 0000000..9a95c31 --- /dev/null +++ b/internal/controller/testdata/captenant/provider-tenant-dnsentry.yaml @@ -0,0 +1,27 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: 8a2ffda0d9efb285c9653316b443d8f6a40246532eb5aee009e65a8a8389e8fe + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-provider0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + dnsName: my-provider.foo.bar.local + targets: + - public-ingress.operator.testing.local +status: + message: dns entry active + state: Ready + targets: + - public-ingress.operator.testing.local + ttl: 300 diff --git a/internal/controller/testdata/captenant/provider-tenant-dr-v1.yaml b/internal/controller/testdata/captenant/provider-tenant-dr-v1.yaml new file mode 100644 index 0000000..06d0700 --- /dev/null +++ b/internal/controller/testdata/captenant/provider-tenant-dr-v1.yaml @@ -0,0 +1,27 @@ +apiVersion: networking.istio.io/v1beta1 +kind: DestinationRule +metadata: + annotations: + sme.sap.com/resource-hash: 5d065e2112f26ad9b5ace902461365ba9cbf539123dea326f060534bc30e22d1 + sme.sap.com/owner-identifier: default.test-cap-01-provider + generation: 1 + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local + trafficPolicy: + loadBalancer: + consistentHash: + httpCookie: + name: JSESSIONID + path: / + ttl: 0s diff --git a/internal/controller/testdata/captenant/provider-tenant-vs-v1.yaml b/internal/controller/testdata/captenant/provider-tenant-vs-v1.yaml new file mode 100644 index 0000000..a218117 --- /dev/null +++ b/internal/controller/testdata/captenant/provider-tenant-vs-v1.yaml @@ -0,0 +1,34 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + annotations: + sme.sap.com/resource-hash: "2309c27d407c5e1d71529d3448da227ab25f63fb5f9d631d7c8a3e9fd0a1ff34" + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + gateways: + - test-cap-01-gw + - istio-system/cap-operator-domains-gen + hosts: + - my-provider.app-domain.test.local + - my-provider.foo.bar.local + http: + - match: + - uri: + prefix: / + route: + - destination: + host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local + port: + number: 5000 + weight: 100 diff --git a/internal/controller/testdata/captenant/to-be-updated-provider-tenant-dnsentry.yaml b/internal/controller/testdata/captenant/to-be-updated-provider-tenant-dnsentry.yaml new file mode 100644 index 0000000..1598adf --- /dev/null +++ b/internal/controller/testdata/captenant/to-be-updated-provider-tenant-dnsentry.yaml @@ -0,0 +1,27 @@ +apiVersion: dns.gardener.cloud/v1alpha1 +kind: DNSEntry +metadata: + annotations: + dns.gardener.cloud/class: garden + sme.sap.com/resource-hash: foobarsomehash + sme.sap.com/owner-identifier: CAPTenant.default.test-cap-01-provider + labels: + sme.sap.com/owner-identifier-hash: ec24f9b09337c244cf5ac64b539f8c04f507cd99 + name: test-cap-01-provider0 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + dnsName: my-provider.foo.bar.local + targets: + - public-ingress.operator.testing.local +status: + message: dns entry active + state: Ready + targets: + - public-ingress.operator.testing.local + ttl: 300 diff --git a/internal/controller/testdata/captenantoperation/ctop-01.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-01.expected.yaml new file mode 100644 index 0000000..beae87e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-01.expected.yaml @@ -0,0 +1,30 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] diff --git a/internal/controller/testdata/captenantoperation/ctop-01.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-01.initial.yaml new file mode 100644 index 0000000..99008d2 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-01.initial.yaml @@ -0,0 +1,13 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenantoperation/ctop-02.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-02.expected.yaml new file mode 100644 index 0000000..c34b850 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-02.expected.yaml @@ -0,0 +1,31 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-02.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-02.initial.yaml new file mode 100644 index 0000000..beae87e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-02.initial.yaml @@ -0,0 +1,30 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] diff --git a/internal/controller/testdata/captenantoperation/ctop-03.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-03.expected.yaml new file mode 100644 index 0000000..54459fb --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-03.expected.yaml @@ -0,0 +1,34 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: [] +status: + state: Failed + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepProcessingError + message: "operation steps missing in CAPTenantOperation default.test-cap-01-provider-abcd" diff --git a/internal/controller/testdata/captenantoperation/ctop-03.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-03.initial.yaml new file mode 100644 index 0000000..87a5507 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-03.initial.yaml @@ -0,0 +1,28 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: [] +status: + state: Processing + conditions: [] diff --git a/internal/controller/testdata/captenantoperation/ctop-04.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-04.expected.yaml new file mode 100644 index 0000000..ba87a03 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-04.expected.yaml @@ -0,0 +1,129 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: provisioning + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"subscribedSubdomain":"my-provider","eventType":"CREATE"}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: provisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: "IS_MTXS_ENABLED" + value: "false" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-04.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-04.initial.yaml new file mode 100644 index 0000000..8086d46 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-04.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-05.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-05.expected.yaml new file mode 100644 index 0000000..0934e02 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-05.expected.yaml @@ -0,0 +1,31 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "5.6.7" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] diff --git a/internal/controller/testdata/captenantoperation/ctop-05.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-05.initial.yaml new file mode 100644 index 0000000..39895fc --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-05.initial.yaml @@ -0,0 +1,13 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 +spec: + tenantId: tenant-id-for-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenantoperation/ctop-06.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-06.expected.yaml new file mode 100644 index 0000000..603b264 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-06.expected.yaml @@ -0,0 +1,134 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: cap-backend + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-cap-backend-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-cap-backend-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "cap-backend" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-cap-backend- + name: test-cap-01-provider-cap-backend-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 2 + ttlSecondsAfterFinished: 300 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "cap-backend" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: upgrade + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"tenants":["tenant-id-for-provider"],"autoUndeploy":true}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-cap-backend-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: foo + value: bar + - name: "IS_MTXS_ENABLED" + value: "false" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-cap-backend-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:v2 + name: cap-backend + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-06.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-06.initial.yaml new file mode 100644 index 0000000..521e8f1 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-06.initial.yaml @@ -0,0 +1,33 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: cap-backend + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-07.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-07.expected.yaml new file mode 100644 index 0000000..ecf49d7 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-07.expected.yaml @@ -0,0 +1,114 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/3 : job default.test-cap-01-provider-custom-say-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-custom-say-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + image: docker/whalesay + imagePullPolicy: IfNotPresent + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-07.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-07.initial.yaml new file mode 100644 index 0000000..d95fb1e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-07.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-08.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-08.expected.yaml new file mode 100644 index 0000000..8f7bfad --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-08.expected.yaml @@ -0,0 +1,119 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepCompleted + message: "step 1/3 : job default.test-cap-01-provider-custom-say-xyz completed" + currentStep: 2 +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + image: docker/whalesay + imagePullPolicy: IfNotPresent + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Complete + status: "True" + Reason: PodCompleted diff --git a/internal/controller/testdata/captenantoperation/ctop-08.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-08.initial.yaml new file mode 100644 index 0000000..d7cac20 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-08.initial.yaml @@ -0,0 +1,119 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 1/3 : job default.test-cap-01-provider-custom-say-xyz created" + currentStep: 1 + activeJob: "test-cap-01-provider-custom-say-xyz" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + image: docker/whalesay + imagePullPolicy: IfNotPresent + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Complete + status: "True" + Reason: PodCompleted diff --git a/internal/controller/testdata/captenantoperation/ctop-09.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-09.expected.yaml new file mode 100644 index 0000000..e979581 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-09.expected.yaml @@ -0,0 +1,138 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 2/3 : job default.test-cap-01-provider-ten-op-gen created" + currentStep: 2 + activeJob: "test-cap-01-provider-ten-op-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-ten-op- + name: test-cap-01-provider-ten-op-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: upgrade + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"tenants":["tenant-id-for-provider"],"autoUndeploy":true}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: flow + value: glow + - name: "IS_MTXS_ENABLED" + value: "false" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: ten-op + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-09.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-09.initial.yaml new file mode 100644 index 0000000..7f28d6c --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-09.initial.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepCompleted + message: "step 1/3 : job default.test-cap-01-provider-abcd-xyz completed" + currentStep: 2 diff --git a/internal/controller/testdata/captenantoperation/ctop-10.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-10.expected.yaml new file mode 100644 index 0000000..90eafdc --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-10.expected.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Failed + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepFailed + message: "step 2/3 : job default.test-cap-01-provider-mtx-xyz failed" diff --git a/internal/controller/testdata/captenantoperation/ctop-10.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-10.initial.yaml new file mode 100644 index 0000000..1092b5e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-10.initial.yaml @@ -0,0 +1,141 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 2/3 : job default.test-cap-01-provider-mtx-xyz created" + currentStep: 2 + activeJob: "test-cap-01-provider-mtx-xyz" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: upgrade + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"tenants":["tenant-id-for-provider"],"autoUndeploy":true}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: flow + value: glow + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Failed + status: "True" + Reason: PodError diff --git a/internal/controller/testdata/captenantoperation/ctop-11.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-11.expected.yaml new file mode 100644 index 0000000..f3b29d2 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-11.expected.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Completed + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepCompleted + message: "step 3/3 : job default.test-cap-01-provider-custom-say-xyz completed" diff --git a/internal/controller/testdata/captenantoperation/ctop-11.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-11.initial.yaml new file mode 100644 index 0000000..f55f9f2 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-11.initial.yaml @@ -0,0 +1,118 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 3/3 : job default.test-cap-01-provider-custom-say-xyz created" + currentStep: 3 + activeJob: "test-cap-01-provider-custom-say-xyz" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "3" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "3" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Complete + status: "True" + Reason: PodCompleted diff --git a/internal/controller/testdata/captenantoperation/ctop-12.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-12.expected.yaml new file mode 100644 index 0000000..716fa42 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-12.expected.yaml @@ -0,0 +1,44 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Deleting + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepCompleted + message: "step 1/3 : job default.test-cap-01-provider-custom-say-xyz completed" + currentStep: 2 diff --git a/internal/controller/testdata/captenantoperation/ctop-12.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-12.initial.yaml new file mode 100644 index 0000000..a5e9d30 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-12.initial.yaml @@ -0,0 +1,119 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 1/3 : job default.test-cap-01-provider-custom-say-xyz created" + currentStep: 1 + activeJob: "test-cap-01-provider-custom-say-xyz" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Complete + status: "True" + Reason: PodCompleted diff --git a/internal/controller/testdata/captenantoperation/ctop-13.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-13.expected.yaml new file mode 100644 index 0000000..f9e16e8 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-13.expected.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Deleting + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepFailed + message: "step 2/3 : job default.test-cap-01-provider-ten-op-xyz failed" diff --git a/internal/controller/testdata/captenantoperation/ctop-13.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-13.initial.yaml new file mode 100644 index 0000000..35a32a3 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-13.initial.yaml @@ -0,0 +1,142 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 2/3 : job default.test-cap-01-provider-ten-op-xyz created" + currentStep: 2 + activeJob: "test-cap-01-provider-ten-op-xyz" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-ten-op- + name: test-cap-01-provider-ten-op-xyz + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "2" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: upgrade + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"tenants":["tenant-id-for-provider"],"autoUndeploy":true}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: flow + value: glow + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: ten-op + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 0 + conditions: + - type: Failed + status: "True" + Reason: PodError diff --git a/internal/controller/testdata/captenantoperation/ctop-14.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-14.expected.yaml new file mode 100644 index 0000000..2a1d054 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-14.expected.yaml @@ -0,0 +1,42 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: [] + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Deleting + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepFailed + message: "step 2/3 : job default.test-cap-01-provider-abcd-xyz failed" diff --git a/internal/controller/testdata/captenantoperation/ctop-14.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-14.initial.yaml new file mode 100644 index 0000000..cf71c1a --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-14.initial.yaml @@ -0,0 +1,43 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + deletionTimestamp: "2022-08-22T13:24:38Z" + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Deleting + observedGeneration: 1 + conditions: + - type: Ready + status: "True" + observedGeneration: 1 + reason: StepFailed + message: "step 2/3 : job default.test-cap-01-provider-abcd-xyz failed" diff --git a/internal/controller/testdata/captenantoperation/ctop-15.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-15.expected.yaml new file mode 100644 index 0000000..3749af1 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-15.expected.yaml @@ -0,0 +1,16 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-invalid-tenant-op + namespace: default + generation: 1 +spec: + tenantId: tenant-id-invalid + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] diff --git a/internal/controller/testdata/captenantoperation/ctop-15.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-15.initial.yaml new file mode 100644 index 0000000..8010244 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-15.initial.yaml @@ -0,0 +1,13 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-invalid-tenant-op + namespace: default + generation: 1 +spec: + tenantId: tenant-id-invalid + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation diff --git a/internal/controller/testdata/captenantoperation/ctop-16.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-16.expected.yaml new file mode 100644 index 0000000..cbede7a --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-16.expected.yaml @@ -0,0 +1,129 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: deprovisioning + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: "{}" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: deprovisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: "IS_MTXS_ENABLED" + value: "false" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-16.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-16.initial.yaml new file mode 100644 index 0000000..afb672c --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-16.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-17.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-17.expected.yaml new file mode 100644 index 0000000..8a5fe00 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-17.expected.yaml @@ -0,0 +1,129 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepProcessing + message: "step 1/1 : waiting for job default.test-cap-01-provider-mtx-gen" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: deprovisioning + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: "{}" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: deprovisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-17.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-17.initial.yaml new file mode 100644 index 0000000..f64b4d4 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-17.initial.yaml @@ -0,0 +1,128 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: deprovisioning + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: "{}" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: deprovisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never +status: + activeItems: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-18.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-18.expected.yaml new file mode 100644 index 0000000..b6637f7 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-18.expected.yaml @@ -0,0 +1,110 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: provisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node + - ./node_modules/@sap/cds-mtxs/bin/cds-mtx + - subscribe + - tenant-id-for-provider + image: docker.image.repo/srv/server:latest + imagePullPolicy: Always + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never + diff --git a/internal/controller/testdata/captenantoperation/ctop-18.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-18.initial.yaml new file mode 100644 index 0000000..8086d46 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-18.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-19.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-19.expected.yaml new file mode 100644 index 0000000..0253daa --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-19.expected.yaml @@ -0,0 +1,109 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: deprovisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node + - ./node_modules/@sap/cds-mtxs/bin/cds-mtx + - unsubscribe + - tenant-id-for-provider + image: docker.image.repo/srv/server:latest + imagePullPolicy: Always + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-19.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-19.initial.yaml new file mode 100644 index 0000000..afb672c --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-19.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: deprovisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: deprovisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-20.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-20.expected.yaml new file mode 100644 index 0000000..3d21519 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-20.expected.yaml @@ -0,0 +1,109 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node + - ./node_modules/@sap/cds-mtxs/bin/cds-mtx + - upgrade + - tenant-id-for-provider + image: docker.image.repo/srv/server:latest + imagePullPolicy: Always + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-20.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-20.initial.yaml new file mode 100644 index 0000000..5b23137 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-20.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-21.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-21.expected.yaml new file mode 100644 index 0000000..5a2d547 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-21.expected.yaml @@ -0,0 +1,115 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: provisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node + - ./node_modules/@sap/cds-mtxs/bin/cds-mtx + - subscribe + - tenant-id-for-provider + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 20m + memory: 20Mi + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-21.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-21.initial.yaml new file mode 100644 index 0000000..8086d46 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-21.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-22.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-22.expected.yaml new file mode 100644 index 0000000..2889ca1 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-22.expected.yaml @@ -0,0 +1,118 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: provisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node + - ./node_modules/@sap/cds-mtxs/bin/cds-mtx + - subscribe + - tenant-id-for-provider + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 20m + memory: 20Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-22.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-22.initial.yaml new file mode 100644 index 0000000..8086d46 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-22.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-23.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-23.expected.yaml new file mode 100644 index 0000000..b7fd73f --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-23.expected.yaml @@ -0,0 +1,119 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/3 : job default.test-cap-01-provider-custom-say-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-custom-say-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + securityContext: + runAsUser: 2000 + runAsGroup: 2000 + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-23.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-23.initial.yaml new file mode 100644 index 0000000..d95fb1e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-23.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-24.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-24.expected.yaml new file mode 100644 index 0000000..cbe9d63 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-24.expected.yaml @@ -0,0 +1,110 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-mtx-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-mtx-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + foo: "bar" + sme.sap.com/my-custom-operation-identifier: "some value for the annotation: `sme.sap.com/my-custom-operation-identifier`" + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-mtx- + name: test-cap-01-provider-mtx-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + template: + metadata: + annotations: + foo: "bar" + sme.sap.com/my-custom-operation-identifier: "some value for the annotation: `sme.sap.com/my-custom-operation-identifier`" + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "mtx" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 5.6.7 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: provisioning + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-mtx-gen + optional: true + command: + - node custom-command + image: docker.image.repo/srv/server:latest + name: mtx + imagePullSecrets: + - name: regcred + restartPolicy: Never + diff --git a/internal/controller/testdata/captenantoperation/ctop-24.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-24.initial.yaml new file mode 100644 index 0000000..8086d46 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-24.initial.yaml @@ -0,0 +1,32 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: provisioning + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: provisioning + capApplicationVersionInstance: test-cap-01-cav-v1 + steps: + - name: mtx + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-25.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-25.expected.yaml new file mode 100644 index 0000000..0d3078b --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-25.expected.yaml @@ -0,0 +1,123 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/3 : job default.test-cap-01-provider-custom-say-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-custom-say-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + foo: "bar" + sme.sap.com/my-custom-app-identifier: "some value for the annotation: `sme.sap.com/my-custom-app-identifier`" + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + generateName: test-cap-01-provider-custom-say- + name: test-cap-01-provider-custom-say-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + foo: "bar" + sme.sap.com/my-custom-app-identifier: "some value for the annotation: `sme.sap.com/my-custom-app-identifier`" + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + app: test-cap-01 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "custom-say" + sme.sap.com/workload-type: "CustomTenantOperation" + spec: + containers: + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: close + value: encounter + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-custom-say-gen + optional: true + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + name: custom-say + imagePullSecrets: + - name: regcred + securityContext: + runAsUser: 2000 + runAsGroup: 2000 + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-25.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-25.initial.yaml new file mode 100644 index 0000000..d95fb1e --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-25.initial.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: custom-say + type: CustomTenantOperation + - name: ten-op + type: TenantOperation + - name: custom-say + type: CustomTenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/captenantoperation/ctop-26.expected.yaml b/internal/controller/testdata/captenantoperation/ctop-26.expected.yaml new file mode 100644 index 0000000..1ccc475 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-26.expected.yaml @@ -0,0 +1,134 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: default.test-cap-01-provider + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: 8.9.10 + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: ten-op + type: TenantOperation +status: + state: Processing + observedGeneration: 1 + conditions: + - type: Ready + status: "False" + observedGeneration: 1 + reason: StepInitiated + message: "step 1/1 : job default.test-cap-01-provider-ten-op-gen created" + currentStep: 1 + activeJob: "test-cap-01-provider-ten-op-gen" +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + generateName: test-cap-01-provider-ten-op- + name: test-cap-01-provider-ten-op-gen + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenantOperation + name: test-cap-01-provider-abcd +spec: + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + sme.sap.com/owner-identifier: default.test-cap-01-provider-abcd + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + labels: + sme.sap.com/tenant-operation-step: "1" + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "1" + sme.sap.com/owner-identifier-hash: ce6bb3ae0b5ebbd0116259415ccac00bff0dc431 + app: test-cap-01 + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/category: "Workload" + sme.sap.com/workload-name: "ten-op" + sme.sap.com/workload-type: "TenantOperation" + spec: + containers: + - env: + - name: WAIT_FOR_SIDECAR + value: "false" + - name: XSUAA_INSTANCE_NAME + value: cap-uaa2 + - name: MTX_SERVICE_URL + value: http://localhost:4004 + - name: MTX_REQUEST_TYPE + value: upgrade + - name: MTX_TENANT_ID + value: tenant-id-for-provider + - name: MTX_REQUEST_PAYLOAD + value: '{"tenants":["tenant-id-for-provider"],"autoUndeploy":true}' + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + image: ghcr.io/sap/cap-operator/mtx-job + name: trigger + - env: + - name: CAPOP_APP_VERSION + value: 8.9.10 + - name: CAPOP_TENANT_ID + value: tenant-id-for-provider + - name: CAPOP_TENANT_OPERATION + value: upgrade + - name: CAPOP_TENANT_SUBDOMAIN + value: my-provider + - name: flow + value: glow + - name: "IS_MTXS_ENABLED" + value: "false" + envFrom: + - secretRef: + name: test-cap-01-provider-abcd-ten-op-gen + optional: true + command: + - "/bin/sh" + - "-c" + args: + - node ./node_modules/@sap/cds/bin/cds run & nc -lv -s localhost -p 8080 + image: docker.image.repo/srv/server:latest + name: ten-op + imagePullSecrets: + - name: regcred + restartPolicy: Never diff --git a/internal/controller/testdata/captenantoperation/ctop-26.initial.yaml b/internal/controller/testdata/captenantoperation/ctop-26.initial.yaml new file mode 100644 index 0000000..159fd11 --- /dev/null +++ b/internal/controller/testdata/captenantoperation/ctop-26.initial.yaml @@ -0,0 +1,33 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: test-cap-01-provider-abcd + namespace: default + generation: 1 + finalizers: + - sme.sap.com/captenantoperation + annotations: + sme.sap.com/owner-identifier: "default.test-cap-01-provider" + labels: + sme.sap.com/tenant-operation-type: upgrade + sme.sap.com/owner-generation: "0" + sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec + sme.sap.com/cav-version: "8.9.10" + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPTenant + name: test-cap-01-provider +spec: + tenantId: tenant-id-for-provider + subDomain: my-provider + operation: upgrade + capApplicationVersionInstance: test-cap-01-cav-v2 + steps: + - name: ten-op + type: TenantOperation +status: + state: Processing + conditions: [] + currentStep: 1 diff --git a/internal/controller/testdata/common/capapplication-multi-xsuaa.yaml b/internal/controller/testdata/common/capapplication-multi-xsuaa.yaml new file mode 100644 index 0000000..16d4b33 --- /dev/null +++ b/internal/controller/testdata/common/capapplication-multi-xsuaa.yaml @@ -0,0 +1,41 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + annotations: + "sme.sap.com/primary-xsuaa": "cap-uaa2" + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: xsuaa + name: cap-uaa2 + secret: cap-cap-01-uaa2-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider diff --git a/internal/controller/testdata/common/capapplication.yaml b/internal/controller/testdata/common/capapplication.yaml new file mode 100644 index 0000000..097045c --- /dev/null +++ b/internal/controller/testdata/common/capapplication.yaml @@ -0,0 +1,39 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + finalizers: + - sme.sap.com/capapplication + generation: 2 + name: test-cap-01 + namespace: default + resourceVersion: "11373799" + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-cap-01-uaa-bind-cf + - class: xsuaa + name: cap-uaa2 + secret: cap-cap-01-uaa2-bind-cf + - class: saas-registry + name: cap-saas-registry + secret: cap-cap-01-saas-bind-cf + - class: service-manager + name: cap-service-manager + secret: cap-cap-01-svc-man-bind-cf + btpAppName: test-cap-01 + domains: + istioIngressGatewayLabels: + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: app-domain.test.local + secondary: + - foo.bar.local + globalAccountId: btp-glo-acc-id + provider: + subDomain: my-provider + tenantId: tenant-id-for-provider diff --git a/internal/controller/testdata/common/capapplicationversion-invalid-env.yaml b/internal/controller/testdata/common/capapplicationversion-invalid-env.yaml new file mode 100644 index 0000000..f63156a --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-invalid-env.yaml @@ -0,0 +1,78 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + env: + - name: foo + value: bar + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: TenantOperation + image: docker.image.repo/srv/server:latest + env: + - name: foo + value: bar + - name: VCAP_SERVICES + value: "{'foo': [{'test': 'bar'}]}" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + env: + - name: foo + value: bar + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v1-mtxs-custom-cmd.yaml b/internal/controller/testdata/common/capapplicationversion-v1-mtxs-custom-cmd.yaml new file mode 100644 index 0000000..cf634fd --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1-mtxs-custom-cmd.yaml @@ -0,0 +1,72 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + annotations: + foo: "bar" + sme.sap.com/my-custom-operation-identifier: "some value for the annotation: `sme.sap.com/my-custom-operation-identifier`" + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + image: docker.image.repo/srv/server:latest + command: + - node custom-command + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v1-mtxs.yaml b/internal/controller/testdata/common/capapplicationversion-v1-mtxs.yaml new file mode 100644 index 0000000..3ffa992 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1-mtxs.yaml @@ -0,0 +1,68 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + image: docker.image.repo/srv/server:latest + imagePullPolicy: Always + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v1-not-ready.yaml b/internal/controller/testdata/common/capapplicationversion-v1-not-ready.yaml new file mode 100644 index 0000000..5f4c664 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1-not-ready.yaml @@ -0,0 +1,65 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 5.6.7 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: TenantOperation + image: docker.image.repo/srv/server:latest + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - reason: ReadyForProcessing + status: "False" + type: Ready + observedGeneration: 1 + state: Processing diff --git a/internal/controller/testdata/common/capapplicationversion-v1-resources.yaml b/internal/controller/testdata/common/capapplicationversion-v1-resources.yaml new file mode 100644 index 0000000..dd7e669 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1-resources.yaml @@ -0,0 +1,74 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 20m + memory: 20Mi + image: docker.image.repo/srv/server:latest + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v1-security-context.yaml b/internal/controller/testdata/common/capapplicationversion-v1-security-context.yaml new file mode 100644 index 0000000..7a1ff17 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1-security-context.yaml @@ -0,0 +1,77 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + resources: + limits: + cpu: 200m + memory: 200Mi + requests: + cpu: 20m + memory: 20Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + image: docker.image.repo/srv/server:latest + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v1.yaml b/internal/controller/testdata/common/capapplicationversion-v1.yaml new file mode 100644 index 0000000..edb876e --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v1.yaml @@ -0,0 +1,70 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + creationTimestamp: "2022-03-18T22:14:33Z" + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v1 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + registrySecrets: + - regcred + version: 5.6.7 + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:latest + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:latest + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + image: docker.image.repo/srv/server:latest + env: + - name: IS_MTXS_ENABLED + value: "false" + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:latest +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2-annotations.yaml b/internal/controller/testdata/common/capapplicationversion-v2-annotations.yaml new file mode 100644 index 0000000..5194bdf --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2-annotations.yaml @@ -0,0 +1,104 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + env: + - name: foo + value: bar + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 + - name: ten-op + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + image: docker.image.repo/srv/server:latest + env: + - name: flow + value: glow + - name: custom-say + annotations: + foo: "bar" + sme.sap.com/my-custom-app-identifier: "some value for the annotation: `sme.sap.com/my-custom-app-identifier`" + consumedBTPServices: + - cap-uaa + jobDefinition: + type: "CustomTenantOperation" + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + runAsGroup: 2000 + env: + - name: close + value: encounter + tenantOperations: + provisioning: + - workloadName: custom-say + - workloadName: content-job # this will be ignored + - workloadName: ten-op + upgrade: + - workloadName: custom-say + - workloadName: ten-op + - workloadName: custom-say +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2-multi-xsuaa.yaml b/internal/controller/testdata/common/capapplicationversion-v2-multi-xsuaa.yaml new file mode 100644 index 0000000..7d4816c --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2-multi-xsuaa.yaml @@ -0,0 +1,78 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-uaa2 + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + env: + - name: foo + value: bar + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 + - name: ten-op + consumedBTPServices: + - cap-uaa + - cap-uaa2 + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + image: docker.image.repo/srv/server:latest + env: + - name: flow + value: glow + - name: "IS_MTXS_ENABLED" + value: "false" +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml b/internal/controller/testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml new file mode 100644 index 0000000..dd5f061 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2-multiple-tenant-ops.yaml @@ -0,0 +1,98 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + env: + - name: foo + value: bar + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 + - name: ten-op + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + image: docker.image.repo/srv/server:latest + env: + - name: flow + value: glow + - name: "IS_MTXS_ENABLED" + value: "false" + - name: custom-say + consumedBTPServices: + - cap-uaa + jobDefinition: + type: "CustomTenantOperation" + image: docker/whalesay + imagePullPolicy: IfNotPresent + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + env: + - name: close + value: encounter + tenantOperations: + provisioning: + - workloadName: custom-say + - workloadName: content-job # this will be ignored + - workloadName: ten-op + upgrade: + - workloadName: custom-say + - workloadName: ten-op + - workloadName: custom-say +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2-no-mtx-workload.yaml b/internal/controller/testdata/common/capapplicationversion-v2-no-mtx-workload.yaml new file mode 100644 index 0000000..24d5425 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2-no-mtx-workload.yaml @@ -0,0 +1,63 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + env: + - name: foo + value: bar + - name: "IS_MTXS_ENABLED" + value: "false" + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2-pod-security-context.yaml b/internal/controller/testdata/common/capapplicationversion-v2-pod-security-context.yaml new file mode 100644 index 0000000..2212d68 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2-pod-security-context.yaml @@ -0,0 +1,101 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + env: + - name: foo + value: bar + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 + - name: ten-op + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + image: docker.image.repo/srv/server:latest + env: + - name: flow + value: glow + - name: custom-say + consumedBTPServices: + - cap-uaa + jobDefinition: + type: "CustomTenantOperation" + image: docker/whalesay + command: ["cowsay", "$(CAPOP_TENANT_OPERATION)", "$(CAPOP_TENANT_ID)"] + backoffLimit: 1 + ttlSecondsAfterFinished: 150 + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + podSecurityContext: + runAsUser: 2000 + runAsGroup: 2000 + env: + - name: close + value: encounter + tenantOperations: + provisioning: + - workloadName: custom-say + - workloadName: content-job # this will be ignored + - workloadName: ten-op + upgrade: + - workloadName: custom-say + - workloadName: ten-op + - workloadName: custom-say +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v2.yaml b/internal/controller/testdata/common/capapplicationversion-v2.yaml new file mode 100644 index 0000000..c809b91 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v2.yaml @@ -0,0 +1,66 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v2 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "11371108" + uid: 5e64489b-7346-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 8.9.10 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v2 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v2 + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + image: docker.image.repo/srv/server:v2 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v2 +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/capapplicationversion-v3.yaml b/internal/controller/testdata/common/capapplicationversion-v3.yaml new file mode 100644 index 0000000..62c0e67 --- /dev/null +++ b/internal/controller/testdata/common/capapplicationversion-v3.yaml @@ -0,0 +1,66 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + generation: 1 + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + name: test-cap-01-cav-v3 + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 + resourceVersion: "113715468" + uid: 5e64489b-1234-4984-8617-e8c37338b3d8 +spec: + capApplicationInstance: test-cap-01 + version: 11.12.13 + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + deploymentDefinition: + type: CAP + image: docker.image.repo/srv/server:v3 + - name: content-job + consumedBTPServices: + - cap-uaa + jobDefinition: + type: Content + image: docker.image.repo/content/cap-content:v3 + - name: mtx + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-registry + jobDefinition: + type: "TenantOperation" + image: docker.image.repo/srv/server:v3 + - name: app-router + consumedBTPServices: + - cap-uaa + - cap-saas-registry + deploymentDefinition: + type: Router + image: docker.image.repo/approuter/approuter:v3 +status: + conditions: + - lastTransitionTime: "2022-03-18T23:07:47Z" + lastUpdateTime: "2022-03-18T23:07:47Z" + reason: CreatedDeployments + status: "True" + type: Ready + observedGeneration: 1 + state: Ready diff --git a/internal/controller/testdata/common/captenant-provider-ready.yaml b/internal/controller/testdata/common/captenant-provider-ready.yaml new file mode 100644 index 0000000..5969035 --- /dev/null +++ b/internal/controller/testdata/common/captenant-provider-ready.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 5.6.7 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: ProvisioningCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v1 diff --git a/internal/controller/testdata/common/captenant-provider-upgraded-ready.yaml b/internal/controller/testdata/common/captenant-provider-upgraded-ready.yaml new file mode 100644 index 0000000..60ad219 --- /dev/null +++ b/internal/controller/testdata/common/captenant-provider-upgraded-ready.yaml @@ -0,0 +1,37 @@ +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + finalizers: + - sme.sap.com/captenant + annotations: + sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 + sme.sap.com/owner-identifier: default.test-cap-01 + labels: + sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 + sme.sap.com/btp-tenant-id: tenant-id-for-provider + sme.sap.com/owner-generation: "2" + sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 + sme.sap.com/tenant-type: provider + name: test-cap-01-provider + namespace: default + ownerReferences: + - apiVersion: sme.sap.com/v1alpha1 + blockOwnerDeletion: true + controller: true + kind: CAPApplication + name: test-cap-01 + uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 +spec: + capApplicationInstance: test-cap-01 + subDomain: my-provider + tenantId: tenant-id-for-provider + version: 8.9.10 + versionUpgradeStrategy: always +status: + conditions: + - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" + reason: UpgradeCompleted + status: "True" + type: Ready + state: Ready + currentCAPApplicationVersionInstance: test-cap-01-cav-v2 diff --git a/internal/controller/testdata/common/credential-secrets.yaml b/internal/controller/testdata/common/credential-secrets.yaml new file mode 100644 index 0000000..f258f50 --- /dev/null +++ b/internal/controller/testdata/common/credential-secrets.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Secret +metadata: + name: cap-cap-01-uaa-bind-cf + namespace: default +type: Opaque +data: + credentials: ewogICJ1YWFkb21haW4iOiAiYXV0aC5zZXJ2aWNlLmxvY2FsIiwKICAieHNhcHBuYW1lIjogInRlc3QtY2FwLTAxIWIxNCIsCiAgInVybCI6ICJodHRwczovL2FwcC1kb21haW4uYXV0aC5zZXJ2aWNlLmxvY2FsIiwKICAiY3JlZGVudGlhbC10eXBlIjogImluc3RhbmNlLXNlY3JldCIKfQo= +--- +apiVersion: v1 +kind: Secret +metadata: + name: cap-cap-01-uaa2-bind-cf + namespace: default +type: Opaque +data: + credentials: eyJ1YWFkb21haW4iOiJhdXRoMi5zZXJ2aWNlLmxvY2FsIiwieHNhcHBuYW1lIjoidGVzdC1jYXAtMDIhYjIxIiwidXJsIjoiaHR0cHM6Ly9hcHAtZG9tYWluMi5hdXRoLnNlcnZpY2UubG9jYWwiLCJjcmVkZW50aWFsLXR5cGUiOiJpbnN0YW5jZS1zZWNyZXQifQ== +--- +apiVersion: v1 +kind: Secret +metadata: + name: cap-cap-01-saas-bind-cf + namespace: default +type: Opaque +data: + credentials: ewogICJzYWFzX3JlZ2lzdHJ5X3VybCI6ICJodHRwczovL3NtLnNlcnZpY2UubG9jYWwiLAogICJjbGllbnRpZCI6ICJjbGllbnRpZCIsCiAgImNsaWVudHNlY3JldCI6ICJjbGllbnRzZWNyZXQiLAogICJ1YWFkb21haW4iOiAiYXV0aC5zZXJ2aWNlLmxvY2FsIgp9Cg== +--- +apiVersion: v1 +kind: Secret +metadata: + name: cap-cap-01-svc-man-bind-cf + namespace: default +type: Opaque +data: + credentials: ewogICJzbV91cmwiOiAiaHR0cHM6Ly9zbS5zZXJ2aWNlLmxvY2FsIiwKICAiY2xpZW50aWQiOiAiY2xpZW50aWQiLAogICJjbGllbnRzZWNyZXQiOiAiY2xpZW50c2VjcmV0IiwKICAidWFhZG9tYWluIjogImF1dGguc2VydmljZS5sb2NhbCIKfQo= diff --git a/internal/controller/testdata/common/istio-ingress.yaml b/internal/controller/testdata/common/istio-ingress.yaml new file mode 100644 index 0000000..f4bb51d --- /dev/null +++ b/internal/controller/testdata/common/istio-ingress.yaml @@ -0,0 +1,46 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: istio-system +status: + phase: Active +--- +apiVersion: v1 +kind: Pod +metadata: + labels: + app: istio-ingressgateway + istio: ingressgateway + name: istio-ingressgateway-5dbdc4cdbb-pvgtp + namespace: istio-system +spec: + containers: + - image: istio.ingress.image.local:1.12.2 + imagePullPolicy: IfNotPresent + name: istio-proxy +--- +apiVersion: v1 +kind: Service +metadata: + annotations: + dns.gardener.cloud/class: garden + dns.gardener.cloud/dnsnames: public-ingress.operator.testing.local + dns.gardener.cloud/ttl: "600" + creationTimestamp: "2022-03-01T15:14:59Z" + finalizers: + - garden.dns.gardener.cloud/service-dns + name: istio-ingressgateway + namespace: istio-system + resourceVersion: "4876" + uid: ee535038-2f0f-4d9a-adbd-1ae05ba1e864 +spec: + ports: + - name: https + port: 443 + protocol: TCP + targetPort: 8443 + selector: + app: istio-ingressgateway + istio: ingressgateway + sessionAffinity: None + type: LoadBalancer diff --git a/internal/controller/testdata/common/operator-gateway.yaml b/internal/controller/testdata/common/operator-gateway.yaml new file mode 100644 index 0000000..5b60fc3 --- /dev/null +++ b/internal/controller/testdata/common/operator-gateway.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + generateName: cap-operator-domains- + generation: 1 + annotations: + sme.sap.com/owner-identifier: CAPOperator.OperatorDomains + labels: + sme.sap.com/owner-identifier-hash: 933c63ba93a11feed88e28ae21e68591bf13256b + sme.sap.com/relevant-dns-target-hash: 2b2bdb40343ac1ec9a7d18bce136a564c026e7d2 + name: cap-operator-domains-gen + namespace: istio-system +spec: + selector: + app: istio-ingressgateway + istio: ingressgateway + servers: + - hosts: + - "*.foo.bar.local" + port: + name: foo.bar.local + number: 443 + protocol: HTTPS + tls: + credentialName: test.local + mode: SIMPLE diff --git a/internal/controller/utils.go b/internal/controller/utils.go new file mode 100644 index 0000000..90f3852 --- /dev/null +++ b/internal/controller/utils.go @@ -0,0 +1,218 @@ +package controller + +import ( + "crypto/sha1" + "crypto/sha256" + "fmt" + "os" + "strconv" + "strings" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "golang.org/x/exp/slices" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/klog/v2" +) + +const ( + certManagerGardener = "gardener" + certManagerCertManagerIO = "cert-manager.io" + dnsManagerGardener = "gardener" + dnsManagerKubernetes = "kubernetes" +) + +const ( + certManagerEnv = "CERT_MANAGER" + dnsManagerEnv = "DNS_MANAGER" +) + +type ownerInfo struct { + ownerNamespace string + ownerName string + ownerGeneration int64 +} +type appMetadataIdentifiers struct { + globalAccountId string + appName string + ownerInfo *ownerInfo +} + +func getOwnerByKind(owners []metav1.OwnerReference, kind string) (*metav1.OwnerReference, bool) { + for _, o := range owners { + if o.APIVersion == v1alpha1.SchemeGroupVersion.String() && o.Kind == kind && *o.Controller { + return &o, true + } + } + return nil, false +} + +func getOwnerFromObjectMetadata(objectMeta metav1.Object, dependentKind string) (NamespacedResourceKey, bool) { + var ownerKey NamespacedResourceKey + + annotations := objectMeta.GetAnnotations() + + if annotations[AnnotationOwnerIdentifier] != "" { + identifier := strings.Split(annotations[AnnotationOwnerIdentifier], ".") + if len(identifier) == 3 && identifier[0] == dependentKind { + ownerKey.Namespace = identifier[1] + ownerKey.Name = identifier[2] + return ownerKey, true + } + } + + return ownerKey, false +} + +func convertToLocalObjectReferences(entries []string) []corev1.LocalObjectReference { + localObjects := make([]corev1.LocalObjectReference, 0) + for _, entry := range entries { + localObjects = append(localObjects, corev1.LocalObjectReference{Name: entry}) + } + return localObjects +} + +func getResourceKindFromKey(key int) string { + kind, ok := KindMap[key] + if !ok { + kind = "unknown" + } + return kind +} + +/* +check whether the status of a custom resource (sme.sap.com) is Ready (based on metav1.Condition) +*/ +func isCROConditionReady(status v1alpha1.GenericStatus) bool { + if status.Conditions == nil { + return false + } + + return slices.ContainsFunc(status.Conditions, func(condition metav1.Condition) bool { + return condition.Type == string(v1alpha1.ConditionTypeReady) && condition.Status == metav1.ConditionTrue + }) +} + +func addFinalizer(finalizers *[]string, finalizerType string) bool { + finalizerExists := slices.ContainsFunc(*finalizers, func(f string) bool { + return f == finalizerType + }) + + if !finalizerExists { + *finalizers = append(*finalizers, finalizerType) + return true + } + return false +} + +func removeFinalizer(finalizers *[]string, finalizerType string) bool { + finalizerExists := false + adjusted := make([]string, 0) + for _, f := range *finalizers { + if f != finalizerType { + adjusted = append(adjusted, f) + } else { + finalizerExists = true + } + } + + if finalizerExists { + *finalizers = adjusted + return true + } + return false +} + +func certificateManager() string { + mgr := certManagerGardener + env := os.Getenv(certManagerEnv) + if env != "" { + if env == certManagerGardener || env == certManagerCertManagerIO { + mgr = env + } else { + klog.Error("Error parsing certificate manager environment variable: invalid value") + } + } + return mgr +} + +func dnsManager() string { + mgr := dnsManagerGardener + env := os.Getenv(dnsManagerEnv) + if env != "" { + if env == dnsManagerGardener || env == dnsManagerKubernetes { + mgr = env + } else { + klog.Error("Error parsing DNS manager environment variable: invalid value") + } + } + return mgr +} + +func updateResourceAnnotation(object *metav1.ObjectMeta, hash string) { + if object.Annotations == nil { + object.Annotations = map[string]string{} + } + // Update Annotation hash + object.Annotations[AnnotationResourceHash] = hash +} + +// Returns an sha256 checksum for a given source string +func sha256Sum(source ...string) string { + sum := sha256.Sum256([]byte(strings.Join(source, ""))) + return fmt.Sprintf("%x", sum) +} + +// Returns an sha1 checksum for a given source string +func sha1Sum(source ...string) string { + sum := sha1.Sum([]byte(strings.Join(source, ""))) + return fmt.Sprintf("%x", sum) +} + +func amendObjectMetadata(object *metav1.ObjectMeta, annotatedOldLabel string, hashLabel string, oldValue string, hashedValue string) (updated bool) { + // Check if old label exists, if so remove it + if _, ok := object.Labels[annotatedOldLabel]; ok { + // Should never happen + klog.Infof("Unexpected label %s=%s found for resource %s.%s", annotatedOldLabel, oldValue, object.Namespace, object.Name) + delete(object.Labels, annotatedOldLabel) + updated = true + } + // Add hashed label as the new label with the hashed identifier value + if _, ok := object.Labels[hashLabel]; !ok { + object.Labels[hashLabel] = hashedValue + updated = true + } + // Add old label as an annotation with the old value + if _, ok := object.Annotations[annotatedOldLabel]; !ok { + object.Annotations[annotatedOldLabel] = oldValue + updated = true + } + // return if something was updated + return updated +} + +func updateLabelAnnotationMetadata(object *metav1.ObjectMeta, appMetadata *appMetadataIdentifiers) (updated bool) { + if object.Labels == nil { + object.Labels = make(map[string]string) + } + if object.Annotations == nil { + object.Annotations = map[string]string{} + } + + // Update BTP Application Identifier + if appMetadata.globalAccountId != "" && amendObjectMetadata(object, AnnotationBTPApplicationIdentifier, LabelBTPApplicationIdentifierHash, strings.Join([]string{appMetadata.globalAccountId, appMetadata.appName}, "."), sha1Sum(appMetadata.globalAccountId, appMetadata.appName)) { + updated = true + } + + // Update OwnerInfo if owner details exists + if appMetadata.ownerInfo != nil { + if amendObjectMetadata(object, AnnotationOwnerIdentifier, LabelOwnerIdentifierHash, strings.Join([]string{appMetadata.ownerInfo.ownerNamespace, appMetadata.ownerInfo.ownerName}, "."), sha1Sum(appMetadata.ownerInfo.ownerNamespace, appMetadata.ownerInfo.ownerName)) { + updated = true + } + if _, ok := object.Labels[LabelOwnerGeneration]; !ok { + object.Labels[LabelOwnerGeneration] = strconv.FormatInt(appMetadata.ownerInfo.ownerGeneration, 10) + } + } + + return updated +} diff --git a/internal/util/config.go b/internal/util/config.go new file mode 100644 index 0000000..8d7d8a8 --- /dev/null +++ b/internal/util/config.go @@ -0,0 +1,55 @@ +package util + +import ( + "io/ioutil" + "os" + "path" + "strings" + + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/klog/v2" +) + +func GetConfig() *rest.Config { + // Try to load config from within cluster + config, err := rest.InClusterConfig() + if err != nil { + klog.Warning("Could not load config from cluster; will attempt to load from file") + + // Load config from local/home directory + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + pwd, err := os.Getwd() + if err != nil { + klog.Fatal("Could not determine working directory") + } + loadingRules.Precedence = append(loadingRules.Precedence, path.Join(pwd, ".kubeconfig")) + clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}) + config, err = clientConfig.ClientConfig() + if err != nil { + klog.Fatal("Error: ", err) + return nil + } else { + klog.Info("Found config file in: ", clientConfig.ConfigAccess().GetDefaultFilename()) + } + } else { + klog.Info("Found config in cluster") + } + + return config +} + +func GetNamespace() string { + if ns := os.Getenv("POD_NAMESPACE"); ns != "" { + return ns + } + + // Fall back to the namespace associated with the service account token, if available + if data, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace"); err == nil { + if ns := strings.TrimSpace(string(data)); len(ns) > 0 { + return ns + } + } + + return "default" +} diff --git a/internal/util/types.go b/internal/util/types.go new file mode 100644 index 0000000..a02e3fa --- /dev/null +++ b/internal/util/types.go @@ -0,0 +1,38 @@ +package util + +type VCAPServiceInstance struct { + Name string `json:"name"` // this attribute holds the binding name if it exists, otherwise, instance name + BindingGUID string `json:"binding_guid,omitempty"` + BindingName string `json:"binding_name,omitempty"` + InstanceGUID string `json:"instance_guid,omitempty"` + InstanceName string `json:"instance_name,omitempty"` + Label string `json:"label"` + Plan string `json:"plan,omitempty"` + Credentials interface{} `json:"credentials"` + Tags []string `json:"tags,omitempty"` +} + +type CredentialData struct { + CredentialType string `json:"credential-type"` + ClientId string `json:"clientid"` + ClientSecret string `json:"clientsecret"` + AuthUrl string `json:"url"` + UAADomain string `json:"uaadomain"` + ServiceBrokerUrl string `json:"sburl"` + CertificateUrl string `json:"certurl"` + Certificate string `json:"certificate"` + CertificateKey string `json:"key"` + VerificationKey string `json:"verificationkey"` + CallbackTimeoutMillis string `json:"callbackTimeoutMillis"` +} + +type SaasRegistryCredentials struct { + CredentialData `json:",inline"` + SaasManagerUrl string `json:"saas_registry_url"` +} + +type XSUAACredentials struct { + CredentialData `json:",inline"` + XSAppName string `json:"xsappname"` + TrusterClientIDSuffix string `json:"trustedclientidsuffix"` +} diff --git a/internal/util/uaa.go b/internal/util/uaa.go new file mode 100644 index 0000000..133b0f8 --- /dev/null +++ b/internal/util/uaa.go @@ -0,0 +1,36 @@ +package util + +import ( + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "golang.org/x/exp/slices" +) + +const ( + AnnotationPrimaryXSUAA = "sme.sap.com/primary-xsuaa" +) + +func GetXSUAAInfo(consumedServiceInfos []v1alpha1.ServiceInfo, ca *v1alpha1.CAPApplication) *v1alpha1.ServiceInfo { + // Get primary xsuaa service instance name + primaryXSUAA := ca.Annotations[AnnotationPrimaryXSUAA] + + serviceIndex := -1 + + // Check if matching service with annotated xsuaa name exists + if primaryXSUAA != "" { + serviceIndex = slices.IndexFunc(consumedServiceInfos, func(consumedServiceInfo v1alpha1.ServiceInfo) bool { + return consumedServiceInfo.Name == primaryXSUAA + }) + } + + // Fallback to using 1st matching "xsuaa" class in the list of consumed services + if serviceIndex == -1 { + serviceIndex = slices.IndexFunc(consumedServiceInfos, func(consumedServiceInfo v1alpha1.ServiceInfo) bool { return consumedServiceInfo.Class == "xsuaa" }) + } + + // Return matching service info if any + if serviceIndex > -1 { + return &consumedServiceInfos[serviceIndex] + } + + return nil +} diff --git a/internal/util/uaa_test.go b/internal/util/uaa_test.go new file mode 100644 index 0000000..19f52e5 --- /dev/null +++ b/internal/util/uaa_test.go @@ -0,0 +1,93 @@ +// This file is needed just to show some coverage as go tests report coverage package wise. The usage in controller and server already cover most of the code. +package util + +import ( + "strings" + "testing" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +var serviceInfos = []v1alpha1.ServiceInfo{ + { + Class: "xsuaa", + Name: "test-xsuaa", + Secret: "test-xsuaa-sec", + }, + { + Class: "xsuaa", + Name: "test-xsuaa2", + Secret: "test-xsuaa-sec2", + }, + { + Class: "saas-registry", + Name: "test-saas", + Secret: "test-saas-sec", + }, + { + Class: "service-manager", + Name: "test-sm", + Secret: "test-sm-sec", + }, + { + Class: "destination", + Name: "test-dest", + Secret: "test-dest-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-host", + Secret: "test-html-host-sec", + }, + { + Class: "html5-apps-repo", + Name: "test-html-rt", + Secret: "test-html-rt-sec", + }, +} + +func execTestsWithBLI(t *testing.T, name string, backlogItems []string, test func(t *testing.T)) { + t.Run(name+", BLIs: "+strings.Join(backlogItems, ", "), test) +} + +func TestGetXSUAAInfoMissingService(t *testing.T) { + execTestsWithBLI(t, "Check that no uaa info is returned when no uaa service is present", []string{"ERP4SMEPREPWORKAPPPLAT-3773"}, func(t *testing.T) { + res := GetXSUAAInfo([]v1alpha1.ServiceInfo{}, &v1alpha1.CAPApplication{}) + + if res != nil { + t.Error("unexpected uaa info") + } + }) +} +func TestGetXSUAAInfoWithoutAnnotation(t *testing.T) { + execTestsWithBLI(t, "Check that the 1st uaa info is returned with CA with no annotation is present", []string{"ERP4SMEPREPWORKAPPPLAT-3773"}, func(t *testing.T) { + // CA without "sme.sap.com/primary-xsuaa" annotation + ca := v1alpha1.CAPApplication{} + + res := GetXSUAAInfo(serviceInfos, &ca) + + if res.Name != "test-xsuaa" { + t.Error("incorrect uaa info") + } + }) +} + +func TestGetXSUAAInfoWithAnnotation(t *testing.T) { + execTestsWithBLI(t, "Check that the right uaa info is returned for CA with annotation present", []string{"ERP4SMEPREPWORKAPPPLAT-3773"}, func(t *testing.T) { + // CA without "sme.sap.com/primary-xsuaa" annotation + ca := v1alpha1.CAPApplication{ + ObjectMeta: v1.ObjectMeta{ + Annotations: map[string]string{ + AnnotationPrimaryXSUAA: "test-xsuaa2", + }, + }, + } + + res := GetXSUAAInfo(serviceInfos, &ca) + + if res.Name != "test-xsuaa2" { + t.Error("incorrect uaa info") + } + }) +} diff --git a/internal/util/vcap-credentials.go b/internal/util/vcap-credentials.go new file mode 100644 index 0000000..3e286cd --- /dev/null +++ b/internal/util/vcap-credentials.go @@ -0,0 +1,149 @@ +package util + +import ( + "context" + "encoding/json" + "fmt" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" +) + +// See Kubernetes-Service-Bindings/doc +type SecretMetadata struct { + MetadataProperties []MetadataPropertyDescriptor `json:"metaDataProperties"` + CredentialProperties []MetadataPropertyDescriptor `json:"credentialProperties"` +} + +type MetadataPropertyDescriptor struct { + Name string `json:"name"` + SourceName string `json:"sourceName"` + Format PropertyFormat `json:"format"` + Container bool `json:"container"` +} + +func (d MetadataPropertyDescriptor) getKey() (key string) { + key = d.SourceName + if key == "" { + key = d.Name + } + return +} + +func (d MetadataPropertyDescriptor) move(source map[string][]byte, target map[string]any) (map[string]any, error) { + key := d.getKey() + switch d.Format { + case PropertyFormatText: + target[d.Name] = string(source[key]) // when property is a container, it cannot have text format + case PropertyFormatJSON: + var ( + v *any + err error + ) + if v, err = ParseJSON[any](source[key]); err != nil { + return nil, err + } + if d.Container { + return (*v).(map[string]any), nil + } + target[d.Name] = v + } + return target, nil +} + +type PropertyFormat string + +const ( + PropertyFormatText PropertyFormat = "text" + PropertyFormatJSON PropertyFormat = "json" +) + +func ReadServiceCredentialsFromSecret[T any](serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (*T, error) { + entry, err := CreateVCAPEntryFromSecret(serviceInfo, ns, kubeClient) + if err != nil { + return nil, err + } + b, err := json.Marshal(entry["credentials"]) + if err != nil { + return nil, fmt.Errorf("could not serialize credentials for service %s: %s", serviceInfo.Name, err) + } + return ParseJSON[T](b) +} + +func CreateVCAPEntryFromSecret(serviceInfo *v1alpha1.ServiceInfo, ns string, kubeClient kubernetes.Interface) (entry map[string]any, err error) { + // Get secret + secret, err := kubeClient.CoreV1().Secrets(ns).Get(context.TODO(), serviceInfo.Secret, metav1.GetOptions{}) + if err != nil { + return nil, err + } + + return createVCAPEntry(secret.Data, serviceInfo) +} + +func createVCAPEntry(data map[string][]byte, si *v1alpha1.ServiceInfo) (entry map[string]any, err error) { + if metaBytes, ok := data[".metadata"]; ok { // metadata available from new service binding specification + var meta SecretMetadata + if err = json.Unmarshal(metaBytes, &meta); err != nil { + return nil, errorCredentialParse("metadata", si.Secret, err) + } + return createVCAPEntryWithMetadata(data, &meta, si) + } else { // fallback to reading secret-key "credentials" + credBytes, ok := data["credentials"] + if !ok { + return nil, fmt.Errorf("could not find credentials for secret %s", si.Secret) + } + // Parse JSON value for the given service secret + cred, err := ParseJSON[map[string]any](credBytes) + if err != nil { + return nil, errorCredentialParse("credentials", si.Secret, err) + } + entry = map[string]any{ + "credentials": cred, + "label": si.Class, + "name": si.Name, + "instance_name": si.Name, + "tags": []string{si.Class}, // app-router looks for xsuaa in tags alone! So add class as a tag! + } + } + return +} + +func createVCAPEntryWithMetadata(data map[string][]byte, meta *SecretMetadata, si *v1alpha1.ServiceInfo) (entry map[string]any, err error) { + entry = map[string]any{"credentials": map[string]any{}} + for i := range meta.MetadataProperties { + if entry, err = meta.MetadataProperties[i].move(data, entry); err != nil { + return nil, errorCredentialParse("metadata", si.Secret, err) + } + } + for i := range meta.CredentialProperties { + if entry["credentials"], err = meta.CredentialProperties[i].move(data, entry["credentials"].(map[string]any)); err != nil { + return nil, errorCredentialParse("credentials", si.Secret, err) + } + if meta.CredentialProperties[i].Container { + break + } + } + if _, ok := entry["label"]; !ok { + entry["label"] = si.Class // ensure label is provided + } + // ensure name is set + if instanceName, ok := entry["instance_name"]; ok { + entry["name"] = instanceName // conform to VCAP_SERVICES specification (https://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-SERVICES) + } else { + entry["name"] = si.Name // source from service info as a fallback + } + return +} + +func errorCredentialParse(key string, secret string, err error) error { + return fmt.Errorf("could not parse %s from secret %s: %w", key, secret, err) +} + +func ParseJSON[T any](b []byte) (*T, error) { + var v T + if err := json.Unmarshal(b, &v); err != nil { + return nil, err // ensure nil pointer is returned in case of error + } + return &v, nil +} diff --git a/internal/util/vcap-credentials_test.go b/internal/util/vcap-credentials_test.go new file mode 100644 index 0000000..bed6721 --- /dev/null +++ b/internal/util/vcap-credentials_test.go @@ -0,0 +1,211 @@ +package util + +import ( + "reflect" + "runtime" + "strings" + "testing" + + "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8sruntime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/fake" +) + +func createTestClient() (*fake.Clientset, error) { + secs := []k8sruntime.Object{ + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "no-meta-credential-key", Namespace: "default"}, + Data: map[string][]byte{ + "credentials": []byte(`{ + "user": "a-user", + "password": "some-pass" + }`), + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "metadata-with-credential-key", Namespace: "default"}, + Data: map[string][]byte{ + ".metadata": []byte(`{ + "metadataProperties": [ + {"name": "instance_name", "sourceName": "service_instance", "format": "text"}, + {"name": "plan", "format": "text"}, + {"name": "type", "format": "text"} + ], + "credentialProperties": [ + {"name": "credentials", "sourceName": "secret-data", "format": "json", "container": true} + ] + }`), + "secret-data": []byte(`{ + "user": "a-user", + "password": "some-pass" + }`), + "service_instance": []byte(`service-a`), + "plan": []byte(`default`), + "type": []byte(`xyz`), + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "malformed-metadata", Namespace: "default"}, + Data: map[string][]byte{ + ".metadata": []byte(`{ + "metadataProperties": [ + {"name": "instance_name", "sourceName": "service_instance", "format": "text"}, + {"name": "plan", "format": "text"}, + {"name": "type", "format": "text"} + ], + "MALFORMED": [[[ // + {"name": "credentials", "sourceName": "secret-data", "format": "json", "container": true} + ] + }`), + "secret-data": []byte(`{ + "user": "a-user", + "password": "some-pass" + }`), + "service_instance": []byte(`service-a`), + "plan": []byte(`default`), + "type": []byte(`xyz`), + }, + }, + &corev1.Secret{ + ObjectMeta: metav1.ObjectMeta{Name: "metadata-with-credential-properties", Namespace: "default"}, + Data: map[string][]byte{ + ".metadata": []byte(`{ + "metadataProperties": [ + {"name": "instance_name", "sourceName": "service_instance", "format": "text"}, + {"name": "plan", "format": "text"}, + {"name": "type", "format": "text"}, + {"name": "tags", "format": "json"} + ], + "credentialProperties": [ + {"name": "api-keys", "sourceName": "keys", "format": "json"}, + {"name": "host", "format": "text"} + ] + }`), + "secret-data": []byte(`{ + "user": "a-user", + "password": "some-pass" + }`), + "service_instance": []byte(`service-a`), + "plan": []byte(`default`), + "type": []byte(`xyz`), + "host": []byte(`abc.url.local`), + "keys": []byte(`["one", "two"]`), + "tags": []byte(`["xyz", "lmnop"]`), + }, + }, + } + return fake.NewSimpleClientset(secs...), nil +} + +func testCreateVCAPEntryFromSecret(t *testing.T) { + type testCase struct { + name string + serviceInfo *v1alpha1.ServiceInfo + namespace string + expectError bool + errorMsg string + expectedLabel string + expectedInstanceName string + expectTags bool + } + cases := []testCase{ + { + name: "valid credential secret without metadata", + namespace: "default", + serviceInfo: &v1alpha1.ServiceInfo{Name: "service-a", Secret: "no-meta-credential-key", Class: "xzy"}, + expectedInstanceName: "service-a", + expectedLabel: "xyz", + }, + { + name: "secret not found", + namespace: "another", + serviceInfo: &v1alpha1.ServiceInfo{Name: "service-a", Secret: "no-meta-credential-key", Class: "xzy"}, + expectError: true, + errorMsg: "secrets \"no-meta-credential-key\" not found", + }, + { + name: "valid credentials (container) with metadata", + namespace: "default", + serviceInfo: &v1alpha1.ServiceInfo{Name: "service-a", Secret: "metadata-with-credential-key", Class: "xzy"}, + expectedInstanceName: "service-a", + expectedLabel: "xyz", + }, + { + name: "malformed metadata", + namespace: "default", + serviceInfo: &v1alpha1.ServiceInfo{Name: "service-a", Secret: "malformed-metadata", Class: "xzy"}, + expectError: true, + errorMsg: "could not parse metadata from secret malformed-metadata: invalid character '/' looking for beginning of value", + }, + { + name: "valid credentials (multiple properties) with metadata", + namespace: "default", + serviceInfo: &v1alpha1.ServiceInfo{Name: "service-a", Secret: "metadata-with-credential-properties", Class: "xzy"}, + expectedInstanceName: "service-a", + expectedLabel: "xyz", + expectTags: true, + }, + } + c, _ := createTestClient() + for i := range cases { + t.Run(cases[i].name, func(t *testing.T) { + config := &cases[i] + entry, err := CreateVCAPEntryFromSecret(config.serviceInfo, config.namespace, c) + if err != nil { + if !config.expectError { + t.Errorf("unexpected error in test case: %s", config.name) + } + if config.errorMsg != "" && err.Error() != config.errorMsg { + t.Errorf("error differs from expected for test case: %s", config.name) + } + return + } else { + if config.expectError { + t.Errorf("expected error in test case: %s", config.name) + } + } + if config.expectedInstanceName != "" && config.expectedInstanceName != entry["instance_name"].(string) { + t.Errorf("instance name differs from expected for test case: %s", config.name) + } + if tags, ok := entry["tags"]; config.expectTags && (!ok || tags == nil) { + t.Errorf("expected tags for test case: %s", config.name) + } + }) + } +} + +func testReadServiceCredentialsFromSecret(t *testing.T) { + c, _ := createTestClient() + + // test successful read + secretName := "metadata-with-credential-key" + credentials, err := ReadServiceCredentialsFromSecret[map[string]string](&v1alpha1.ServiceInfo{Name: "service-a", Class: "xyz", Secret: secretName}, "default", c) + if err != nil { + t.Errorf("could not read credentials from secret %s", secretName) + } + if (*credentials)["user"] != "a-user" || (*credentials)["password"] != "some-pass" { + t.Errorf("credential attributes from secret %s not as expected", secretName) + } + + // test with type mismatch + _, err = ReadServiceCredentialsFromSecret[[]string](&v1alpha1.ServiceInfo{Name: "service-a", Class: "xyz", Secret: secretName}, "default", c) + if err == nil { + t.Errorf("expected error when reading credentials as array from secret %s", secretName) + } +} + +func TestVCAPCredentials(t *testing.T) { + catalog := &[]struct { + test func(t *testing.T) + backlogItems []string + }{ + {test: testCreateVCAPEntryFromSecret, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2611"}}, + {test: testReadServiceCredentialsFromSecret, backlogItems: []string{"ERP4SMEPREPWORKAPPPLAT-2611"}}, + } + for _, tc := range *catalog { + nameParts := []string{runtime.FuncForPC(reflect.ValueOf(tc.test).Pointer()).Name()} + t.Run(strings.Join(append(nameParts, tc.backlogItems...), " "), tc.test) + } +} diff --git a/pkg/apis/sme.sap.com/v1alpha1/doc.go b/pkg/apis/sme.sap.com/v1alpha1/doc.go new file mode 100644 index 0000000..28a9f2e --- /dev/null +++ b/pkg/apis/sme.sap.com/v1alpha1/doc.go @@ -0,0 +1,4 @@ +// +k8s:deepcopy-gen=package +// +groupName=sme.sap.com + +package v1alpha1 diff --git a/pkg/apis/sme.sap.com/v1alpha1/register.go b/pkg/apis/sme.sap.com/v1alpha1/register.go new file mode 100644 index 0000000..cda5477 --- /dev/null +++ b/pkg/apis/sme.sap.com/v1alpha1/register.go @@ -0,0 +1,53 @@ +package v1alpha1 + +import ( + metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// SchemeGroupVersion is group version used to register these objects +var SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} + +var ( + // SchemeBuilder initializes a scheme builder + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // AddToScheme is a global function that registers this API group & version to a scheme + AddToScheme = SchemeBuilder.AddToScheme +) + +// Kind takes an unqualified kind and returns back a Group qualified GroupKind +func Kind(kind string) schema.GroupKind { + return SchemeGroupVersion.WithKind(kind).GroupKind() +} + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +// Adds the list of known types to the given scheme +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes( + SchemeGroupVersion, + &CAPApplication{}, + &CAPApplicationList{}, + ) + scheme.AddKnownTypes( + SchemeGroupVersion, + &CAPApplicationVersion{}, + &CAPApplicationVersionList{}, + ) + scheme.AddKnownTypes( + SchemeGroupVersion, + &CAPTenant{}, + &CAPTenantList{}, + ) + scheme.AddKnownTypes( + SchemeGroupVersion, + &CAPTenantOperation{}, + &CAPTenantOperationList{}, + ) + metaV1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/pkg/apis/sme.sap.com/v1alpha1/types.go b/pkg/apis/sme.sap.com/v1alpha1/types.go new file mode 100644 index 0000000..53208c1 --- /dev/null +++ b/pkg/apis/sme.sap.com/v1alpha1/types.go @@ -0,0 +1,471 @@ +package v1alpha1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + Group = "sme.sap.com" + Version = "v1alpha1" + CAPApplicationKind = "CAPApplication" + CAPApplicationResource = "capapplications" + CAPApplicationVersionKind = "CAPApplicationVersion" + CAPApplicationVersionResource = "capapplicationversions" + CAPTenantKind = "CAPTenant" + CAPTenantResource = "captenants" + CAPTenantOperationKind = "CAPTenantOperation" + CAPTenantOperationResource = "captenantoperations" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPApplication is the schema for capapplications API +type CAPApplication struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + // CAPApplication spec + Spec CAPApplicationSpec `json:"spec"` + // CAPApplication status + Status CAPApplicationStatus `json:"status"` +} + +type CAPApplicationStatus struct { + GenericStatus `json:",inline"` + // State of CAPApplication + State CAPApplicationState `json:"state"` + // Hash representing last known application domains + DomainSpecHash string `json:"domainSpecHash,omitempty"` + // The last time a full reconciliation was completed + LastFullReconciliationTime metav1.Time `json:"lastFullReconciliationTime,omitempty"` +} + +type CAPApplicationState string + +const ( + // CAPApplication is being reconciled + CAPApplicationStateProcessing CAPApplicationState = "Processing" + // An error occurred during reconciliation + CAPApplicationStateError CAPApplicationState = "Error" + // Deletion has been triggered + CAPApplicationStateDeleting CAPApplicationState = "Deleting" + // CAPApplication has been reconciled and is now consistent + CAPApplicationStateConsistent CAPApplicationState = "Consistent" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPApplicationList contains a list of CAPApplication +type CAPApplicationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []CAPApplication `json:"items"` +} + +// CAPApplicationSpec defines the desired state of CAPApplication +type CAPApplicationSpec struct { + // Domains used by the application + Domains ApplicationDomains `json:"domains"` + // SAP BTP Global Account Identifier where services are entitles for the current application + GlobalAccountId string `json:"globalAccountId"` + // Short name for the application (similar to BTP XSAPPNAME) + BTPAppName string `json:"btpAppName"` + // Provider subaccount where application services are created + Provider BTPTenantIdentification `json:"provider"` + // SAP BTP Services consumed by the application + BTP BTP `json:"btp"` +} + +// Application domains +type ApplicationDomains struct { + // Primary application domain will be used to generate a wildcard TLS certificate. In SAP Gardener managed clusters this is (usually) a subdomain of the cluster domain + Primary string `json:"primary"` + // Customer specific domains to serve application endpoints (optional) + Secondary []string `json:"secondary,omitempty"` + // Public ingress URL for the cluster Load Balancer + DnsTarget string `json:"dnsTarget,omitempty"` + // Labels used to identify the istio ingress-gateway component and its corresponding namespace. Usually {"app":"istio-ingressgateway","istio":"ingressgateway"} + IstioIngressGatewayLabels []NameValue `json:"istioIngressGatewayLabels"` +} + +// Generic Name/Value configuration +type NameValue struct { + Name string `json:"name"` + Value string `json:"value"` +} + +// Identifies an SAP BTP subaccount (tenant) +type BTPTenantIdentification struct { + // BTP subaccount subdomain + SubDomain string `json:"subDomain"` + // BTP subaccount Tenant ID + TenantId string `json:"tenantId"` +} + +type BTP struct { + // Details of BTP Services + Services []ServiceInfo `json:"services"` +} + +// Service information +type ServiceInfo struct { + // Name of service instance + Name string `json:"name"` + // Secret containing service access credentials + Secret string `json:"secret"` + // Type of service + Class string `json:"class"` + // TODO: enhance this with params and other options --> Needed if/when we want to create the services via BTP/CF Operator +} + +// Custom resource status +type GenericStatus struct { + // Observed generation of the resource where this status was identified + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // State expressed as conditions + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +type CAPApplicationStatusConditionType string + +const ( + ConditionTypeAllTenantsReady CAPApplicationStatusConditionType = "AllTenantsReady" + ConditionTypeLatestVersionReady CAPApplicationStatusConditionType = "LatestVersionReady" +) + +type StatusConditionType string + +const ( + ConditionTypeReady StatusConditionType = "Ready" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPApplicationVersion defines the schema for capapplicationversions API +type CAPApplicationVersion struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + // CAPApplicationVersion spec + Spec CAPApplicationVersionSpec `json:"spec"` + // CAPApplicationVersion status + Status CAPApplicationVersionStatus `json:"status"` +} + +type CAPApplicationVersionStatus struct { + GenericStatus `json:",inline"` + // State of CAPApplicationVersion + State CAPApplicationVersionState `json:"state"` + // List of finished Content Jobs + FinishedJobs []string `json:"finishedJobs,omitempty"` +} + +type CAPApplicationVersionState string + +const ( + // CAPApplicationVersion is being processed + CAPApplicationVersionStateProcessing CAPApplicationVersionState = "Processing" + // An error occurred during reconciliation + CAPApplicationVersionStateError CAPApplicationVersionState = "Error" + // Deletion has been triggered + CAPApplicationVersionStateDeleting CAPApplicationVersionState = "Deleting" + // CAPApplicationVersion is now ready for use (dependent resources have been created) + CAPApplicationVersionStateReady CAPApplicationVersionState = "Ready" +) + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPApplicationVersionList contains a list of CAPApplicationVersion +type CAPApplicationVersionList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []CAPApplicationVersion `json:"items"` +} + +// CAPApplicationVersionSpec specifies the desired state of CAPApplicationVersion +type CAPApplicationVersionSpec struct { + // Denotes to which CAPApplication the current version belongs + CAPApplicationInstance string `json:"capApplicationInstance"` + // Semantic version + Version string `json:"version"` + // Registry secrets used to pull images of the application components + RegistrySecrets []string `json:"registrySecrets"` + // Information about the Workloads + Workloads []WorkloadDetails `json:"workloads"` + // Tenant Operations may be used to specify how jobs are sequenced for the different tenant operations + TenantOperations *TenantOperations `json:"tenantOperations,omitempty"` +} + +// WorkloadDetails specifies the details of the Workload +type WorkloadDetails struct { + // Name of the workload + Name string `json:"name"` + // List of BTP services consumed by the current application component workload. These services must be defined in the corresponding CAPApplication. + ConsumedBTPServices []string `json:"consumedBTPServices"` + // Custom labels for the current workload + Labels map[string]string `json:"labels"` + // Annotations for the current workload, in case of `Deployments` this also get copied over to any `Service` that may be created + Annotations map[string]string `json:"annotations"` + // Definition of a deployment + DeploymentDefinition *DeploymentDetails `json:"deploymentDefinition,omitempty"` + // Definition of a job + JobDefinition *JobDetails `json:"jobDefinition,omitempty"` +} + +// DeploymentDetails specifies the details of the Deployment +type DeploymentDetails struct { + ContainerDetails `json:",inline"` + // Type of the Deployment + Type DeploymentType `json:"type"` + // Number of replicas + Replicas *int32 `json:"replicas,omitempty"` + // Port configuration + Ports []Ports `json:"ports,omitempty"` + // Liveness probe + LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"` + // Readiness probe + ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty"` +} + +// Type of deployment +type DeploymentType string + +const ( + // CAP backend server deployment type + DeploymentCAP DeploymentType = "CAP" + // Application router deployment type + DeploymentRouter DeploymentType = "Router" + // Additional deployment type + DeploymentAdditional DeploymentType = "Additional" +) + +// JobDetails specifies the details of the Job +type JobDetails struct { + ContainerDetails `json:",inline"` + // Type of Job + Type JobType `json:"type"` + // Specifies the number of retries before marking this job failed. + BackoffLimit *int32 `json:"backoffLimit,omitempty"` + // Specifies the time after which the job may be cleaned up. + TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` +} + +// Type of Job +type JobType string + +const ( + // job for deploying content or configuration to (BTP) services + JobContent JobType = "Content" + // job for tenant operation e.g. deploying relevant data to a tenant + JobTenantOperation JobType = "TenantOperation" + // job for custom tenant operation e.g. pre/post hooks for a tenant operation + JobCustomTenantOperation JobType = "CustomTenantOperation" +) + +// ContainerDetails specifies the details of the Container +type ContainerDetails struct { + // Image info for the container + Image string `json:"image"` + // Pull policy for the container image + ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"` + // Entrypoint array for the container + Command []string `json:"command,omitempty"` + // Environment Config for the Container + Env []corev1.EnvVar `json:"env,omitempty"` + // Resources + Resources corev1.ResourceRequirements `json:"resources,omitempty"` + // SecurityContext for the Container + SecurityContext *corev1.SecurityContext `json:"securityContext,omitempty"` + // SecurityContext for the Pod + PodSecurityContext *corev1.PodSecurityContext `json:"podSecurityContext,omitempty"` +} + +// Configuration of Service Ports for the deployment +type Ports struct { + // App protocol used by the service port + AppProtocol *string `json:"appProtocol,omitempty"` + // Name of the service port + Name string `json:"name"` + // Network Policy of the service port + NetworkPolicy PortNetworkPolicyType `json:"networkPolicy,omitempty"` + // The port number used for container and the corresponding service (if any) + Port int32 `json:"port"` + // Destination name which may be used by the Router deployment to reach this backend service + RouterDestinationName string `json:"routerDestinationName,omitempty"` +} + +// Type of NetworkPolicy for the port +type PortNetworkPolicyType string + +const ( + // Expose the port for the current application versions pod(s) scope + PortNetworkPolicyTypeApplication PortNetworkPolicyType = "Application" + // Expose the port for any pod(s) in the overall cluster scope + PortNetworkPolicyTypeCluster PortNetworkPolicyType = "Cluster" +) + +// Configuration used to sequence tenant related jobs for a given tenant operation +type TenantOperations struct { + // Tenant provisioning steps + Provisioning []TenantOperationWorkloadReference `json:"provisioning,omitempty"` + // Tenant upgrade steps + Upgrade []TenantOperationWorkloadReference `json:"upgrade,omitempty"` + // Tenant deprovisioning steps + Deprovisioning []TenantOperationWorkloadReference `json:"deprovisioning,omitempty"` +} + +type TenantOperationWorkloadReference struct { + // Reference to a specified workload of type 'TenantOperation' or 'CustomTenantOperation' + WorkloadName string `json:"workloadName"` + // Indicates whether to proceed with remaining operation steps in case of failure. Relevant only for 'CustomTenantOperation' + ContinueOnFailure bool `json:"continueOnFailure,omitempty"` +} + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPTenant defines the schema for captenants API +type CAPTenant struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + // CAPTenant spec + Spec CAPTenantSpec `json:"spec"` + // CAPTenant status + Status CAPTenantStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPTenantList contains a list of CAPTenant +type CAPTenantList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []CAPTenant `json:"items"` +} + +type CAPTenantStatus struct { + GenericStatus `json:",inline"` + // State of CAPTenant + State CAPTenantState `json:"state"` + // Specifies the current version of the tenant after provisioning or upgrade + CurrentCAPApplicationVersionInstance string `json:"currentCAPApplicationVersionInstance,omitempty"` + // Previous versions of the tenant (first to last) + PreviousCAPApplicationVersions []string `json:"previousCAPApplicationVersions,omitempty"` + // The last time a full reconciliation was completed + LastFullReconciliationTime metav1.Time `json:"lastFullReconciliationTime,omitempty"` +} + +type CAPTenantState string + +const ( + // Tenant is being provisioned + CAPTenantStateProvisioning CAPTenantState = "Provisioning" + // Tenant provisioning ended in error + CAPTenantStateProvisioningError CAPTenantState = "ProvisioningError" + // Tenant is being upgraded + CAPTenantStateUpgrading CAPTenantState = "Upgrading" + // Tenant upgrade failed + CAPTenantStateUpgradeError CAPTenantState = "UpgradeError" + // Deletion has been triggered + CAPTenantStateDeleting CAPTenantState = "Deleting" + // Tenant has been provisioned/upgraded and is now ready for use + CAPTenantStateReady CAPTenantState = "Ready" +) + +// CAPTenantSpec defines the desired state of the CAPTenant +type CAPTenantSpec struct { + // Denotes to which CAPApplication the current tenant belongs + CAPApplicationInstance string `json:"capApplicationInstance"` + // Details of consumer sub-account subscribing to the application + BTPTenantIdentification `json:",inline"` + // Semver that is used to determine the relevant CAPApplicationVersion that a CAPTenant can be upgraded to (i.e. if it is not already on that version) + Version string `json:"version,omitempty"` + // Denotes whether a CAPTenant can be upgraded. One of ('always', 'never') + VersionUpgradeStrategy VersionUpgradeStrategyType `json:"versionUpgradeStrategy,omitempty"` +} + +type VersionUpgradeStrategyType string + +const ( + // Always (default) + VersionUpgradeStrategyTypeAlways VersionUpgradeStrategyType = "always" + // Never + VersionUpgradeStrategyTypeNever VersionUpgradeStrategyType = "never" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPTenantOperation defines the schema for captenantoperations API +type CAPTenantOperation struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata"` + // CAPTenantOperation spec + Spec CAPTenantOperationSpec `json:"spec"` + // CAPTenantOperation status + Status CAPTenantOperationStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// CAPTenantOperationList contains a list of CAPTenantOperation +type CAPTenantOperationList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata"` + Items []CAPTenantOperation `json:"items"` +} + +type CAPTenantOperationSpec struct { + // Scope of the tenant lifecycle operation. One of 'provisioning', 'deprovisioning' or 'upgrade' + Operation CAPTenantOperationType `json:"operation"` + // BTP sub-account (tenant) for which request is created + BTPTenantIdentification `json:",inline"` + // Reference to CAPApplicationVersion for executing the operation + CAPApplicationVersionInstance string `json:"capApplicationVersionInstance"` + // Steps (jobs) to be executed for the operation to complete + Steps []CAPTenantOperationStep `json:"steps"` +} + +type CAPTenantOperationStep struct { + // Name of the workload from the referenced CAPApplicationVersion + Name string `json:"name"` + // Type of job. One of 'TenantOperation' or 'CustomTenantOperation' + Type JobType `json:"type"` + // Indicates whether the operation can continue in case of step failure. Relevant only for type 'CustomTenantOperation' + ContinueOnFailure bool `json:"continueOnFailure,omitempty"` +} + +type CAPTenantOperationStatus struct { + GenericStatus `json:",inline"` + // State of CAPTenantOperation + State CAPTenantOperationState `json:"state"` + // Current step being processed from the sequence of specified steps + CurrentStep *uint32 `json:"currentStep,omitempty"` + // Name of the job being executed for the current step + ActiveJob *string `json:"activeJob,omitempty"` +} + +type CAPTenantOperationState string + +const ( + // CAPTenantOperation is being processed + CAPTenantOperationStateProcessing CAPTenantOperationState = "Processing" + // CAPTenantOperation steps have failed + CAPTenantOperationStateFailed CAPTenantOperationState = "Failed" + // CAPTenantOperation steps completed + CAPTenantOperationStateCompleted CAPTenantOperationState = "Completed" + // CAPTenantOperation deletion has been triggered + CAPTenantOperationStateDeleting CAPTenantOperationState = "Deleting" +) + +type CAPTenantOperationType string + +const ( + // Provision tenant + CAPTenantOperationTypeProvisioning CAPTenantOperationType = "provisioning" + // Deprovision tenant + CAPTenantOperationTypeDeprovisioning CAPTenantOperationType = "deprovisioning" + // Upgrade tenant + CAPTenantOperationTypeUpgrade CAPTenantOperationType = "upgrade" +) diff --git a/pkg/apis/sme.sap.com/v1alpha1/utils.go b/pkg/apis/sme.sap.com/v1alpha1/utils.go new file mode 100644 index 0000000..44d0482 --- /dev/null +++ b/pkg/apis/sme.sap.com/v1alpha1/utils.go @@ -0,0 +1,89 @@ +package v1alpha1 + +import ( + "os" + "strconv" + + "golang.org/x/exp/slices" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +const ( + readyType = string(ConditionTypeReady) + EnvMaxTenantVersionHistory = "MAX_TENANT_VERSION_HISTORY" + defaultMaxTenantVersionHistory = 10 + minTenantVersionHistory = 3 +) + +func (ca *CAPApplication) SetStatusWithReadyCondition(state CAPApplicationState, readyStatus metav1.ConditionStatus, reason string, message string) { + ca.Status.State = state + ca.SetStatusCondition(readyType, readyStatus, reason, message) +} + +func (ca *CAPApplication) SetStatusDomainSpecHash(hash string) { + ca.Status.DomainSpecHash = hash +} + +// SetStatusCondition updates/sets the conditions in the Status of the resource. +func (ca *CAPApplication) SetStatusCondition(conditionType string, readyStatus metav1.ConditionStatus, reason string, message string) { + ca.Status.SetStatusCondition(metav1.Condition{Type: conditionType, Status: readyStatus, Reason: reason, Message: message, ObservedGeneration: ca.Generation}) +} + +func (cav *CAPApplicationVersion) SetStatusWithReadyCondition(state CAPApplicationVersionState, readyStatus metav1.ConditionStatus, reason string, message string) { + cav.Status.State = state + cav.Status.SetStatusCondition(metav1.Condition{Type: readyType, Status: readyStatus, Reason: reason, Message: message, ObservedGeneration: cav.Generation}) +} + +func (cav *CAPApplicationVersion) SetStatusFinishedJobs(finishedJob string) { + if !cav.CheckFinishedJobs(finishedJob) { + cav.Status.FinishedJobs = append(cav.Status.FinishedJobs, finishedJob) + } +} + +func (cav *CAPApplicationVersion) CheckFinishedJobs(finishedJob string) bool { + return slices.ContainsFunc(cav.Status.FinishedJobs, func(job string) bool { + return job == finishedJob + }) +} + +func (cat *CAPTenant) SetStatusWithReadyCondition(state CAPTenantState, readyStatus metav1.ConditionStatus, reason string, message string) { + cat.Status.State = state + cat.Status.SetStatusCondition(metav1.Condition{Type: readyType, Status: readyStatus, Reason: reason, Message: message, ObservedGeneration: cat.Generation}) +} + +func (cat *CAPTenant) SetStatusCAPApplicationVersion(cavName string) { + if cat.Status.CurrentCAPApplicationVersionInstance != "" { + if cat.Status.PreviousCAPApplicationVersions == nil { + cat.Status.PreviousCAPApplicationVersions = []string{} + } + cat.Status.PreviousCAPApplicationVersions = append(cat.Status.PreviousCAPApplicationVersions, cat.Status.CurrentCAPApplicationVersionInstance) + if len(cat.Status.PreviousCAPApplicationVersions) > minTenantVersionHistory { // clean up history only if it exceeds minimum + max := defaultMaxTenantVersionHistory + if sval, ok := os.LookupEnv(EnvMaxTenantVersionHistory); ok { + if i, err := strconv.ParseInt(sval, 10, 0); err == nil { + max = int(i) + } + } + if len(cat.Status.PreviousCAPApplicationVersions) > max { + cat.Status.PreviousCAPApplicationVersions = cat.Status.PreviousCAPApplicationVersions[1:] // remove one entry + } + } + } + cat.Status.CurrentCAPApplicationVersionInstance = cavName +} + +func (ctop *CAPTenantOperation) SetStatusWithReadyCondition(state CAPTenantOperationState, readyStatus metav1.ConditionStatus, reason string, message string) { + ctop.Status.State = state + ctop.Status.SetStatusCondition(metav1.Condition{Type: readyType, Status: readyStatus, Reason: reason, Message: message, ObservedGeneration: ctop.Generation}) +} + +func (ctop *CAPTenantOperation) SetStatusCurrentStep(step *uint32, job *string) { + ctop.Status.CurrentStep = step + ctop.Status.ActiveJob = job +} + +func (status *GenericStatus) SetStatusCondition(condition metav1.Condition) { + status.ObservedGeneration = condition.ObservedGeneration + meta.SetStatusCondition(&status.Conditions, condition) +} diff --git a/pkg/apis/sme.sap.com/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sme.sap.com/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..31fd087 --- /dev/null +++ b/pkg/apis/sme.sap.com/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,804 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ApplicationDomains) DeepCopyInto(out *ApplicationDomains) { + *out = *in + if in.Secondary != nil { + in, out := &in.Secondary, &out.Secondary + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.IstioIngressGatewayLabels != nil { + in, out := &in.IstioIngressGatewayLabels, &out.IstioIngressGatewayLabels + *out = make([]NameValue, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationDomains. +func (in *ApplicationDomains) DeepCopy() *ApplicationDomains { + if in == nil { + return nil + } + out := new(ApplicationDomains) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BTP) DeepCopyInto(out *BTP) { + *out = *in + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]ServiceInfo, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BTP. +func (in *BTP) DeepCopy() *BTP { + if in == nil { + return nil + } + out := new(BTP) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BTPTenantIdentification) DeepCopyInto(out *BTPTenantIdentification) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BTPTenantIdentification. +func (in *BTPTenantIdentification) DeepCopy() *BTPTenantIdentification { + if in == nil { + return nil + } + out := new(BTPTenantIdentification) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplication) DeepCopyInto(out *CAPApplication) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplication. +func (in *CAPApplication) DeepCopy() *CAPApplication { + if in == nil { + return nil + } + out := new(CAPApplication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPApplication) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationList) DeepCopyInto(out *CAPApplicationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CAPApplication, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationList. +func (in *CAPApplicationList) DeepCopy() *CAPApplicationList { + if in == nil { + return nil + } + out := new(CAPApplicationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPApplicationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationSpec) DeepCopyInto(out *CAPApplicationSpec) { + *out = *in + in.Domains.DeepCopyInto(&out.Domains) + out.Provider = in.Provider + in.BTP.DeepCopyInto(&out.BTP) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationSpec. +func (in *CAPApplicationSpec) DeepCopy() *CAPApplicationSpec { + if in == nil { + return nil + } + out := new(CAPApplicationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationStatus) DeepCopyInto(out *CAPApplicationStatus) { + *out = *in + in.GenericStatus.DeepCopyInto(&out.GenericStatus) + in.LastFullReconciliationTime.DeepCopyInto(&out.LastFullReconciliationTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationStatus. +func (in *CAPApplicationStatus) DeepCopy() *CAPApplicationStatus { + if in == nil { + return nil + } + out := new(CAPApplicationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationVersion) DeepCopyInto(out *CAPApplicationVersion) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationVersion. +func (in *CAPApplicationVersion) DeepCopy() *CAPApplicationVersion { + if in == nil { + return nil + } + out := new(CAPApplicationVersion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPApplicationVersion) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationVersionList) DeepCopyInto(out *CAPApplicationVersionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CAPApplicationVersion, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationVersionList. +func (in *CAPApplicationVersionList) DeepCopy() *CAPApplicationVersionList { + if in == nil { + return nil + } + out := new(CAPApplicationVersionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPApplicationVersionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationVersionSpec) DeepCopyInto(out *CAPApplicationVersionSpec) { + *out = *in + if in.RegistrySecrets != nil { + in, out := &in.RegistrySecrets, &out.RegistrySecrets + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Workloads != nil { + in, out := &in.Workloads, &out.Workloads + *out = make([]WorkloadDetails, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.TenantOperations != nil { + in, out := &in.TenantOperations, &out.TenantOperations + *out = new(TenantOperations) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationVersionSpec. +func (in *CAPApplicationVersionSpec) DeepCopy() *CAPApplicationVersionSpec { + if in == nil { + return nil + } + out := new(CAPApplicationVersionSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPApplicationVersionStatus) DeepCopyInto(out *CAPApplicationVersionStatus) { + *out = *in + in.GenericStatus.DeepCopyInto(&out.GenericStatus) + if in.FinishedJobs != nil { + in, out := &in.FinishedJobs, &out.FinishedJobs + *out = make([]string, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPApplicationVersionStatus. +func (in *CAPApplicationVersionStatus) DeepCopy() *CAPApplicationVersionStatus { + if in == nil { + return nil + } + out := new(CAPApplicationVersionStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenant) DeepCopyInto(out *CAPTenant) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenant. +func (in *CAPTenant) DeepCopy() *CAPTenant { + if in == nil { + return nil + } + out := new(CAPTenant) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPTenant) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantList) DeepCopyInto(out *CAPTenantList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CAPTenant, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantList. +func (in *CAPTenantList) DeepCopy() *CAPTenantList { + if in == nil { + return nil + } + out := new(CAPTenantList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPTenantList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantOperation) DeepCopyInto(out *CAPTenantOperation) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantOperation. +func (in *CAPTenantOperation) DeepCopy() *CAPTenantOperation { + if in == nil { + return nil + } + out := new(CAPTenantOperation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPTenantOperation) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantOperationList) DeepCopyInto(out *CAPTenantOperationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]CAPTenantOperation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantOperationList. +func (in *CAPTenantOperationList) DeepCopy() *CAPTenantOperationList { + if in == nil { + return nil + } + out := new(CAPTenantOperationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *CAPTenantOperationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantOperationSpec) DeepCopyInto(out *CAPTenantOperationSpec) { + *out = *in + out.BTPTenantIdentification = in.BTPTenantIdentification + if in.Steps != nil { + in, out := &in.Steps, &out.Steps + *out = make([]CAPTenantOperationStep, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantOperationSpec. +func (in *CAPTenantOperationSpec) DeepCopy() *CAPTenantOperationSpec { + if in == nil { + return nil + } + out := new(CAPTenantOperationSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantOperationStatus) DeepCopyInto(out *CAPTenantOperationStatus) { + *out = *in + in.GenericStatus.DeepCopyInto(&out.GenericStatus) + if in.CurrentStep != nil { + in, out := &in.CurrentStep, &out.CurrentStep + *out = new(uint32) + **out = **in + } + if in.ActiveJob != nil { + in, out := &in.ActiveJob, &out.ActiveJob + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantOperationStatus. +func (in *CAPTenantOperationStatus) DeepCopy() *CAPTenantOperationStatus { + if in == nil { + return nil + } + out := new(CAPTenantOperationStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantOperationStep) DeepCopyInto(out *CAPTenantOperationStep) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantOperationStep. +func (in *CAPTenantOperationStep) DeepCopy() *CAPTenantOperationStep { + if in == nil { + return nil + } + out := new(CAPTenantOperationStep) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantSpec) DeepCopyInto(out *CAPTenantSpec) { + *out = *in + out.BTPTenantIdentification = in.BTPTenantIdentification + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantSpec. +func (in *CAPTenantSpec) DeepCopy() *CAPTenantSpec { + if in == nil { + return nil + } + out := new(CAPTenantSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CAPTenantStatus) DeepCopyInto(out *CAPTenantStatus) { + *out = *in + in.GenericStatus.DeepCopyInto(&out.GenericStatus) + if in.PreviousCAPApplicationVersions != nil { + in, out := &in.PreviousCAPApplicationVersions, &out.PreviousCAPApplicationVersions + *out = make([]string, len(*in)) + copy(*out, *in) + } + in.LastFullReconciliationTime.DeepCopyInto(&out.LastFullReconciliationTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CAPTenantStatus. +func (in *CAPTenantStatus) DeepCopy() *CAPTenantStatus { + if in == nil { + return nil + } + out := new(CAPTenantStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ContainerDetails) DeepCopyInto(out *ContainerDetails) { + *out = *in + if in.Command != nil { + in, out := &in.Command, &out.Command + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]v1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.Resources.DeepCopyInto(&out.Resources) + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(v1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.PodSecurityContext != nil { + in, out := &in.PodSecurityContext, &out.PodSecurityContext + *out = new(v1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerDetails. +func (in *ContainerDetails) DeepCopy() *ContainerDetails { + if in == nil { + return nil + } + out := new(ContainerDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeploymentDetails) DeepCopyInto(out *DeploymentDetails) { + *out = *in + in.ContainerDetails.DeepCopyInto(&out.ContainerDetails) + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]Ports, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LivenessProbe != nil { + in, out := &in.LivenessProbe, &out.LivenessProbe + *out = new(v1.Probe) + (*in).DeepCopyInto(*out) + } + if in.ReadinessProbe != nil { + in, out := &in.ReadinessProbe, &out.ReadinessProbe + *out = new(v1.Probe) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentDetails. +func (in *DeploymentDetails) DeepCopy() *DeploymentDetails { + if in == nil { + return nil + } + out := new(DeploymentDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GenericStatus) DeepCopyInto(out *GenericStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericStatus. +func (in *GenericStatus) DeepCopy() *GenericStatus { + if in == nil { + return nil + } + out := new(GenericStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JobDetails) DeepCopyInto(out *JobDetails) { + *out = *in + in.ContainerDetails.DeepCopyInto(&out.ContainerDetails) + if in.BackoffLimit != nil { + in, out := &in.BackoffLimit, &out.BackoffLimit + *out = new(int32) + **out = **in + } + if in.TTLSecondsAfterFinished != nil { + in, out := &in.TTLSecondsAfterFinished, &out.TTLSecondsAfterFinished + *out = new(int32) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobDetails. +func (in *JobDetails) DeepCopy() *JobDetails { + if in == nil { + return nil + } + out := new(JobDetails) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NameValue) DeepCopyInto(out *NameValue) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameValue. +func (in *NameValue) DeepCopy() *NameValue { + if in == nil { + return nil + } + out := new(NameValue) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Ports) DeepCopyInto(out *Ports) { + *out = *in + if in.AppProtocol != nil { + in, out := &in.AppProtocol, &out.AppProtocol + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ports. +func (in *Ports) DeepCopy() *Ports { + if in == nil { + return nil + } + out := new(Ports) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ServiceInfo) DeepCopyInto(out *ServiceInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceInfo. +func (in *ServiceInfo) DeepCopy() *ServiceInfo { + if in == nil { + return nil + } + out := new(ServiceInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TenantOperationWorkloadReference) DeepCopyInto(out *TenantOperationWorkloadReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOperationWorkloadReference. +func (in *TenantOperationWorkloadReference) DeepCopy() *TenantOperationWorkloadReference { + if in == nil { + return nil + } + out := new(TenantOperationWorkloadReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TenantOperations) DeepCopyInto(out *TenantOperations) { + *out = *in + if in.Provisioning != nil { + in, out := &in.Provisioning, &out.Provisioning + *out = make([]TenantOperationWorkloadReference, len(*in)) + copy(*out, *in) + } + if in.Upgrade != nil { + in, out := &in.Upgrade, &out.Upgrade + *out = make([]TenantOperationWorkloadReference, len(*in)) + copy(*out, *in) + } + if in.Deprovisioning != nil { + in, out := &in.Deprovisioning, &out.Deprovisioning + *out = make([]TenantOperationWorkloadReference, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantOperations. +func (in *TenantOperations) DeepCopy() *TenantOperations { + if in == nil { + return nil + } + out := new(TenantOperations) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *WorkloadDetails) DeepCopyInto(out *WorkloadDetails) { + *out = *in + if in.ConsumedBTPServices != nil { + in, out := &in.ConsumedBTPServices, &out.ConsumedBTPServices + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.DeploymentDefinition != nil { + in, out := &in.DeploymentDefinition, &out.DeploymentDefinition + *out = new(DeploymentDetails) + (*in).DeepCopyInto(*out) + } + if in.JobDefinition != nil { + in, out := &in.JobDefinition, &out.JobDefinition + *out = new(JobDetails) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadDetails. +func (in *WorkloadDetails) DeepCopy() *WorkloadDetails { + if in == nil { + return nil + } + out := new(WorkloadDetails) + in.DeepCopyInto(out) + return out +} diff --git a/pkg/client/applyconfiguration/internal/internal.go b/pkg/client/applyconfiguration/internal/internal.go new file mode 100644 index 0000000..4a2ed48 --- /dev/null +++ b/pkg/client/applyconfiguration/internal/internal.go @@ -0,0 +1,61 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package internal + +import ( + "fmt" + "sync" + + typed "sigs.k8s.io/structured-merge-diff/v4/typed" +) + +func Parser() *typed.Parser { + parserOnce.Do(func() { + var err error + parser, err = typed.NewParser(schemaYAML) + if err != nil { + panic(fmt.Sprintf("Failed to parse schema: %v", err)) + } + }) + return parser +} + +var parserOnce sync.Once +var parser *typed.Parser +var schemaYAML = typed.YAMLObject(`types: +- name: __untyped_atomic_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic +- name: __untyped_deduced_ + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +`) diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/applicationdomains.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/applicationdomains.go new file mode 100644 index 0000000..747e7c6 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/applicationdomains.go @@ -0,0 +1,72 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ApplicationDomainsApplyConfiguration represents an declarative configuration of the ApplicationDomains type for use +// with apply. +type ApplicationDomainsApplyConfiguration struct { + Primary *string `json:"primary,omitempty"` + Secondary []string `json:"secondary,omitempty"` + DnsTarget *string `json:"dnsTarget,omitempty"` + IstioIngressGatewayLabels []NameValueApplyConfiguration `json:"istioIngressGatewayLabels,omitempty"` +} + +// ApplicationDomainsApplyConfiguration constructs an declarative configuration of the ApplicationDomains type for use with +// apply. +func ApplicationDomains() *ApplicationDomainsApplyConfiguration { + return &ApplicationDomainsApplyConfiguration{} +} + +// WithPrimary sets the Primary field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Primary field is set to the value of the last call. +func (b *ApplicationDomainsApplyConfiguration) WithPrimary(value string) *ApplicationDomainsApplyConfiguration { + b.Primary = &value + return b +} + +// WithSecondary adds the given value to the Secondary field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Secondary field. +func (b *ApplicationDomainsApplyConfiguration) WithSecondary(values ...string) *ApplicationDomainsApplyConfiguration { + for i := range values { + b.Secondary = append(b.Secondary, values[i]) + } + return b +} + +// WithDnsTarget sets the DnsTarget field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DnsTarget field is set to the value of the last call. +func (b *ApplicationDomainsApplyConfiguration) WithDnsTarget(value string) *ApplicationDomainsApplyConfiguration { + b.DnsTarget = &value + return b +} + +// WithIstioIngressGatewayLabels adds the given value to the IstioIngressGatewayLabels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the IstioIngressGatewayLabels field. +func (b *ApplicationDomainsApplyConfiguration) WithIstioIngressGatewayLabels(values ...*NameValueApplyConfiguration) *ApplicationDomainsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithIstioIngressGatewayLabels") + } + b.IstioIngressGatewayLabels = append(b.IstioIngressGatewayLabels, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btp.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btp.go new file mode 100644 index 0000000..5d0d0b1 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btp.go @@ -0,0 +1,43 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// BTPApplyConfiguration represents an declarative configuration of the BTP type for use +// with apply. +type BTPApplyConfiguration struct { + Services []ServiceInfoApplyConfiguration `json:"services,omitempty"` +} + +// BTPApplyConfiguration constructs an declarative configuration of the BTP type for use with +// apply. +func BTP() *BTPApplyConfiguration { + return &BTPApplyConfiguration{} +} + +// WithServices adds the given value to the Services field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Services field. +func (b *BTPApplyConfiguration) WithServices(values ...*ServiceInfoApplyConfiguration) *BTPApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithServices") + } + b.Services = append(b.Services, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btptenantidentification.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btptenantidentification.go new file mode 100644 index 0000000..a3b69c3 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btptenantidentification.go @@ -0,0 +1,47 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// BTPTenantIdentificationApplyConfiguration represents an declarative configuration of the BTPTenantIdentification type for use +// with apply. +type BTPTenantIdentificationApplyConfiguration struct { + SubDomain *string `json:"subDomain,omitempty"` + TenantId *string `json:"tenantId,omitempty"` +} + +// BTPTenantIdentificationApplyConfiguration constructs an declarative configuration of the BTPTenantIdentification type for use with +// apply. +func BTPTenantIdentification() *BTPTenantIdentificationApplyConfiguration { + return &BTPTenantIdentificationApplyConfiguration{} +} + +// WithSubDomain sets the SubDomain field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SubDomain field is set to the value of the last call. +func (b *BTPTenantIdentificationApplyConfiguration) WithSubDomain(value string) *BTPTenantIdentificationApplyConfiguration { + b.SubDomain = &value + return b +} + +// WithTenantId sets the TenantId field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TenantId field is set to the value of the last call. +func (b *BTPTenantIdentificationApplyConfiguration) WithTenantId(value string) *BTPTenantIdentificationApplyConfiguration { + b.TenantId = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplication.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplication.go new file mode 100644 index 0000000..a33c5b6 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplication.go @@ -0,0 +1,218 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// CAPApplicationApplyConfiguration represents an declarative configuration of the CAPApplication type for use +// with apply. +type CAPApplicationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CAPApplicationSpecApplyConfiguration `json:"spec,omitempty"` + Status *CAPApplicationStatusApplyConfiguration `json:"status,omitempty"` +} + +// CAPApplication constructs an declarative configuration of the CAPApplication type for use with +// apply. +func CAPApplication(name, namespace string) *CAPApplicationApplyConfiguration { + b := &CAPApplicationApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("CAPApplication") + b.WithAPIVersion("sme.sap.com/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithKind(value string) *CAPApplicationApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithAPIVersion(value string) *CAPApplicationApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithName(value string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithGenerateName(value string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithNamespace(value string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithUID(value types.UID) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithResourceVersion(value string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithGeneration(value int64) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *CAPApplicationApplyConfiguration) WithLabels(entries map[string]string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *CAPApplicationApplyConfiguration) WithAnnotations(entries map[string]string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *CAPApplicationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *CAPApplicationApplyConfiguration) WithFinalizers(values ...string) *CAPApplicationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *CAPApplicationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithSpec(value *CAPApplicationSpecApplyConfiguration) *CAPApplicationApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *CAPApplicationApplyConfiguration) WithStatus(value *CAPApplicationStatusApplyConfiguration) *CAPApplicationApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationspec.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationspec.go new file mode 100644 index 0000000..3568284 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationspec.go @@ -0,0 +1,74 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// CAPApplicationSpecApplyConfiguration represents an declarative configuration of the CAPApplicationSpec type for use +// with apply. +type CAPApplicationSpecApplyConfiguration struct { + Domains *ApplicationDomainsApplyConfiguration `json:"domains,omitempty"` + GlobalAccountId *string `json:"globalAccountId,omitempty"` + BTPAppName *string `json:"btpAppName,omitempty"` + Provider *BTPTenantIdentificationApplyConfiguration `json:"provider,omitempty"` + BTP *BTPApplyConfiguration `json:"btp,omitempty"` +} + +// CAPApplicationSpecApplyConfiguration constructs an declarative configuration of the CAPApplicationSpec type for use with +// apply. +func CAPApplicationSpec() *CAPApplicationSpecApplyConfiguration { + return &CAPApplicationSpecApplyConfiguration{} +} + +// WithDomains sets the Domains field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Domains field is set to the value of the last call. +func (b *CAPApplicationSpecApplyConfiguration) WithDomains(value *ApplicationDomainsApplyConfiguration) *CAPApplicationSpecApplyConfiguration { + b.Domains = value + return b +} + +// WithGlobalAccountId sets the GlobalAccountId field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GlobalAccountId field is set to the value of the last call. +func (b *CAPApplicationSpecApplyConfiguration) WithGlobalAccountId(value string) *CAPApplicationSpecApplyConfiguration { + b.GlobalAccountId = &value + return b +} + +// WithBTPAppName sets the BTPAppName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BTPAppName field is set to the value of the last call. +func (b *CAPApplicationSpecApplyConfiguration) WithBTPAppName(value string) *CAPApplicationSpecApplyConfiguration { + b.BTPAppName = &value + return b +} + +// WithProvider sets the Provider field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Provider field is set to the value of the last call. +func (b *CAPApplicationSpecApplyConfiguration) WithProvider(value *BTPTenantIdentificationApplyConfiguration) *CAPApplicationSpecApplyConfiguration { + b.Provider = value + return b +} + +// WithBTP sets the BTP field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BTP field is set to the value of the last call. +func (b *CAPApplicationSpecApplyConfiguration) WithBTP(value *BTPApplyConfiguration) *CAPApplicationSpecApplyConfiguration { + b.BTP = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationstatus.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationstatus.go new file mode 100644 index 0000000..b1721fb --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationstatus.go @@ -0,0 +1,80 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CAPApplicationStatusApplyConfiguration represents an declarative configuration of the CAPApplicationStatus type for use +// with apply. +type CAPApplicationStatusApplyConfiguration struct { + GenericStatusApplyConfiguration `json:",inline"` + State *smesapcomv1alpha1.CAPApplicationState `json:"state,omitempty"` + DomainSpecHash *string `json:"domainSpecHash,omitempty"` + LastFullReconciliationTime *v1.Time `json:"lastFullReconciliationTime,omitempty"` +} + +// CAPApplicationStatusApplyConfiguration constructs an declarative configuration of the CAPApplicationStatus type for use with +// apply. +func CAPApplicationStatus() *CAPApplicationStatusApplyConfiguration { + return &CAPApplicationStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *CAPApplicationStatusApplyConfiguration) WithObservedGeneration(value int64) *CAPApplicationStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *CAPApplicationStatusApplyConfiguration) WithConditions(values ...v1.Condition) *CAPApplicationStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *CAPApplicationStatusApplyConfiguration) WithState(value smesapcomv1alpha1.CAPApplicationState) *CAPApplicationStatusApplyConfiguration { + b.State = &value + return b +} + +// WithDomainSpecHash sets the DomainSpecHash field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DomainSpecHash field is set to the value of the last call. +func (b *CAPApplicationStatusApplyConfiguration) WithDomainSpecHash(value string) *CAPApplicationStatusApplyConfiguration { + b.DomainSpecHash = &value + return b +} + +// WithLastFullReconciliationTime sets the LastFullReconciliationTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastFullReconciliationTime field is set to the value of the last call. +func (b *CAPApplicationStatusApplyConfiguration) WithLastFullReconciliationTime(value v1.Time) *CAPApplicationStatusApplyConfiguration { + b.LastFullReconciliationTime = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversion.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversion.go new file mode 100644 index 0000000..4318651 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversion.go @@ -0,0 +1,218 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// CAPApplicationVersionApplyConfiguration represents an declarative configuration of the CAPApplicationVersion type for use +// with apply. +type CAPApplicationVersionApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CAPApplicationVersionSpecApplyConfiguration `json:"spec,omitempty"` + Status *CAPApplicationVersionStatusApplyConfiguration `json:"status,omitempty"` +} + +// CAPApplicationVersion constructs an declarative configuration of the CAPApplicationVersion type for use with +// apply. +func CAPApplicationVersion(name, namespace string) *CAPApplicationVersionApplyConfiguration { + b := &CAPApplicationVersionApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("CAPApplicationVersion") + b.WithAPIVersion("sme.sap.com/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithKind(value string) *CAPApplicationVersionApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithAPIVersion(value string) *CAPApplicationVersionApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithName(value string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithGenerateName(value string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithNamespace(value string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithUID(value types.UID) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithResourceVersion(value string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithGeneration(value int64) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *CAPApplicationVersionApplyConfiguration) WithLabels(entries map[string]string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *CAPApplicationVersionApplyConfiguration) WithAnnotations(entries map[string]string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *CAPApplicationVersionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *CAPApplicationVersionApplyConfiguration) WithFinalizers(values ...string) *CAPApplicationVersionApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *CAPApplicationVersionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithSpec(value *CAPApplicationVersionSpecApplyConfiguration) *CAPApplicationVersionApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *CAPApplicationVersionApplyConfiguration) WithStatus(value *CAPApplicationVersionStatusApplyConfiguration) *CAPApplicationVersionApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionspec.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionspec.go new file mode 100644 index 0000000..b337704 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionspec.go @@ -0,0 +1,81 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// CAPApplicationVersionSpecApplyConfiguration represents an declarative configuration of the CAPApplicationVersionSpec type for use +// with apply. +type CAPApplicationVersionSpecApplyConfiguration struct { + CAPApplicationInstance *string `json:"capApplicationInstance,omitempty"` + Version *string `json:"version,omitempty"` + RegistrySecrets []string `json:"registrySecrets,omitempty"` + Workloads []WorkloadDetailsApplyConfiguration `json:"workloads,omitempty"` + TenantOperations *TenantOperationsApplyConfiguration `json:"tenantOperations,omitempty"` +} + +// CAPApplicationVersionSpecApplyConfiguration constructs an declarative configuration of the CAPApplicationVersionSpec type for use with +// apply. +func CAPApplicationVersionSpec() *CAPApplicationVersionSpecApplyConfiguration { + return &CAPApplicationVersionSpecApplyConfiguration{} +} + +// WithCAPApplicationInstance sets the CAPApplicationInstance field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CAPApplicationInstance field is set to the value of the last call. +func (b *CAPApplicationVersionSpecApplyConfiguration) WithCAPApplicationInstance(value string) *CAPApplicationVersionSpecApplyConfiguration { + b.CAPApplicationInstance = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *CAPApplicationVersionSpecApplyConfiguration) WithVersion(value string) *CAPApplicationVersionSpecApplyConfiguration { + b.Version = &value + return b +} + +// WithRegistrySecrets adds the given value to the RegistrySecrets field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the RegistrySecrets field. +func (b *CAPApplicationVersionSpecApplyConfiguration) WithRegistrySecrets(values ...string) *CAPApplicationVersionSpecApplyConfiguration { + for i := range values { + b.RegistrySecrets = append(b.RegistrySecrets, values[i]) + } + return b +} + +// WithWorkloads adds the given value to the Workloads field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Workloads field. +func (b *CAPApplicationVersionSpecApplyConfiguration) WithWorkloads(values ...*WorkloadDetailsApplyConfiguration) *CAPApplicationVersionSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithWorkloads") + } + b.Workloads = append(b.Workloads, *values[i]) + } + return b +} + +// WithTenantOperations sets the TenantOperations field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TenantOperations field is set to the value of the last call. +func (b *CAPApplicationVersionSpecApplyConfiguration) WithTenantOperations(value *TenantOperationsApplyConfiguration) *CAPApplicationVersionSpecApplyConfiguration { + b.TenantOperations = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionstatus.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionstatus.go new file mode 100644 index 0000000..a53eea1 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/capapplicationversionstatus.go @@ -0,0 +1,73 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CAPApplicationVersionStatusApplyConfiguration represents an declarative configuration of the CAPApplicationVersionStatus type for use +// with apply. +type CAPApplicationVersionStatusApplyConfiguration struct { + GenericStatusApplyConfiguration `json:",inline"` + State *smesapcomv1alpha1.CAPApplicationVersionState `json:"state,omitempty"` + FinishedJobs []string `json:"finishedJobs,omitempty"` +} + +// CAPApplicationVersionStatusApplyConfiguration constructs an declarative configuration of the CAPApplicationVersionStatus type for use with +// apply. +func CAPApplicationVersionStatus() *CAPApplicationVersionStatusApplyConfiguration { + return &CAPApplicationVersionStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *CAPApplicationVersionStatusApplyConfiguration) WithObservedGeneration(value int64) *CAPApplicationVersionStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *CAPApplicationVersionStatusApplyConfiguration) WithConditions(values ...v1.Condition) *CAPApplicationVersionStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *CAPApplicationVersionStatusApplyConfiguration) WithState(value smesapcomv1alpha1.CAPApplicationVersionState) *CAPApplicationVersionStatusApplyConfiguration { + b.State = &value + return b +} + +// WithFinishedJobs adds the given value to the FinishedJobs field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the FinishedJobs field. +func (b *CAPApplicationVersionStatusApplyConfiguration) WithFinishedJobs(values ...string) *CAPApplicationVersionStatusApplyConfiguration { + for i := range values { + b.FinishedJobs = append(b.FinishedJobs, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenant.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenant.go new file mode 100644 index 0000000..74e667d --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenant.go @@ -0,0 +1,218 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// CAPTenantApplyConfiguration represents an declarative configuration of the CAPTenant type for use +// with apply. +type CAPTenantApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CAPTenantSpecApplyConfiguration `json:"spec,omitempty"` + Status *CAPTenantStatusApplyConfiguration `json:"status,omitempty"` +} + +// CAPTenant constructs an declarative configuration of the CAPTenant type for use with +// apply. +func CAPTenant(name, namespace string) *CAPTenantApplyConfiguration { + b := &CAPTenantApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("CAPTenant") + b.WithAPIVersion("sme.sap.com/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithKind(value string) *CAPTenantApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithAPIVersion(value string) *CAPTenantApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithName(value string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithGenerateName(value string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithNamespace(value string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithUID(value types.UID) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithResourceVersion(value string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithGeneration(value int64) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *CAPTenantApplyConfiguration) WithLabels(entries map[string]string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *CAPTenantApplyConfiguration) WithAnnotations(entries map[string]string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *CAPTenantApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *CAPTenantApplyConfiguration) WithFinalizers(values ...string) *CAPTenantApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *CAPTenantApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithSpec(value *CAPTenantSpecApplyConfiguration) *CAPTenantApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *CAPTenantApplyConfiguration) WithStatus(value *CAPTenantStatusApplyConfiguration) *CAPTenantApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperation.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperation.go new file mode 100644 index 0000000..a7e5106 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperation.go @@ -0,0 +1,218 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// CAPTenantOperationApplyConfiguration represents an declarative configuration of the CAPTenantOperation type for use +// with apply. +type CAPTenantOperationApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *CAPTenantOperationSpecApplyConfiguration `json:"spec,omitempty"` + Status *CAPTenantOperationStatusApplyConfiguration `json:"status,omitempty"` +} + +// CAPTenantOperation constructs an declarative configuration of the CAPTenantOperation type for use with +// apply. +func CAPTenantOperation(name, namespace string) *CAPTenantOperationApplyConfiguration { + b := &CAPTenantOperationApplyConfiguration{} + b.WithName(name) + b.WithNamespace(namespace) + b.WithKind("CAPTenantOperation") + b.WithAPIVersion("sme.sap.com/v1alpha1") + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithKind(value string) *CAPTenantOperationApplyConfiguration { + b.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithAPIVersion(value string) *CAPTenantOperationApplyConfiguration { + b.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithName(value string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithGenerateName(value string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithNamespace(value string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithUID(value types.UID) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithResourceVersion(value string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithGeneration(value int64) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *CAPTenantOperationApplyConfiguration) WithLabels(entries map[string]string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *CAPTenantOperationApplyConfiguration) WithAnnotations(entries map[string]string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *CAPTenantOperationApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.OwnerReferences = append(b.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *CAPTenantOperationApplyConfiguration) WithFinalizers(values ...string) *CAPTenantOperationApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.Finalizers = append(b.Finalizers, values[i]) + } + return b +} + +func (b *CAPTenantOperationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithSpec(value *CAPTenantOperationSpecApplyConfiguration) *CAPTenantOperationApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *CAPTenantOperationApplyConfiguration) WithStatus(value *CAPTenantOperationStatusApplyConfiguration) *CAPTenantOperationApplyConfiguration { + b.Status = value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationspec.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationspec.go new file mode 100644 index 0000000..0c40846 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationspec.go @@ -0,0 +1,82 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" +) + +// CAPTenantOperationSpecApplyConfiguration represents an declarative configuration of the CAPTenantOperationSpec type for use +// with apply. +type CAPTenantOperationSpecApplyConfiguration struct { + Operation *v1alpha1.CAPTenantOperationType `json:"operation,omitempty"` + BTPTenantIdentificationApplyConfiguration `json:",inline"` + CAPApplicationVersionInstance *string `json:"capApplicationVersionInstance,omitempty"` + Steps []CAPTenantOperationStepApplyConfiguration `json:"steps,omitempty"` +} + +// CAPTenantOperationSpecApplyConfiguration constructs an declarative configuration of the CAPTenantOperationSpec type for use with +// apply. +func CAPTenantOperationSpec() *CAPTenantOperationSpecApplyConfiguration { + return &CAPTenantOperationSpecApplyConfiguration{} +} + +// WithOperation sets the Operation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Operation field is set to the value of the last call. +func (b *CAPTenantOperationSpecApplyConfiguration) WithOperation(value v1alpha1.CAPTenantOperationType) *CAPTenantOperationSpecApplyConfiguration { + b.Operation = &value + return b +} + +// WithSubDomain sets the SubDomain field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SubDomain field is set to the value of the last call. +func (b *CAPTenantOperationSpecApplyConfiguration) WithSubDomain(value string) *CAPTenantOperationSpecApplyConfiguration { + b.SubDomain = &value + return b +} + +// WithTenantId sets the TenantId field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TenantId field is set to the value of the last call. +func (b *CAPTenantOperationSpecApplyConfiguration) WithTenantId(value string) *CAPTenantOperationSpecApplyConfiguration { + b.TenantId = &value + return b +} + +// WithCAPApplicationVersionInstance sets the CAPApplicationVersionInstance field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CAPApplicationVersionInstance field is set to the value of the last call. +func (b *CAPTenantOperationSpecApplyConfiguration) WithCAPApplicationVersionInstance(value string) *CAPTenantOperationSpecApplyConfiguration { + b.CAPApplicationVersionInstance = &value + return b +} + +// WithSteps adds the given value to the Steps field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Steps field. +func (b *CAPTenantOperationSpecApplyConfiguration) WithSteps(values ...*CAPTenantOperationStepApplyConfiguration) *CAPTenantOperationSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithSteps") + } + b.Steps = append(b.Steps, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstatus.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstatus.go new file mode 100644 index 0000000..60bedb0 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstatus.go @@ -0,0 +1,80 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CAPTenantOperationStatusApplyConfiguration represents an declarative configuration of the CAPTenantOperationStatus type for use +// with apply. +type CAPTenantOperationStatusApplyConfiguration struct { + GenericStatusApplyConfiguration `json:",inline"` + State *smesapcomv1alpha1.CAPTenantOperationState `json:"state,omitempty"` + CurrentStep *uint32 `json:"currentStep,omitempty"` + ActiveJob *string `json:"activeJob,omitempty"` +} + +// CAPTenantOperationStatusApplyConfiguration constructs an declarative configuration of the CAPTenantOperationStatus type for use with +// apply. +func CAPTenantOperationStatus() *CAPTenantOperationStatusApplyConfiguration { + return &CAPTenantOperationStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *CAPTenantOperationStatusApplyConfiguration) WithObservedGeneration(value int64) *CAPTenantOperationStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *CAPTenantOperationStatusApplyConfiguration) WithConditions(values ...v1.Condition) *CAPTenantOperationStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *CAPTenantOperationStatusApplyConfiguration) WithState(value smesapcomv1alpha1.CAPTenantOperationState) *CAPTenantOperationStatusApplyConfiguration { + b.State = &value + return b +} + +// WithCurrentStep sets the CurrentStep field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CurrentStep field is set to the value of the last call. +func (b *CAPTenantOperationStatusApplyConfiguration) WithCurrentStep(value uint32) *CAPTenantOperationStatusApplyConfiguration { + b.CurrentStep = &value + return b +} + +// WithActiveJob sets the ActiveJob field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ActiveJob field is set to the value of the last call. +func (b *CAPTenantOperationStatusApplyConfiguration) WithActiveJob(value string) *CAPTenantOperationStatusApplyConfiguration { + b.ActiveJob = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstep.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstep.go new file mode 100644 index 0000000..8eea65c --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoperationstep.go @@ -0,0 +1,60 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" +) + +// CAPTenantOperationStepApplyConfiguration represents an declarative configuration of the CAPTenantOperationStep type for use +// with apply. +type CAPTenantOperationStepApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Type *v1alpha1.JobType `json:"type,omitempty"` + ContinueOnFailure *bool `json:"continueOnFailure,omitempty"` +} + +// CAPTenantOperationStepApplyConfiguration constructs an declarative configuration of the CAPTenantOperationStep type for use with +// apply. +func CAPTenantOperationStep() *CAPTenantOperationStepApplyConfiguration { + return &CAPTenantOperationStepApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CAPTenantOperationStepApplyConfiguration) WithName(value string) *CAPTenantOperationStepApplyConfiguration { + b.Name = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *CAPTenantOperationStepApplyConfiguration) WithType(value v1alpha1.JobType) *CAPTenantOperationStepApplyConfiguration { + b.Type = &value + return b +} + +// WithContinueOnFailure sets the ContinueOnFailure field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContinueOnFailure field is set to the value of the last call. +func (b *CAPTenantOperationStepApplyConfiguration) WithContinueOnFailure(value bool) *CAPTenantOperationStepApplyConfiguration { + b.ContinueOnFailure = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantspec.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantspec.go new file mode 100644 index 0000000..9ecf9b6 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantspec.go @@ -0,0 +1,77 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" +) + +// CAPTenantSpecApplyConfiguration represents an declarative configuration of the CAPTenantSpec type for use +// with apply. +type CAPTenantSpecApplyConfiguration struct { + CAPApplicationInstance *string `json:"capApplicationInstance,omitempty"` + BTPTenantIdentificationApplyConfiguration `json:",inline"` + Version *string `json:"version,omitempty"` + VersionUpgradeStrategy *smesapcomv1alpha1.VersionUpgradeStrategyType `json:"versionUpgradeStrategy,omitempty"` +} + +// CAPTenantSpecApplyConfiguration constructs an declarative configuration of the CAPTenantSpec type for use with +// apply. +func CAPTenantSpec() *CAPTenantSpecApplyConfiguration { + return &CAPTenantSpecApplyConfiguration{} +} + +// WithCAPApplicationInstance sets the CAPApplicationInstance field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CAPApplicationInstance field is set to the value of the last call. +func (b *CAPTenantSpecApplyConfiguration) WithCAPApplicationInstance(value string) *CAPTenantSpecApplyConfiguration { + b.CAPApplicationInstance = &value + return b +} + +// WithSubDomain sets the SubDomain field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SubDomain field is set to the value of the last call. +func (b *CAPTenantSpecApplyConfiguration) WithSubDomain(value string) *CAPTenantSpecApplyConfiguration { + b.SubDomain = &value + return b +} + +// WithTenantId sets the TenantId field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TenantId field is set to the value of the last call. +func (b *CAPTenantSpecApplyConfiguration) WithTenantId(value string) *CAPTenantSpecApplyConfiguration { + b.TenantId = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *CAPTenantSpecApplyConfiguration) WithVersion(value string) *CAPTenantSpecApplyConfiguration { + b.Version = &value + return b +} + +// WithVersionUpgradeStrategy sets the VersionUpgradeStrategy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the VersionUpgradeStrategy field is set to the value of the last call. +func (b *CAPTenantSpecApplyConfiguration) WithVersionUpgradeStrategy(value smesapcomv1alpha1.VersionUpgradeStrategyType) *CAPTenantSpecApplyConfiguration { + b.VersionUpgradeStrategy = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantstatus.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantstatus.go new file mode 100644 index 0000000..7746e78 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantstatus.go @@ -0,0 +1,91 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// CAPTenantStatusApplyConfiguration represents an declarative configuration of the CAPTenantStatus type for use +// with apply. +type CAPTenantStatusApplyConfiguration struct { + GenericStatusApplyConfiguration `json:",inline"` + State *smesapcomv1alpha1.CAPTenantState `json:"state,omitempty"` + CurrentCAPApplicationVersionInstance *string `json:"currentCAPApplicationVersionInstance,omitempty"` + PreviousCAPApplicationVersions []string `json:"previousCAPApplicationVersions,omitempty"` + LastFullReconciliationTime *v1.Time `json:"lastFullReconciliationTime,omitempty"` +} + +// CAPTenantStatusApplyConfiguration constructs an declarative configuration of the CAPTenantStatus type for use with +// apply. +func CAPTenantStatus() *CAPTenantStatusApplyConfiguration { + return &CAPTenantStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *CAPTenantStatusApplyConfiguration) WithObservedGeneration(value int64) *CAPTenantStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *CAPTenantStatusApplyConfiguration) WithConditions(values ...v1.Condition) *CAPTenantStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} + +// WithState sets the State field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the State field is set to the value of the last call. +func (b *CAPTenantStatusApplyConfiguration) WithState(value smesapcomv1alpha1.CAPTenantState) *CAPTenantStatusApplyConfiguration { + b.State = &value + return b +} + +// WithCurrentCAPApplicationVersionInstance sets the CurrentCAPApplicationVersionInstance field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CurrentCAPApplicationVersionInstance field is set to the value of the last call. +func (b *CAPTenantStatusApplyConfiguration) WithCurrentCAPApplicationVersionInstance(value string) *CAPTenantStatusApplyConfiguration { + b.CurrentCAPApplicationVersionInstance = &value + return b +} + +// WithPreviousCAPApplicationVersions adds the given value to the PreviousCAPApplicationVersions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the PreviousCAPApplicationVersions field. +func (b *CAPTenantStatusApplyConfiguration) WithPreviousCAPApplicationVersions(values ...string) *CAPTenantStatusApplyConfiguration { + for i := range values { + b.PreviousCAPApplicationVersions = append(b.PreviousCAPApplicationVersions, values[i]) + } + return b +} + +// WithLastFullReconciliationTime sets the LastFullReconciliationTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastFullReconciliationTime field is set to the value of the last call. +func (b *CAPTenantStatusApplyConfiguration) WithLastFullReconciliationTime(value v1.Time) *CAPTenantStatusApplyConfiguration { + b.LastFullReconciliationTime = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/containerdetails.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/containerdetails.go new file mode 100644 index 0000000..d96b962 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/containerdetails.go @@ -0,0 +1,100 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/api/core/v1" +) + +// ContainerDetailsApplyConfiguration represents an declarative configuration of the ContainerDetails type for use +// with apply. +type ContainerDetailsApplyConfiguration struct { + Image *string `json:"image,omitempty"` + ImagePullPolicy *v1.PullPolicy `json:"imagePullPolicy,omitempty"` + Command []string `json:"command,omitempty"` + Env []v1.EnvVar `json:"env,omitempty"` + Resources *v1.ResourceRequirements `json:"resources,omitempty"` + SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"` + PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"` +} + +// ContainerDetailsApplyConfiguration constructs an declarative configuration of the ContainerDetails type for use with +// apply. +func ContainerDetails() *ContainerDetailsApplyConfiguration { + return &ContainerDetailsApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *ContainerDetailsApplyConfiguration) WithImage(value string) *ContainerDetailsApplyConfiguration { + b.Image = &value + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *ContainerDetailsApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *ContainerDetailsApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithCommand adds the given value to the Command field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Command field. +func (b *ContainerDetailsApplyConfiguration) WithCommand(values ...string) *ContainerDetailsApplyConfiguration { + for i := range values { + b.Command = append(b.Command, values[i]) + } + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *ContainerDetailsApplyConfiguration) WithEnv(values ...v1.EnvVar) *ContainerDetailsApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *ContainerDetailsApplyConfiguration) WithResources(value v1.ResourceRequirements) *ContainerDetailsApplyConfiguration { + b.Resources = &value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *ContainerDetailsApplyConfiguration) WithSecurityContext(value v1.SecurityContext) *ContainerDetailsApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithPodSecurityContext sets the PodSecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PodSecurityContext field is set to the value of the last call. +func (b *ContainerDetailsApplyConfiguration) WithPodSecurityContext(value v1.PodSecurityContext) *ContainerDetailsApplyConfiguration { + b.PodSecurityContext = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/deploymentdetails.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/deploymentdetails.go new file mode 100644 index 0000000..633f51e --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/deploymentdetails.go @@ -0,0 +1,145 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/api/core/v1" +) + +// DeploymentDetailsApplyConfiguration represents an declarative configuration of the DeploymentDetails type for use +// with apply. +type DeploymentDetailsApplyConfiguration struct { + ContainerDetailsApplyConfiguration `json:",inline"` + Type *smesapcomv1alpha1.DeploymentType `json:"type,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + Ports []PortsApplyConfiguration `json:"ports,omitempty"` + LivenessProbe *v1.Probe `json:"livenessProbe,omitempty"` + ReadinessProbe *v1.Probe `json:"readinessProbe,omitempty"` +} + +// DeploymentDetailsApplyConfiguration constructs an declarative configuration of the DeploymentDetails type for use with +// apply. +func DeploymentDetails() *DeploymentDetailsApplyConfiguration { + return &DeploymentDetailsApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithImage(value string) *DeploymentDetailsApplyConfiguration { + b.Image = &value + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *DeploymentDetailsApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithCommand adds the given value to the Command field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Command field. +func (b *DeploymentDetailsApplyConfiguration) WithCommand(values ...string) *DeploymentDetailsApplyConfiguration { + for i := range values { + b.Command = append(b.Command, values[i]) + } + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *DeploymentDetailsApplyConfiguration) WithEnv(values ...v1.EnvVar) *DeploymentDetailsApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithResources(value v1.ResourceRequirements) *DeploymentDetailsApplyConfiguration { + b.Resources = &value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithSecurityContext(value v1.SecurityContext) *DeploymentDetailsApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithPodSecurityContext sets the PodSecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PodSecurityContext field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithPodSecurityContext(value v1.PodSecurityContext) *DeploymentDetailsApplyConfiguration { + b.PodSecurityContext = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithType(value smesapcomv1alpha1.DeploymentType) *DeploymentDetailsApplyConfiguration { + b.Type = &value + return b +} + +// WithReplicas sets the Replicas field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Replicas field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithReplicas(value int32) *DeploymentDetailsApplyConfiguration { + b.Replicas = &value + return b +} + +// WithPorts adds the given value to the Ports field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Ports field. +func (b *DeploymentDetailsApplyConfiguration) WithPorts(values ...*PortsApplyConfiguration) *DeploymentDetailsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithPorts") + } + b.Ports = append(b.Ports, *values[i]) + } + return b +} + +// WithLivenessProbe sets the LivenessProbe field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LivenessProbe field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithLivenessProbe(value v1.Probe) *DeploymentDetailsApplyConfiguration { + b.LivenessProbe = &value + return b +} + +// WithReadinessProbe sets the ReadinessProbe field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ReadinessProbe field is set to the value of the last call. +func (b *DeploymentDetailsApplyConfiguration) WithReadinessProbe(value v1.Probe) *DeploymentDetailsApplyConfiguration { + b.ReadinessProbe = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/genericstatus.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/genericstatus.go new file mode 100644 index 0000000..13651cf --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/genericstatus.go @@ -0,0 +1,53 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// GenericStatusApplyConfiguration represents an declarative configuration of the GenericStatus type for use +// with apply. +type GenericStatusApplyConfiguration struct { + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Conditions []v1.Condition `json:"conditions,omitempty"` +} + +// GenericStatusApplyConfiguration constructs an declarative configuration of the GenericStatus type for use with +// apply. +func GenericStatus() *GenericStatusApplyConfiguration { + return &GenericStatusApplyConfiguration{} +} + +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *GenericStatusApplyConfiguration) WithObservedGeneration(value int64) *GenericStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *GenericStatusApplyConfiguration) WithConditions(values ...v1.Condition) *GenericStatusApplyConfiguration { + for i := range values { + b.Conditions = append(b.Conditions, values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/jobdetails.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/jobdetails.go new file mode 100644 index 0000000..e8dc3bf --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/jobdetails.go @@ -0,0 +1,122 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/api/core/v1" +) + +// JobDetailsApplyConfiguration represents an declarative configuration of the JobDetails type for use +// with apply. +type JobDetailsApplyConfiguration struct { + ContainerDetailsApplyConfiguration `json:",inline"` + Type *smesapcomv1alpha1.JobType `json:"type,omitempty"` + BackoffLimit *int32 `json:"backoffLimit,omitempty"` + TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"` +} + +// JobDetailsApplyConfiguration constructs an declarative configuration of the JobDetails type for use with +// apply. +func JobDetails() *JobDetailsApplyConfiguration { + return &JobDetailsApplyConfiguration{} +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithImage(value string) *JobDetailsApplyConfiguration { + b.Image = &value + return b +} + +// WithImagePullPolicy sets the ImagePullPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ImagePullPolicy field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithImagePullPolicy(value v1.PullPolicy) *JobDetailsApplyConfiguration { + b.ImagePullPolicy = &value + return b +} + +// WithCommand adds the given value to the Command field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Command field. +func (b *JobDetailsApplyConfiguration) WithCommand(values ...string) *JobDetailsApplyConfiguration { + for i := range values { + b.Command = append(b.Command, values[i]) + } + return b +} + +// WithEnv adds the given value to the Env field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Env field. +func (b *JobDetailsApplyConfiguration) WithEnv(values ...v1.EnvVar) *JobDetailsApplyConfiguration { + for i := range values { + b.Env = append(b.Env, values[i]) + } + return b +} + +// WithResources sets the Resources field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Resources field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithResources(value v1.ResourceRequirements) *JobDetailsApplyConfiguration { + b.Resources = &value + return b +} + +// WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the SecurityContext field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithSecurityContext(value v1.SecurityContext) *JobDetailsApplyConfiguration { + b.SecurityContext = &value + return b +} + +// WithPodSecurityContext sets the PodSecurityContext field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the PodSecurityContext field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithPodSecurityContext(value v1.PodSecurityContext) *JobDetailsApplyConfiguration { + b.PodSecurityContext = &value + return b +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithType(value smesapcomv1alpha1.JobType) *JobDetailsApplyConfiguration { + b.Type = &value + return b +} + +// WithBackoffLimit sets the BackoffLimit field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the BackoffLimit field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithBackoffLimit(value int32) *JobDetailsApplyConfiguration { + b.BackoffLimit = &value + return b +} + +// WithTTLSecondsAfterFinished sets the TTLSecondsAfterFinished field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TTLSecondsAfterFinished field is set to the value of the last call. +func (b *JobDetailsApplyConfiguration) WithTTLSecondsAfterFinished(value int32) *JobDetailsApplyConfiguration { + b.TTLSecondsAfterFinished = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/namevalue.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/namevalue.go new file mode 100644 index 0000000..eeb1006 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/namevalue.go @@ -0,0 +1,47 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// NameValueApplyConfiguration represents an declarative configuration of the NameValue type for use +// with apply. +type NameValueApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// NameValueApplyConfiguration constructs an declarative configuration of the NameValue type for use with +// apply. +func NameValue() *NameValueApplyConfiguration { + return &NameValueApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *NameValueApplyConfiguration) WithName(value string) *NameValueApplyConfiguration { + b.Name = &value + return b +} + +// WithValue sets the Value field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Value field is set to the value of the last call. +func (b *NameValueApplyConfiguration) WithValue(value string) *NameValueApplyConfiguration { + b.Value = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/ports.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/ports.go new file mode 100644 index 0000000..4170e44 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/ports.go @@ -0,0 +1,78 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" +) + +// PortsApplyConfiguration represents an declarative configuration of the Ports type for use +// with apply. +type PortsApplyConfiguration struct { + AppProtocol *string `json:"appProtocol,omitempty"` + Name *string `json:"name,omitempty"` + NetworkPolicy *v1alpha1.PortNetworkPolicyType `json:"networkPolicy,omitempty"` + Port *int32 `json:"port,omitempty"` + RouterDestinationName *string `json:"routerDestinationName,omitempty"` +} + +// PortsApplyConfiguration constructs an declarative configuration of the Ports type for use with +// apply. +func Ports() *PortsApplyConfiguration { + return &PortsApplyConfiguration{} +} + +// WithAppProtocol sets the AppProtocol field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AppProtocol field is set to the value of the last call. +func (b *PortsApplyConfiguration) WithAppProtocol(value string) *PortsApplyConfiguration { + b.AppProtocol = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *PortsApplyConfiguration) WithName(value string) *PortsApplyConfiguration { + b.Name = &value + return b +} + +// WithNetworkPolicy sets the NetworkPolicy field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the NetworkPolicy field is set to the value of the last call. +func (b *PortsApplyConfiguration) WithNetworkPolicy(value v1alpha1.PortNetworkPolicyType) *PortsApplyConfiguration { + b.NetworkPolicy = &value + return b +} + +// WithPort sets the Port field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Port field is set to the value of the last call. +func (b *PortsApplyConfiguration) WithPort(value int32) *PortsApplyConfiguration { + b.Port = &value + return b +} + +// WithRouterDestinationName sets the RouterDestinationName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the RouterDestinationName field is set to the value of the last call. +func (b *PortsApplyConfiguration) WithRouterDestinationName(value string) *PortsApplyConfiguration { + b.RouterDestinationName = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/serviceinfo.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/serviceinfo.go new file mode 100644 index 0000000..f2a9e09 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/serviceinfo.go @@ -0,0 +1,56 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ServiceInfoApplyConfiguration represents an declarative configuration of the ServiceInfo type for use +// with apply. +type ServiceInfoApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Secret *string `json:"secret,omitempty"` + Class *string `json:"class,omitempty"` +} + +// ServiceInfoApplyConfiguration constructs an declarative configuration of the ServiceInfo type for use with +// apply. +func ServiceInfo() *ServiceInfoApplyConfiguration { + return &ServiceInfoApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ServiceInfoApplyConfiguration) WithName(value string) *ServiceInfoApplyConfiguration { + b.Name = &value + return b +} + +// WithSecret sets the Secret field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Secret field is set to the value of the last call. +func (b *ServiceInfoApplyConfiguration) WithSecret(value string) *ServiceInfoApplyConfiguration { + b.Secret = &value + return b +} + +// WithClass sets the Class field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Class field is set to the value of the last call. +func (b *ServiceInfoApplyConfiguration) WithClass(value string) *ServiceInfoApplyConfiguration { + b.Class = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperations.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperations.go new file mode 100644 index 0000000..30398e8 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperations.go @@ -0,0 +1,71 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TenantOperationsApplyConfiguration represents an declarative configuration of the TenantOperations type for use +// with apply. +type TenantOperationsApplyConfiguration struct { + Provisioning []TenantOperationWorkloadReferenceApplyConfiguration `json:"provisioning,omitempty"` + Upgrade []TenantOperationWorkloadReferenceApplyConfiguration `json:"upgrade,omitempty"` + Deprovisioning []TenantOperationWorkloadReferenceApplyConfiguration `json:"deprovisioning,omitempty"` +} + +// TenantOperationsApplyConfiguration constructs an declarative configuration of the TenantOperations type for use with +// apply. +func TenantOperations() *TenantOperationsApplyConfiguration { + return &TenantOperationsApplyConfiguration{} +} + +// WithProvisioning adds the given value to the Provisioning field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Provisioning field. +func (b *TenantOperationsApplyConfiguration) WithProvisioning(values ...*TenantOperationWorkloadReferenceApplyConfiguration) *TenantOperationsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithProvisioning") + } + b.Provisioning = append(b.Provisioning, *values[i]) + } + return b +} + +// WithUpgrade adds the given value to the Upgrade field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Upgrade field. +func (b *TenantOperationsApplyConfiguration) WithUpgrade(values ...*TenantOperationWorkloadReferenceApplyConfiguration) *TenantOperationsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithUpgrade") + } + b.Upgrade = append(b.Upgrade, *values[i]) + } + return b +} + +// WithDeprovisioning adds the given value to the Deprovisioning field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Deprovisioning field. +func (b *TenantOperationsApplyConfiguration) WithDeprovisioning(values ...*TenantOperationWorkloadReferenceApplyConfiguration) *TenantOperationsApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithDeprovisioning") + } + b.Deprovisioning = append(b.Deprovisioning, *values[i]) + } + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperationworkloadreference.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperationworkloadreference.go new file mode 100644 index 0000000..bebb5ef --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/tenantoperationworkloadreference.go @@ -0,0 +1,47 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TenantOperationWorkloadReferenceApplyConfiguration represents an declarative configuration of the TenantOperationWorkloadReference type for use +// with apply. +type TenantOperationWorkloadReferenceApplyConfiguration struct { + WorkloadName *string `json:"workloadName,omitempty"` + ContinueOnFailure *bool `json:"continueOnFailure,omitempty"` +} + +// TenantOperationWorkloadReferenceApplyConfiguration constructs an declarative configuration of the TenantOperationWorkloadReference type for use with +// apply. +func TenantOperationWorkloadReference() *TenantOperationWorkloadReferenceApplyConfiguration { + return &TenantOperationWorkloadReferenceApplyConfiguration{} +} + +// WithWorkloadName sets the WorkloadName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the WorkloadName field is set to the value of the last call. +func (b *TenantOperationWorkloadReferenceApplyConfiguration) WithWorkloadName(value string) *TenantOperationWorkloadReferenceApplyConfiguration { + b.WorkloadName = &value + return b +} + +// WithContinueOnFailure sets the ContinueOnFailure field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ContinueOnFailure field is set to the value of the last call. +func (b *TenantOperationWorkloadReferenceApplyConfiguration) WithContinueOnFailure(value bool) *TenantOperationWorkloadReferenceApplyConfiguration { + b.ContinueOnFailure = &value + return b +} diff --git a/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/workloaddetails.go b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/workloaddetails.go new file mode 100644 index 0000000..18185f4 --- /dev/null +++ b/pkg/client/applyconfiguration/sme.sap.com/v1alpha1/workloaddetails.go @@ -0,0 +1,97 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// WorkloadDetailsApplyConfiguration represents an declarative configuration of the WorkloadDetails type for use +// with apply. +type WorkloadDetailsApplyConfiguration struct { + Name *string `json:"name,omitempty"` + ConsumedBTPServices []string `json:"consumedBTPServices,omitempty"` + Labels map[string]string `json:"labels,omitempty"` + Annotations map[string]string `json:"annotations,omitempty"` + DeploymentDefinition *DeploymentDetailsApplyConfiguration `json:"deploymentDefinition,omitempty"` + JobDefinition *JobDetailsApplyConfiguration `json:"jobDefinition,omitempty"` +} + +// WorkloadDetailsApplyConfiguration constructs an declarative configuration of the WorkloadDetails type for use with +// apply. +func WorkloadDetails() *WorkloadDetailsApplyConfiguration { + return &WorkloadDetailsApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *WorkloadDetailsApplyConfiguration) WithName(value string) *WorkloadDetailsApplyConfiguration { + b.Name = &value + return b +} + +// WithConsumedBTPServices adds the given value to the ConsumedBTPServices field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the ConsumedBTPServices field. +func (b *WorkloadDetailsApplyConfiguration) WithConsumedBTPServices(values ...string) *WorkloadDetailsApplyConfiguration { + for i := range values { + b.ConsumedBTPServices = append(b.ConsumedBTPServices, values[i]) + } + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *WorkloadDetailsApplyConfiguration) WithLabels(entries map[string]string) *WorkloadDetailsApplyConfiguration { + if b.Labels == nil && len(entries) > 0 { + b.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *WorkloadDetailsApplyConfiguration) WithAnnotations(entries map[string]string) *WorkloadDetailsApplyConfiguration { + if b.Annotations == nil && len(entries) > 0 { + b.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.Annotations[k] = v + } + return b +} + +// WithDeploymentDefinition sets the DeploymentDefinition field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeploymentDefinition field is set to the value of the last call. +func (b *WorkloadDetailsApplyConfiguration) WithDeploymentDefinition(value *DeploymentDetailsApplyConfiguration) *WorkloadDetailsApplyConfiguration { + b.DeploymentDefinition = value + return b +} + +// WithJobDefinition sets the JobDefinition field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the JobDefinition field is set to the value of the last call. +func (b *WorkloadDetailsApplyConfiguration) WithJobDefinition(value *JobDetailsApplyConfiguration) *WorkloadDetailsApplyConfiguration { + b.JobDefinition = value + return b +} diff --git a/pkg/client/applyconfiguration/utils.go b/pkg/client/applyconfiguration/utils.go new file mode 100644 index 0000000..b0eb1b9 --- /dev/null +++ b/pkg/client/applyconfiguration/utils.go @@ -0,0 +1,86 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package applyconfiguration + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no +// apply configuration type exists for the given GroupVersionKind. +func ForKind(kind schema.GroupVersionKind) interface{} { + switch kind { + // Group=sme.sap.com, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithKind("ApplicationDomains"): + return &smesapcomv1alpha1.ApplicationDomainsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("BTP"): + return &smesapcomv1alpha1.BTPApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("BTPTenantIdentification"): + return &smesapcomv1alpha1.BTPTenantIdentificationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplication"): + return &smesapcomv1alpha1.CAPApplicationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationSpec"): + return &smesapcomv1alpha1.CAPApplicationSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationStatus"): + return &smesapcomv1alpha1.CAPApplicationStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationVersion"): + return &smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationVersionSpec"): + return &smesapcomv1alpha1.CAPApplicationVersionSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationVersionStatus"): + return &smesapcomv1alpha1.CAPApplicationVersionStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenant"): + return &smesapcomv1alpha1.CAPTenantApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantOperation"): + return &smesapcomv1alpha1.CAPTenantOperationApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantOperationSpec"): + return &smesapcomv1alpha1.CAPTenantOperationSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantOperationStatus"): + return &smesapcomv1alpha1.CAPTenantOperationStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantOperationStep"): + return &smesapcomv1alpha1.CAPTenantOperationStepApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantSpec"): + return &smesapcomv1alpha1.CAPTenantSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("CAPTenantStatus"): + return &smesapcomv1alpha1.CAPTenantStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ContainerDetails"): + return &smesapcomv1alpha1.ContainerDetailsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("DeploymentDetails"): + return &smesapcomv1alpha1.DeploymentDetailsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("GenericStatus"): + return &smesapcomv1alpha1.GenericStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("JobDetails"): + return &smesapcomv1alpha1.JobDetailsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("NameValue"): + return &smesapcomv1alpha1.NameValueApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Ports"): + return &smesapcomv1alpha1.PortsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ServiceInfo"): + return &smesapcomv1alpha1.ServiceInfoApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TenantOperations"): + return &smesapcomv1alpha1.TenantOperationsApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TenantOperationWorkloadReference"): + return &smesapcomv1alpha1.TenantOperationWorkloadReferenceApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("WorkloadDetails"): + return &smesapcomv1alpha1.WorkloadDetailsApplyConfiguration{} + + } + return nil +} diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go new file mode 100644 index 0000000..19ec601 --- /dev/null +++ b/pkg/client/clientset/versioned/clientset.go @@ -0,0 +1,119 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package versioned + +import ( + "fmt" + "net/http" + + smev1alpha1 "github.com/sap/cap-operator/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1" + discovery "k8s.io/client-go/discovery" + rest "k8s.io/client-go/rest" + flowcontrol "k8s.io/client-go/util/flowcontrol" +) + +type Interface interface { + Discovery() discovery.DiscoveryInterface + SmeV1alpha1() smev1alpha1.SmeV1alpha1Interface +} + +// Clientset contains the clients for groups. +type Clientset struct { + *discovery.DiscoveryClient + smeV1alpha1 *smev1alpha1.SmeV1alpha1Client +} + +// SmeV1alpha1 retrieves the SmeV1alpha1Client +func (c *Clientset) SmeV1alpha1() smev1alpha1.SmeV1alpha1Interface { + return c.smeV1alpha1 +} + +// Discovery retrieves the DiscoveryClient +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + if c == nil { + return nil + } + return c.DiscoveryClient +} + +// NewForConfig creates a new Clientset for the given config. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfig will generate a rate-limiter in configShallowCopy. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*Clientset, error) { + configShallowCopy := *c + + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + + // share the transport between all clients + httpClient, err := rest.HTTPClientFor(&configShallowCopy) + if err != nil { + return nil, err + } + + return NewForConfigAndClient(&configShallowCopy, httpClient) +} + +// NewForConfigAndClient creates a new Clientset for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +// If config's RateLimiter is not set and QPS and Burst are acceptable, +// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. +func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { + configShallowCopy := *c + if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { + if configShallowCopy.Burst <= 0 { + return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") + } + configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) + } + + var cs Clientset + var err error + cs.smeV1alpha1, err = smev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + + cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } + return &cs, nil +} + +// NewForConfigOrDie creates a new Clientset for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *Clientset { + cs, err := NewForConfig(c) + if err != nil { + panic(err) + } + return cs +} + +// New creates a new Clientset for the given RESTClient. +func New(c rest.Interface) *Clientset { + var cs Clientset + cs.smeV1alpha1 = smev1alpha1.New(c) + + cs.DiscoveryClient = discovery.NewDiscoveryClient(c) + return &cs +} diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go new file mode 100644 index 0000000..87a36d4 --- /dev/null +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -0,0 +1,84 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + clientset "github.com/sap/cap-operator/pkg/client/clientset/versioned" + smev1alpha1 "github.com/sap/cap-operator/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1" + fakesmev1alpha1 "github.com/sap/cap-operator/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/discovery" + fakediscovery "k8s.io/client-go/discovery/fake" + "k8s.io/client-go/testing" +) + +// NewSimpleClientset returns a clientset that will respond with the provided objects. +// It's backed by a very simple object tracker that processes creates, updates and deletions as-is, +// without applying any validations and/or defaults. It shouldn't be considered a replacement +// for a real clientset and is mostly useful in simple unit tests. +func NewSimpleClientset(objects ...runtime.Object) *Clientset { + o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) + for _, obj := range objects { + if err := o.Add(obj); err != nil { + panic(err) + } + } + + cs := &Clientset{tracker: o} + cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake} + cs.AddReactor("*", "*", testing.ObjectReaction(o)) + cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { + gvr := action.GetResource() + ns := action.GetNamespace() + watch, err := o.Watch(gvr, ns) + if err != nil { + return false, nil, err + } + return true, watch, nil + }) + + return cs +} + +// Clientset implements clientset.Interface. Meant to be embedded into a +// struct to get a default implementation. This makes faking out just the method +// you want to test easier. +type Clientset struct { + testing.Fake + discovery *fakediscovery.FakeDiscovery + tracker testing.ObjectTracker +} + +func (c *Clientset) Discovery() discovery.DiscoveryInterface { + return c.discovery +} + +func (c *Clientset) Tracker() testing.ObjectTracker { + return c.tracker +} + +var ( + _ clientset.Interface = &Clientset{} + _ testing.FakeClient = &Clientset{} +) + +// SmeV1alpha1 retrieves the SmeV1alpha1Client +func (c *Clientset) SmeV1alpha1() smev1alpha1.SmeV1alpha1Interface { + return &fakesmev1alpha1.FakeSmeV1alpha1{Fake: &c.Fake} +} diff --git a/pkg/client/clientset/versioned/fake/doc.go b/pkg/client/clientset/versioned/fake/doc.go new file mode 100644 index 0000000..f3eda38 --- /dev/null +++ b/pkg/client/clientset/versioned/fake/doc.go @@ -0,0 +1,19 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated fake clientset. +package fake diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go new file mode 100644 index 0000000..4f93072 --- /dev/null +++ b/pkg/client/clientset/versioned/fake/register.go @@ -0,0 +1,55 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + smev1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var scheme = runtime.NewScheme() +var codecs = serializer.NewCodecFactory(scheme) + +var localSchemeBuilder = runtime.SchemeBuilder{ + smev1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(scheme)) +} diff --git a/pkg/client/clientset/versioned/scheme/doc.go b/pkg/client/clientset/versioned/scheme/doc.go new file mode 100644 index 0000000..927470e --- /dev/null +++ b/pkg/client/clientset/versioned/scheme/doc.go @@ -0,0 +1,19 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// This package contains the scheme of the automatically generated clientset. +package scheme diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go new file mode 100644 index 0000000..637a3db --- /dev/null +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -0,0 +1,55 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package scheme + +import ( + smev1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + serializer "k8s.io/apimachinery/pkg/runtime/serializer" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +var Scheme = runtime.NewScheme() +var Codecs = serializer.NewCodecFactory(Scheme) +var ParameterCodec = runtime.NewParameterCodec(Scheme) +var localSchemeBuilder = runtime.SchemeBuilder{ + smev1alpha1.AddToScheme, +} + +// AddToScheme adds all types of this clientset into the given scheme. This allows composition +// of clientsets, like in: +// +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) +// +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// +// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types +// correctly. +var AddToScheme = localSchemeBuilder.AddToScheme + +func init() { + v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) + utilruntime.Must(AddToScheme(Scheme)) +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplication.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplication.go new file mode 100644 index 0000000..d5fac8d --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplication.go @@ -0,0 +1,255 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + scheme "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// CAPApplicationsGetter has a method to return a CAPApplicationInterface. +// A group's client should implement this interface. +type CAPApplicationsGetter interface { + CAPApplications(namespace string) CAPApplicationInterface +} + +// CAPApplicationInterface has methods to work with CAPApplication resources. +type CAPApplicationInterface interface { + Create(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.CreateOptions) (*v1alpha1.CAPApplication, error) + Update(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (*v1alpha1.CAPApplication, error) + UpdateStatus(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (*v1alpha1.CAPApplication, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CAPApplication, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CAPApplicationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplication, err error) + Apply(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) + ApplyStatus(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) + CAPApplicationExpansion +} + +// cAPApplications implements CAPApplicationInterface +type cAPApplications struct { + client rest.Interface + ns string +} + +// newCAPApplications returns a CAPApplications +func newCAPApplications(c *SmeV1alpha1Client, namespace string) *cAPApplications { + return &cAPApplications{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cAPApplication, and returns the corresponding cAPApplication object, and an error if there is any. +func (c *cAPApplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPApplication, err error) { + result = &v1alpha1.CAPApplication{} + err = c.client.Get(). + Namespace(c.ns). + Resource("capapplications"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CAPApplications that match those selectors. +func (c *cAPApplications) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPApplicationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.CAPApplicationList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("capapplications"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cAPApplications. +func (c *cAPApplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("capapplications"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cAPApplication and creates it. Returns the server's representation of the cAPApplication, and an error, if there is any. +func (c *cAPApplications) Create(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.CreateOptions) (result *v1alpha1.CAPApplication, err error) { + result = &v1alpha1.CAPApplication{} + err = c.client.Post(). + Namespace(c.ns). + Resource("capapplications"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplication). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cAPApplication and updates it. Returns the server's representation of the cAPApplication, and an error, if there is any. +func (c *cAPApplications) Update(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (result *v1alpha1.CAPApplication, err error) { + result = &v1alpha1.CAPApplication{} + err = c.client.Put(). + Namespace(c.ns). + Resource("capapplications"). + Name(cAPApplication.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplication). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cAPApplications) UpdateStatus(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (result *v1alpha1.CAPApplication, err error) { + result = &v1alpha1.CAPApplication{} + err = c.client.Put(). + Namespace(c.ns). + Resource("capapplications"). + Name(cAPApplication.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplication). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cAPApplication and deletes it. Returns an error if one occurs. +func (c *cAPApplications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("capapplications"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cAPApplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("capapplications"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cAPApplication. +func (c *cAPApplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplication, err error) { + result = &v1alpha1.CAPApplication{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("capapplications"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPApplication. +func (c *cAPApplications) Apply(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) { + if cAPApplication == nil { + return nil, fmt.Errorf("cAPApplication provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPApplication) + if err != nil { + return nil, err + } + name := cAPApplication.Name + if name == nil { + return nil, fmt.Errorf("cAPApplication.Name must be provided to Apply") + } + result = &v1alpha1.CAPApplication{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("capapplications"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *cAPApplications) ApplyStatus(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) { + if cAPApplication == nil { + return nil, fmt.Errorf("cAPApplication provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPApplication) + if err != nil { + return nil, err + } + + name := cAPApplication.Name + if name == nil { + return nil, fmt.Errorf("cAPApplication.Name must be provided to Apply") + } + + result = &v1alpha1.CAPApplication{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("capapplications"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplicationversion.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplicationversion.go new file mode 100644 index 0000000..fbe1ea4 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/capapplicationversion.go @@ -0,0 +1,255 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + scheme "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// CAPApplicationVersionsGetter has a method to return a CAPApplicationVersionInterface. +// A group's client should implement this interface. +type CAPApplicationVersionsGetter interface { + CAPApplicationVersions(namespace string) CAPApplicationVersionInterface +} + +// CAPApplicationVersionInterface has methods to work with CAPApplicationVersion resources. +type CAPApplicationVersionInterface interface { + Create(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.CreateOptions) (*v1alpha1.CAPApplicationVersion, error) + Update(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.CAPApplicationVersion, error) + UpdateStatus(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.CAPApplicationVersion, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CAPApplicationVersion, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CAPApplicationVersionList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplicationVersion, err error) + Apply(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) + ApplyStatus(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) + CAPApplicationVersionExpansion +} + +// cAPApplicationVersions implements CAPApplicationVersionInterface +type cAPApplicationVersions struct { + client rest.Interface + ns string +} + +// newCAPApplicationVersions returns a CAPApplicationVersions +func newCAPApplicationVersions(c *SmeV1alpha1Client, namespace string) *cAPApplicationVersions { + return &cAPApplicationVersions{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cAPApplicationVersion, and returns the corresponding cAPApplicationVersion object, and an error if there is any. +func (c *cAPApplicationVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Get(). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CAPApplicationVersions that match those selectors. +func (c *cAPApplicationVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPApplicationVersionList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.CAPApplicationVersionList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("capapplicationversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cAPApplicationVersions. +func (c *cAPApplicationVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("capapplicationversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cAPApplicationVersion and creates it. Returns the server's representation of the cAPApplicationVersion, and an error, if there is any. +func (c *cAPApplicationVersions) Create(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.CreateOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Post(). + Namespace(c.ns). + Resource("capapplicationversions"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplicationVersion). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cAPApplicationVersion and updates it. Returns the server's representation of the cAPApplicationVersion, and an error, if there is any. +func (c *cAPApplicationVersions) Update(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Put(). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(cAPApplicationVersion.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplicationVersion). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cAPApplicationVersions) UpdateStatus(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Put(). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(cAPApplicationVersion.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPApplicationVersion). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cAPApplicationVersion and deletes it. Returns an error if one occurs. +func (c *cAPApplicationVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cAPApplicationVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("capapplicationversions"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cAPApplicationVersion. +func (c *cAPApplicationVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplicationVersion, err error) { + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPApplicationVersion. +func (c *cAPApplicationVersions) Apply(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + if cAPApplicationVersion == nil { + return nil, fmt.Errorf("cAPApplicationVersion provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPApplicationVersion) + if err != nil { + return nil, err + } + name := cAPApplicationVersion.Name + if name == nil { + return nil, fmt.Errorf("cAPApplicationVersion.Name must be provided to Apply") + } + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *cAPApplicationVersions) ApplyStatus(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + if cAPApplicationVersion == nil { + return nil, fmt.Errorf("cAPApplicationVersion provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPApplicationVersion) + if err != nil { + return nil, err + } + + name := cAPApplicationVersion.Name + if name == nil { + return nil, fmt.Errorf("cAPApplicationVersion.Name must be provided to Apply") + } + + result = &v1alpha1.CAPApplicationVersion{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("capapplicationversions"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenant.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenant.go new file mode 100644 index 0000000..b7503ab --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenant.go @@ -0,0 +1,255 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + scheme "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// CAPTenantsGetter has a method to return a CAPTenantInterface. +// A group's client should implement this interface. +type CAPTenantsGetter interface { + CAPTenants(namespace string) CAPTenantInterface +} + +// CAPTenantInterface has methods to work with CAPTenant resources. +type CAPTenantInterface interface { + Create(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.CreateOptions) (*v1alpha1.CAPTenant, error) + Update(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (*v1alpha1.CAPTenant, error) + UpdateStatus(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (*v1alpha1.CAPTenant, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CAPTenant, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CAPTenantList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenant, err error) + Apply(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) + ApplyStatus(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) + CAPTenantExpansion +} + +// cAPTenants implements CAPTenantInterface +type cAPTenants struct { + client rest.Interface + ns string +} + +// newCAPTenants returns a CAPTenants +func newCAPTenants(c *SmeV1alpha1Client, namespace string) *cAPTenants { + return &cAPTenants{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cAPTenant, and returns the corresponding cAPTenant object, and an error if there is any. +func (c *cAPTenants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPTenant, err error) { + result = &v1alpha1.CAPTenant{} + err = c.client.Get(). + Namespace(c.ns). + Resource("captenants"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CAPTenants that match those selectors. +func (c *cAPTenants) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPTenantList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.CAPTenantList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("captenants"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cAPTenants. +func (c *cAPTenants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("captenants"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cAPTenant and creates it. Returns the server's representation of the cAPTenant, and an error, if there is any. +func (c *cAPTenants) Create(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.CreateOptions) (result *v1alpha1.CAPTenant, err error) { + result = &v1alpha1.CAPTenant{} + err = c.client.Post(). + Namespace(c.ns). + Resource("captenants"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenant). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cAPTenant and updates it. Returns the server's representation of the cAPTenant, and an error, if there is any. +func (c *cAPTenants) Update(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (result *v1alpha1.CAPTenant, err error) { + result = &v1alpha1.CAPTenant{} + err = c.client.Put(). + Namespace(c.ns). + Resource("captenants"). + Name(cAPTenant.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenant). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cAPTenants) UpdateStatus(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (result *v1alpha1.CAPTenant, err error) { + result = &v1alpha1.CAPTenant{} + err = c.client.Put(). + Namespace(c.ns). + Resource("captenants"). + Name(cAPTenant.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenant). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cAPTenant and deletes it. Returns an error if one occurs. +func (c *cAPTenants) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("captenants"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cAPTenants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("captenants"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cAPTenant. +func (c *cAPTenants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenant, err error) { + result = &v1alpha1.CAPTenant{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("captenants"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPTenant. +func (c *cAPTenants) Apply(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) { + if cAPTenant == nil { + return nil, fmt.Errorf("cAPTenant provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPTenant) + if err != nil { + return nil, err + } + name := cAPTenant.Name + if name == nil { + return nil, fmt.Errorf("cAPTenant.Name must be provided to Apply") + } + result = &v1alpha1.CAPTenant{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("captenants"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *cAPTenants) ApplyStatus(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) { + if cAPTenant == nil { + return nil, fmt.Errorf("cAPTenant provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPTenant) + if err != nil { + return nil, err + } + + name := cAPTenant.Name + if name == nil { + return nil, fmt.Errorf("cAPTenant.Name must be provided to Apply") + } + + result = &v1alpha1.CAPTenant{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("captenants"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenantoperation.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenantoperation.go new file mode 100644 index 0000000..fa8ff66 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/captenantoperation.go @@ -0,0 +1,255 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + json "encoding/json" + "fmt" + "time" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + scheme "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + rest "k8s.io/client-go/rest" +) + +// CAPTenantOperationsGetter has a method to return a CAPTenantOperationInterface. +// A group's client should implement this interface. +type CAPTenantOperationsGetter interface { + CAPTenantOperations(namespace string) CAPTenantOperationInterface +} + +// CAPTenantOperationInterface has methods to work with CAPTenantOperation resources. +type CAPTenantOperationInterface interface { + Create(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.CreateOptions) (*v1alpha1.CAPTenantOperation, error) + Update(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (*v1alpha1.CAPTenantOperation, error) + UpdateStatus(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (*v1alpha1.CAPTenantOperation, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CAPTenantOperation, error) + List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CAPTenantOperationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenantOperation, err error) + Apply(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) + ApplyStatus(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) + CAPTenantOperationExpansion +} + +// cAPTenantOperations implements CAPTenantOperationInterface +type cAPTenantOperations struct { + client rest.Interface + ns string +} + +// newCAPTenantOperations returns a CAPTenantOperations +func newCAPTenantOperations(c *SmeV1alpha1Client, namespace string) *cAPTenantOperations { + return &cAPTenantOperations{ + client: c.RESTClient(), + ns: namespace, + } +} + +// Get takes name of the cAPTenantOperation, and returns the corresponding cAPTenantOperation object, and an error if there is any. +func (c *cAPTenantOperations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPTenantOperation, err error) { + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Get(). + Namespace(c.ns). + Resource("captenantoperations"). + Name(name). + VersionedParams(&options, scheme.ParameterCodec). + Do(ctx). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of CAPTenantOperations that match those selectors. +func (c *cAPTenantOperations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPTenantOperationList, err error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + result = &v1alpha1.CAPTenantOperationList{} + err = c.client.Get(). + Namespace(c.ns). + Resource("captenantoperations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Do(ctx). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested cAPTenantOperations. +func (c *cAPTenantOperations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + var timeout time.Duration + if opts.TimeoutSeconds != nil { + timeout = time.Duration(*opts.TimeoutSeconds) * time.Second + } + opts.Watch = true + return c.client.Get(). + Namespace(c.ns). + Resource("captenantoperations"). + VersionedParams(&opts, scheme.ParameterCodec). + Timeout(timeout). + Watch(ctx) +} + +// Create takes the representation of a cAPTenantOperation and creates it. Returns the server's representation of the cAPTenantOperation, and an error, if there is any. +func (c *cAPTenantOperations) Create(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.CreateOptions) (result *v1alpha1.CAPTenantOperation, err error) { + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Post(). + Namespace(c.ns). + Resource("captenantoperations"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenantOperation). + Do(ctx). + Into(result) + return +} + +// Update takes the representation of a cAPTenantOperation and updates it. Returns the server's representation of the cAPTenantOperation, and an error, if there is any. +func (c *cAPTenantOperations) Update(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (result *v1alpha1.CAPTenantOperation, err error) { + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Put(). + Namespace(c.ns). + Resource("captenantoperations"). + Name(cAPTenantOperation.Name). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenantOperation). + Do(ctx). + Into(result) + return +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *cAPTenantOperations) UpdateStatus(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (result *v1alpha1.CAPTenantOperation, err error) { + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Put(). + Namespace(c.ns). + Resource("captenantoperations"). + Name(cAPTenantOperation.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(cAPTenantOperation). + Do(ctx). + Into(result) + return +} + +// Delete takes name of the cAPTenantOperation and deletes it. Returns an error if one occurs. +func (c *cAPTenantOperations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + return c.client.Delete(). + Namespace(c.ns). + Resource("captenantoperations"). + Name(name). + Body(&opts). + Do(ctx). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *cAPTenantOperations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + var timeout time.Duration + if listOpts.TimeoutSeconds != nil { + timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second + } + return c.client.Delete(). + Namespace(c.ns). + Resource("captenantoperations"). + VersionedParams(&listOpts, scheme.ParameterCodec). + Timeout(timeout). + Body(&opts). + Do(ctx). + Error() +} + +// Patch applies the patch and returns the patched cAPTenantOperation. +func (c *cAPTenantOperations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenantOperation, err error) { + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Patch(pt). + Namespace(c.ns). + Resource("captenantoperations"). + Name(name). + SubResource(subresources...). + VersionedParams(&opts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPTenantOperation. +func (c *cAPTenantOperations) Apply(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) { + if cAPTenantOperation == nil { + return nil, fmt.Errorf("cAPTenantOperation provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPTenantOperation) + if err != nil { + return nil, err + } + name := cAPTenantOperation.Name + if name == nil { + return nil, fmt.Errorf("cAPTenantOperation.Name must be provided to Apply") + } + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("captenantoperations"). + Name(*name). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *cAPTenantOperations) ApplyStatus(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) { + if cAPTenantOperation == nil { + return nil, fmt.Errorf("cAPTenantOperation provided to Apply must not be nil") + } + patchOpts := opts.ToPatchOptions() + data, err := json.Marshal(cAPTenantOperation) + if err != nil { + return nil, err + } + + name := cAPTenantOperation.Name + if name == nil { + return nil, fmt.Errorf("cAPTenantOperation.Name must be provided to Apply") + } + + result = &v1alpha1.CAPTenantOperation{} + err = c.client.Patch(types.ApplyPatchType). + Namespace(c.ns). + Resource("captenantoperations"). + Name(*name). + SubResource("status"). + VersionedParams(&patchOpts, scheme.ParameterCodec). + Body(data). + Do(ctx). + Into(result) + return +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/doc.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/doc.go new file mode 100644 index 0000000..c999da0 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/doc.go @@ -0,0 +1,19 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/doc.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/doc.go new file mode 100644 index 0000000..4645661 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/doc.go @@ -0,0 +1,19 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplication.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplication.go new file mode 100644 index 0000000..6e3bc5c --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplication.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCAPApplications implements CAPApplicationInterface +type FakeCAPApplications struct { + Fake *FakeSmeV1alpha1 + ns string +} + +var capapplicationsResource = v1alpha1.SchemeGroupVersion.WithResource("capapplications") + +var capapplicationsKind = v1alpha1.SchemeGroupVersion.WithKind("CAPApplication") + +// Get takes name of the cAPApplication, and returns the corresponding cAPApplication object, and an error if there is any. +func (c *FakeCAPApplications) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPApplication, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(capapplicationsResource, c.ns, name), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// List takes label and field selectors, and returns the list of CAPApplications that match those selectors. +func (c *FakeCAPApplications) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPApplicationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(capapplicationsResource, capapplicationsKind, c.ns, opts), &v1alpha1.CAPApplicationList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CAPApplicationList{ListMeta: obj.(*v1alpha1.CAPApplicationList).ListMeta} + for _, item := range obj.(*v1alpha1.CAPApplicationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cAPApplications. +func (c *FakeCAPApplications) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(capapplicationsResource, c.ns, opts)) + +} + +// Create takes the representation of a cAPApplication and creates it. Returns the server's representation of the cAPApplication, and an error, if there is any. +func (c *FakeCAPApplications) Create(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.CreateOptions) (result *v1alpha1.CAPApplication, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(capapplicationsResource, c.ns, cAPApplication), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// Update takes the representation of a cAPApplication and updates it. Returns the server's representation of the cAPApplication, and an error, if there is any. +func (c *FakeCAPApplications) Update(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (result *v1alpha1.CAPApplication, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(capapplicationsResource, c.ns, cAPApplication), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCAPApplications) UpdateStatus(ctx context.Context, cAPApplication *v1alpha1.CAPApplication, opts v1.UpdateOptions) (*v1alpha1.CAPApplication, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(capapplicationsResource, "status", c.ns, cAPApplication), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// Delete takes name of the cAPApplication and deletes it. Returns an error if one occurs. +func (c *FakeCAPApplications) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(capapplicationsResource, c.ns, name, opts), &v1alpha1.CAPApplication{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCAPApplications) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(capapplicationsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CAPApplicationList{}) + return err +} + +// Patch applies the patch and returns the patched cAPApplication. +func (c *FakeCAPApplications) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplication, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPApplication. +func (c *FakeCAPApplications) Apply(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) { + if cAPApplication == nil { + return nil, fmt.Errorf("cAPApplication provided to Apply must not be nil") + } + data, err := json.Marshal(cAPApplication) + if err != nil { + return nil, err + } + name := cAPApplication.Name + if name == nil { + return nil, fmt.Errorf("cAPApplication.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCAPApplications) ApplyStatus(ctx context.Context, cAPApplication *smesapcomv1alpha1.CAPApplicationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplication, err error) { + if cAPApplication == nil { + return nil, fmt.Errorf("cAPApplication provided to Apply must not be nil") + } + data, err := json.Marshal(cAPApplication) + if err != nil { + return nil, err + } + name := cAPApplication.Name + if name == nil { + return nil, fmt.Errorf("cAPApplication.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.CAPApplication{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplication), err +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplicationversion.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplicationversion.go new file mode 100644 index 0000000..6a1609e --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_capapplicationversion.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCAPApplicationVersions implements CAPApplicationVersionInterface +type FakeCAPApplicationVersions struct { + Fake *FakeSmeV1alpha1 + ns string +} + +var capapplicationversionsResource = v1alpha1.SchemeGroupVersion.WithResource("capapplicationversions") + +var capapplicationversionsKind = v1alpha1.SchemeGroupVersion.WithKind("CAPApplicationVersion") + +// Get takes name of the cAPApplicationVersion, and returns the corresponding cAPApplicationVersion object, and an error if there is any. +func (c *FakeCAPApplicationVersions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(capapplicationversionsResource, c.ns, name), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// List takes label and field selectors, and returns the list of CAPApplicationVersions that match those selectors. +func (c *FakeCAPApplicationVersions) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPApplicationVersionList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(capapplicationversionsResource, capapplicationversionsKind, c.ns, opts), &v1alpha1.CAPApplicationVersionList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CAPApplicationVersionList{ListMeta: obj.(*v1alpha1.CAPApplicationVersionList).ListMeta} + for _, item := range obj.(*v1alpha1.CAPApplicationVersionList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cAPApplicationVersions. +func (c *FakeCAPApplicationVersions) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(capapplicationversionsResource, c.ns, opts)) + +} + +// Create takes the representation of a cAPApplicationVersion and creates it. Returns the server's representation of the cAPApplicationVersion, and an error, if there is any. +func (c *FakeCAPApplicationVersions) Create(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.CreateOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(capapplicationversionsResource, c.ns, cAPApplicationVersion), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// Update takes the representation of a cAPApplicationVersion and updates it. Returns the server's representation of the cAPApplicationVersion, and an error, if there is any. +func (c *FakeCAPApplicationVersions) Update(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(capapplicationversionsResource, c.ns, cAPApplicationVersion), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCAPApplicationVersions) UpdateStatus(ctx context.Context, cAPApplicationVersion *v1alpha1.CAPApplicationVersion, opts v1.UpdateOptions) (*v1alpha1.CAPApplicationVersion, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(capapplicationversionsResource, "status", c.ns, cAPApplicationVersion), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// Delete takes name of the cAPApplicationVersion and deletes it. Returns an error if one occurs. +func (c *FakeCAPApplicationVersions) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(capapplicationversionsResource, c.ns, name, opts), &v1alpha1.CAPApplicationVersion{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCAPApplicationVersions) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(capapplicationversionsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CAPApplicationVersionList{}) + return err +} + +// Patch applies the patch and returns the patched cAPApplicationVersion. +func (c *FakeCAPApplicationVersions) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPApplicationVersion, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationversionsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPApplicationVersion. +func (c *FakeCAPApplicationVersions) Apply(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + if cAPApplicationVersion == nil { + return nil, fmt.Errorf("cAPApplicationVersion provided to Apply must not be nil") + } + data, err := json.Marshal(cAPApplicationVersion) + if err != nil { + return nil, err + } + name := cAPApplicationVersion.Name + if name == nil { + return nil, fmt.Errorf("cAPApplicationVersion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationversionsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCAPApplicationVersions) ApplyStatus(ctx context.Context, cAPApplicationVersion *smesapcomv1alpha1.CAPApplicationVersionApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPApplicationVersion, err error) { + if cAPApplicationVersion == nil { + return nil, fmt.Errorf("cAPApplicationVersion provided to Apply must not be nil") + } + data, err := json.Marshal(cAPApplicationVersion) + if err != nil { + return nil, err + } + name := cAPApplicationVersion.Name + if name == nil { + return nil, fmt.Errorf("cAPApplicationVersion.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(capapplicationversionsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.CAPApplicationVersion{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPApplicationVersion), err +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenant.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenant.go new file mode 100644 index 0000000..b95f4fa --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenant.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCAPTenants implements CAPTenantInterface +type FakeCAPTenants struct { + Fake *FakeSmeV1alpha1 + ns string +} + +var captenantsResource = v1alpha1.SchemeGroupVersion.WithResource("captenants") + +var captenantsKind = v1alpha1.SchemeGroupVersion.WithKind("CAPTenant") + +// Get takes name of the cAPTenant, and returns the corresponding cAPTenant object, and an error if there is any. +func (c *FakeCAPTenants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPTenant, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(captenantsResource, c.ns, name), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// List takes label and field selectors, and returns the list of CAPTenants that match those selectors. +func (c *FakeCAPTenants) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPTenantList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(captenantsResource, captenantsKind, c.ns, opts), &v1alpha1.CAPTenantList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CAPTenantList{ListMeta: obj.(*v1alpha1.CAPTenantList).ListMeta} + for _, item := range obj.(*v1alpha1.CAPTenantList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cAPTenants. +func (c *FakeCAPTenants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(captenantsResource, c.ns, opts)) + +} + +// Create takes the representation of a cAPTenant and creates it. Returns the server's representation of the cAPTenant, and an error, if there is any. +func (c *FakeCAPTenants) Create(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.CreateOptions) (result *v1alpha1.CAPTenant, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(captenantsResource, c.ns, cAPTenant), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// Update takes the representation of a cAPTenant and updates it. Returns the server's representation of the cAPTenant, and an error, if there is any. +func (c *FakeCAPTenants) Update(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (result *v1alpha1.CAPTenant, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(captenantsResource, c.ns, cAPTenant), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCAPTenants) UpdateStatus(ctx context.Context, cAPTenant *v1alpha1.CAPTenant, opts v1.UpdateOptions) (*v1alpha1.CAPTenant, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(captenantsResource, "status", c.ns, cAPTenant), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// Delete takes name of the cAPTenant and deletes it. Returns an error if one occurs. +func (c *FakeCAPTenants) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(captenantsResource, c.ns, name, opts), &v1alpha1.CAPTenant{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCAPTenants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(captenantsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CAPTenantList{}) + return err +} + +// Patch applies the patch and returns the patched cAPTenant. +func (c *FakeCAPTenants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenant, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPTenant. +func (c *FakeCAPTenants) Apply(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) { + if cAPTenant == nil { + return nil, fmt.Errorf("cAPTenant provided to Apply must not be nil") + } + data, err := json.Marshal(cAPTenant) + if err != nil { + return nil, err + } + name := cAPTenant.Name + if name == nil { + return nil, fmt.Errorf("cAPTenant.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCAPTenants) ApplyStatus(ctx context.Context, cAPTenant *smesapcomv1alpha1.CAPTenantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenant, err error) { + if cAPTenant == nil { + return nil, fmt.Errorf("cAPTenant provided to Apply must not be nil") + } + data, err := json.Marshal(cAPTenant) + if err != nil { + return nil, err + } + name := cAPTenant.Name + if name == nil { + return nil, fmt.Errorf("cAPTenant.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.CAPTenant{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenant), err +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenantoperation.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenantoperation.go new file mode 100644 index 0000000..26f2c8e --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_captenantoperation.go @@ -0,0 +1,188 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + "context" + json "encoding/json" + "fmt" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/client/applyconfiguration/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + testing "k8s.io/client-go/testing" +) + +// FakeCAPTenantOperations implements CAPTenantOperationInterface +type FakeCAPTenantOperations struct { + Fake *FakeSmeV1alpha1 + ns string +} + +var captenantoperationsResource = v1alpha1.SchemeGroupVersion.WithResource("captenantoperations") + +var captenantoperationsKind = v1alpha1.SchemeGroupVersion.WithKind("CAPTenantOperation") + +// Get takes name of the cAPTenantOperation, and returns the corresponding cAPTenantOperation object, and an error if there is any. +func (c *FakeCAPTenantOperations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CAPTenantOperation, err error) { + obj, err := c.Fake. + Invokes(testing.NewGetAction(captenantoperationsResource, c.ns, name), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// List takes label and field selectors, and returns the list of CAPTenantOperations that match those selectors. +func (c *FakeCAPTenantOperations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CAPTenantOperationList, err error) { + obj, err := c.Fake. + Invokes(testing.NewListAction(captenantoperationsResource, captenantoperationsKind, c.ns, opts), &v1alpha1.CAPTenantOperationList{}) + + if obj == nil { + return nil, err + } + + label, _, _ := testing.ExtractFromListOptions(opts) + if label == nil { + label = labels.Everything() + } + list := &v1alpha1.CAPTenantOperationList{ListMeta: obj.(*v1alpha1.CAPTenantOperationList).ListMeta} + for _, item := range obj.(*v1alpha1.CAPTenantOperationList).Items { + if label.Matches(labels.Set(item.Labels)) { + list.Items = append(list.Items, item) + } + } + return list, err +} + +// Watch returns a watch.Interface that watches the requested cAPTenantOperations. +func (c *FakeCAPTenantOperations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(testing.NewWatchAction(captenantoperationsResource, c.ns, opts)) + +} + +// Create takes the representation of a cAPTenantOperation and creates it. Returns the server's representation of the cAPTenantOperation, and an error, if there is any. +func (c *FakeCAPTenantOperations) Create(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.CreateOptions) (result *v1alpha1.CAPTenantOperation, err error) { + obj, err := c.Fake. + Invokes(testing.NewCreateAction(captenantoperationsResource, c.ns, cAPTenantOperation), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// Update takes the representation of a cAPTenantOperation and updates it. Returns the server's representation of the cAPTenantOperation, and an error, if there is any. +func (c *FakeCAPTenantOperations) Update(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (result *v1alpha1.CAPTenantOperation, err error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateAction(captenantoperationsResource, c.ns, cAPTenantOperation), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCAPTenantOperations) UpdateStatus(ctx context.Context, cAPTenantOperation *v1alpha1.CAPTenantOperation, opts v1.UpdateOptions) (*v1alpha1.CAPTenantOperation, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(captenantoperationsResource, "status", c.ns, cAPTenantOperation), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// Delete takes name of the cAPTenantOperation and deletes it. Returns an error if one occurs. +func (c *FakeCAPTenantOperations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { + _, err := c.Fake. + Invokes(testing.NewDeleteActionWithOptions(captenantoperationsResource, c.ns, name, opts), &v1alpha1.CAPTenantOperation{}) + + return err +} + +// DeleteCollection deletes a collection of objects. +func (c *FakeCAPTenantOperations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { + action := testing.NewDeleteCollectionAction(captenantoperationsResource, c.ns, listOpts) + + _, err := c.Fake.Invokes(action, &v1alpha1.CAPTenantOperationList{}) + return err +} + +// Patch applies the patch and returns the patched cAPTenantOperation. +func (c *FakeCAPTenantOperations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CAPTenantOperation, err error) { + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantoperationsResource, c.ns, name, pt, data, subresources...), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// Apply takes the given apply declarative configuration, applies it and returns the applied cAPTenantOperation. +func (c *FakeCAPTenantOperations) Apply(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) { + if cAPTenantOperation == nil { + return nil, fmt.Errorf("cAPTenantOperation provided to Apply must not be nil") + } + data, err := json.Marshal(cAPTenantOperation) + if err != nil { + return nil, err + } + name := cAPTenantOperation.Name + if name == nil { + return nil, fmt.Errorf("cAPTenantOperation.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantoperationsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} + +// ApplyStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). +func (c *FakeCAPTenantOperations) ApplyStatus(ctx context.Context, cAPTenantOperation *smesapcomv1alpha1.CAPTenantOperationApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha1.CAPTenantOperation, err error) { + if cAPTenantOperation == nil { + return nil, fmt.Errorf("cAPTenantOperation provided to Apply must not be nil") + } + data, err := json.Marshal(cAPTenantOperation) + if err != nil { + return nil, err + } + name := cAPTenantOperation.Name + if name == nil { + return nil, fmt.Errorf("cAPTenantOperation.Name must be provided to Apply") + } + obj, err := c.Fake. + Invokes(testing.NewPatchSubresourceAction(captenantoperationsResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha1.CAPTenantOperation{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CAPTenantOperation), err +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_sme.sap.com_client.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_sme.sap.com_client.go new file mode 100644 index 0000000..d700557 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/fake_sme.sap.com_client.go @@ -0,0 +1,51 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeSmeV1alpha1 struct { + *testing.Fake +} + +func (c *FakeSmeV1alpha1) CAPApplications(namespace string) v1alpha1.CAPApplicationInterface { + return &FakeCAPApplications{c, namespace} +} + +func (c *FakeSmeV1alpha1) CAPApplicationVersions(namespace string) v1alpha1.CAPApplicationVersionInterface { + return &FakeCAPApplicationVersions{c, namespace} +} + +func (c *FakeSmeV1alpha1) CAPTenants(namespace string) v1alpha1.CAPTenantInterface { + return &FakeCAPTenants{c, namespace} +} + +func (c *FakeSmeV1alpha1) CAPTenantOperations(namespace string) v1alpha1.CAPTenantOperationInterface { + return &FakeCAPTenantOperations{c, namespace} +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeSmeV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/generated_expansion.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/generated_expansion.go new file mode 100644 index 0000000..a277d6f --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/generated_expansion.go @@ -0,0 +1,26 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +type CAPApplicationExpansion interface{} + +type CAPApplicationVersionExpansion interface{} + +type CAPTenantExpansion interface{} + +type CAPTenantOperationExpansion interface{} diff --git a/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/sme.sap.com_client.go b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/sme.sap.com_client.go new file mode 100644 index 0000000..faea613 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/sme.sap.com_client.go @@ -0,0 +1,121 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "net/http" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "github.com/sap/cap-operator/pkg/client/clientset/versioned/scheme" + rest "k8s.io/client-go/rest" +) + +type SmeV1alpha1Interface interface { + RESTClient() rest.Interface + CAPApplicationsGetter + CAPApplicationVersionsGetter + CAPTenantsGetter + CAPTenantOperationsGetter +} + +// SmeV1alpha1Client is used to interact with features provided by the sme.sap.com group. +type SmeV1alpha1Client struct { + restClient rest.Interface +} + +func (c *SmeV1alpha1Client) CAPApplications(namespace string) CAPApplicationInterface { + return newCAPApplications(c, namespace) +} + +func (c *SmeV1alpha1Client) CAPApplicationVersions(namespace string) CAPApplicationVersionInterface { + return newCAPApplicationVersions(c, namespace) +} + +func (c *SmeV1alpha1Client) CAPTenants(namespace string) CAPTenantInterface { + return newCAPTenants(c, namespace) +} + +func (c *SmeV1alpha1Client) CAPTenantOperations(namespace string) CAPTenantOperationInterface { + return newCAPTenantOperations(c, namespace) +} + +// NewForConfig creates a new SmeV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*SmeV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new SmeV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SmeV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &SmeV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new SmeV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *SmeV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new SmeV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *SmeV1alpha1Client { + return &SmeV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := v1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *SmeV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go new file mode 100644 index 0000000..527bbe4 --- /dev/null +++ b/pkg/client/informers/externalversions/factory.go @@ -0,0 +1,250 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + reflect "reflect" + sync "sync" + time "time" + + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + smesapcom "github.com/sap/cap-operator/pkg/client/informers/externalversions/sme.sap.com" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// SharedInformerOption defines the functional option type for SharedInformerFactory. +type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory + +type sharedInformerFactory struct { + client versioned.Interface + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc + lock sync.Mutex + defaultResync time.Duration + customResync map[reflect.Type]time.Duration + + informers map[reflect.Type]cache.SharedIndexInformer + // startedInformers is used for tracking which informers have been started. + // This allows Start() to be called multiple times safely. + startedInformers map[reflect.Type]bool + // wg tracks how many goroutines were started. + wg sync.WaitGroup + // shuttingDown is true when Shutdown has been called. It may still be running + // because it needs to wait for goroutines. + shuttingDown bool +} + +// WithCustomResyncConfig sets a custom resync period for the specified informer types. +func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + for k, v := range resyncConfig { + factory.customResync[reflect.TypeOf(k)] = v + } + return factory + } +} + +// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. +func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.tweakListOptions = tweakListOptions + return factory + } +} + +// WithNamespace limits the SharedInformerFactory to the specified namespace. +func WithNamespace(namespace string) SharedInformerOption { + return func(factory *sharedInformerFactory) *sharedInformerFactory { + factory.namespace = namespace + return factory + } +} + +// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. +func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync) +} + +// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. +// Listers obtained via this SharedInformerFactory will be subject to the same filters +// as specified here. +// Deprecated: Please use NewSharedInformerFactoryWithOptions instead +func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { + return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) +} + +// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. +func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { + factory := &sharedInformerFactory{ + client: client, + namespace: v1.NamespaceAll, + defaultResync: defaultResync, + informers: make(map[reflect.Type]cache.SharedIndexInformer), + startedInformers: make(map[reflect.Type]bool), + customResync: make(map[reflect.Type]time.Duration), + } + + // Apply all options + for _, opt := range options { + factory = opt(factory) + } + + return factory +} + +func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.shuttingDown { + return + } + + for informerType, informer := range f.informers { + if !f.startedInformers[informerType] { + f.wg.Add(1) + // We need a new variable in each loop iteration, + // otherwise the goroutine would use the loop variable + // and that keeps changing. + informer := informer + go func() { + defer f.wg.Done() + informer.Run(stopCh) + }() + f.startedInformers[informerType] = true + } + } +} + +func (f *sharedInformerFactory) Shutdown() { + f.lock.Lock() + f.shuttingDown = true + f.lock.Unlock() + + // Will return immediately if there is nothing to wait for. + f.wg.Wait() +} + +func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { + informers := func() map[reflect.Type]cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informers := map[reflect.Type]cache.SharedIndexInformer{} + for informerType, informer := range f.informers { + if f.startedInformers[informerType] { + informers[informerType] = informer + } + } + return informers + }() + + res := map[reflect.Type]bool{} + for informType, informer := range informers { + res[informType] = cache.WaitForCacheSync(stopCh, informer.HasSynced) + } + return res +} + +// InformerFor returns the SharedIndexInformer for obj using an internal +// client. +func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { + f.lock.Lock() + defer f.lock.Unlock() + + informerType := reflect.TypeOf(obj) + informer, exists := f.informers[informerType] + if exists { + return informer + } + + resyncPeriod, exists := f.customResync[informerType] + if !exists { + resyncPeriod = f.defaultResync + } + + informer = newFunc(f.client, resyncPeriod) + f.informers[informerType] = informer + + return informer +} + +// SharedInformerFactory provides shared informers for resources in all known +// API group versions. +// +// It is typically used like this: +// +// ctx, cancel := context.Background() +// defer cancel() +// factory := NewSharedInformerFactory(client, resyncPeriod) +// defer factory.WaitForStop() // Returns immediately if nothing was started. +// genericInformer := factory.ForResource(resource) +// typedInformer := factory.SomeAPIGroup().V1().SomeType() +// factory.Start(ctx.Done()) // Start processing these informers. +// synced := factory.WaitForCacheSync(ctx.Done()) +// for v, ok := range synced { +// if !ok { +// fmt.Fprintf(os.Stderr, "caches failed to sync: %v", v) +// return +// } +// } +// +// // Creating informers can also be created after Start, but then +// // Start must be called again: +// anotherGenericInformer := factory.ForResource(resource) +// factory.Start(ctx.Done()) +type SharedInformerFactory interface { + internalinterfaces.SharedInformerFactory + + // Start initializes all requested informers. They are handled in goroutines + // which run until the stop channel gets closed. + Start(stopCh <-chan struct{}) + + // Shutdown marks a factory as shutting down. At that point no new + // informers can be started anymore and Start will return without + // doing anything. + // + // In addition, Shutdown blocks until all goroutines have terminated. For that + // to happen, the close channel(s) that they were started with must be closed, + // either before Shutdown gets called or while it is waiting. + // + // Shutdown may be called multiple times, even concurrently. All such calls will + // block until all goroutines have terminated. + Shutdown() + + // WaitForCacheSync blocks until all started informers' caches were synced + // or the stop channel gets closed. + WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool + + // ForResource gives generic access to a shared informer of the matching type. + ForResource(resource schema.GroupVersionResource) (GenericInformer, error) + + // InformerFor returns the SharedIndexInformer for obj using an internal + // client. + InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer + + Sme() smesapcom.Interface +} + +func (f *sharedInformerFactory) Sme() smesapcom.Interface { + return smesapcom.New(f, f.namespace, f.tweakListOptions) +} diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go new file mode 100644 index 0000000..98d39a5 --- /dev/null +++ b/pkg/client/informers/externalversions/generic.go @@ -0,0 +1,67 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package externalversions + +import ( + "fmt" + + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + schema "k8s.io/apimachinery/pkg/runtime/schema" + cache "k8s.io/client-go/tools/cache" +) + +// GenericInformer is type of SharedIndexInformer which will locate and delegate to other +// sharedInformers based on type +type GenericInformer interface { + Informer() cache.SharedIndexInformer + Lister() cache.GenericLister +} + +type genericInformer struct { + informer cache.SharedIndexInformer + resource schema.GroupResource +} + +// Informer returns the SharedIndexInformer. +func (f *genericInformer) Informer() cache.SharedIndexInformer { + return f.informer +} + +// Lister returns the GenericLister. +func (f *genericInformer) Lister() cache.GenericLister { + return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) +} + +// ForResource gives generic access to a shared informer of the matching type +// TODO extend this to unknown resources with a client pool +func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { + switch resource { + // Group=sme.sap.com, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("capapplications"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sme().V1alpha1().CAPApplications().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("capapplicationversions"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sme().V1alpha1().CAPApplicationVersions().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("captenants"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sme().V1alpha1().CAPTenants().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("captenantoperations"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Sme().V1alpha1().CAPTenantOperations().Informer()}, nil + + } + + return nil, fmt.Errorf("no informer found for %v", resource) +} diff --git a/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go new file mode 100644 index 0000000..643bd40 --- /dev/null +++ b/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go @@ -0,0 +1,39 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package internalinterfaces + +import ( + time "time" + + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + cache "k8s.io/client-go/tools/cache" +) + +// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. +type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer + +// SharedInformerFactory a small interface to allow for adding an informer without an import cycle +type SharedInformerFactory interface { + Start(stopCh <-chan struct{}) + InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer +} + +// TweakListOptionsFunc is a function that transforms a v1.ListOptions. +type TweakListOptionsFunc func(*v1.ListOptions) diff --git a/pkg/client/informers/externalversions/sme.sap.com/interface.go b/pkg/client/informers/externalversions/sme.sap.com/interface.go new file mode 100644 index 0000000..dd220d8 --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/interface.go @@ -0,0 +1,45 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package sme + +import ( + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/sap/cap-operator/pkg/client/informers/externalversions/sme.sap.com/v1alpha1" +) + +// Interface provides access to each of this group's versions. +type Interface interface { + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface +} + +type group struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} diff --git a/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplication.go b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplication.go new file mode 100644 index 0000000..aaa00e7 --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplication.go @@ -0,0 +1,89 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/sap/cap-operator/pkg/client/listers/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// CAPApplicationInformer provides access to a shared informer and lister for +// CAPApplications. +type CAPApplicationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.CAPApplicationLister +} + +type cAPApplicationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCAPApplicationInformer constructs a new informer for CAPApplication type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCAPApplicationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCAPApplicationInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCAPApplicationInformer constructs a new informer for CAPApplication type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCAPApplicationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPApplications(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPApplications(namespace).Watch(context.TODO(), options) + }, + }, + &smesapcomv1alpha1.CAPApplication{}, + resyncPeriod, + indexers, + ) +} + +func (f *cAPApplicationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCAPApplicationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cAPApplicationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&smesapcomv1alpha1.CAPApplication{}, f.defaultInformer) +} + +func (f *cAPApplicationInformer) Lister() v1alpha1.CAPApplicationLister { + return v1alpha1.NewCAPApplicationLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplicationversion.go b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplicationversion.go new file mode 100644 index 0000000..d1b528a --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/capapplicationversion.go @@ -0,0 +1,89 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/sap/cap-operator/pkg/client/listers/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// CAPApplicationVersionInformer provides access to a shared informer and lister for +// CAPApplicationVersions. +type CAPApplicationVersionInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.CAPApplicationVersionLister +} + +type cAPApplicationVersionInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCAPApplicationVersionInformer constructs a new informer for CAPApplicationVersion type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCAPApplicationVersionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCAPApplicationVersionInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCAPApplicationVersionInformer constructs a new informer for CAPApplicationVersion type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCAPApplicationVersionInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPApplicationVersions(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPApplicationVersions(namespace).Watch(context.TODO(), options) + }, + }, + &smesapcomv1alpha1.CAPApplicationVersion{}, + resyncPeriod, + indexers, + ) +} + +func (f *cAPApplicationVersionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCAPApplicationVersionInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cAPApplicationVersionInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&smesapcomv1alpha1.CAPApplicationVersion{}, f.defaultInformer) +} + +func (f *cAPApplicationVersionInformer) Lister() v1alpha1.CAPApplicationVersionLister { + return v1alpha1.NewCAPApplicationVersionLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenant.go b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenant.go new file mode 100644 index 0000000..f7c381d --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenant.go @@ -0,0 +1,89 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/sap/cap-operator/pkg/client/listers/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// CAPTenantInformer provides access to a shared informer and lister for +// CAPTenants. +type CAPTenantInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.CAPTenantLister +} + +type cAPTenantInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCAPTenantInformer constructs a new informer for CAPTenant type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCAPTenantInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCAPTenantInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCAPTenantInformer constructs a new informer for CAPTenant type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCAPTenantInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPTenants(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPTenants(namespace).Watch(context.TODO(), options) + }, + }, + &smesapcomv1alpha1.CAPTenant{}, + resyncPeriod, + indexers, + ) +} + +func (f *cAPTenantInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCAPTenantInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cAPTenantInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&smesapcomv1alpha1.CAPTenant{}, f.defaultInformer) +} + +func (f *cAPTenantInformer) Lister() v1alpha1.CAPTenantLister { + return v1alpha1.NewCAPTenantLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenantoperation.go b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenantoperation.go new file mode 100644 index 0000000..5a030f8 --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/captenantoperation.go @@ -0,0 +1,89 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + time "time" + + smesapcomv1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" + v1alpha1 "github.com/sap/cap-operator/pkg/client/listers/sme.sap.com/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// CAPTenantOperationInformer provides access to a shared informer and lister for +// CAPTenantOperations. +type CAPTenantOperationInformer interface { + Informer() cache.SharedIndexInformer + Lister() v1alpha1.CAPTenantOperationLister +} + +type cAPTenantOperationInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewCAPTenantOperationInformer constructs a new informer for CAPTenantOperation type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewCAPTenantOperationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredCAPTenantOperationInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredCAPTenantOperationInformer constructs a new informer for CAPTenantOperation type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredCAPTenantOperationInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPTenantOperations(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.SmeV1alpha1().CAPTenantOperations(namespace).Watch(context.TODO(), options) + }, + }, + &smesapcomv1alpha1.CAPTenantOperation{}, + resyncPeriod, + indexers, + ) +} + +func (f *cAPTenantOperationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredCAPTenantOperationInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *cAPTenantOperationInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&smesapcomv1alpha1.CAPTenantOperation{}, f.defaultInformer) +} + +func (f *cAPTenantOperationInformer) Lister() v1alpha1.CAPTenantOperationLister { + return v1alpha1.NewCAPTenantOperationLister(f.Informer().GetIndexer()) +} diff --git a/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/interface.go b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/interface.go new file mode 100644 index 0000000..a2368a0 --- /dev/null +++ b/pkg/client/informers/externalversions/sme.sap.com/v1alpha1/interface.go @@ -0,0 +1,65 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // CAPApplications returns a CAPApplicationInformer. + CAPApplications() CAPApplicationInformer + // CAPApplicationVersions returns a CAPApplicationVersionInformer. + CAPApplicationVersions() CAPApplicationVersionInformer + // CAPTenants returns a CAPTenantInformer. + CAPTenants() CAPTenantInformer + // CAPTenantOperations returns a CAPTenantOperationInformer. + CAPTenantOperations() CAPTenantOperationInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// CAPApplications returns a CAPApplicationInformer. +func (v *version) CAPApplications() CAPApplicationInformer { + return &cAPApplicationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// CAPApplicationVersions returns a CAPApplicationVersionInformer. +func (v *version) CAPApplicationVersions() CAPApplicationVersionInformer { + return &cAPApplicationVersionInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// CAPTenants returns a CAPTenantInformer. +func (v *version) CAPTenants() CAPTenantInformer { + return &cAPTenantInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} + +// CAPTenantOperations returns a CAPTenantOperationInformer. +func (v *version) CAPTenantOperations() CAPTenantOperationInformer { + return &cAPTenantOperationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/pkg/client/listers/sme.sap.com/v1alpha1/capapplication.go b/pkg/client/listers/sme.sap.com/v1alpha1/capapplication.go new file mode 100644 index 0000000..ddec643 --- /dev/null +++ b/pkg/client/listers/sme.sap.com/v1alpha1/capapplication.go @@ -0,0 +1,98 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CAPApplicationLister helps list CAPApplications. +// All objects returned here must be treated as read-only. +type CAPApplicationLister interface { + // List lists all CAPApplications in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPApplication, err error) + // CAPApplications returns an object that can list and get CAPApplications. + CAPApplications(namespace string) CAPApplicationNamespaceLister + CAPApplicationListerExpansion +} + +// cAPApplicationLister implements the CAPApplicationLister interface. +type cAPApplicationLister struct { + indexer cache.Indexer +} + +// NewCAPApplicationLister returns a new CAPApplicationLister. +func NewCAPApplicationLister(indexer cache.Indexer) CAPApplicationLister { + return &cAPApplicationLister{indexer: indexer} +} + +// List lists all CAPApplications in the indexer. +func (s *cAPApplicationLister) List(selector labels.Selector) (ret []*v1alpha1.CAPApplication, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPApplication)) + }) + return ret, err +} + +// CAPApplications returns an object that can list and get CAPApplications. +func (s *cAPApplicationLister) CAPApplications(namespace string) CAPApplicationNamespaceLister { + return cAPApplicationNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CAPApplicationNamespaceLister helps list and get CAPApplications. +// All objects returned here must be treated as read-only. +type CAPApplicationNamespaceLister interface { + // List lists all CAPApplications in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPApplication, err error) + // Get retrieves the CAPApplication from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.CAPApplication, error) + CAPApplicationNamespaceListerExpansion +} + +// cAPApplicationNamespaceLister implements the CAPApplicationNamespaceLister +// interface. +type cAPApplicationNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CAPApplications in the indexer for a given namespace. +func (s cAPApplicationNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CAPApplication, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPApplication)) + }) + return ret, err +} + +// Get retrieves the CAPApplication from the indexer for a given namespace and name. +func (s cAPApplicationNamespaceLister) Get(name string) (*v1alpha1.CAPApplication, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("capapplication"), name) + } + return obj.(*v1alpha1.CAPApplication), nil +} diff --git a/pkg/client/listers/sme.sap.com/v1alpha1/capapplicationversion.go b/pkg/client/listers/sme.sap.com/v1alpha1/capapplicationversion.go new file mode 100644 index 0000000..95fe11a --- /dev/null +++ b/pkg/client/listers/sme.sap.com/v1alpha1/capapplicationversion.go @@ -0,0 +1,98 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CAPApplicationVersionLister helps list CAPApplicationVersions. +// All objects returned here must be treated as read-only. +type CAPApplicationVersionLister interface { + // List lists all CAPApplicationVersions in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPApplicationVersion, err error) + // CAPApplicationVersions returns an object that can list and get CAPApplicationVersions. + CAPApplicationVersions(namespace string) CAPApplicationVersionNamespaceLister + CAPApplicationVersionListerExpansion +} + +// cAPApplicationVersionLister implements the CAPApplicationVersionLister interface. +type cAPApplicationVersionLister struct { + indexer cache.Indexer +} + +// NewCAPApplicationVersionLister returns a new CAPApplicationVersionLister. +func NewCAPApplicationVersionLister(indexer cache.Indexer) CAPApplicationVersionLister { + return &cAPApplicationVersionLister{indexer: indexer} +} + +// List lists all CAPApplicationVersions in the indexer. +func (s *cAPApplicationVersionLister) List(selector labels.Selector) (ret []*v1alpha1.CAPApplicationVersion, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPApplicationVersion)) + }) + return ret, err +} + +// CAPApplicationVersions returns an object that can list and get CAPApplicationVersions. +func (s *cAPApplicationVersionLister) CAPApplicationVersions(namespace string) CAPApplicationVersionNamespaceLister { + return cAPApplicationVersionNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CAPApplicationVersionNamespaceLister helps list and get CAPApplicationVersions. +// All objects returned here must be treated as read-only. +type CAPApplicationVersionNamespaceLister interface { + // List lists all CAPApplicationVersions in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPApplicationVersion, err error) + // Get retrieves the CAPApplicationVersion from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.CAPApplicationVersion, error) + CAPApplicationVersionNamespaceListerExpansion +} + +// cAPApplicationVersionNamespaceLister implements the CAPApplicationVersionNamespaceLister +// interface. +type cAPApplicationVersionNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CAPApplicationVersions in the indexer for a given namespace. +func (s cAPApplicationVersionNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CAPApplicationVersion, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPApplicationVersion)) + }) + return ret, err +} + +// Get retrieves the CAPApplicationVersion from the indexer for a given namespace and name. +func (s cAPApplicationVersionNamespaceLister) Get(name string) (*v1alpha1.CAPApplicationVersion, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("capapplicationversion"), name) + } + return obj.(*v1alpha1.CAPApplicationVersion), nil +} diff --git a/pkg/client/listers/sme.sap.com/v1alpha1/captenant.go b/pkg/client/listers/sme.sap.com/v1alpha1/captenant.go new file mode 100644 index 0000000..bf1e889 --- /dev/null +++ b/pkg/client/listers/sme.sap.com/v1alpha1/captenant.go @@ -0,0 +1,98 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CAPTenantLister helps list CAPTenants. +// All objects returned here must be treated as read-only. +type CAPTenantLister interface { + // List lists all CAPTenants in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPTenant, err error) + // CAPTenants returns an object that can list and get CAPTenants. + CAPTenants(namespace string) CAPTenantNamespaceLister + CAPTenantListerExpansion +} + +// cAPTenantLister implements the CAPTenantLister interface. +type cAPTenantLister struct { + indexer cache.Indexer +} + +// NewCAPTenantLister returns a new CAPTenantLister. +func NewCAPTenantLister(indexer cache.Indexer) CAPTenantLister { + return &cAPTenantLister{indexer: indexer} +} + +// List lists all CAPTenants in the indexer. +func (s *cAPTenantLister) List(selector labels.Selector) (ret []*v1alpha1.CAPTenant, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPTenant)) + }) + return ret, err +} + +// CAPTenants returns an object that can list and get CAPTenants. +func (s *cAPTenantLister) CAPTenants(namespace string) CAPTenantNamespaceLister { + return cAPTenantNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CAPTenantNamespaceLister helps list and get CAPTenants. +// All objects returned here must be treated as read-only. +type CAPTenantNamespaceLister interface { + // List lists all CAPTenants in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPTenant, err error) + // Get retrieves the CAPTenant from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.CAPTenant, error) + CAPTenantNamespaceListerExpansion +} + +// cAPTenantNamespaceLister implements the CAPTenantNamespaceLister +// interface. +type cAPTenantNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CAPTenants in the indexer for a given namespace. +func (s cAPTenantNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CAPTenant, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPTenant)) + }) + return ret, err +} + +// Get retrieves the CAPTenant from the indexer for a given namespace and name. +func (s cAPTenantNamespaceLister) Get(name string) (*v1alpha1.CAPTenant, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("captenant"), name) + } + return obj.(*v1alpha1.CAPTenant), nil +} diff --git a/pkg/client/listers/sme.sap.com/v1alpha1/captenantoperation.go b/pkg/client/listers/sme.sap.com/v1alpha1/captenantoperation.go new file mode 100644 index 0000000..1dfab4c --- /dev/null +++ b/pkg/client/listers/sme.sap.com/v1alpha1/captenantoperation.go @@ -0,0 +1,98 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1alpha1 "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/tools/cache" +) + +// CAPTenantOperationLister helps list CAPTenantOperations. +// All objects returned here must be treated as read-only. +type CAPTenantOperationLister interface { + // List lists all CAPTenantOperations in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPTenantOperation, err error) + // CAPTenantOperations returns an object that can list and get CAPTenantOperations. + CAPTenantOperations(namespace string) CAPTenantOperationNamespaceLister + CAPTenantOperationListerExpansion +} + +// cAPTenantOperationLister implements the CAPTenantOperationLister interface. +type cAPTenantOperationLister struct { + indexer cache.Indexer +} + +// NewCAPTenantOperationLister returns a new CAPTenantOperationLister. +func NewCAPTenantOperationLister(indexer cache.Indexer) CAPTenantOperationLister { + return &cAPTenantOperationLister{indexer: indexer} +} + +// List lists all CAPTenantOperations in the indexer. +func (s *cAPTenantOperationLister) List(selector labels.Selector) (ret []*v1alpha1.CAPTenantOperation, err error) { + err = cache.ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPTenantOperation)) + }) + return ret, err +} + +// CAPTenantOperations returns an object that can list and get CAPTenantOperations. +func (s *cAPTenantOperationLister) CAPTenantOperations(namespace string) CAPTenantOperationNamespaceLister { + return cAPTenantOperationNamespaceLister{indexer: s.indexer, namespace: namespace} +} + +// CAPTenantOperationNamespaceLister helps list and get CAPTenantOperations. +// All objects returned here must be treated as read-only. +type CAPTenantOperationNamespaceLister interface { + // List lists all CAPTenantOperations in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*v1alpha1.CAPTenantOperation, err error) + // Get retrieves the CAPTenantOperation from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*v1alpha1.CAPTenantOperation, error) + CAPTenantOperationNamespaceListerExpansion +} + +// cAPTenantOperationNamespaceLister implements the CAPTenantOperationNamespaceLister +// interface. +type cAPTenantOperationNamespaceLister struct { + indexer cache.Indexer + namespace string +} + +// List lists all CAPTenantOperations in the indexer for a given namespace. +func (s cAPTenantOperationNamespaceLister) List(selector labels.Selector) (ret []*v1alpha1.CAPTenantOperation, err error) { + err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(*v1alpha1.CAPTenantOperation)) + }) + return ret, err +} + +// Get retrieves the CAPTenantOperation from the indexer for a given namespace and name. +func (s cAPTenantOperationNamespaceLister) Get(name string) (*v1alpha1.CAPTenantOperation, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(v1alpha1.Resource("captenantoperation"), name) + } + return obj.(*v1alpha1.CAPTenantOperation), nil +} diff --git a/pkg/client/listers/sme.sap.com/v1alpha1/expansion_generated.go b/pkg/client/listers/sme.sap.com/v1alpha1/expansion_generated.go new file mode 100644 index 0000000..2e8d90e --- /dev/null +++ b/pkg/client/listers/sme.sap.com/v1alpha1/expansion_generated.go @@ -0,0 +1,50 @@ +/* +Copyright (c) 2023 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +// CAPApplicationListerExpansion allows custom methods to be added to +// CAPApplicationLister. +type CAPApplicationListerExpansion interface{} + +// CAPApplicationNamespaceListerExpansion allows custom methods to be added to +// CAPApplicationNamespaceLister. +type CAPApplicationNamespaceListerExpansion interface{} + +// CAPApplicationVersionListerExpansion allows custom methods to be added to +// CAPApplicationVersionLister. +type CAPApplicationVersionListerExpansion interface{} + +// CAPApplicationVersionNamespaceListerExpansion allows custom methods to be added to +// CAPApplicationVersionNamespaceLister. +type CAPApplicationVersionNamespaceListerExpansion interface{} + +// CAPTenantListerExpansion allows custom methods to be added to +// CAPTenantLister. +type CAPTenantListerExpansion interface{} + +// CAPTenantNamespaceListerExpansion allows custom methods to be added to +// CAPTenantNamespaceLister. +type CAPTenantNamespaceListerExpansion interface{} + +// CAPTenantOperationListerExpansion allows custom methods to be added to +// CAPTenantOperationLister. +type CAPTenantOperationListerExpansion interface{} + +// CAPTenantOperationNamespaceListerExpansion allows custom methods to be added to +// CAPTenantOperationNamespaceLister. +type CAPTenantOperationNamespaceListerExpansion interface{} diff --git a/website/archetypes/default.md b/website/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/website/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/website/content/en/_index.md b/website/content/en/_index.md new file mode 100644 index 0000000..adcd3a5 --- /dev/null +++ b/website/content/en/_index.md @@ -0,0 +1,17 @@ +--- +title: CAP Operator +linkTitle: CAP Operator +description: A Kubernetes Operator for managing the lifecycle of multi-tenant CAP applications +--- + +{{% blocks/cover title="Welcome to CAP Operator !" image_anchor="top" height="full" color="primary" %}} +
+ A Kubernetes Operator for managing the lifecycle of multi-tenant CAP applications


+ + Documentation + + + Source Repository + +
+{{% /blocks/cover %}} \ No newline at end of file diff --git a/website/content/en/docs/_index.md b/website/content/en/docs/_index.md new file mode 100644 index 0000000..4e8c88d --- /dev/null +++ b/website/content/en/docs/_index.md @@ -0,0 +1,25 @@ +--- +title: "Documentation" +linkTitle: "Documentation" +weight: 20 +menu: + main: + weight: 10 + pre: "" +--- + +The [**CAP Operator**](https://github.com/sap/cap-operator) deploys and manages the lifecycle of multi-tenant BTP Golden Path based [CAP](https://cap.cloud.sap/docs) applications and related components, within a Kubernetes cluster. + +Main features of the CAP Operator: + +- Quick and easy deployment of CAP application backends, router and related networking components. +- Integrates with BTP SaaS Provisioning to handle asynchronous tenant subscription requests, executing provisioning / deprovisioning tasks as Kubernetes jobs. +- Automatically upgrades known tenants when newer application versions are available. +- Supports deployment of service specific content / configuration as a Kubernetes job with with every application version (e.g. HTML5 application content to HTML5 Repository Service). +- Manages TLS certificates and DNS entries related to the deployed application, with support for customer specific domains. + +The following picture provides an overview of the major automation steps handled by the Operator during application deployment. + +![workflow](/img/workflow.png) + +Explore the following chapters to learn more. diff --git a/website/content/en/docs/concepts/_index.md b/website/content/en/docs/concepts/_index.md new file mode 100644 index 0000000..1965a7f --- /dev/null +++ b/website/content/en/docs/concepts/_index.md @@ -0,0 +1,16 @@ +--- +title: "Concepts" +linkTitle: "Concepts" +weight: 10 +type: "docs" +description: > + Motivation and overview of components +--- + +Provisioning and operating a CAP Application on a Kubernetes cluster requires deployment of various components in addition to the CAP application server (see [a list of typical components]({{< ref "/cap-application-components.md" >}})). Some of these components can be created at the time of system provisioning, while others need to be created (or updated) at different points during the lifecycle of the application (DAY 2 operational tasks). + +Using helm charts to manage a CAP Application deployment can support the initial system provisioning, but further lifecycle operations like tenant provisioning, which are initiated from external components (SAP BTP), will require manual adjustment of the deployed resources. An example of such an instance would be the creation of `VirtualServices` (part of Istio service mesh) during tenant provisioning to route application (HTTP) requests submitted on the new tenant subdomain to the application server. Another limitation of using helm charts is the lack of control over the order in which resources are created. + +More control over the deployment and further automation of lifecycle operations can be achieved by extending the Kubernetes API with custom resources, which describe the components and configuration of CAP applications, and controllers to reconcile them. Similar to standard controllers of Kubernetes the custom controllers watch for changes in the custom resource objects and work towards moving the cluster state to the desired state. + +The [CAP Operator](https://github.com/sap/cap-operator) comprises of Custom Resource Definitions which describe the CAP application components, the controller to reconcile these resources, and other components which support the lifecycle management. diff --git a/website/content/en/docs/concepts/cap-application-components.md b/website/content/en/docs/concepts/cap-application-components.md new file mode 100644 index 0000000..91bbb2c --- /dev/null +++ b/website/content/en/docs/concepts/cap-application-components.md @@ -0,0 +1,30 @@ +--- +title: "CAP Application Components" +linkTitle: "CAP Application Components" +weight: 20 +type: "docs" +description: > + A typical multi-tenant CAP application +--- + +A full stack application built using the CAP programming model will have the following components + +### SAP BTP Service Instances + +Multi-tenant CAP based applications need to consume services from SAP BTP like XSUAA, SaaS Provisioning etc. These service instances need to be created within a BTP Provider Account. Service keys (bindings) need to be created for these instances which generate the credentials used by the application for accessing these services. + +### CAP application server + +The application provides data models which will be deployed to the connected database. An HTTP server exposes defined services and handles server side application logic. For more details check out [CAP documentation](https://cap.cloud.sap/docs). It is also possible that the application is split into multiple servers (services) which work together. + +### CAP components to support Multi-tenancy + +CAP provides the module `@sap/cds-mtxs` which can be operated as a sidecar (component running independently from the application server). This component is then responsible for handling requests related to tenant management like onboarding which then creates the required schema in the connected database. This module also supports triggering tenant management tasks as CLI commands. + +### AppRouter + +The [AppRouter](https://www.npmjs.com/package/@sap/approuter), or an extended version of it, takes care of authenticating requests (using the XSUAA service) and routes the requests to the application servers or related services (e.g. HTML5 Application Repository Service). + +### SAP Fiori applications + +Multiple SAP Fiori frontend applications may connect to the CAP application backend. These UI5 applications are deployed to the HTML5 Application Repository Service and served from there. Similarly, the application may have content specific to other services which need to be deployed, like the Portal Service. diff --git a/website/content/en/docs/concepts/operator-components/_index.md b/website/content/en/docs/concepts/operator-components/_index.md new file mode 100644 index 0000000..39b1747 --- /dev/null +++ b/website/content/en/docs/concepts/operator-components/_index.md @@ -0,0 +1,23 @@ +--- +title: "CAP Operator Overview" +linkTitle: "CAP Operator Overview" +weight: 10 +type: "docs" +description: > + An overview of the architecture +--- + +The CAP Operator is comprised of the following components + +1. **CAP Controller**: a native Kubernetes controller that reconciles custom resources which are defined as part of the operator +2. **Web-hooks**: validating web-hooks to ensure consistency of custom resource objects submitted to kubernetes API server +3. **Subscription Server**: web server for handling HTTP requests submitted by the BTP `saas-registry` service instances during tenant subscription (and unsubscribe) +4. **MTX Job** _[DEPRECATED]_: wrapper component which enables execution of tenant lifecycle operations using `cds/mtx` module provided by CAP, as kubernetes Jobs. _This module is no longer required for applications using the newer `@sap/cds-mtxs` module._ + +> Note: [`@sap/cds-mtx` is no longer supported with CDS 7](https://cap.cloud.sap/docs/releases/jun23#migration-from-old-mtx). The MTX Job component will be removed once support for older CDS version ends. + +The following diagram depicts how the main components interact when deployed to a cluster. + +![cluster-components](/img/block-cluster.png) + +The following pages provide further details about the CAP Operator components. diff --git a/website/content/en/docs/concepts/operator-components/controller.md b/website/content/en/docs/concepts/operator-components/controller.md new file mode 100644 index 0000000..61faac0 --- /dev/null +++ b/website/content/en/docs/concepts/operator-components/controller.md @@ -0,0 +1,23 @@ +--- +title: "Controller" +linkTitle: "Controller" +weight: 10 +type: "docs" +description: > + Reconciliation of Custom Resource Objects +--- + +The CAP Controller is implemented using the [client-go](https://github.com/kubernetes/client-go) from Kubernetes, which provides the required tools and utilities to interact with the Kubernetes API server. It manages custom resources which are included with the operator. + +The controller uses `Informers` to watch certain resources and invokes registered event handlers when these resources are modified. To streamline the processing of such notifications, rate limiting queues are implemented which store the changes and allow processing of these items in independent reconciliation threads (go routines). Such a design allows sequential processing of the changed items and avoids conflicts. + +The following _namespaced_ Custom Resources have been defined to be reconciled by the CAP controller: + +- `CAPApplication`: defines a high level application, its domains and consumed BTP services +- `CAPApplicationVersion`: defines a child resource of the `CAPApplication` which contains container images which will be used to deploy application components (workloads) of a specific version +- `CAPTenant`: represents a child resource of the `CAPApplication` which corresponds to a BTP sub-account which has subscribed to the application +- `CAPTenantOperation`: represents a provisioning, deprovisioning or upgrade operation on a tenant which is scheduled as a child resource of a `CAPTenant` and executed as a sequence of specified steps. + +> Parent-child relationships between custom resources are established by defining owner references for the children. + +![controller](/img/block-controller.png) diff --git a/website/content/en/docs/concepts/operator-components/mtx-job.md b/website/content/en/docs/concepts/operator-components/mtx-job.md new file mode 100644 index 0000000..fca4fe5 --- /dev/null +++ b/website/content/en/docs/concepts/operator-components/mtx-job.md @@ -0,0 +1,16 @@ +--- +title: "MTX Job" +linkTitle: "MTX Job" +weight: 30 +type: "docs" +description: > + Executing `cds-mtx` routes as Kubernetes Jobs +--- + +CAP provides the [`cds/mtx`](https://cap.cloud.sap/docs/guides/multitenancy/old-mtx-apis) module which provides APIs (HTTP endpoints) for triggering tenant lifecycle operations like provisioning or upgrade. Even though these routes can be served from a deployment of the CAP application server, they consume considerably higher memory compared to application routes. It would be ideal to execute such operations, independent from the application server, as dedicated Kubernetes jobs which can be monitored. As the current `cds-mtx` version operates only as a web-server serving specific lifecycle routes, a trigger or wrapper is required which starts the `cds-mtx` server, executes the required lifecycle route with the given payload, and finally shuts down the server. + +MTX Job component was developed as such a wrapper which runs as a sidecar container within the job pod, along with the `cds-mtx` server, and manages the lifecycle operation. During the reconciliation of custom resource `CAPTenantOperation` which represents a tenant lifecycle operation, the controller creates Jobs where MTX Job is added as a sidecar to the `cds-mtx` server. The MTX Job component waits for the `cds-mtx` server to start, triggers the required lifecycle route, and waits for it to be completed. Finally, it shuts down the `cds-mtx` server and completes the job with the appropriate exit code. This is achieved using a `netcat` listener in the job pod template to allow the trigger to manage the mtx container by sending a dummy connect to the mtx pod (listener) and hence exit gracefully. + +MTX Job will connect to [XSUAA service](https://help.sap.com/viewer/5088c3bb02144e7782959bb1529ca70e/SHIP/en-US/9cde62c2d3a8440caae18f7dbcf68d4c.html) for a valid authentication token to trigger the required lifecycle operation. + +> Note: [`@sap/cds-mtx` is no longer supported with CDS 7](https://cap.cloud.sap/docs/releases/jun23#migration-from-old-mtx). This MTX Job component will be removed once support for older CDS version ends. diff --git a/website/content/en/docs/concepts/operator-components/subscription-server.md b/website/content/en/docs/concepts/operator-components/subscription-server.md new file mode 100644 index 0000000..f5d42ef --- /dev/null +++ b/website/content/en/docs/concepts/operator-components/subscription-server.md @@ -0,0 +1,26 @@ +--- +title: "Subscription Server" +linkTitle: "Subscription Server" +weight: 20 +type: "docs" +description: > + Integration with SaaS Provisioning Service +--- + +The Subscription Server handles HTTP requests from the [SaaS Provisioning Service](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/2cd8913a50bc4d3e8172f84bb4bfba20.html) for tenant subscription operations on CAP applications which have been installed in the cluster. + +During the creation of a `saas-registry` service instance (in the provider sub-account) [callback URLs are configured](../../../usage/prerequisites/#saas-provisioning-service) which should point to the subscription server routes. + +When a consumer tenant subscribes to an application managed by the operator a subscription callback is received by the subscription server which then generates the `CAPTenant` custom resource object. + +The subscription server returns an `Accepted` (202) response code and starts a routine/thread which keeps polling for the tenant status until the changes to the `CAPTenant` are then independently reconciled by the controller. + +Once the tenant provisioning process has completed (or has failed), the tracking routine will return the appropriate status to the SaaS Registry via an asynchronous callback (by obtaining the necessary authorization token). + + +![subscription](/img/block-subscription.png) + + +([More details about asynchronous tenant subscription](https://controlcenter.ondemand.com/index.html#/knowledge_center/articles/2316430f7d804820934910db736cefbf).) + +Such an asynchronous processing allows us to avoid timeouts during synchronous calls, as well as schedule dedicated jobs (via `CAPTenantOperation`) for completion of the subscription and perform any further tasks required in the cluster (e.g. create a `VirtualService` corresponding to the tenant subdomain). diff --git a/website/content/en/docs/configuration/_index.md b/website/content/en/docs/configuration/_index.md new file mode 100644 index 0000000..13d58ba --- /dev/null +++ b/website/content/en/docs/configuration/_index.md @@ -0,0 +1,20 @@ +--- +title: "Configuration" +linkTitle: "Configuration" +weight: 30 +type: "docs" +tags: ["setup"] +description: > + Configuration options +--- + +This page provides a list of environment variables used by the CAP Operator. + +### Controller + +- `CERT_MANAGER`: Specifies the certificate manager to be used for TLS certificates. Possible values are: + - `gardener`: [SAP Gardener Certificate Management](https://github.com/gardener/cert-management) + - `cert-manager.io`: [cert-manager.io cert-manager](https://github.com/cert-manager/cert-manager) +- `DNS_MANAGER`: Specifies the External DNS Manager to be used. Possible values are: + - `gardener`: [SAP Gardener External DNS Manager](https://github.com/gardener/external-dns-management) + - `kubernetes`: [External DNS Management from Kubernetes](https://github.com/kubernetes-sigs/external-dns) diff --git a/website/content/en/docs/installation/_index.md b/website/content/en/docs/installation/_index.md new file mode 100644 index 0000000..295eb86 --- /dev/null +++ b/website/content/en/docs/installation/_index.md @@ -0,0 +1,10 @@ +--- +title: "Installation" +linkTitle: "Installation" +weight: 20 +type: "docs" +description: > + How to install CAP Operator in a Kubernetes cluster +--- + +This page provides an overview of available methods to install the CAP Operator on a Kubernetes cluster. diff --git a/website/content/en/docs/installation/helm-install.md b/website/content/en/docs/installation/helm-install.md new file mode 100644 index 0000000..521c1da --- /dev/null +++ b/website/content/en/docs/installation/helm-install.md @@ -0,0 +1,56 @@ +--- +title: "Using Helm" +linkTitle: "Using Helm" +weight: 20 +type: "docs" +tags: ["setup"] +description: > + How to deploy using Helm chart +--- + +The recommended way to install the CAP operator components is using the [Helm chart](https://github.com/sap/cap-operator-lifecycle/tree/main/chart) which is published in as an OCI package here: oci://ghcr.io/sap/cap-operator-helm/cap-operator. + +To install create a namespace and helm install the chart into it. You need to supply your `domain` and the `dnsTarget` of your subscription server, either as command line parameter or with a values file: + +Command line parameters: + +```bash +kubectl create namespace cap-operator-system +helm upgrade -i -n cap-operator-system cap-operator oci://ghcr.io/sap/cap-operator-helm/cap-operator --set subscriptionServer.domain=cap-operator. --set subscriptionServer.dnsTarget=public-ingress. +``` + +Values file: + +```bash +kubectl create namespace cap-operator-system +helm upgrade -i -n cap-operator-system cap-operator oci://ghcr.io/sap/cap-operator-helm/cap-operator -f my-cap-operator-values.yaml +``` + +with a values file `my-cap-operator-values.yaml` like + +```yaml +subscriptionServer: + dnsTarget: public-ingress. + domain: cap-operator. +``` + +Note: +This uses your existing docker credentials, if any. Alternatively, you can pass the desired credentials with options `username` and `password`: + +```bash + helm upgrade -i -n cap-operator-system cap-operator oci://ghcr.io/sap/cap-operator-helm/cap-operator --set subscriptionServer.domain=cap-operator. --set subscriptionServer.dnsTarget=public-ingress. --username --password +``` + +To utilize the [local version](https://github.com/sap/cap-operator-lifecycle/tree/main/chart), use + +```bash +helm upgrade -i -n cap-operator-system cap-operator PATH_TO_CAP_OPERATOR_LIFECYCLE_REPOSITORY/chart --set subscriptionServer.domain=cap-operator. --set subscriptionServer.dnsTarget=public-ingress. +``` + +or + +```bash +helm upgrade -i -n cap-operator-system cap-operator PATH_TO_CAP_OPERATOR_LIFECYCLE_REPOSITORY/chart -f my-values.yaml +``` + +{{% include "includes/chart-values.md" %}} diff --git a/website/content/en/docs/installation/prerequisites.md b/website/content/en/docs/installation/prerequisites.md new file mode 100644 index 0000000..afed244 --- /dev/null +++ b/website/content/en/docs/installation/prerequisites.md @@ -0,0 +1,30 @@ +--- +title: "Prerequisites" +linkTitle: "Prerequisites" +weight: 10 +type: "docs" +description: > + How to prepare the cluster before installing CAP Operator +--- + +It is recommended to use a [Gardener](https://gardener.cloud/) managed cluster for deploying CAP applications managed using the CAP Operator. + +The Kubernetes cluster must be setup with the following prerequisites before installing the CAP Operator. + +##### [Istio](https://istio.io/latest/docs/concepts/traffic-management/) (version >= 1.12) + +Istio Service Mesh is used for HTTP traffic management. The CAP Operator creates Istio resources for managing incoming HTTP requests to the application as well as for routing requests on specific (tenant) subdomains. + +> It is required to determine the public ingress gateway subdomain and the overall shoot domain for the system and specify them in the [Chart values](../../installation/helm-install/#values) + +##### [cf-service-operator](https://sap.github.io/cf-service-operator/docs/) or [sap-btp-service-operator](https://github.com/SAP/sap-btp-service-operator) + +These operators can be used for managing SAP BTP service instances and service bindings from within the Kubernetes cluster. + +> Due to unavailability of certain BTP services for Kubernetes platforms, it is recommended to use the [cf-service-operator](https://github.com/sap/cf-service-operator/) which creates the services for a Cloud Foundry space and injects the required access credentials as secrets into the Kubernetes cluster. + +> Please note that service credentials added as Kubernetes Secrets to a namespace, by these operators, supports additional metadata. If you do not use this feature of these operators, it is also required that you use `secretKey: credentials` in the spec of these operators to ensure the service credentials retain any JSON data as it is. **It is recommended to use `secretKey`, even when credential metadata is available to reduce the overhead of interpreting parsing multiple JSON attributes.** + +##### [SAP Gardener Certificate Management](https://github.com/gardener/cert-management) + +This component is available in clusters managed by SAP Gardener and will be used to manage TLS Certificates and issuers. SAP Gardener manages encryption, issuing and signing of certificates. Alternatively, [cert-manager.io cert-manager](https://github.com/cert-manager/cert-manager) can be used. diff --git a/website/content/en/docs/reference/_index.md b/website/content/en/docs/reference/_index.md new file mode 100644 index 0000000..ea2b46e --- /dev/null +++ b/website/content/en/docs/reference/_index.md @@ -0,0 +1,10 @@ +--- +title: "Reference" +linkTitle: "Reference" +weight: 99 +type: "docs" +description: > + API reference +--- + +{{% include "includes/api-reference.html" %}} diff --git a/website/content/en/docs/support/_index.md b/website/content/en/docs/support/_index.md new file mode 100644 index 0000000..91b4302 --- /dev/null +++ b/website/content/en/docs/support/_index.md @@ -0,0 +1,19 @@ +--- +title: Support +linkTitle: "Support" +weight: 95 +type: "docs" +description: > + How to get Support +--- + +Reach out to the project team and the project community via the communication channels listed below. + +To report a bug, please create an [issue](https://github.com/sap/cap-operator/issues). + +See anything missing? Please let us know or [raise a PR](https://github.com/sap/cap-operator/pulls). + +## Communication Channels + +- Issues: [GitHub](https://github.com/sap/cap-operator/issues) +- Email: [CAP Operator](mailto:cap-operator@sap.com) \ No newline at end of file diff --git a/website/content/en/docs/troubleshoot/_index.md b/website/content/en/docs/troubleshoot/_index.md new file mode 100644 index 0000000..9340699 --- /dev/null +++ b/website/content/en/docs/troubleshoot/_index.md @@ -0,0 +1,80 @@ +--- +title: "Troubleshooting" +linkTitle: "Troubleshooting" +weight: 90 +type: "docs" +description: > + Common issues and how to solve them +--- + +**Usage of @sap/cds-mtxs library for multitenancy** + +> By default, the CAP Operator utilizes the `@sap/cds-mtxs` library. However, you can disable this by setting the IS_MTXS_ENABLED environment variable to "false" in the TenantOperation workload, in which case the old `@sap/cds-mtx` library based wrapper job will be used instead. As mentioned in the CAP documentation, [`@sap/cds-mtx` is no longer supported with CDS 7](https://cap.cloud.sap/docs/releases/jun23#migration-from-old-mtx). The MTX Job component will be removed once support for older CDS version ends. + +The CAP Operator supports usage of `@sap/cds-mtxs` (which is the replacement for the former `@sap/cds-mtx` library) from CAP by default. + +This enables us to get rid of our [wrapper implementation](../concepts/operator-components/mtx-job/) and instead use built-in (into `@sap/cds-mtxs`) cli based handling for tenant operations during provisioning, deprovisioning and upgrading tenants. + +As of now for the usage of this new library you may (depending on your k8s cluster hardening setup) need to add additional `securityContext` for the `TenantOperation` and also `CAP` workloads as shown in the sample below. + +``` yaml + - name: tenant-job + consumedBTPServices: + - "{{ include "xsuaaInstance" . }}" + - "{{ include "serviceManagerInstance" . }}" + - "{{ include "saasRegistryInstance" . }}" + jobDefinition: + type: TenantOperation + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{ "provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345" } }' + image: "some.repo.example.com/cap-app/server" + securityContext: # needed until CAP resolves issue with folder creation in the root dir of the app container at runtime + runAsUser: 1000 +``` + +**Secret/credential handling for different workloads of the CAP Operator** + +Libraries like `xsenv`/`cds`(CAP) handle credentials differently in different environments (CF, K8s) and on K8s when using credential data directly from secrets, any JSON data type information related to the data values may get lost and lead to inconsistencies. + +This issue is now addressed by the SAP Service Binding Specification, which mandates the addition of metadata to these secrets. Both `btp-service-operator` and `cf-service-operator` supports the addition of metadata. But, in case this feature is not used in your clusters, the CAP Operator avoids inconsistencies by creating `VCAP_SERVICES` environment variable across all workloads and expects all BTP services credentials to be available in Kubernetes secrets under a key `credentials`. + +This can be achieved using the `secretKey` property for a `ServiceBinding` created using `btp-service-operator` or `cf-service-operator`, e.g.: + +``` +apiVersion: cf.cs.sap.com/v1alpha1 +kind: ServiceBinding +metadata: + name: uaa + namespace: demo +spec: + serviceInstanceName: uaa + name: app-uaa + secretKey: credentials +``` + +> It is recommended to use `secretKey`, even when credential metadata is available to reduce the overhead of interpreting parsing multiple JSON attributes. + +**HTTP requests reaching the AppRouter are not getting forwarded to the application server (pods)** + +The AppRouter component maps incoming requests to destinations (applications or services) which have been configured. If you are using an `xs-app.json` file with your AppRouter to specify route mapping to various destinations, ensure that the `destinationName` property for the CAP backend is specified in the corresponding CAPApplicationVersion configuration. The CAP operator will inject this destination to the AppRouter pods (via environment variables). + + +**HTTP requests are timing out in the AppRouter for long running operations in backend workload** + +If your backend service is known to take a long time, configure the `destinations` environment variable on the AppRouter component to set the desired timeout configuration for that destination (`destinationName`). The CAP Operator will just overwrite the URL part of that destination to point to the right workload, remaining settings are taken over exactly as configured. + +**Recommended AppRouter version** + +Use `@sap/approuter` version `14.x.x` (or higher). + +**CAP Operator resources cannot be deleted in the k8s cluster/namespace** + +All custom resource objects (CROs) created by the CAP Operator are protected with `finalizers` to ensure proper cleanup takes place. +For instance, when deleting a `CAPApplication` CRO any existing tenants would be deprovisioned automatically to avoid inconsistenties. Once the deprovisioning is successful the corresponding CROs would be removed automatically. +The provider `CAPTenant` resource cannot be deleted while before deleting a consistent `CAPApplication`. +_NOTE_: The CAP operator needs the `secrets` from service instances/bindings to exist for the entire lifecycle of the cap application. Removing the service instances/bindings i.e. the secrets from the cluster while the CAP application related CROs still exist would cause leftover resources in cluster (and perhaps the db). Recovering from such inconsistent states might not even be possible. +Such a situation can easily arise when using `helm` delete/uninstall as the order of deletion of resouces is not configurable. We recommend you do this with care. +It is important to ensure that the secrets from service instance/bindings are not deleted before any CAP application that consumes those secrets is completely removed. diff --git a/website/content/en/docs/usage/_index.md b/website/content/en/docs/usage/_index.md new file mode 100644 index 0000000..5b7ea62 --- /dev/null +++ b/website/content/en/docs/usage/_index.md @@ -0,0 +1,8 @@ +--- +title: "Usage" +linkTitle: "Usage" +weight: 40 +type: "docs" +description: > + Managing application with the CAP Operator +--- diff --git a/website/content/en/docs/usage/deploying-application.md b/website/content/en/docs/usage/deploying-application.md new file mode 100644 index 0000000..056280c --- /dev/null +++ b/website/content/en/docs/usage/deploying-application.md @@ -0,0 +1,127 @@ +--- +title: "Deploying a CAP Application" +linkTitle: "Deploying a CAP Application" +weight: 20 +type: "docs" +description: > + How to deploy a new CAP based application +--- + +Just by defining two resources provided by the CAP Operator, namely `capapplications.sme.sap.com` and `capapplicationversions.sme.sap.com`, it possible to deploy a multi-tenant CAP application and start using it. These resources are _namespaced_ and so the CAP Operator will create all related resources (deployments, gateways, jobs etc.) within the same namespace. + +The object, `CAPApplication`, describes the high level attributes of an application like the BTP account where it is hosted, consumed BTP services, domains where the application routes will be made available etc. See [API Reference](../../reference/#sme.sap.com/v1alpha1.CAPApplication). + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + name: cap-app-01 + namespace: cap-app-01 +spec: + btpAppName: cap-app-01 # <-- short name (similar to BTP XSAPPNAME) + btp: + services: + - class: xsuaa # <-- BTP service technical name + name: app-uaa # <-- name of the service instance + secret: cap-app-01-uaa-bind-cf # <-- secret containing the credentials to access the service existing in the same namespace + - class: saas-registry + name: app-saas-registry + secret: cap-app-01-saas-bind-cf + - class: service-manager + name: app-service-manager + secret: cap-app-01-svc-man-bind-cf + - class: destination + name: app-destination + secret: cap-app-01-dest-bind-cf + - class: html5-apps-repo + name: app-html5-repo-host + secret: cap-app-01-html5-repo-bind-cf + - class: html5-apps-repo + name: app-html5-repo-runtime + secret: cap-app-01-html5-rt-bind-cf + - class: portal + name: app-portal + secret: cap-app-01-portal-bind-cf + domains: + istioIngressGatewayLabels: # <-- labels used to identify the istio ingress gateway (the values provided here are the default values) + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: "cap-app-01.cluster.shoot.url.k8s.example.com" # <-- primary domain where the application is exposed. Each tenant will have access to a subdomain of this domain. Ensure that this is at most 62 chars long. + secondary: + - "alt.shoot.example.com" + globalAccountId: global-account-id + provider: + subDomain: cap-app-01-provider + tenantId: e55d7b5-279-48be-a7b0-aa2bae55d7b5 +``` + +The object, `CAPApplicationVersion`, describes the different components of an application version including the container images to be used and the services consumed by each component. See [API Reference](../../reference/#sme.sap.com/v1alpha1.CAPApplicationVersion). + +The `CAPApplicationVersion` must be created in the same namespace as the `CAPApplication` and refers to it. + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + name: cav-cap-app-01-1 + namespace: cap-app-01 +spec: + capApplicationInstance: cap-cap-app-01 # <-- reference to CAPApplication in the same namespace + version: "1" # <-- semantic version + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: # <-- these are services used by the application server (already defines as part of CAPApplication resource). Corresponding credential secrets will be mounted onto the component pods as volumes. + - app-uaa + - app-service-manager + - app-saas-registry + deploymentDefinition: + type: CAP # <-- indicates the CAP application server + image: app.some.repo.example.com/srv/server:0.0.1 + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + - name: app-router + consumedBTPServices: + - app-uaa + - app-destination + - app-saas-registry + - app-html5-repo-runtime + - app-portal + deploymentDefinition: + type: Router + image: app.some.repo.example.com/approuter/approuter:0.0.1 + env: + - name: PORT + value: 4000 + - name: TENANT_HOST_PATTERN + value: "^(.*).(cap-app-01.cluster.shoot.canary.k8s-hana.ondemand.co|alt.shoot.example.com)" + - name: service-content + consumedBTPServices: + - app-uaa + - app-html5-repo-host + - app-portal + jobDefinition: + type: Content + image: app.some.repo.example.com/approuter/content:0.0.1 + backoffLimit: 1 +``` + +> NOTE: The above example is a minimal `CAPApplicationVersion` that may be deployed. For more supported configuration and their explanations, see [here](../resources/capapplicationversion). + +The controller component of the CAP Operator reacts to these objects and creates further resources which constitute a running application: + +- Deployment (and service) for the application server with credentials (from secrets) to access BTP services injected as `VCAP_SERVICES` environment variable +- Deployment (and service) for the AppRouter with destination mapping to the application server and subscription server (for the tenant provisioning route) +- Job for the version content deployer +- TLS Certificates for provided domains using either [SAP Gardener cert-management](https://github.com/gardener/cert-management) or [cert-manager.io cert-manager](https://github.com/cert-manager/cert-manager) +- Istio Gateway resource for the application domains + +> The content deployer is used to deploy content or configuration to BTP services, before using them. + +Once these resources are available, the `CAPApplicationVersion` status changes to `Ready`. **The controller then proceeds to automatically create an object of type `CAPTenant` which corresponds to the tenant of the provider sub-account.** Please see the page on [tenant subscription]({{< ref "/tenant-provisioning.md" >}}) for details on how the `CAPTenant` resource is reconciled. diff --git a/website/content/en/docs/usage/prerequisites.md b/website/content/en/docs/usage/prerequisites.md new file mode 100644 index 0000000..380f52a --- /dev/null +++ b/website/content/en/docs/usage/prerequisites.md @@ -0,0 +1,105 @@ +--- +title: "Prerequisites" +linkTitle: "Prerequisites" +weight: 10 +type: "docs" +description: > + What to do before deploying a new CAP Application +--- + +### Prepare BTP Global Account and Provider Subaccount + +CAP based applications make use of various BTP services which are created in a Provider Subaccount. So, before the application can be deployed, it is required to create a Global Account and assign the required services which will be used. You can do this using [SAP BTP Control Center](https://controlcenter.ondemand.com/index.html). Once this is done, a Provider Subaccount needs to be created, where the required service instances can be created. + +### Create Service Instances and Bindings + +A multi-tenant CAP based application will need to consume the following BTP services. While creating these service instances, some of the parameters supplied require special attention. Service Keys (Bindings) are then created to generate access credentials, which in turn should be provided as Kubernetes Secrets in the namespace where the application is being deployed. + +Other services (not listed here) may also be used depending on the requirement (e.g. HTML5 Repository Service, Business Logging etc.). + +> IMPORTANT: Due to limited availability of BTP services on Kubernetes, certain services will need to be created by enabling Cloud Foundry for the provider subaccount. We recommend to use the [cf-service-operator](https://sap.github.io/cf-service-operator/docs/) for managing the Service Instances and Service Bindings directly from within the Kubernetes cluster. Based on the Service Bindings, it automatically generates the secrets containing the service access credentials. + +##### XSUAA Service + +The parameter `oauth2-configuration.redirect-uris` must include the domain used by the application. As an example based on the cluster setup this url may have the form `https://*...shoot.url.k8s.example.com/**`. + +Scope required to make asynchronous tenant subscription operations need to be included. Additionally, check the [CAP Multi-tenancy](https://cap.cloud.sap/docs/java/multitenancy#xsuaa-mt-configuration) documentation for additional scopes which are required. + +```yaml +parameters: + authorities: + - $XSAPPNAME.mtcallback + - $XSAPPNAME.mtdeployment + oauth2-configuration: + redirect-uris: + - https://*my-cap-app.cluster-x.my-project.shoot.url.k8s.example.com/** + role-collections: + ... + role-templates: + ... + scopes: + - description: UAA + name: uaa.user + - description: With this scope set, the callbacks for tenant onboarding, offboarding and getDependencies can be called + grant-as-authority-to-apps: + - $XSAPPNAME(application,sap-provisioning,tenant-onboarding) + name: $XSAPPNAME.Callback + - description: Async callback to update the saas-registry (provisioning succeeded/failed) + name: $XSAPPNAME.subscription.write + - description: Deploy applications + name: $XSAPPNAME.mtdeployment + - description: Subscribe to applications + grant-as-authority-to-apps: + - $XSAPPNAME(application,sap-provisioning,tenant-onboarding) + name: $XSAPPNAME.mtcallback + ... +``` +When using mulitple xsuaa service instances in the app (e.g. one for the `application` and other `apiaccess`). The primary xsuaa instance can be set using the annotation: "sme.sap.com/primary-xsuaa" with the value being the `name` of the service instance, as shown below: + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + annotations: + "sme.sap.com/primary-xsuaa": "my-cap-app-uaa" # This let's the CAP Operator determine/use the right UAA instance for the application. + name: test-cap-01 + ... +spec: + btp: + services: + - class: xsuaa + name: my-cap-app-uaa-api + secret: my-cap-app-uaa-api-bind-cf + - class: xsuaa + name: my-cap-app-uaa + secret: my-cap-app-uaa-bind-cf + - class: saas-registry + name: my-cap-app-saas-registry + secret: my-cap-app-saas-bind-cf + ... + btpAppName: my-cap-app + ... +``` + +##### SaaS Provisioning Service + +When creating an instance of the SaaS Provisioning Service, it should be configured to use asynchronous tenant subscription callbacks. See [here](https://controlcenter.ondemand.com/index.html#/knowledge_center/articles/f239e5501a534b64ab5f8dde9bd83c53) for more details. + +```yaml +parameters: + appName: + appUrls: + callbackTimeoutMillis: 300000 # <-- used to fail subscription process when no response is received + getDependencies: https://..cluster-x.my-project.shoot.url.k8s.example.com/callback/v1.0/dependencies # <-- handled by the application + onSubscription: https:///provision/tenants/{tenantId} # <-- the /provision route is forwarded directly to the CAP Operator (Subscription Server) and should be specified as such + onSubscriptionAsync: true + onUnSubscriptionAsync: true +``` + +##### SAP HANA Cloud + +A SAP HANA Cloud instance (preferably shared and accessible from the provider subaccount) is required. The Instance ID of the database must be noted for usage in relevant workloads. SAP HANA Schemas & HDI Containers service should also be entitled for the provider subaccount. + +##### Service Manager + +The Service Manager Service allows CAP to retrieve schema (tenant) specific credentials to connect to the HANA database. diff --git a/website/content/en/docs/usage/resources/_index.md b/website/content/en/docs/usage/resources/_index.md new file mode 100644 index 0000000..acf49d7 --- /dev/null +++ b/website/content/en/docs/usage/resources/_index.md @@ -0,0 +1,8 @@ +--- +title: "Resources" +linkTitle: "Resources" +weight: 50 +type: "docs" +description: > + Detailed configuration of resources managed by the the CAP Operator +--- diff --git a/website/content/en/docs/usage/resources/capapplication.md b/website/content/en/docs/usage/resources/capapplication.md new file mode 100644 index 0000000..4f83066 --- /dev/null +++ b/website/content/en/docs/usage/resources/capapplication.md @@ -0,0 +1,67 @@ +--- +title: "CAPApplication" +linkTitle: "CAPApplication" +weight: 10 +type: "docs" +description: > + How to configure the `CAPApplication` resource +--- + +The below example shows a fully configured `CAPApplication`: + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplication +metadata: + name: cap-app + namespace: cap-ns +spec: + btp: + services: + - class: xsuaa + name: cap-uaa + secret: cap-uaa-bind + - class: saas-registry + name: cap-saas-reg + secret: cap-saas-reg-bind + - class: service-manager + name: cap-service-manager + secret: cap-svc-man-bind + - class: destination + name: cap-destination + secret: cap-bem-02-dest-bind + - class: html5-apps-repo + name: cap-html5-repo-host + secret: cap-html5-repo-bind + - class: html5-apps-repo + name: cap-html5-repo-runtime + secret: cap-html5-rt-bind + - class: portal + name: cap-portal + secret: cap-portal-bind + - class: business-logging + name: cap-business-logging + secret: cap-business-logging-bind + btpAppName: cap-app + domains: + istioIngressGatewayLabels: # <-- labels used to identify Load Balancer service used by Istio + - name: app + value: istio-ingressgateway + - name: istio + value: ingressgateway + primary: cap-app.cluster.project.shoot.url.k8s.example.com + secondary: + - alt-cap.cluster.project.shoot.url.k8s.example.com + globalAccountId: 2dddd48d-b45f-45a5-b861-a80872a0c8a8 + provider: # <-- provider tenant details + subDomain: cap-app-provider + tenantId: 7a49218f-c750-4e1f-a248-7f1cefa13010 +``` + +The overall list of BTP service instances and respective secrets (credentials) required by the application is specified as an array in `btp.services`. These service instances are assumed to exist in the provider sub-account. Operators like [cf-service-operator](https://sap.github.io/cf-service-operator/docs/) or [sap-btp-service-operator](https://github.com/SAP/sap-btp-service-operator) can be used to declaratively create these service instances and their credentials as Kubernetes resources. + +The `provider` section specifies details of the provider sub-account linked to this application, while `globalAccountId` denotes the global account in which the provider sub-account is created. Within a global account the `btpAppName` has to be unique as this is equivalent to `XSAPPNAME` which is used in various BTP service and application constructs. + +The `domains` section provides details of where the application routes are exposed. Within a SAP Gardener cluster the primary application domain is a subdomain of the cluster domain, and Gardener [cert-management](https://github.com/gardener/cert-management) will be used to request a wildcard TLS certificate for the primary domain. Additional secondary domains may also be specified (e.g. for customer specific domains) for the application. + +`istioIngressGatewayLabels` are key-value pairs (string) used to identify the ingress controller component of Istio and the related Load Balancer service. These values are configured during installation of Istio service mesh in the cluster. diff --git a/website/content/en/docs/usage/resources/capapplicationversion.md b/website/content/en/docs/usage/resources/capapplicationversion.md new file mode 100644 index 0000000..b1b5243 --- /dev/null +++ b/website/content/en/docs/usage/resources/capapplicationversion.md @@ -0,0 +1,318 @@ +--- +title: "CAPApplicationVersion" +linkTitle: "CAPApplicationVersion" +weight: 20 +type: "docs" +description: > + How to configure the `CAPApplicationVersion` resource +--- + +The `CAPApplicationVersion` has the following high level structure: + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + name: cav-cap-app-v1 + namespace: cap-ns +spec: + version: 3.2.1 # <-- semantic version (should be unique within the versions of a CAP application) + capApplicationInstance: cap-app + registrySecrets: # <-- image pull secrets to be used in the workloads + - regcred + workloads: # <-- define deployments and jobs used for this application version + - name: "cap-backend" + deploymentDefinition: # ... + consumedBTPServices: # ... + - name: "app-router" + deploymentDefinition: # ... + consumedBTPServices: # ... + - name: "service-content" + jobDefinition: # ... + consumedBTPServices: # ... + - name: "mtx-runner" + jobDefinition: # ... + consumedBTPServices: # ... + tenantOperations: # ... <-- (optional) +``` + +- An instance of `CAPApplicationVersion` is always related to an instance of `CAPApplication` in the same namespace. This reference is established using the attribute `capApplicationInstance`. +- An array of workloads (`workloads`) should be defined which include the various software components of the CAP application. A deployment representing the CAP application server or a job which is used for tenant operations are examples of such workloads. A workload should have either a `deploymentDefinition` or a `jobDefinition`. See the next section for more details. +- An optional attribute `tenantOperations` can be used to define a sequence of steps (jobs) to be executed during tenant operations (provisioning / upgrade / deprovisioning). + +### Workloads with `deploymentDefinition` + +```yaml +name: cap-backend +consumedBTPServices: # <-- an array of service instance names referencing the BTP services defined in the CAPApplication resource + - cap-uaa + - cap-saas-reg +deploymentDefinition: + type: CAP # <-- possible values are CAP / Router / Additional + image: some.repo.example.com/cap-app/server:3.22.11 # <-- container image + env: # <-- (optional) same as in core v1 pod.spec.containers.env + - name: SAY + value: "I'm GROOT" + replicas: 3 # <-- (optional) replicas for scaling + ports: + - name: app-port + port: 4004 + routerDestinationName: cap-server-url + - name: tech-port + port: 4005 +``` + +The `type` of the deployment is important to indicate how the operator should handle this workload (for example, injection of `destinations` to be used by the AppRouter). Valid values are: + +- `CAP` to indicate a CAP application server. Only one workload of this type can be used at present. +- `Router` to indicate a version of [AppRouter](https://www.npmjs.com/package/@sap/approuter). Only one workload of this type can be used. +- `Additional` to indicate supporting components which can be deployed along with the CAP application server. + +Optional attributes like `replicas`, `env`, `resources`, `probes`, `securityContext` and `ports` can be defined to configure the deployment. + +#### Port configuration + +It is possible to define which (and how many) ports exposed by a deployment container are exposed inside the cluster (via. services of type `ClusterIP`). The port definition includes a `name` in addition to the `port` number being exposed. + +For `deploymentDefinition`, other than type `Router` it would be possible to specify a `routerDestinationName` which would be used as a named `destination` injected into the AppRouter. + +The port configurations are not mandatory and can be omitted. This would mean that the operator will configure services using defaults. The following defaults are applied in case port configuration is omitted: + +- For workload of type `CAP`, the default port used by CAP, `4004`, will be added to the service and a destination with name `srv-api` will be added to the AppRouter referring to this service port (any existing `destinations` env configuration for this workload will be taken over by overwriting the `URL`). +- For workload of type `Router`, the port `4000` will be exposed in the service. This service will be used as the target for HTTP traffic reaching the application domain (domains are specified within the `CAPApplication` resource). + +> NOTE: If multiple ports are configured for a workload of type `Router`, the first available port will be used to target external traffic to the application domain. + +### Workloads with `jobDefinition` + +```yaml +workloads: + # ... deployment workloads have been omitted in this example + - name: "content-deployer" + consumedServices: # ... + jobDefinition: + type: Content + image: some.repo.example.com/cap-app/content:1.0.1 + - name: "mtx-runner" + consumedServices: # ... + jobDefinition: + type: TenantOperation + image: some.repo.example.com/cap-app/server:3.22.11 + backoffLimit: 2 # <-- determines retry attempts for the job on failure (default is 6) + ttlSecondsAfterFinished: 300 # <-- the job will be cleaned up after this duration + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + - name: "notify-upgrade" + consumedServices: # ... + jobDefinition: + type: CustomTenantOperation + image: # ... + command: ["npm", "run", "notify:upgrade"] # <-- custom entry point for the container allows reuse of a container image with multiple entry points + backoffLimit: 1 + - name: "create-test-data" + consumedServices: # ... + jobDefinition: + type: CustomTenantOperation + image: # ... + command: ["npm", "run ", "deploy:testdata"] +``` + +Workloads with a `jobDefinition` represent a job execution at a particular point in the lifecycle of the application or tenant. The following values are allowed for `type` in such workloads: + +- `Content`: A content deployer job which can be used to deploy (BTP) service specific content from the application version. This job is executed as soon as a new `CAPApplicationVersion` resource is created in the cluster. A workload of this type is required in a `CAPApplicationVersion`. +- `TenantOperation`: A job executed during provisioning, upgrade or deprovisioning of a tenant (`CAPTenant`). These jobs are controlled by the operator and uses the `cds/mtxs` APIs to perform HDI content deployment by default. In order to use `cds/mtx` APIs for HDI content deployment, set environment variable `IS_MTXS_ENABLED` to `"false"` on the `TenantOperation` job. In case a workload of type `TenantOperation` is not provided as part of the `CAPApplicationVersion`, the workload with `deploymentDefinition` of type `CAP` will be used to determine the `jobDefinition` (`image`, `env`, etc. will be used and in such cases to trigger deployment via `cds/mtx` APIs, the environment variable `IS_MTXS_ENABLED` should be set in the `CAP` workload). Also if `cds/mtxs` APIs are used, `command` can be used by applications to trigger tenant operations with custom command. +- `CustomTenantOperation`: An optional job which runs before or after the `TenantOperation` where the application can perform tenant specific tasks (for example, create test data). + +> NOTE: `command` will be ignored for workloads of type `TenantOperation` (for non mtxs based scenarios) as this is controlled by the operator. Also, [`@sap/cds-mtx` is no longer supported with CDS 7](https://cap.cloud.sap/docs/releases/jun23#migration-from-old-mtx). + +### Sequencing tenant operations + +A tenant operation refers to `provisioning`, `upgrade` or `deprovisioning` which are executed in the context of a CAP application for individual tenants (i.e. using the `cds/mtx` or similar modules provided by CAP). Within the `workloads` we have already defined two types of jobs which are valid for such operations, namely `TenantOperation` and `CustomTenantOperation`. + +The `TenantOperation` is mandatory for all tenant operations. + +In addition, you can choose which `CustomTenantOperation` jobs shall be run for a specific operation and in which order. For example, a `CustomTenantOperation` deploying test data to the tenant database schema would need to run during `provisioning`, but should not during `deprovisioning`. + +The field `tenantOperations` specifies which jobs are executed during the different tenant operations and what order they are executed in. + +```yaml +spec: + workloads: # ... + tenantOperations: + provisioning: + - workloadName: "mtx-runner" + - workloadName: "create-test-data" + upgrade: + - workloadName: "notify-upgrade" + continueOnFailure: true # <-- indicates the overall operation may proceed even if this step fails + - workloadName: "mtx-runner" + - workloadName: "create-test-data" + # <-- as the deprovisioning steps are not specified, only the `TenantOperation` workload (first available) will be executed +``` + +In the above example, for each tenant operation, not only are the valid jobs (steps) specified, but also the order in which they are to be executed. Each step in an operation is defined with: + +- `workloadName`refers to the job workload executed in this operation step +- `continueOnFailure` is valid only for `CustomTenantOperation` steps and indicates whether the overall tenant operation can proceed when this operation step fails. + +> NOTE: +> +> - Specifying `tenantOperations` is required only in case `CustomTenantOperations` are to be used. If not specified, each operation will comprise of only the `TenantOperation` step (the first one available from `workloads`). +> - The `tenantOperations`, and specified sequencing are valid only for tenants provisioned (or deprovisioned) on the corresponding `CAPApplicationVersion` and for tenants being upgraded to this `CAPApplicationVersion`. + +### Full Example + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + name: cav-cap-app-v1 + namespace: cap-ns +spec: + version: 3.2.1 + capApplicationInstance: cap-app + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - cap-uaa + - cap-service-manager + - cap-saas-reg + deploymentDefinition: + type: CAP + image: some.repo.example.com/cap-app/server:3.22.11 + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + replicas: 3 + ports: + - name: app-port + port: 4004 + routerDestinationName: cap-server-url + - name: tech-port + port: 4005 + appProtocol: grpc + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4005 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 4005 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + - name: "app-router" + consumedBTPServices: + - cap-uaa + - cap-saas-reg + - cap-html5-repo-rt + deploymentDefinition: + type: Router + image: some.repo.example.com/cap-app/router:4.0.1 + env: + - name: PORT + value: "3000" + ports: + - name: router-port + port: 3000 + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 3000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 3000 + initialDelaySeconds: 20 + periodSeconds: 10 + timeoutSeconds: 2 + resources: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 20m + memory: 50Mi + podSecurityContext: + runAsUser: 2000 + fsGroup: 2000 + - name: "service-content" + consumedServices: + - cap-uaa + - cap-portal + - cap-html5-repo-host + jobDefinition: + type: Content + image: some.repo.example.com/cap-app/content:1.0.1 + securityContext: + runAsUser: 1000 + runAsGroup: 2000 + - name: "mtx-runner" + consumedServices: # ... + jobDefinition: + type: TenantOperation + image: some.repo.example.com/cap-app/server:3.22.11 + backoffLimit: 2 + ttlSecondsAfterFinished: 300 + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + - name: "notify-upgrade" + consumedServices: [] + jobDefinition: + type: CustomTenantOperation + image: some.repo.example.com/cap-app/server:3.22.11 + command: ["npm", "run", "notify:upgrade"] + backoffLimit: 1 + - name: "create-test-data" + consumedServices: + - cap-service-manager + jobDefinition: + type: CustomTenantOperation + image: some.repo.example.com/cap-app/server:3.22.11 + command: ["npm", "run ", "deploy:testdata"] + tenantOperations: + provisioning: + - workloadName: "mtx-runner" + - workloadName: "create-test-data" + upgrade: + - workloadName: "notify-upgrade" + continueOnFailure: true + - workloadName: "mtx-runner" + - workloadName: "create-test-data" +``` +> NOTE: +> The CAP Operator [workloads](../../../reference/#sme.sap.com/v1alpha1.WorkloadDetails) supports several configurations (present in the [kubernetes API](https://kubernetes.io/docs/reference/using-api/)) which can be configured by looking into our API reference: +> - [Container API reference](../../../reference/#sme.sap.com/v1alpha1.ContainerDetails) for generic container specific configuration +> - [Deployment API reference](../../../reference/#sme.sap.com/v1alpha1.DeploymentDetails) for deployment specific configuration +> - [Job API reference](../../../reference/#sme.sap.com/v1alpha1.JobDetails) for job specific configuration \ No newline at end of file diff --git a/website/content/en/docs/usage/resources/captenant.md b/website/content/en/docs/usage/resources/captenant.md new file mode 100644 index 0000000..4297b4a --- /dev/null +++ b/website/content/en/docs/usage/resources/captenant.md @@ -0,0 +1,32 @@ +--- +title: "CAPTenant" +linkTitle: "CAPTenant" +weight: 30 +type: "docs" +description: > + How to configure the `CAPTenant` resource +--- + +{{< alert color="warning" title="Warning" >}} +The `CAPTenant` resource is completely managed by the operator and should not be created / modified manually. For details of how `CAPTenant` is created, see page on [tenant subscription](../../tenant-provisioning). +{{< /alert >}} + +The `CAPTenant` resource indicates the existence of tenant in the related application (or one that is current being provisioned). The resource starts with a `Provisioning` state and moves to `Ready` when successfully provisioned. Managing tenants as Kubernetes resources allows not only to control the lifecycle of the entity, but also allows to control other requirements which should be fulfilled for the application to serve tenant specific requests (for example, creating of networking resources). + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + name: cap-app-consumer-ge455 + namespace: cap-ns +spec: + capApplicationInstance: cap-app + subDomain: consumer-x + tenantId: cb46733-1279-48be-fdf434-aa2bae55d7b5 + version: "1" + versionUpgradeStrategy: always +``` + +The specification contains attributes relevant for BTP which identifies a tenant like `tenantId` and `subDomain`. + +The `version` field corresponds to the `CAPApplicationVersion` on which the tenant is provisioned or was upgraded. When a newer `CAPApplicationVersion` is available, the operator automatically increments the tenant version which triggers the upgrade process. The `versionUpgradeStrategy` is by default `always`, but could be set to `none` in exceptional cases to prevent automatic upgrade of the tenant. diff --git a/website/content/en/docs/usage/resources/captenantoperation.md b/website/content/en/docs/usage/resources/captenantoperation.md new file mode 100644 index 0000000..de41cc9 --- /dev/null +++ b/website/content/en/docs/usage/resources/captenantoperation.md @@ -0,0 +1,44 @@ +--- +title: "CAPTenantOperation" +linkTitle: "CAPTenantOperation" +weight: 40 +type: "docs" +description: > + How to configure the `CAPTenantOperation` resource +--- + +{{< alert color="warning" title="Warning" >}} +The `CAPTenantOperation` resource is managed by the operator and should not be created / modified manually. The creation of `CAPTenantOperation` is initiated by the `CAPTenant` for executing provisioning, deprovisioning or upgrade. +{{< /alert >}} + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: cap-app-consumer-ge455-77kb9 + namespace: cap-ns +spec: + capApplicationVersionInstance: cav-cap-app-v2 + operation: upgrade + steps: + - continueOnFailure: true + name: mtx-runner + type: CustomTenantOperation + - name: mtx-runner + type: TenantOperation + - name: create-test-data + type: CustomTenantOperation + subDomain: consumer-x + tenantId: cb46733-1279-48be-fdf434-aa2bae55d7b5 +``` + +The above example shows a `CAPTenantOperation` created to execute upgrade operation on a tenant. In addition to tenant details, the `CAPApplicationVersion` to be used for the operation is specified. In case of upgrade or provisioning operation this would be the target `CAPApplicationVersion` whereas for deprovisioning it would be the current `CAPApplicationVersion` of the tenant. + +The operation is completed by executing a series of steps (jobs) which are specified in or derived from the `CAPApplicationVersion`. Each step refers to a workload of type `TenantOperation` or `CustomTenantOperation`. When `CAPTenantOperation` is created by the operator, there should be at least one step of type `TenantOperation` (which is the job used for the database schema update using CAP provided modules). + +`CustomTenantOperation` jobs are hooks provided to the application, which can be executed before or after the actual `TenantOperation`. For applications to be able to identify the context of an execution each job is injected with the following environment variables: + +- `CAPOP_APP_VERSION`: The (semantic) version from the relevant `CAPApplicationVersion` +- `CAPOP_TENANT_ID`: Tenant identifier of the tenant for which the operation is executed +- `CAPOP_TENANT_OPERATION`: The type of operation - `provisioning`, `deprovisioning` or `upgrade` +- `CAPOP_TENANT_SUBDOMAIN`: Subdomain (from sub-account) belonging to the tenant for which the operation is executed diff --git a/website/content/en/docs/usage/tenant-provisioning.md b/website/content/en/docs/usage/tenant-provisioning.md new file mode 100644 index 0000000..7ad8299 --- /dev/null +++ b/website/content/en/docs/usage/tenant-provisioning.md @@ -0,0 +1,65 @@ +--- +title: "Tenant Subscription" +linkTitle: "Tenant Subscription" +weight: 30 +type: "docs" +description: > + How tenant provisioning works +--- + +From the perspective of the CAP Operator, a valid tenant for an application is represented by the resource `CAPTenant`. It refers to the `CAPApplication` it belongs to and specifies details of the BTP sub-account representing the tenant. + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenant +metadata: + name: cap-app-01-provider + namespace: cap-app-01 +spec: + capApplicationInstance: cap-app-01 # <-- reference to the CAPApplication + subDomain: app-provider + tenantId: aa2bae55d7b5-1279-456564-a7b0-aa2bae55d7b5 + version: "1.0.0" # <-- expected version of the application + versionUpgradeStrategy: always # <-- always / never +``` + +## Tenant Provisioning + +The process of tenant provisioning starts when a consumer sub-account subscribes to the application, either via the BTP Cockpit or using the APIs provided by the SaaS Provisioning Service. This in turn initiates the asynchronous callback from the SaaS Provisioning Service instance into the cluster, and the request is handled by the [Subscription Server]({{< ref "docs/concepts/operator-components/subscription-server.md" >}}). The subscription server validates the request and creates an instance of `CAPTenant` for the identified `CAPApplication`. + +{{< alert color="warning" title="Warning" >}} +An instance of `CAPTenant` must not be created or deleted manually within the cluster. A new instance has to be created by the Subscription Server after receiving a provisioning call from BTP SaaS Provisioning Service. +{{< /alert >}} + +The controller, observing the new `CAPTenant` will initiate the provisioning process by creating the resource `CAPTenantOperation` which represents the provisioning operation. + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: cap-app-01-provider-sgz8b + namespace: cap-app-01 +spec: + capApplicationVersionInstance: cav-cap-app-01-1 # <-- latest CAPApplicationVersion in Ready state + subDomain: app-provider + tenantId: aa2bae55d7b5-1279-456564-a7b0-aa2bae55d7b5 + operation: provisioning # <-- valid values are provisioning, deprovisioning and upgrade + steps: + - name: cap-backend # <-- derived from workload of type CAP (when workload of type TenantOperation is not specified) + type: TenantOperation +``` + +The `CAPTenantOperation` is further reconciled to create Kubernetes Jobs (steps) which are derived from the latest `CAPApplicationVersion` which is in `Ready` state. The steps comprise of a `TenantOperation` job and optional `CustomTenantOperation` steps. The `TenantOperation` step uses built in cli based tenant operations from `@sap/cds-mtxs` to execute tenant provisioning. + +The `CAPTenant` reaches a Ready state, only after + +- Successful completion of all `CAPTenantOperation` steps +- Creation of Istio `VirtualService` which allows HTTP requests on the tenant subdomain to reach the application + +![tenant-provisioning](/img/activity-tenantprovisioning.png) + +## Tenant Deprovisioning + +Similar to the tenant provisioning process, when a tenant unsubscribes from the application, the request is received by the Subscription Server. It validates the existence and status of the `CAPTenant` and submits a request for deletion to the Kubernetes API server. + +The controller identifies that the `CAPTenant` has to be deleted, but withholds deletion till it can create and watch for successful completion of a `CAPTenantOperation` of type deprovisioning. The `CAPTenantOperation` creates the corresponding jobs (steps) which executes the tenant deprovisioning. diff --git a/website/content/en/docs/usage/version-upgrade.md b/website/content/en/docs/usage/version-upgrade.md new file mode 100644 index 0000000..5b65315 --- /dev/null +++ b/website/content/en/docs/usage/version-upgrade.md @@ -0,0 +1,120 @@ +--- +title: "Application Upgrade" +linkTitle: "Application Upgrade" +weight: 40 +type: "docs" +description: > + How to upgrade to a new Application Version +--- + +An important lifecycle aspect of operating multi-tenant CAP Applications is the tenant upgrade process. With CAP Operator these tenant upgrades can be fully automated by providing a new instance of `capapplicationversions.sme.sap.com` custom resource. +As you've already seen during [initial deployment]({{< ref "/deploying-application.md" >}}), the `CAPApplicationVersion` resource describes the different components (workloads) of an application version that includes the container image to be used and the services consumed by each component. +To upgrade the application, one needs to provide a new `CAPApplicationVersion` with the relevant `image` for each component and use a newer (higher) semantic version in the `version` field. See [API Reference](../../reference/#sme.sap.com/v1alpha1.CAPApplicationVersion). + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPApplicationVersion +metadata: + name: cav-cap-app-01-2 + namespace: cap-app-01 +spec: + capApplicationInstance: cap-cap-app-01 # <-- reference to CAPApplication in the same namespace + version: "2.0.1" # <-- semantic version + registrySecrets: + - regcred + workloads: + - name: cap-backend + consumedBTPServices: + - app-uaa + - app-service-manager + - app-saas-registry + deploymentDefinition: + type: CAP # <-- indicates the CAP application server + image: app.some.repo.example.com/srv/server:0.0.2 + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + - name: app-router + consumedBTPServices: + - app-uaa + - app-destination + - app-saas-registry + - app-html5-repo-runtime + - app-portal + deploymentDefinition: + type: Router + image: app.some.repo.example.com/approuter/approuter:0.0.2 + env: + - name: PORT + value: 4000 + - name: TENANT_HOST_PATTERN + value: "^(.*).(cap-app-01.cluster.shoot.canary.k8s-hana.ondemand.co|alt.shoot.example.com)" + - name: service-content + consumedBTPServices: + - app-uaa + - app-html5-repo-host + - app-portal + jobDefinition: + type: Content + image: app.some.repo.example.com/approuter/content:0.0.2 + backoffLimit: 1 + - name: mtx-runner + consumedBTPServices: + - app-uaa + - app-service-manager + - app-saas-registry + jobDefinition: + type: TenantOperation + image: app.some.repo.example.com/approuter/content:0.0.2 + env: + - name: CDS_ENV + value: production + - name: CDS_MTX_PROVISIONING_CONTAINER + value: '{"provisioning_parameters": { "database_id": "16e25c51-5455-4b17-a4d7-43545345345"}}' + - name: notify-upgrade + consumedBTPServices: [] + jobDefinition: + type: CustomTenantOperation + image: app.some.repo.example.com/approuter/content:0.0.2 + command: ["npm", "run", "notify:upgrade"] + backoffLimit: 1 + env: + - name: TARGET_DL + value: group_xyz@sap.com + tenantOperations: + upgrade: + - workloadName: mtx-runner + - workloadName: notify-upgrade + continueOnFailure: true +``` + +Note that in this version (compared to version "1" used for [initial deployment]({{< ref "/deploying-application.md" >}})), new workloads of type `TenantOperation` and `CustomTenantOperation` have been added. + +The controller component of the CAP Operator reacts to the new `CAPApplicationVersion` resource and triggers another deployment for application server, router and triggers the content deployment job. Once the new `CAPApplicationVersion` is `Ready`, **the controller then proceeds to automatically upgrade all relevant tenants** i.e. by updating the `version` attribute on the `CAPTenant` resources. + +The reconciliation of a `CAPTenant` changes its state to `Upgrading` and creates the `CAPTenantOperation` resource of type upgrade. + +```yaml +apiVersion: sme.sap.com/v1alpha1 +kind: CAPTenantOperation +metadata: + name: cap-app-01-provider-fgdfg + namespace: cap-app-01 +spec: + capApplicationVersionInstance: cav-cap-app-01-2 + subDomain: cap-provider + tenantId: aa2bae55d7b5-1279-456564-a7b0-aa2bae55d7b5 + operation: upgrade # possible values are provisioning / upgrade / deprovisioning + steps: + - name: "mtx-runner" + type: TenantOperation + - name: "notify-upgrade" + type: CustomTenantOperation + continueOnFailure: true # <-- can be set for workloads of type CustomTenantOperation to indicate that the success of this job is optional for the completion of the overall operation +``` + +The `CAPTenantOperation` creates jobs for each of the steps involved and executes them sequentially, till all the jobs are finished or one of them fails. The `CAPTenant` is notified about the result and updates its state accordingly. + +A successful completion of the `CAPTenantOperation` will cause the `VirtualService` managed by the `CAPTenant` to be modified to route HTTP traffic to the deployments of the newer `CAPApplicationVersion`. Once all tenants have been upgraded the older `CAPApplicationVersion` can be deleted. diff --git a/website/go.mod b/website/go.mod new file mode 100644 index 0000000..e7ed3ea --- /dev/null +++ b/website/go.mod @@ -0,0 +1,5 @@ +module github.com/sap/cap-operator/website + +go 1.21 + +require github.com/google/docsy v0.7.1 // indirect diff --git a/website/go.sum b/website/go.sum new file mode 100644 index 0000000..d9ed4c5 --- /dev/null +++ b/website/go.sum @@ -0,0 +1,5 @@ +github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= +github.com/google/docsy v0.7.1 h1:DUriA7Nr3lJjNi9Ulev1SfiG1sUYmvyDeU4nTp7uDxY= +github.com/google/docsy v0.7.1/go.mod h1:JCmE+c+izhE0Rvzv3y+AzHhz1KdwlA9Oj5YBMklJcfc= +github.com/google/docsy/dependencies v0.7.1/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4= +github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= diff --git a/website/hugo.yaml b/website/hugo.yaml new file mode 100644 index 0000000..34d6e73 --- /dev/null +++ b/website/hugo.yaml @@ -0,0 +1,167 @@ +baseURL: "https://sap.github.io/cap-operator" +title: "CAP Operator" + +enableRobotsTXT: true + +# Will give values to .Lastmod etc. +enableGitInfo: true + +# Language settings +contentDir: "content/en" +defaultContentLanguage: "en" +defaultContentLanguageInSubdir: false +# Useful when translating. +enableMissingTranslationPlaceholders: true + +# horizontal (top level) menu items +menu: + main: + # NOTE: the "Documentation" menu item is sourced from the front matter of the _index.md file + - name: "GitHub" + weight: 90 + url: "https://github.com/sap/cap-operator/" + pre: "" + +# You can add your own taxonomies +taxonomies: + tag: "tags" + category: "categories" + +# If used, must have same lang as taxonomyCloud +taxonomyCloudTitle: ["Tag Cloud", "Categories"] + +# set taxonomyPageHeader = [] to hide taxonomies on the page headers +taxonomyPageHeader: ["tags", "categories"] + +# Configure how URLs look like per section. +permalinks: + blog: "/:section/:year/:month/:day/:slug/" + +# Image processing configuration. +imaging: + resampleFilter: "CatmullRom" + quality: 90 + anchor: "smart" + +# Language configuration +languages: + en: + languageName: "English" + contentDir: "content/en" + # Weight used for sorting. + weight: 1 + params: + title: "CAP Operator" + description: "CAP Multi-tenant Application Operator for Kubernetes" + +markup: + goldmark: + renderer: + unsafe: true + highlight: + # See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html + style: "nord" + # Uncomment if you want your chosen highlight style used for code blocks without a specified language + guessSyntax: "true" + codeFences: true + +# Everything below this are Site Params + +# Comment out if you don't want the "print entire section" link enabled. +outputs: + section: ["HTML", "print", "RSS"] + +params: + taxonomy: + # set taxonomyCloud = [] to hide taxonomy clouds + taxonomyCloud: ["tags", "categories"] + + copyright: "ERP for SME" + # privacy_policy = "https://policies.google.com/privacy" + + # Menu title if your navbar has a versions selector to access old versions of your site. + # This menu appears only if you have at least one [params.versions] set. + version_menu: "Releases" + + # Flag used in the "version-banner" partial to decide whether to display a + # banner on every page indicating that this is an archived version of the docs. + # Set this flag to "true" if you want to display the banner. + archived_version: false + + # The version number for the version of the docs represented in this doc set. + # Used in the "version-banner" partial to display a version number for the + # current doc set. + version: "0.0" + + # A link to latest version of the docs. Used in the "version-banner" partial to + # point people to the main doc site. + url_latest_version: "https://sap.github.io/cap-operator" + + # Repository configuration (URLs for in-page links to opening issues and suggesting changes) + github_repo: "https://github.com/sap/cap-operator" + # An optional link to a related project repo. For example, the sibling repository where your product code lives. + github_project_repo: "https://github.com/sap/cap-operator" + + # Specify a value here if your content directory is not in your repo's root directory + github_subdir: "website" + + # Uncomment this if you have a newer GitHub repo with "main" as the default branch, + # or specify a new value if you want to reference another branch in your GitHub links + github_branch: "main" + + # Enable Algolia DocSearch + algolia_docsearch: false + + # Enable Lunr.js offline search + offlineSearch: true + + # User interface configuration + ui: + # Set to true to disable breadcrumb navigation. + breadcrumb_disable: false + # Set to true to disable the About link in the site footer + footer_about_disable: false + # Set to false if you don't want to display a logo (/assets/icons/logo.svg) in the top navbar + navbar_logo: false + # Set to true if you don't want the top navbar to be translucent when over a `block/cover`, like on the homepage. + navbar_translucent_over_cover_disable: false + # Enable to show the side bar menu in its compact state. + sidebar_menu_compact: true + # Set to true to hide the sidebar search box (the top nav search box will still be displayed if search is enabled) + sidebar_search_disable: true + + # Adds a H2 section titled "Feedback" to the bottom of each doc. The responses are sent to Google Analytics as events. + # This feature depends on [services.googleAnalytics] and will be disabled if "services.googleAnalytics.id" is not set. + # If you want this feature, but occasionally need to remove the "Feedback" section from a single page, + # add "hide_feedback: true" to the page's front matter. + feedback: + enable: false + # The responses that the user sees after clicking "yes" (the page was helpful) or "no" (the page was not helpful). + # yes = 'Glad to hear it! Please tell us how we can improve.' + # no = 'Sorry to hear that. Please tell us how we can improve.' + + # Adds a reading time to the top of each doc. + # If you want this feature, but occasionally need to remove the Reading time from a single page, + # add "hide_readingtime: true" to the page's front matter + readingtime: + enable: true + + links: + # End user relevant links. These will show up on left side of footer and in the community page if you have one. + user: + - name: "Ask for help" + url: "mailto:DL_64A676DD6A9245028D2A9DCC@global.corp.sap" + icon: "fa fa-envelope" + desc: "Help from development team" + # Developer relevant links. These will show up on right side of footer and in the community page if you have one. + developer: + - name: "GitHub" + urlL: "https://github.com/sap/cap-operator/" + icon: "fab fa-github" + desc: "Development takes place here!" + +# Add docsy as hugo module +module: + imports: + - path: "github.com/google/docsy" + - path: "github.com/google/docsy/dependencies" \ No newline at end of file diff --git a/website/includes/api-reference.html b/website/includes/api-reference.html new file mode 100644 index 0000000..e4117f6 --- /dev/null +++ b/website/includes/api-reference.html @@ -0,0 +1,2234 @@ +

Packages:

+ +

sme.sap.com/v1alpha1

+Resource Types: + +

CAPApplication +

+
+

CAPApplication is the schema for capapplications API

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sme.sap.com/v1alpha1 + +
+kind
+string +
CAPApplication
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +CAPApplicationSpec + + +
+

CAPApplication spec

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+domains
+ + +ApplicationDomains + + +
+

Domains used by the application

+
+globalAccountId
+ +string + +
+

SAP BTP Global Account Identifier where services are entitles for the current application

+
+btpAppName
+ +string + +
+

Short name for the application (similar to BTP XSAPPNAME)

+
+provider
+ + +BTPTenantIdentification + + +
+

Provider subaccount where application services are created

+
+btp
+ + +BTP + + +
+

SAP BTP Services consumed by the application

+
+
+status
+ + +CAPApplicationStatus + + +
+

CAPApplication status

+
+

CAPApplicationVersion +

+
+

CAPApplicationVersion defines the schema for capapplicationversions API

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sme.sap.com/v1alpha1 + +
+kind
+string +
CAPApplicationVersion
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +CAPApplicationVersionSpec + + +
+

CAPApplicationVersion spec

+
+
+ + + + + + + + + + + + + + + + + + + + + +
+capApplicationInstance
+ +string + +
+

Denotes to which CAPApplication the current version belongs

+
+version
+ +string + +
+

Semantic version

+
+registrySecrets
+ +[]string + +
+

Registry secrets used to pull images of the application components

+
+workloads
+ + +[]WorkloadDetails + + +
+

Information about the Workloads

+
+tenantOperations
+ + +TenantOperations + + +
+

Tenant Operations may be used to specify how jobs are sequenced for the different tenant operations

+
+
+status
+ + +CAPApplicationVersionStatus + + +
+

CAPApplicationVersion status

+
+

CAPTenant +

+
+

CAPTenant defines the schema for captenants API

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sme.sap.com/v1alpha1 + +
+kind
+string +
CAPTenant
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +CAPTenantSpec + + +
+

CAPTenant spec

+
+
+ + + + + + + + + + + + + + + + + +
+capApplicationInstance
+ +string + +
+

Denotes to which CAPApplication the current tenant belongs

+
+BTPTenantIdentification
+ + +BTPTenantIdentification + + +
+

+(Members of BTPTenantIdentification are embedded into this type.) +

+

Details of consumer sub-account subscribing to the application

+
+version
+ +string + +
+

Semver that is used to determine the relevant CAPApplicationVersion that a CAPTenant can be upgraded to (i.e. if it is not already on that version)

+
+versionUpgradeStrategy
+ + +VersionUpgradeStrategyType + + +
+

Denotes whether a CAPTenant can be upgraded. One of (‘always’, ‘never’)

+
+
+status
+ + +CAPTenantStatus + + +
+

CAPTenant status

+
+

CAPTenantOperation +

+
+

CAPTenantOperation defines the schema for captenantoperations API

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+apiVersion
+string
+ +sme.sap.com/v1alpha1 + +
+kind
+string +
CAPTenantOperation
+metadata
+ + +Kubernetes meta/v1.ObjectMeta + + +
+Refer to the Kubernetes API documentation for the fields of the +metadata field. +
+spec
+ + +CAPTenantOperationSpec + + +
+

CAPTenantOperation spec

+
+
+ + + + + + + + + + + + + + + + + +
+operation
+ + +CAPTenantOperationType + + +
+

Scope of the tenant lifecycle operation. One of ‘provisioning’, ‘deprovisioning’ or ‘upgrade’

+
+BTPTenantIdentification
+ + +BTPTenantIdentification + + +
+

+(Members of BTPTenantIdentification are embedded into this type.) +

+

BTP sub-account (tenant) for which request is created

+
+capApplicationVersionInstance
+ +string + +
+

Reference to CAPApplicationVersion for executing the operation

+
+steps
+ + +[]CAPTenantOperationStep + + +
+

Steps (jobs) to be executed for the operation to complete

+
+
+status
+ + +CAPTenantOperationStatus + + +
+

CAPTenantOperation status

+
+

ApplicationDomains +

+

+(Appears on: CAPApplicationSpec) +

+
+

Application domains

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+primary
+ +string + +
+

Primary application domain will be used to generate a wildcard TLS certificate. In SAP Gardener managed clusters this is (usually) a subdomain of the cluster domain

+
+secondary
+ +[]string + +
+

Customer specific domains to serve application endpoints (optional)

+
+dnsTarget
+ +string + +
+

Public ingress URL for the cluster Load Balancer

+
+istioIngressGatewayLabels
+ + +[]NameValue + + +
+

Labels used to identify the istio ingress-gateway component and its corresponding namespace. Usually {“app”:“istio-ingressgateway”,“istio”:“ingressgateway”}

+
+

BTP +

+

+(Appears on: CAPApplicationSpec) +

+
+
+ + + + + + + + + + + + + +
FieldDescription
+services
+ + +[]ServiceInfo + + +
+

Details of BTP Services

+
+

BTPTenantIdentification +

+

+(Appears on: CAPApplicationSpec, CAPTenantOperationSpec, CAPTenantSpec) +

+
+

Identifies an SAP BTP subaccount (tenant)

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+subDomain
+ +string + +
+

BTP subaccount subdomain

+
+tenantId
+ +string + +
+

BTP subaccount Tenant ID

+
+

CAPApplicationSpec +

+

+(Appears on: CAPApplication) +

+
+

CAPApplicationSpec defines the desired state of CAPApplication

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+domains
+ + +ApplicationDomains + + +
+

Domains used by the application

+
+globalAccountId
+ +string + +
+

SAP BTP Global Account Identifier where services are entitles for the current application

+
+btpAppName
+ +string + +
+

Short name for the application (similar to BTP XSAPPNAME)

+
+provider
+ + +BTPTenantIdentification + + +
+

Provider subaccount where application services are created

+
+btp
+ + +BTP + + +
+

SAP BTP Services consumed by the application

+
+

CAPApplicationState +(string alias)

+

+(Appears on: CAPApplicationStatus) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Consistent"

CAPApplication has been reconciled and is now consistent

+

"Deleting"

Deletion has been triggered

+

"Error"

An error occurred during reconciliation

+

"Processing"

CAPApplication is being reconciled

+
+

CAPApplicationStatus +

+

+(Appears on: CAPApplication) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+GenericStatus
+ + +GenericStatus + + +
+

+(Members of GenericStatus are embedded into this type.) +

+
+state
+ + +CAPApplicationState + + +
+

State of CAPApplication

+
+domainSpecHash
+ +string + +
+

Hash representing last known application domains

+
+lastFullReconciliationTime
+ + +Kubernetes meta/v1.Time + + +
+

The last time a full reconciliation was completed

+
+

CAPApplicationStatusConditionType +(string alias)

+
+
+ + + + + + + + + + + + +
ValueDescription

"AllTenantsReady"

"LatestVersionReady"

+

CAPApplicationVersionSpec +

+

+(Appears on: CAPApplicationVersion) +

+
+

CAPApplicationVersionSpec specifies the desired state of CAPApplicationVersion

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+capApplicationInstance
+ +string + +
+

Denotes to which CAPApplication the current version belongs

+
+version
+ +string + +
+

Semantic version

+
+registrySecrets
+ +[]string + +
+

Registry secrets used to pull images of the application components

+
+workloads
+ + +[]WorkloadDetails + + +
+

Information about the Workloads

+
+tenantOperations
+ + +TenantOperations + + +
+

Tenant Operations may be used to specify how jobs are sequenced for the different tenant operations

+
+

CAPApplicationVersionState +(string alias)

+

+(Appears on: CAPApplicationVersionStatus) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Deleting"

Deletion has been triggered

+

"Error"

An error occurred during reconciliation

+

"Processing"

CAPApplicationVersion is being processed

+

"Ready"

CAPApplicationVersion is now ready for use (dependent resources have been created)

+
+

CAPApplicationVersionStatus +

+

+(Appears on: CAPApplicationVersion) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+GenericStatus
+ + +GenericStatus + + +
+

+(Members of GenericStatus are embedded into this type.) +

+
+state
+ + +CAPApplicationVersionState + + +
+

State of CAPApplicationVersion

+
+finishedJobs
+ +[]string + +
+

List of finished Content Jobs

+
+

CAPTenantOperationSpec +

+

+(Appears on: CAPTenantOperation) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+operation
+ + +CAPTenantOperationType + + +
+

Scope of the tenant lifecycle operation. One of ‘provisioning’, ‘deprovisioning’ or ‘upgrade’

+
+BTPTenantIdentification
+ + +BTPTenantIdentification + + +
+

+(Members of BTPTenantIdentification are embedded into this type.) +

+

BTP sub-account (tenant) for which request is created

+
+capApplicationVersionInstance
+ +string + +
+

Reference to CAPApplicationVersion for executing the operation

+
+steps
+ + +[]CAPTenantOperationStep + + +
+

Steps (jobs) to be executed for the operation to complete

+
+

CAPTenantOperationState +(string alias)

+

+(Appears on: CAPTenantOperationStatus) +

+
+
+ + + + + + + + + + + + + + + + +
ValueDescription

"Completed"

CAPTenantOperation steps completed

+

"Deleting"

CAPTenantOperation deletion has been triggered

+

"Failed"

CAPTenantOperation steps have failed

+

"Processing"

CAPTenantOperation is being processed

+
+

CAPTenantOperationStatus +

+

+(Appears on: CAPTenantOperation) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+GenericStatus
+ + +GenericStatus + + +
+

+(Members of GenericStatus are embedded into this type.) +

+
+state
+ + +CAPTenantOperationState + + +
+

State of CAPTenantOperation

+
+currentStep
+ +uint32 + +
+

Current step being processed from the sequence of specified steps

+
+activeJob
+ +string + +
+

Name of the job being executed for the current step

+
+

CAPTenantOperationStep +

+

+(Appears on: CAPTenantOperationSpec) +

+
+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of the workload from the referenced CAPApplicationVersion

+
+type
+ + +JobType + + +
+

Type of job. One of ‘TenantOperation’ or ‘CustomTenantOperation’

+
+continueOnFailure
+ +bool + +
+

Indicates whether the operation can continue in case of step failure. Relevant only for type ‘CustomTenantOperation’

+
+

CAPTenantOperationType +(string alias)

+

+(Appears on: CAPTenantOperationSpec) +

+
+
+ + + + + + + + + + + + + + +
ValueDescription

"deprovisioning"

Deprovision tenant

+

"provisioning"

Provision tenant

+

"upgrade"

Upgrade tenant

+
+

CAPTenantSpec +

+

+(Appears on: CAPTenant) +

+
+

CAPTenantSpec defines the desired state of the CAPTenant

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+capApplicationInstance
+ +string + +
+

Denotes to which CAPApplication the current tenant belongs

+
+BTPTenantIdentification
+ + +BTPTenantIdentification + + +
+

+(Members of BTPTenantIdentification are embedded into this type.) +

+

Details of consumer sub-account subscribing to the application

+
+version
+ +string + +
+

Semver that is used to determine the relevant CAPApplicationVersion that a CAPTenant can be upgraded to (i.e. if it is not already on that version)

+
+versionUpgradeStrategy
+ + +VersionUpgradeStrategyType + + +
+

Denotes whether a CAPTenant can be upgraded. One of (‘always’, ‘never’)

+
+

CAPTenantState +(string alias)

+

+(Appears on: CAPTenantStatus) +

+
+
+ + + + + + + + + + + + + + + + + + + + +
ValueDescription

"Deleting"

Deletion has been triggered

+

"Provisioning"

Tenant is being provisioned

+

"ProvisioningError"

Tenant provisioning ended in error

+

"Ready"

Tenant has been provisioned/upgraded and is now ready for use

+

"UpgradeError"

Tenant upgrade failed

+

"Upgrading"

Tenant is being upgraded

+
+

CAPTenantStatus +

+

+(Appears on: CAPTenant) +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+GenericStatus
+ + +GenericStatus + + +
+

+(Members of GenericStatus are embedded into this type.) +

+
+state
+ + +CAPTenantState + + +
+

State of CAPTenant

+
+currentCAPApplicationVersionInstance
+ +string + +
+

Specifies the current version of the tenant after provisioning or upgrade

+
+previousCAPApplicationVersions
+ +[]string + +
+

Previous versions of the tenant (first to last)

+
+lastFullReconciliationTime
+ + +Kubernetes meta/v1.Time + + +
+

The last time a full reconciliation was completed

+
+

ContainerDetails +

+

+(Appears on: DeploymentDetails, JobDetails) +

+
+

ContainerDetails specifies the details of the Container

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+image
+ +string + +
+

Image info for the container

+
+imagePullPolicy
+ + +Kubernetes core/v1.PullPolicy + + +
+

Pull policy for the container image

+
+command
+ +[]string + +
+

Entrypoint array for the container

+
+env
+ + +[]Kubernetes core/v1.EnvVar + + +
+

Environment Config for the Container

+
+resources
+ + +Kubernetes core/v1.ResourceRequirements + + +
+

Resources

+
+securityContext
+ + +Kubernetes core/v1.SecurityContext + + +
+

SecurityContext for the Container

+
+podSecurityContext
+ + +Kubernetes core/v1.PodSecurityContext + + +
+

SecurityContext for the Pod

+
+

DeploymentDetails +

+

+(Appears on: WorkloadDetails) +

+
+

DeploymentDetails specifies the details of the Deployment

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ContainerDetails
+ + +ContainerDetails + + +
+

+(Members of ContainerDetails are embedded into this type.) +

+
+type
+ + +DeploymentType + + +
+

Type of the Deployment

+
+replicas
+ +int32 + +
+

Number of replicas

+
+ports
+ + +[]Ports + + +
+

Port configuration

+
+livenessProbe
+ + +Kubernetes core/v1.Probe + + +
+

Liveness probe

+
+readinessProbe
+ + +Kubernetes core/v1.Probe + + +
+

Readiness probe

+
+

DeploymentType +(string alias)

+

+(Appears on: DeploymentDetails) +

+
+

Type of deployment

+
+ + + + + + + + + + + + + + +
ValueDescription

"Additional"

Additional deployment type

+

"CAP"

CAP backend server deployment type

+

"Router"

Application router deployment type

+
+

GenericStatus +

+

+(Appears on: CAPApplicationStatus, CAPApplicationVersionStatus, CAPTenantOperationStatus, CAPTenantStatus) +

+
+

Custom resource status

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+observedGeneration
+ +int64 + +
+

Observed generation of the resource where this status was identified

+
+conditions
+ + +[]Kubernetes meta/v1.Condition + + +
+

State expressed as conditions

+
+

JobDetails +

+

+(Appears on: WorkloadDetails) +

+
+

JobDetails specifies the details of the Job

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+ContainerDetails
+ + +ContainerDetails + + +
+

+(Members of ContainerDetails are embedded into this type.) +

+
+type
+ + +JobType + + +
+

Type of Job

+
+backoffLimit
+ +int32 + +
+

Specifies the number of retries before marking this job failed.

+
+ttlSecondsAfterFinished
+ +int32 + +
+

Specifies the time after which the job may be cleaned up.

+
+

JobType +(string alias)

+

+(Appears on: CAPTenantOperationStep, JobDetails) +

+
+

Type of Job

+
+ + + + + + + + + + + + + + +
ValueDescription

"Content"

job for deploying content or configuration to (BTP) services

+

"CustomTenantOperation"

job for custom tenant operation e.g. pre/post hooks for a tenant operation

+

"TenantOperation"

job for tenant operation e.g. deploying relevant data to a tenant

+
+

NameValue +

+

+(Appears on: ApplicationDomains) +

+
+

Generic Name/Value configuration

+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+
+value
+ +string + +
+
+

PortNetworkPolicyType +(string alias)

+

+(Appears on: Ports) +

+
+

Type of NetworkPolicy for the port

+
+ + + + + + + + + + + + +
ValueDescription

"Application"

Expose the port for the current application versions pod(s) scope

+

"Cluster"

Expose the port for any pod(s) in the overall cluster scope

+
+

Ports +

+

+(Appears on: DeploymentDetails) +

+
+

Configuration of Service Ports for the deployment

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+appProtocol
+ +string + +
+

App protocol used by the service port

+
+name
+ +string + +
+

Name of the service port

+
+networkPolicy
+ + +PortNetworkPolicyType + + +
+

Network Policy of the service port

+
+port
+ +int32 + +
+

The port number used for container and the corresponding service (if any)

+
+routerDestinationName
+ +string + +
+

Destination name which may be used by the Router deployment to reach this backend service

+
+

ServiceInfo +

+

+(Appears on: BTP) +

+
+

Service information

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of service instance

+
+secret
+ +string + +
+

Secret containing service access credentials

+
+class
+ +string + +
+

Type of service

+
+

StatusConditionType +(string alias)

+
+
+ + + + + + + + + + +
ValueDescription

"Ready"

+

TenantOperationWorkloadReference +

+

+(Appears on: TenantOperations) +

+
+
+ + + + + + + + + + + + + + + + + +
FieldDescription
+workloadName
+ +string + +
+

Reference to a specified workload of type ‘TenantOperation’ or ‘CustomTenantOperation’

+
+continueOnFailure
+ +bool + +
+

Indicates whether to proceed with remaining operation steps in case of failure. Relevant only for ‘CustomTenantOperation’

+
+

TenantOperations +

+

+(Appears on: CAPApplicationVersionSpec) +

+
+

Configuration used to sequence tenant related jobs for a given tenant operation

+
+ + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+provisioning
+ + +[]TenantOperationWorkloadReference + + +
+

Tenant provisioning steps

+
+upgrade
+ + +[]TenantOperationWorkloadReference + + +
+

Tenant upgrade steps

+
+deprovisioning
+ + +[]TenantOperationWorkloadReference + + +
+

Tenant deprovisioning steps

+
+

VersionUpgradeStrategyType +(string alias)

+

+(Appears on: CAPTenantSpec) +

+
+
+ + + + + + + + + + + + +
ValueDescription

"always"

Always (default)

+

"never"

Never

+
+

WorkloadDetails +

+

+(Appears on: CAPApplicationVersionSpec) +

+
+

WorkloadDetails specifies the details of the Workload

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+name
+ +string + +
+

Name of the workload

+
+consumedBTPServices
+ +[]string + +
+

List of BTP services consumed by the current application component workload. These services must be defined in the corresponding CAPApplication.

+
+labels
+ +map[string]string + +
+

Custom labels for the current workload

+
+annotations
+ +map[string]string + +
+

Annotations for the current workload, in case of Deployments this also get copied over to any Service that may be created

+
+deploymentDefinition
+ + +DeploymentDetails + + +
+

Definition of a deployment

+
+jobDefinition
+ + +JobDetails + + +
+

Definition of a job

+
+
+

+Generated with gen-crd-api-reference-docs +on git commit 867824a. +

diff --git a/website/includes/chart-values.md b/website/includes/chart-values.md new file mode 100644 index 0000000..cf79b4b --- /dev/null +++ b/website/includes/chart-values.md @@ -0,0 +1,67 @@ +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| image.tag | string | `"latest"` | Default image tag (can be overwritten on component level) | +| image.pullPolicy | string | `"IfNotPresent"` | Default image pull policy (can be overwritten on component level) | +| imagePullSecrets | list | `[{"name":"regcred"}]` | Default image pull secrets (can be overwritten on component level) | +| podSecurityContext | object | `{}` | Default pod security content (can be overwritten on component level) | +| nodeSelector | object | `{}` | Default node selector (can be overwritten on component level) | +| affinity | object | `{}` | Default affinity settings (can be overwritten on component level) | +| tolerations | list | `[]` | Default tolerations (can be overwritten on component level) | +| priorityClassName | string | `""` | Default priority class (can be overwritten on component level) | +| controller.replicas | int | `1` | Replicas | +| controller.image.repository | string | `"ghcr.io/sap/cap-operator/main/cap-controller"` | Image repository | +| controller.image.tag | string | `""` | Image tag | +| controller.image.pullPolicy | string | `""` | Image pull policy | +| controller.imagePullSecrets | list | `[]` | Image pull secrets | +| controller.podSecurityContext | object | `{}` | Pod security content | +| controller.nodeSelector | object | `{}` | Node selector | +| controller.affinity | object | `{}` | Affinity settings | +| controller.tolerations | list | `[]` | Tolerations | +| controller.priorityClassName | string | `""` | Priority class | +| controller.securityContext | object | `{}` | Security context | +| controller.resources.limits.memory | string | `"500Mi"` | Memory limit | +| controller.resources.limits.cpu | float | `0.2` | CPU limit | +| controller.resources.requests.memory | string | `"50Mi"` | Memory request | +| controller.resources.requests.cpu | float | `0.02` | CPU request | +| subscriptionServer.replicas | int | `1` | Replicas | +| subscriptionServer.image.repository | string | `"ghcr.io/sap/cap-operator/main/server"` | Image repository | +| subscriptionServer.image.tag | string | `""` | Image tag | +| subscriptionServer.image.pullPolicy | string | `""` | Image pull policy | +| subscriptionServer.imagePullSecrets | list | `[]` | Image pull secrets | +| subscriptionServer.podSecurityContext | object | `{}` | Pod security content | +| subscriptionServer.nodeSelector | object | `{}` | Node selector | +| subscriptionServer.affinity | object | `{}` | Affinity settings | +| subscriptionServer.tolerations | list | `[]` | Tolerations | +| subscriptionServer.priorityClassName | string | `""` | Priority class | +| subscriptionServer.securityContext | object | `{}` | Security context | +| subscriptionServer.resources.limits.memory | string | `"200Mi"` | Memory limit | +| subscriptionServer.resources.limits.cpu | float | `0.1` | CPU limit | +| subscriptionServer.resources.requests.memory | string | `"20Mi"` | Memory request | +| subscriptionServer.resources.requests.cpu | float | `0.01` | CPU request | +| subscriptionServer.port | int | `4000` | Service port | +| subscriptionServer.istioSystemNamespace | string | `"istio-system"` | The namespace in the cluster where istio system components are installed | +| subscriptionServer.ingressGatewayLabels | object | `{"app":"istio-ingressgateway","istio":"ingressgateway"}` | Labels used to identify the istio ingress-gateway component | +| subscriptionServer.dnsTarget | string | `"public-ingress.clusters.cs.services.sap"` | The dns target mentioned on the public ingress gateway service used in the cluster | +| subscriptionServer.domain | string | `"cap-operator.clusters.cs.services.sap"` | The domain under which the cap operator subscription server would be available | +| webhook.sidecar | bool | `false` | Side car to mount admission review | +| webhook.replicas | int | `1` | Replicas | +| webhook.image.repository | string | `"ghcr.io/sap/cap-operator/main/web-hooks"` | Image repository | +| webhook.image.tag | string | `""` | Image tag | +| webhook.image.pullPolicy | string | `""` | Image pull policy | +| webhook.imagePullSecrets | list | `[]` | Image pull secrets | +| webhook.podSecurityContext | object | `{}` | Pod security content | +| webhook.nodeSelector | object | `{}` | Node selector | +| webhook.affinity | object | `{}` | Affinity settings | +| webhook.tolerations | list | `[]` | Tolerations | +| webhook.priorityClassName | string | `""` | Priority class | +| webhook.securityContext | object | `{}` | Security context | +| webhook.resources.limits.memory | string | `"200Mi"` | Memory limit | +| webhook.resources.limits.cpu | float | `0.1` | CPU limit | +| webhook.resources.requests.memory | string | `"20Mi"` | Memory request | +| webhook.resources.requests.cpu | float | `0.01` | CPU request | +| webhook.service | object | `{"port":443,"targetPort":1443,"type":"ClusterIP"}` | Service port | +| webhook.service.type | string | `"ClusterIP"` | Service type | +| webhook.service.port | int | `443` | Service port | +| webhook.service.targetPort | int | `1443` | Target port | diff --git a/website/layouts/shortcodes/include.html b/website/layouts/shortcodes/include.html new file mode 100644 index 0000000..1ed3ff9 --- /dev/null +++ b/website/layouts/shortcodes/include.html @@ -0,0 +1 @@ +{{ .Get 0 | readFile | safeHTML }} \ No newline at end of file diff --git a/website/package-lock.json b/website/package-lock.json new file mode 100644 index 0000000..0322333 --- /dev/null +++ b/website/package-lock.json @@ -0,0 +1,1611 @@ +{ + "name": "website", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "devDependencies": { + "autoprefixer": "^10.4.8", + "postcss": "^8.4.16", + "postcss-cli": "^10.0.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/autoprefixer": { + "version": "10.4.15", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", + "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001520", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001521", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz", + "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.494", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.494.tgz", + "integrity": "sha512-KF7wtsFFDu4ws1ZsSOt4pdmO1yWVNWCFtijVYZPUeW4SV7/hy/AESjLn/+qIWgq7mHscNOKAwN5AIM1+YAy+Ww==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fs-extra": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-cli": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-10.1.0.tgz", + "integrity": "sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA==", + "dev": true, + "dependencies": { + "chokidar": "^3.3.0", + "dependency-graph": "^0.11.0", + "fs-extra": "^11.0.0", + "get-stdin": "^9.0.0", + "globby": "^13.0.0", + "picocolors": "^1.0.0", + "postcss-load-config": "^4.0.0", + "postcss-reporter": "^7.0.0", + "pretty-hrtime": "^1.0.3", + "read-cache": "^1.0.0", + "slash": "^5.0.0", + "yargs": "^17.0.0" + }, + "bin": { + "postcss": "index.js" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-load-config": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", + "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", + "dev": true, + "dependencies": { + "lilconfig": "^2.0.5", + "yaml": "^2.1.1" + }, + "engines": { + "node": ">= 14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": ">=8.0.9", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "postcss": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-reporter": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-7.0.5.tgz", + "integrity": "sha512-glWg7VZBilooZGOFPhN9msJ3FQs19Hie7l5a/eE6WglzYqVeH3ong3ShFcp9kDWJT1g2Y/wd59cocf9XxBtkWA==", + "dev": true, + "dependencies": { + "picocolors": "^1.0.0", + "thenby": "^1.3.4" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "dependencies": { + "pify": "^2.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yaml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + } + }, + "dependencies": { + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "autoprefixer": { + "version": "10.4.15", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", + "integrity": "sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==", + "dev": true, + "requires": { + "browserslist": "^4.21.10", + "caniuse-lite": "^1.0.30001520", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + } + }, + "caniuse-lite": { + "version": "1.0.30001521", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz", + "integrity": "sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "electron-to-chromium": { + "version": "1.4.494", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.494.tgz", + "integrity": "sha512-KF7wtsFFDu4ws1ZsSOt4pdmO1yWVNWCFtijVYZPUeW4SV7/hy/AESjLn/+qIWgq7mHscNOKAwN5AIM1+YAy+Ww==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true + }, + "fs-extra": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", + "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-stdin": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", + "dev": true + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", + "dev": true, + "requires": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "dependencies": { + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + } + } + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "nanoid": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "dev": true + }, + "node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true + }, + "postcss": { + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", + "dev": true, + "requires": { + "nanoid": "^3.3.6", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-cli": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/postcss-cli/-/postcss-cli-10.1.0.tgz", + "integrity": "sha512-Zu7PLORkE9YwNdvOeOVKPmWghprOtjFQU3srMUGbdz3pHJiFh7yZ4geiZFMkjMfB0mtTFR3h8RemR62rPkbOPA==", + "dev": true, + "requires": { + "chokidar": "^3.3.0", + "dependency-graph": "^0.11.0", + "fs-extra": "^11.0.0", + "get-stdin": "^9.0.0", + "globby": "^13.0.0", + "picocolors": "^1.0.0", + "postcss-load-config": "^4.0.0", + "postcss-reporter": "^7.0.0", + "pretty-hrtime": "^1.0.3", + "read-cache": "^1.0.0", + "slash": "^5.0.0", + "yargs": "^17.0.0" + } + }, + "postcss-load-config": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz", + "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==", + "dev": true, + "requires": { + "lilconfig": "^2.0.5", + "yaml": "^2.1.1" + } + }, + "postcss-reporter": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-7.0.5.tgz", + "integrity": "sha512-glWg7VZBilooZGOFPhN9msJ3FQs19Hie7l5a/eE6WglzYqVeH3ong3ShFcp9kDWJT1g2Y/wd59cocf9XxBtkWA==", + "dev": true, + "requires": { + "picocolors": "^1.0.0", + "thenby": "^1.3.4" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "read-cache": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", + "integrity": "sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==", + "dev": true, + "requires": { + "pify": "^2.3.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yaml": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz", + "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } +} diff --git a/website/package.json b/website/package.json new file mode 100644 index 0000000..ff8634f --- /dev/null +++ b/website/package.json @@ -0,0 +1,7 @@ +{ + "devDependencies": { + "autoprefixer": "^10.4.8", + "postcss": "^8.4.16", + "postcss-cli": "^10.0.0" + } +} diff --git a/website/static/img/activity-tenantprovisioning.png b/website/static/img/activity-tenantprovisioning.png new file mode 100644 index 0000000000000000000000000000000000000000..99e49ccda5f2f78d6fd7418e266708f97bc929f8 GIT binary patch literal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G<@i=}@*vIPG$=toxb z%?@d~l^*0XCYRZ>6}h|0HI83sIgGa-xBik#l$&f<)akA3L;j9GSV9cY4AxpP;mVo0 zmqfm6C_k99-7H~V=jjDFQPNhP(1ls?gJ92m2b~q5cRt&*B(=eTIRE;%muIGu_6Mb2 zI_&v=OJ!Z(eGYw14(X8ta^tjdUtx$d;$-8h;G{|ziB2CXJRp-=~6!{=j-tMJ9~FXI4WEe zJ+q_S{`!)8Q%qs0=1a;uiyidVe1#Pgw)5zbuM7s_dSzv}O*369!4uu4WL` z1jVmG!l8~QJv~TUTib#_Ts?LD;uNCcI+KFlfqCmwVd;l68WU~Vtd)^h$q0*hbP2`- zIgoo4G@T%mdL7d1whqpbj)UHn1pOU-2B0=;4*Vc8=vt->22MO~P*&w8$vo?DsHhrp z>7~_o<0jS8q4OQ0*rqq~r%U*a42euR1cwzH23@+zU^sr#{%+dD)+maZ-uv{fgV7y7Mo z4yL^3EAio^W=e}Lkp!87Mwj}Pfugl?=Rfv_ys6UwbyznDtn~Sj(UkvrQvdGpqJr2m zZX-c%V)SXg+4)&5HirYIR{3usFYY0pgXoAyKlfH!`IW+{!+b`OInIz<($O`ylVdLY z>?+9xLK7f~P^>Woade4I6Gr62$bX7fC t*&0U7hh%>h*{C~Gzm4W}9LW0ot*X`$_33B?9e@eQVWf-wEn95ze*h>vPrLvC literal 0 HcmV?d00001 diff --git a/website/static/img/block-subscription.png b/website/static/img/block-subscription.png new file mode 100644 index 0000000000000000000000000000000000000000..b6bda3aadbfc8f9b5c5130f1ac37885f5545e80a GIT binary patch literal 88912 zcmeEu2{@Ep|9>Q*$dHmHjBQfMzGfR^8{1e)Ny#!8`!e>u$RInV>>^7^M1?3N?LYte@EW`DE`D}6XY4XTN%e)l z1SK`V-?lg_drvDDK?yOOt)L`IP(nf->u!#>_mKC|wa078I$Bz3>S%yw(8JZr1-sA( zV`Y!sDh{<0Cvox9^0aby(08-NI)i?;eha;1#la|OpsoKxgSf1O{6dSpC;4;4StP`u z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_2gQjWY znSeP{VqcMES}0M`@30jeYyZ-CerBLQ=D(`<_Ul}5%4%Xy9acQLD*yAIE0|;V1w$7y z)6>%@NTeS>mUZsES>%#Rcb@|H06hAd1J3+V4oxNg@B@=pd|W7L;Qv3RUW$_d literal 0 HcmV?d00001 diff --git a/website/static/img/logo.png b/website/static/img/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..966973fdd63b6cd8d89101687a18b578401a2ab4 GIT binary patch literal 7522 zcmbtZ)msz}(Ao2PA z4e!OwdCtu|&(yh?Nzm3*Cc>x1M?*s+QdLpV{f9IEtOXbF&+iYEi2Va}Z(U_Mw7Mz! zqkja;5dwvvp*6lIc(B3#$ML*WOuW(1cv=46&;!b4{Ls+oZ&ei_`T>@w`FI_9_P$?V z#Wdlfmvi!P8rIe>no^Xv>JqSGai|r?E+^XHp>xLaesqE0i;|4|05$#L}vaE*4PwDbMTxlJ&$M2;1IzTLgi+_Xk3KxWlp_3eGNbEosigzWvMtgGpY z8fcA%92uajA zDkH+N&4fQtpKFNZqhze?(CjdXDZLeFB?uE`{_TmhoryXzdwVa80J=xN5kH}4M8d7V zV9iNal>Fu-Yu+~0>sfrGVF#6KAwT;?m0KWuXU)p#SALWQRg9G#(a`HT`veVl)YUa? ziFwrMkda24RU#wd2YKbA)$J2&ggt&vsmQ(&#p8bq9O#-NPlo%9Y4Q39>0^_boJ5D95bp}^ginx$)# zv)Dva2~pZ?p)CqsvFx}WI`lHpNQxub%)d(&zP?>C@+e*?=!?l3QT6GvKX-8HHali) z!lvSthBW*jXVoNQ&P4^#>^c4%_AMhZkBJgH>U3dC;BMRI87g|9^g>w57BwCDjewaJ zr3GdbaznTFcWg%)fw!iw%8sPK%(}%k@$v6gz)&40QTfnyDrlHINB|2**(Dw#JXJ_nhtGyuPAunvs99Br9_0Gx z%&oT~K4(>8Kfd+9_ZlGu6U%M_lk{?J*FS(^p(YZO_b zqoX~)BN2AL&&VankAJuFgEVry()PKeOiPXQC4LEc{C*;Mq~EqETO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oH?2%);Ez@4g=dHm(7;j(mb%9q(O8 zY~N8sj!@iF_)feUK44j|TTDwjAf%u0VLv8mBcl4lNQ5yWkcPy7R^Po0Vi4uO0*N_N zO|70+Y9XXNgn|E^DE-13+&!x@4}P&ayZ~7@db_e*j zq~tLku4&NrN~y}nTJ&}A!cJSjFc>npTYLPPS;2!kkCnY0xwCDb)*Rqy1vIOr^DR;p zWWv|BBQReVNRHaZW`37Z0?UtvPtEr5ofj}MuL43zDkB_fNpJ)~za|Izsmb=GWAgZW zejYa(3>2Q9R*Ln*gF63MW^Od3r{=UH%M|q`eg{_~$JU4;aJdNBj60&i$9!11(XVSf zh8d_^ksO~A_~h-t8&oy2G*4!))Kfs)fpjG;v9nQTKVd3y$Xprr)fH5@#(+YR3u2KF z!BpxtpazqKGI>f55e04w?$qiq<}ORq=o5p>8oLTx#H^DA+i(LWRnpT7^4uR?iEm%= z(l4y&v(3x`!|+&({&su literal 0 HcmV?d00001 diff --git a/website/static/img/workflow.png b/website/static/img/workflow.png new file mode 100644 index 0000000000000000000000000000000000000000..e2d2f0b47bdce169d42e452e9349da6aa11e281f GIT binary patch literal 256756 zcmeFZWmJ{h8aBKHBosujr4%WpML-%s3F(jy=|;Ls0RbriC8R-0nnkCQ(kR{C-3{Np z+S_7d7mvr0cL*8KQu$M;Jkz5OA7FMD*AjVUXNgOHtnB@YiR`l? zndr{#ZHW>|euD9Y?t;X#oAQq@UoGm*y%@BRBNM)T>Um5&-xhO6{~)_ME*Pt#gQLGJ zXTL1Rdcd2#-}YgfKJw1<|9Oxks2X7L|IbtG_*680zW;ip*D*a4{hzmxyvKP-{_n>U zlejb?!M`3dK3eZW|22lMFDLG`PyaJWk5*&?#lHthx>AQh`L8hu2yAcvzp4CRzbbR# zLB=#JEXd?9e{XiEubqaiQwVaZ0>?T}DO#}$wNu|0Fr{{!>f|F1Qci^{)x zH97Ia)20V5_XdB{MbuTT3* zu#@bX{%g*^@Y3`12@E=7ew>{iZ~nj{OVAxRr*k{Fb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