├── .dockerignore ├── .github └── workflows │ ├── build.yml │ ├── publish-docker.yaml │ ├── publish-website.yaml │ └── publish.yaml ├── .gitignore ├── .vscode └── launch.json ├── CONTRIBUTING.md ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── REUSE.toml ├── build ├── controller │ └── Dockerfile ├── server │ └── Dockerfile └── web-hooks │ └── Dockerfile ├── cmd ├── controller │ ├── domain-migration.go │ └── main.go ├── server │ ├── internal │ │ ├── client.go │ │ ├── handler.go │ │ ├── handler_test.go │ │ ├── jwt.go │ │ ├── jwt_test.go │ │ └── testdata │ │ │ ├── Cert.md │ │ │ ├── auth.service.local.crt │ │ │ ├── auth.service.local.key │ │ │ └── rootCA.pem │ └── server.go └── web-hooks │ ├── internal │ └── handler │ │ ├── handler.go │ │ ├── handler_test.go │ │ ├── mutate.go │ │ └── mutate_test.go │ └── main.go ├── crds ├── sme.sap.com_capapplications.yaml ├── sme.sap.com_capapplicationversions.yaml ├── sme.sap.com_captenantoperations.yaml ├── sme.sap.com_captenantoutputs.yaml ├── sme.sap.com_captenants.yaml ├── sme.sap.com_clusterdomains.yaml └── sme.sap.com_domains.yaml ├── go.mod ├── go.sum ├── hack ├── LICENSE_BOILERPLATE.txt ├── Makefile ├── api-reference │ ├── config.json │ └── template │ │ ├── members.tpl │ │ ├── pkg.tpl │ │ ├── placeholder.go │ │ └── type.tpl ├── generate.sh └── tools.go ├── internal ├── controller │ ├── certificate-handler.go │ ├── common_test.go │ ├── controller.go │ ├── controller_test.go │ ├── informers.go │ ├── informers_test.go │ ├── metrics.go │ ├── reconcile-capapplication.go │ ├── reconcile-capapplication_test.go │ ├── reconcile-capapplicationversion.go │ ├── reconcile-capapplicationversion_test.go │ ├── reconcile-captenant.go │ ├── reconcile-captenant_test.go │ ├── reconcile-captenantoperation.go │ ├── reconcile-captenantoperation_test.go │ ├── reconcile-domain.go │ ├── reconcile-domain_test.go │ ├── reconcile-networking.go │ ├── reconcile.go │ ├── reconcile_test.go │ ├── reconciliation-result.go │ ├── testdata │ │ ├── capapplication │ │ │ ├── ca-01.expected.yaml │ │ │ ├── ca-01.initial.yaml │ │ │ ├── ca-02.expected.yaml │ │ │ ├── ca-02.initial.yaml │ │ │ ├── ca-03.expected.yaml │ │ │ ├── ca-03.initial.yaml │ │ │ ├── ca-04.expected.yaml │ │ │ ├── ca-04.initial.yaml │ │ │ ├── ca-05.expected.yaml │ │ │ ├── ca-05.initial.yaml │ │ │ ├── ca-06.expected.yaml │ │ │ ├── ca-06.initial.yaml │ │ │ ├── ca-09.expected.yaml │ │ │ ├── ca-09.initial.yaml │ │ │ ├── ca-12.expected.yaml │ │ │ ├── ca-12.initial.yaml │ │ │ ├── ca-13.expected.yaml │ │ │ ├── ca-13.initial.yaml │ │ │ ├── ca-14.expected.yaml │ │ │ ├── ca-14.initial.yaml │ │ │ ├── ca-15.expected.yaml │ │ │ ├── ca-15.initial.yaml │ │ │ ├── ca-16.expected.yaml │ │ │ ├── ca-16.initial.yaml │ │ │ ├── ca-17.expected.yaml │ │ │ ├── ca-17.initial.yaml │ │ │ ├── ca-19.expected.yaml │ │ │ ├── ca-19.initial.yaml │ │ │ ├── ca-29.expected.yaml │ │ │ ├── ca-29.initial.yaml │ │ │ ├── ca-30.expected.yaml │ │ │ ├── ca-30.initial.yaml │ │ │ ├── ca-31.expected.yaml │ │ │ ├── ca-31.initial.yaml │ │ │ ├── ca-32.expected.yaml │ │ │ ├── ca-32.initial.yaml │ │ │ ├── ca-33.expected.yaml │ │ │ ├── ca-33.initial.yaml │ │ │ ├── ca-42.expected.yaml │ │ │ ├── ca-42.initial.yaml │ │ │ ├── ca-43.expected.yaml │ │ │ ├── ca-43.initial.yaml │ │ │ ├── ca-45.expected.yaml │ │ │ ├── ca-45.initial.yaml │ │ │ ├── ca-processing-domainRefs.yaml │ │ │ ├── ca-services-hostUpdated.yaml │ │ │ ├── ca-services-ready.yaml │ │ │ ├── ca-services.yaml │ │ │ ├── cat-consumer-no-finalizers-ready.yaml │ │ │ ├── cat-consumer-upg-never-deleting.yaml │ │ │ ├── cat-consumer-upg-never-ready.yaml │ │ │ ├── cat-consumer-upgrading.yaml │ │ │ ├── cat-provider-error.yaml │ │ │ ├── cat-provider-no-finalizers-ready.yaml │ │ │ ├── cat-provider-upgrade-error.yaml │ │ │ ├── cav-33-version-updated-ready.yaml │ │ │ ├── cav-error.yaml │ │ │ └── cav-name-modified-ready.yaml │ │ ├── capapplicationversion │ │ │ ├── all-mulitple-content-job-completed-content-suffix.yaml │ │ │ ├── all-mulitple-content-job-completed.yaml │ │ │ ├── cat-provider-version.yaml │ │ │ ├── cav-affinity.yaml │ │ │ ├── cav-annotations.yaml │ │ │ ├── cav-cluster-netpol-port.yaml │ │ │ ├── cav-custom-destination-config.yaml │ │ │ ├── cav-custom-labels.yaml │ │ │ ├── cav-empty-status.yaml │ │ │ ├── cav-error-condition-status.yaml │ │ │ ├── cav-error-status.yaml │ │ │ ├── cav-failed-content-job.yaml │ │ │ ├── cav-init.yaml │ │ │ ├── cav-invalid-ca.yaml │ │ │ ├── cav-invalid-env-cap.yaml │ │ │ ├── cav-invalid-env-content.yaml │ │ │ ├── cav-invalid-env-job-worker.yaml │ │ │ ├── cav-merged-destinations-router.yaml │ │ │ ├── cav-node-prio.yaml │ │ │ ├── cav-node-selector.yaml │ │ │ ├── cav-pod-security-context.yaml │ │ │ ├── cav-probes-and-resources.yaml │ │ │ ├── cav-processing-job-finished.yaml │ │ │ ├── cav-processing-with-multiple-content-jobs.yaml │ │ │ ├── cav-processing-with-no-content-job.yaml │ │ │ ├── cav-processing.yaml │ │ │ ├── cav-ready-deleting.yaml │ │ │ ├── cav-ready-with-multiple-content-jobs-content-suffix.yaml │ │ │ ├── cav-security-context.yaml │ │ │ ├── cav-toleration.yaml │ │ │ ├── cav-topology.yaml │ │ │ ├── cav-unknown-deleting.yaml │ │ │ ├── cav-valid-env-config.yaml │ │ │ ├── cav-vol.yaml │ │ │ ├── content-job-completed.yaml │ │ │ ├── content-job-failed.yaml │ │ │ ├── content-job-pending.yaml │ │ │ ├── deployments-failure.yaml │ │ │ ├── deployments-ready.yaml │ │ │ ├── expected │ │ │ │ ├── cav-deleted-unknown.yaml │ │ │ │ ├── cav-deleted.yaml │ │ │ │ ├── cav-deleting.yaml │ │ │ │ ├── cav-error-condition-processing.yaml │ │ │ │ ├── cav-error-deployment-failure.yaml │ │ │ │ ├── cav-error-processing.yaml │ │ │ │ ├── cav-failed-content-job.yaml │ │ │ │ ├── cav-failed-env-cap.yaml │ │ │ │ ├── cav-failed-env-content.yaml │ │ │ │ ├── cav-failed-env-job-worker.yaml │ │ │ │ ├── cav-failed-with-multiple-content-jobs.yaml │ │ │ │ ├── cav-missing-secrets.yaml │ │ │ │ ├── cav-processing-with-multiple-content-jobs.yaml │ │ │ │ ├── cav-processing.yaml │ │ │ │ ├── cav-ready-affinity.yaml │ │ │ │ ├── cav-ready-annotations.yaml │ │ │ │ ├── cav-ready-cluster-netpol-port.yaml │ │ │ │ ├── cav-ready-content-job.yaml │ │ │ │ ├── cav-ready-custom-destination-config.yaml │ │ │ │ ├── cav-ready-custom-labels-config.yaml │ │ │ │ ├── cav-ready-init.yaml │ │ │ │ ├── cav-ready-merged-destinations-router.yaml │ │ │ │ ├── cav-ready-node-prio.yaml │ │ │ │ ├── cav-ready-node-selector.yaml │ │ │ │ ├── cav-ready-pod-security-context.yaml │ │ │ │ ├── cav-ready-probes-and-resources.yaml │ │ │ │ ├── cav-ready-security-context.yaml │ │ │ │ ├── cav-ready-toleration.yaml │ │ │ │ ├── cav-ready-topology.yaml │ │ │ │ ├── cav-ready-valid-env-config.yaml │ │ │ │ ├── cav-ready-vol.yaml │ │ │ │ ├── cav-ready-with-multiple-content-jobs.yaml │ │ │ │ ├── cav-ready-with-no-content-job.yaml │ │ │ │ ├── cav-services-ready.yaml │ │ │ │ └── cav-waiting.yaml │ │ │ ├── one-of-mulitple-content-job-completed.yaml │ │ │ ├── one-of-mulitple-content-job-failed.yaml │ │ │ ├── service-content-job-completed.yaml │ │ │ └── services-ready.yaml │ │ ├── captenant │ │ │ ├── cat-01.initial.yaml │ │ │ ├── cat-02.expected.yaml │ │ │ ├── cat-02.initial.yaml │ │ │ ├── cat-03.expected.yaml │ │ │ ├── cat-03.initial.yaml │ │ │ ├── cat-04.expected.yaml │ │ │ ├── cat-04.initial.yaml │ │ │ ├── cat-05.expected.yaml │ │ │ ├── cat-05.initial.yaml │ │ │ ├── cat-06.expected.yaml │ │ │ ├── cat-06.initial.yaml │ │ │ ├── cat-07.expected.yaml │ │ │ ├── cat-07.initial.yaml │ │ │ ├── cat-08.expected.yaml │ │ │ ├── cat-08.initial.yaml │ │ │ ├── cat-09.expected.yaml │ │ │ ├── cat-09.initial.yaml │ │ │ ├── cat-10.expected.yaml │ │ │ ├── cat-10.initial.yaml │ │ │ ├── cat-11.expected.yaml │ │ │ ├── cat-11.initial.yaml │ │ │ ├── cat-13.expected.yaml │ │ │ ├── cat-13.initial.yaml │ │ │ ├── cat-14.initial.yaml │ │ │ ├── cat-15.expected.yaml │ │ │ ├── cat-15.initial.yaml │ │ │ ├── cat-20.expected.yaml │ │ │ ├── cat-20.initial.yaml │ │ │ ├── cat-21.expected.yaml │ │ │ ├── cat-21.initial.yaml │ │ │ ├── cat-22.initial.yaml │ │ │ ├── cat-23.expected.yaml │ │ │ ├── cat-23.initial.yaml │ │ │ ├── cat-24.expected.yaml │ │ │ ├── cat-24.initial.yaml │ │ │ ├── cat-25.expected.yaml │ │ │ ├── cat-25.initial.yaml │ │ │ ├── cat-26.initial.yaml │ │ │ ├── cat-27.expected.yaml │ │ │ ├── cat-28.expected.yaml │ │ │ ├── cat-28.initial.yaml │ │ │ ├── cat-29.expected.yaml │ │ │ ├── cat-29.initial.yaml │ │ │ ├── cat-30.expected.yaml │ │ │ ├── cat-30.initial.yaml │ │ │ ├── cat-with-no-version.yaml │ │ │ ├── provider-tenant-dr-v1.yaml │ │ │ └── provider-tenant-vs-v1.yaml │ │ ├── captenantoperation │ │ │ ├── ctop-01.expected.yaml │ │ │ ├── ctop-01.initial.yaml │ │ │ ├── ctop-02.expected.yaml │ │ │ ├── ctop-02.initial.yaml │ │ │ ├── ctop-03.expected.yaml │ │ │ ├── ctop-03.initial.yaml │ │ │ ├── ctop-04.expected.yaml │ │ │ ├── ctop-04.initial.yaml │ │ │ ├── ctop-05.expected.yaml │ │ │ ├── ctop-05.initial.yaml │ │ │ ├── ctop-06.expected.yaml │ │ │ ├── ctop-06.initial.yaml │ │ │ ├── ctop-07.expected.yaml │ │ │ ├── ctop-07.initial.yaml │ │ │ ├── ctop-08.expected.yaml │ │ │ ├── ctop-08.initial.yaml │ │ │ ├── ctop-09.expected.yaml │ │ │ ├── ctop-09.initial.yaml │ │ │ ├── ctop-10.expected.yaml │ │ │ ├── ctop-10.initial.yaml │ │ │ ├── ctop-11.expected.yaml │ │ │ ├── ctop-11.initial.yaml │ │ │ ├── ctop-12.expected.yaml │ │ │ ├── ctop-12.initial.yaml │ │ │ ├── ctop-13.expected.yaml │ │ │ ├── ctop-13.initial.yaml │ │ │ ├── ctop-14.expected.yaml │ │ │ ├── ctop-14.initial.yaml │ │ │ ├── ctop-15.expected.yaml │ │ │ ├── ctop-15.initial.yaml │ │ │ ├── ctop-16.expected.yaml │ │ │ ├── ctop-16.initial.yaml │ │ │ ├── ctop-17.expected.yaml │ │ │ ├── ctop-17.initial.yaml │ │ │ ├── ctop-18.expected.yaml │ │ │ ├── ctop-18.initial.yaml │ │ │ ├── ctop-19.expected.yaml │ │ │ ├── ctop-19.initial.yaml │ │ │ ├── ctop-20.expected.yaml │ │ │ ├── ctop-20.initial.yaml │ │ │ ├── ctop-21.expected.yaml │ │ │ ├── ctop-21.initial.yaml │ │ │ ├── ctop-22.expected.yaml │ │ │ ├── ctop-22.initial.yaml │ │ │ ├── ctop-23.expected.yaml │ │ │ ├── ctop-23.initial.yaml │ │ │ ├── ctop-24.expected.yaml │ │ │ ├── ctop-24.initial.yaml │ │ │ ├── ctop-25.expected.yaml │ │ │ ├── ctop-25.initial.yaml │ │ │ ├── ctop-26.expected.yaml │ │ │ ├── ctop-26.initial.yaml │ │ │ ├── ctop-init-custom.expected.yaml │ │ │ ├── ctop-init-custom.initial.yaml │ │ │ ├── ctop-init.expected.yaml │ │ │ ├── ctop-init.initial.yaml │ │ │ ├── ctop-scheduling-custom.expected.yaml │ │ │ ├── ctop-scheduling-custom.initial.yaml │ │ │ ├── ctop-scheduling.expected.yaml │ │ │ ├── ctop-scheduling.initial.yaml │ │ │ ├── ctop-vol-custom.expected.yaml │ │ │ ├── ctop-vol-custom.initial.yaml │ │ │ ├── ctop-vol.expected.yaml │ │ │ └── ctop-vol.initial.yaml │ │ ├── common │ │ │ ├── ca-services.yaml │ │ │ ├── capapplication-multi-xsuaa.yaml │ │ │ ├── capapplication-vs-headers-error-req.yaml │ │ │ ├── capapplication-vs-headers-error-res.yaml │ │ │ ├── capapplication-vs-headers.yaml │ │ │ ├── capapplication.yaml │ │ │ ├── capapplicationversion-invalid-env.yaml │ │ │ ├── capapplicationversion-v1-init-custom.yaml │ │ │ ├── capapplicationversion-v1-init.yaml │ │ │ ├── capapplicationversion-v1-mtxs-custom-cmd.yaml │ │ │ ├── capapplicationversion-v1-mtxs.yaml │ │ │ ├── capapplicationversion-v1-resources.yaml │ │ │ ├── capapplicationversion-v1-scheduling-custom.yaml │ │ │ ├── capapplicationversion-v1-scheduling.yaml │ │ │ ├── capapplicationversion-v1-security-context.yaml │ │ │ ├── capapplicationversion-v1-vol-custom.yaml │ │ │ ├── capapplicationversion-v1-vol.yaml │ │ │ ├── capapplicationversion-v1.yaml │ │ │ ├── capapplicationversion-v2-annotations.yaml │ │ │ ├── capapplicationversion-v2-multi-xsuaa.yaml │ │ │ ├── capapplicationversion-v2-multiple-tenant-ops.yaml │ │ │ ├── capapplicationversion-v2-no-mtx-workload.yaml │ │ │ ├── capapplicationversion-v2-pod-security-context.yaml │ │ │ ├── capapplicationversion-v2.yaml │ │ │ ├── capapplicationversion-v3.yaml │ │ │ ├── captenant-provider-ready.yaml │ │ │ ├── captenant-provider-upgraded-ready.yaml │ │ │ ├── cav-services.yaml │ │ │ ├── cluster-domain-ready.yaml │ │ │ ├── credential-secrets.yaml │ │ │ ├── domain-hostUpdated-ready.yaml │ │ │ ├── domain-ready.yaml │ │ │ └── service-virtualservices.yaml │ │ ├── domain │ │ │ ├── ca-services-ready.yaml │ │ │ ├── cluster-domain-deleting-no-finalizer.yaml │ │ │ ├── cluster-domain-deleting.yaml │ │ │ ├── cluster-domain-initial-state-label-finalizer.yaml │ │ │ ├── cluster-domain-initial-state.yaml │ │ │ ├── cluster-domain-ready-withDeletionTimestamp.yaml │ │ │ ├── domain-cert-error.yaml │ │ │ ├── domain-certManager-error.yaml │ │ │ ├── domain-deleting-no-finalizer.yaml │ │ │ ├── domain-deleting.yaml │ │ │ ├── domain-dns-error.yaml │ │ │ ├── domain-duplicate.expected.yaml │ │ │ ├── domain-duplicate.yaml │ │ │ ├── domain-initial-state-label-finalizer.yaml │ │ │ ├── domain-initial-state.yaml │ │ │ ├── domain-no-ingress-error.yaml │ │ │ ├── domain-processing-dns.yaml │ │ │ ├── domain-processing-observedDom-cert-gateway.yaml │ │ │ ├── domain-processing-observedDom-certManager-gateway.yaml │ │ │ ├── domain-processing-observedDom.yaml │ │ │ ├── domain-processing.yaml │ │ │ ├── domain-ready-withDeletionTimestamp.yaml │ │ │ ├── domain-ready.yaml │ │ │ ├── domain-update.expected.yaml │ │ │ ├── domain-update.yaml │ │ │ ├── domain-with-subdomain-processing-with-dns-netpol-cat.yaml │ │ │ ├── domain-with-subdomain-processing-with-dns-netpol.yaml │ │ │ ├── domain-with-subdomain-processing.yaml │ │ │ ├── domain-with-subdomain-ready.yaml │ │ │ ├── istio-ingress.yaml │ │ │ ├── primary-certManager-error.yaml │ │ │ ├── primary-certManager-ready.yaml │ │ │ ├── primary-certificate-error.yaml │ │ │ ├── primary-certificate-ready.yaml │ │ │ ├── primary-dns-error.yaml │ │ │ ├── primary-dns-ready.yaml │ │ │ └── primary-gateway.yaml │ │ └── version-monitoring │ │ │ ├── ca-cleanup-dry-run-enabled.yaml │ │ │ ├── ca-cleanup-enabled.yaml │ │ │ ├── cat-consumer-v2-upgrading.yaml │ │ │ ├── cat-provider-v2-ready.yaml │ │ │ ├── cat-provider-v3-ready.yaml │ │ │ ├── cav-v1-deletion-rules-error.yaml │ │ │ ├── cav-v1-deletion-rules-processing.yaml │ │ │ ├── cav-v1-deletion-rules.yaml │ │ │ ├── cav-v1-monitoring-port-missing.yaml │ │ │ ├── cav-v2-deletion-rules.yaml │ │ │ ├── cav-v3-deletion-rules-processing.yaml │ │ │ ├── cav-v3-deletion-rules.yaml │ │ │ └── servicemonitors-cav-v1.yaml │ ├── utils.go │ ├── version-monitoring.go │ └── version-monitoring_test.go └── util │ ├── config.go │ ├── log.go │ ├── log_test.go │ ├── metrics-server.go │ ├── types.go │ ├── uaa.go │ ├── uaa_test.go │ ├── vcap-credentials.go │ └── vcap-credentials_test.go ├── pkg ├── apis │ └── sme.sap.com │ │ └── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ ├── utils.go │ │ └── zz_generated.deepcopy.go └── client │ ├── applyconfiguration │ ├── internal │ │ └── internal.go │ ├── sme.sap.com │ │ └── v1alpha1 │ │ │ ├── applicationdomains.go │ │ │ ├── btp.go │ │ │ ├── btptenantidentification.go │ │ │ ├── capapplication.go │ │ │ ├── capapplicationspec.go │ │ │ ├── capapplicationstatus.go │ │ │ ├── capapplicationversion.go │ │ │ ├── capapplicationversionspec.go │ │ │ ├── capapplicationversionstatus.go │ │ │ ├── captenant.go │ │ │ ├── captenantoperation.go │ │ │ ├── captenantoperationspec.go │ │ │ ├── captenantoperationstatus.go │ │ │ ├── captenantoperationstep.go │ │ │ ├── captenantoutput.go │ │ │ ├── captenantoutputspec.go │ │ │ ├── captenantspec.go │ │ │ ├── captenantstatus.go │ │ │ ├── clusterdomain.go │ │ │ ├── commondetails.go │ │ │ ├── deletionrules.go │ │ │ ├── deploymentdetails.go │ │ │ ├── domain.go │ │ │ ├── domainref.go │ │ │ ├── domainspec.go │ │ │ ├── domainstatus.go │ │ │ ├── genericstatus.go │ │ │ ├── jobdetails.go │ │ │ ├── metricrule.go │ │ │ ├── monitoringconfig.go │ │ │ ├── namevalue.go │ │ │ ├── ports.go │ │ │ ├── route.go │ │ │ ├── serviceexposure.go │ │ │ ├── serviceinfo.go │ │ │ ├── tenantoperations.go │ │ │ ├── tenantoperationworkloadreference.go │ │ │ ├── workloaddetails.go │ │ │ └── workloadmonitoring.go │ └── utils.go │ ├── clientset │ └── versioned │ │ ├── clientset.go │ │ ├── fake │ │ ├── clientset_generated.go │ │ ├── doc.go │ │ └── register.go │ │ ├── scheme │ │ ├── doc.go │ │ └── register.go │ │ └── typed │ │ └── sme.sap.com │ │ └── v1alpha1 │ │ ├── capapplication.go │ │ ├── capapplicationversion.go │ │ ├── captenant.go │ │ ├── captenantoperation.go │ │ ├── captenantoutput.go │ │ ├── clusterdomain.go │ │ ├── doc.go │ │ ├── domain.go │ │ ├── fake │ │ ├── doc.go │ │ ├── fake_capapplication.go │ │ ├── fake_capapplicationversion.go │ │ ├── fake_captenant.go │ │ ├── fake_captenantoperation.go │ │ ├── fake_captenantoutput.go │ │ ├── fake_clusterdomain.go │ │ ├── fake_domain.go │ │ └── fake_sme.sap.com_client.go │ │ ├── generated_expansion.go │ │ └── sme.sap.com_client.go │ ├── informers │ └── externalversions │ │ ├── factory.go │ │ ├── generic.go │ │ ├── internalinterfaces │ │ └── factory_interfaces.go │ │ └── sme.sap.com │ │ ├── interface.go │ │ └── v1alpha1 │ │ ├── capapplication.go │ │ ├── capapplicationversion.go │ │ ├── captenant.go │ │ ├── captenantoperation.go │ │ ├── captenantoutput.go │ │ ├── clusterdomain.go │ │ ├── domain.go │ │ └── interface.go │ └── listers │ └── sme.sap.com │ └── v1alpha1 │ ├── capapplication.go │ ├── capapplicationversion.go │ ├── captenant.go │ ├── captenantoperation.go │ ├── captenantoutput.go │ ├── clusterdomain.go │ ├── domain.go │ └── expansion_generated.go ├── sonar-project.properties └── website ├── archetypes └── default.md ├── assets └── scss │ └── _styles_project.scss ├── content └── en │ ├── _index.md │ └── docs │ ├── _index.md │ ├── concepts │ ├── _index.md │ ├── cap-application-components.md │ └── operator-components │ │ ├── _index.md │ │ ├── controller.md │ │ └── subscription-server.md │ ├── configuration │ └── _index.md │ ├── installation │ ├── _index.md │ ├── cap-operator-manager │ │ └── _index.md │ ├── helm │ │ ├── _index.md │ │ └── helm-values.md │ └── prerequisites.md │ ├── reference │ └── _index.md │ ├── support │ └── _index.md │ ├── troubleshoot │ └── _index.md │ ├── usage │ ├── _index.md │ ├── deploying-application.md │ ├── domain-management.md │ ├── operator-metrics.md │ ├── prerequisites.md │ ├── resources │ │ ├── _index.md │ │ ├── capapplication.md │ │ ├── capapplicationversion.md │ │ ├── captenant.md │ │ ├── captenantoperation.md │ │ ├── captenantoutput.md │ │ ├── clusterdomain.md │ │ └── domain.md │ ├── services-workload.md │ ├── tenant-provisioning.md │ ├── version-monitoring.md │ └── version-upgrade.md │ └── whats-new.md ├── go.mod ├── go.sum ├── hugo.yaml ├── includes ├── api-reference.html └── chart-values.md ├── layouts └── _shortcodes │ └── include.html ├── package-lock.json ├── package.json └── static └── img ├── activity-tenantprovisioning.drawio.svg ├── block-cluster.drawio.svg ├── block-controller.drawio.svg ├── block-subscription.drawio.svg ├── logo.png └── workflow.png /.dockerignore: -------------------------------------------------------------------------------- 1 | # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file 2 | # Ignore build and test binaries. 3 | bin/ 4 | testbin/ 5 | -------------------------------------------------------------------------------- /.github/workflows/publish.yaml: -------------------------------------------------------------------------------- 1 | name: Publish artifacts (CRD yaml) on Release 2 | 3 | on: 4 | release: 5 | types: [published] 6 | 7 | defaults: 8 | run: 9 | shell: bash 10 | 11 | permissions: 12 | contents: write # allows uploading release assets 13 | 14 | jobs: 15 | generate_crd: 16 | name: Generate CRD 17 | runs-on: ubuntu-24.04 18 | 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | 23 | - name: Generate and Upload CRD 24 | run: | 25 | echo "Generating CRD" 26 | yq '.' crds/*.yaml > crd.yaml 27 | 28 | echo "Uploading CRD" 29 | file=crd.yaml 30 | upload_url="${{ github.event.release.upload_url }}" 31 | upload_url=${upload_url%%\{*\}} 32 | echo "Uploading $file to $upload_url ..." 33 | curl -sSf \ 34 | -H "Accept: application/vnd.github+json" \ 35 | -H "Authorization: Bearer ${{ github.token }}" \ 36 | -H "Content-Type: $(file -b --mime-type $file)" \ 37 | --data-binary @$file \ 38 | "$upload_url?name=$(basename $file)" 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | local/ 2 | .kubeconfig 3 | 4 | # Binaries for programs and plugins 5 | *.exe 6 | *.exe~ 7 | *.dll 8 | bin 9 | testbin/* 10 | 11 | # Test binary, build with `go test -c` 12 | *.test 13 | 14 | # OS specific 15 | .DS_Store 16 | 17 | # Hugo artifacts 18 | .hugo_build.lock 19 | /website/resources 20 | /website/node_modules 21 | /website/public 22 | 23 | # /tmp 24 | tmp/ -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch Controller", 9 | "type": "go", 10 | "request": "launch", 11 | "mode": "auto", 12 | "program": "${workspaceFolder}/cmd/controller" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /build/controller/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for go modules 2 | FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build 3 | 4 | WORKDIR /build 5 | 6 | COPY go.mod go.sum . 7 | 8 | RUN go mod download 9 | 10 | COPY cmd/controller/ cmd/controller/ 11 | COPY pkg/ pkg/ 12 | COPY internal/ internal/ 13 | 14 | ARG TARGETOS TARGETARCH 15 | ENV CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} 16 | 17 | RUN --mount=type=cache,target=/go/pkg \ 18 | --mount=type=cache,target=/root/.cache/go-build \ 19 | go build -o ./bin/controller ./cmd/controller/ 20 | 21 | # Run Stage 22 | FROM gcr.io/distroless/static:nonroot AS final 23 | 24 | ENTRYPOINT ["/app/controller"] 25 | 26 | COPY --from=build /build/bin/controller /app/controller -------------------------------------------------------------------------------- /build/server/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for go modules 2 | FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build 3 | 4 | WORKDIR /build 5 | 6 | COPY go.mod go.sum . 7 | 8 | RUN go mod download 9 | 10 | COPY cmd/server/ cmd/server/ 11 | COPY pkg pkg/ 12 | COPY internal/util/ internal/util/ 13 | 14 | ARG TARGETOS TARGETARCH 15 | ENV CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} 16 | 17 | RUN --mount=type=cache,target=/go/pkg \ 18 | --mount=type=cache,target=/root/.cache/go-build \ 19 | go build -o ./bin/server ./cmd/server/server.go 20 | 21 | # Run Stage 22 | FROM gcr.io/distroless/static:nonroot AS final 23 | 24 | ENTRYPOINT ["/app/server"] 25 | 26 | COPY --from=build /build/bin/server /app/server -------------------------------------------------------------------------------- /build/web-hooks/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build stage for go modules 2 | FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build 3 | 4 | WORKDIR /build 5 | 6 | COPY go.mod go.sum . 7 | 8 | RUN go mod download 9 | 10 | COPY cmd/web-hooks/ cmd/web-hooks/ 11 | COPY pkg/ pkg/ 12 | COPY internal/util/ internal/util/ 13 | 14 | ARG TARGETOS TARGETARCH 15 | ENV CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} 16 | 17 | RUN --mount=type=cache,target=/go/pkg \ 18 | --mount=type=cache,target=/root/.cache/go-build \ 19 | go build -o ./bin/webhook ./cmd/web-hooks/main.go 20 | 21 | # Run Stage 22 | FROM gcr.io/distroless/static:nonroot AS final 23 | 24 | ENTRYPOINT ["/app/webhook"] 25 | 26 | COPY --from=build /build/bin/webhook /app/webhook -------------------------------------------------------------------------------- /cmd/server/internal/client.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package handler 7 | 8 | import ( 9 | "net/http" 10 | ) 11 | 12 | type httpClientGenerator interface { 13 | NewHTTPClient() *http.Client 14 | } 15 | 16 | type httpClientGeneratorImpl struct{} 17 | 18 | func (facade *httpClientGeneratorImpl) NewHTTPClient() *http.Client { 19 | return &http.Client{} 20 | } 21 | -------------------------------------------------------------------------------- /cmd/server/internal/testdata/Cert.md: -------------------------------------------------------------------------------- 1 | ### Generate CSR and auth.service.local.key 2 | ``` 3 | openssl req -newkey rsa:2048 -nodes -sha256 -keyout auth.service.local.key -out csr.cer -subj "/C=DE/ST=RandomState/L=RandomCity/O=RandomOrg/OU=RandomOrgUnit/CN=*.auth.service.local/emailAddress=hello@example.com" 4 | ``` 5 | 6 | ### Generate Root CA 7 | ``` 8 | openssl x509 -req -sha256 -days 3650 -in csr.cer -signkey auth.service.local.key -out rootCA.pem 9 | 10 | ``` 11 | 12 | ### Generate auth.service.local cert 13 | 14 | Create extensions.cfg with: 15 | basicConstraints=CA:FALSE 16 | authorityKeyIdentifier=keyid,issuer 17 | keyUsage=Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment 18 | subjectAltName=DNS:auth.service.local, DNS:*.auth.service.local, IP:127.0.0.1 19 | 20 | then execute: 21 | 22 | ``` 23 | openssl x509 -req -sha256 -days 3650 -in csr.cer -CA rootCA.pem -CAkey auth.service.local.key -out auth.service.local.crt -CAcreateserial -extfile=extensions.cfg -copy_extensions=copyall 24 | ``` -------------------------------------------------------------------------------- /cmd/server/internal/testdata/rootCA.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID0zCCArsCFGW07a83z8cK1c0JIkHXX+h4CO6IMA0GCSqGSIb3DQEBCwUAMIGl 3 | MQswCQYDVQQGEwJERTEUMBIGA1UECAwLUmFuZG9tU3RhdGUxEzARBgNVBAcMClJh 4 | bmRvbUNpdHkxEjAQBgNVBAoMCVJhbmRvbU9yZzEWMBQGA1UECwwNUmFuZG9tT3Jn 5 | VW5pdDEdMBsGA1UEAwwUKi5hdXRoLnNlcnZpY2UubG9jYWwxIDAeBgkqhkiG9w0B 6 | CQEWEWhlbGxvQGV4YW1wbGUuY29tMB4XDTIzMDkyMTIzNDQ0NVoXDTMzMDkxODIz 7 | NDQ0NVowgaUxCzAJBgNVBAYTAkRFMRQwEgYDVQQIDAtSYW5kb21TdGF0ZTETMBEG 8 | A1UEBwwKUmFuZG9tQ2l0eTESMBAGA1UECgwJUmFuZG9tT3JnMRYwFAYDVQQLDA1S 9 | YW5kb21PcmdVbml0MR0wGwYDVQQDDBQqLmF1dGguc2VydmljZS5sb2NhbDEgMB4G 10 | CSqGSIb3DQEJARYRaGVsbG9AZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUA 11 | A4IBDwAwggEKAoIBAQDgkMvORiISYn26ysvrtFZ5nK19vMzdDI0+qC6eiO02ImNE 12 | roMZ39fXPX0rryU3iNOqjgNe6Dx2pbmgTLrqPeHmWuxHVo+jOCV7G7LbDJCS43an 13 | b/emfEYMOL76YLg0/ZQo1HePrxF2Exnxmv5erpmD39WYj6pxVZjcM8QbWrBU1eMI 14 | yuEW5pudv+T55Zw3CUHwbKQ/fwgGwF9rVX4WmUlgXvwcQqHshtloHJLbWqjoS/tp 15 | ek1Wfk3iaUKHnCz4TMH/6urrU68zVoF43CxIfs0mdENdP2gJM3SgIX15bySxqPIc 16 | EUle0Hg7Cd4FaOCDzCZSoK4K6fE1NYAuWolNVDphAgMBAAEwDQYJKoZIhvcNAQEL 17 | BQADggEBAN91XXjgLUgJEIhisdtyV9yEf53vr4ddQ3n1J3XJkToPbh46R2lXez4S 18 | 38na3IM9UPAWGiqq7xDxhi2ieu8H4ww6akBvOCm5vs4PhXWCkuzzF2BLaBoT8hsk 19 | VRbylzZbzshicPMLoMRi7sVKoc6mD80Nta2BMFNClLE01ow/wFx3HH4rWviaiNHd 20 | gJ/gvffN70p24BEoP4LRbXQKUSeCjRdWvw9QdpDIYyqRPLSWuupB5JmO5dPx9IXF 21 | 59Fro6wA9NRIzcXD+Ig8U3AbxHMtQemdcofjTGW+3V9Ozs/YQGuqdotQ020V9mR5 22 | 59Xddx06ziMyA9DY4mnO3+5gVN2haKw= 23 | -----END CERTIFICATE----- 24 | -------------------------------------------------------------------------------- /crds/sme.sap.com_captenantoutputs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.18.0 7 | name: captenantoutputs.sme.sap.com 8 | spec: 9 | group: sme.sap.com 10 | names: 11 | kind: CAPTenantOutput 12 | listKind: CAPTenantOutputList 13 | plural: captenantoutputs 14 | shortNames: 15 | - ctout 16 | singular: captenantoutput 17 | scope: Namespaced 18 | versions: 19 | - additionalPrinterColumns: 20 | - jsonPath: .metadata.creationTimestamp 21 | name: Age 22 | type: date 23 | name: v1alpha1 24 | schema: 25 | openAPIV3Schema: 26 | properties: 27 | apiVersion: 28 | type: string 29 | kind: 30 | type: string 31 | metadata: 32 | type: object 33 | spec: 34 | properties: 35 | subscriptionCallbackData: 36 | type: string 37 | type: object 38 | required: 39 | - metadata 40 | - spec 41 | type: object 42 | served: true 43 | storage: true 44 | subresources: {} 45 | -------------------------------------------------------------------------------- /hack/LICENSE_BOILERPLATE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | -------------------------------------------------------------------------------- /hack/api-reference/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "hideMemberFields": [ 3 | "TypeMeta" 4 | ], 5 | "hideTypePatterns": [ 6 | "ParseError$", 7 | "List$" 8 | ], 9 | "externalPackages": [ 10 | { 11 | "typeMatchPrefix": "^k8s\\.io/(api|apimachinery/pkg/apis)/", 12 | "docsURLTemplate": "https://pkg.go.dev/{{.PackagePath}}#{{.TypeIdentifier}}" 13 | } 14 | ], 15 | "typeDisplayNamePrefixOverrides": { 16 | "k8s.io/api/": "Kubernetes ", 17 | "k8s.io/apimachinery/pkg/apis/": "Kubernetes " 18 | }, 19 | "markdownDisabled": false 20 | } 21 | -------------------------------------------------------------------------------- /hack/api-reference/template/members.tpl: -------------------------------------------------------------------------------- 1 | {{ define "members" }} 2 | 3 | {{ range .Members }} 4 | {{ if not (hiddenMember .)}} 5 | 6 | 7 | {{ fieldName . }}
8 | 9 | {{ if linkForType .Type }} 10 | 11 | {{ typeDisplayName .Type }} 12 | 13 | {{ else }} 14 | {{ typeDisplayName .Type }} 15 | {{ end }} 16 | 17 | 18 | 19 | {{ if fieldEmbedded . }} 20 |

21 | (Members of {{ fieldName . }} are embedded into this type.) 22 |

23 | {{ end}} 24 | 25 | {{ if isOptionalMember .}} 26 | (Optional) 27 | {{ end }} 28 | 29 | {{ safe (renderComments .CommentLines) }} 30 | 31 | {{ if and (eq (.Type.Name.Name) "ObjectMeta") }} 32 | Refer to the Kubernetes API documentation for the fields of the 33 | metadata field. 34 | {{ end }} 35 | 36 | {{ if or (eq (fieldName .) "spec") }} 37 |
38 |
39 | 40 | {{ template "members" .Type }} 41 |
42 | {{ end }} 43 | 44 | 45 | {{ end }} 46 | {{ end }} 47 | 48 | {{ end }} 49 | -------------------------------------------------------------------------------- /hack/api-reference/template/pkg.tpl: -------------------------------------------------------------------------------- 1 | {{ define "packages" }} 2 | 3 | {{ with .packages}} 4 |

Packages:

5 | 12 | {{ end}} 13 | 14 | {{ range .packages }} 15 |

16 | {{- packageDisplayName . -}} 17 |

18 | 19 | {{ with (index .GoPackages 0 )}} 20 | {{ with .DocComments }} 21 |
22 | {{ safe (renderComments .) }} 23 |
24 | {{ end }} 25 | {{ end }} 26 | 27 | Resource Types: 28 | 37 | 38 | {{ range (visibleTypes (sortedTypes .Types))}} 39 | {{ template "type" . }} 40 | {{ end }} 41 |
42 | {{ end }} 43 | 44 |

45 | Generated with gen-crd-api-reference-docs 46 | {{ with .gitCommit }} on git commit {{ . }}{{end}}. 47 |

48 | 49 | {{ end }} 50 | -------------------------------------------------------------------------------- /hack/api-reference/template/placeholder.go: -------------------------------------------------------------------------------- 1 | // Placeholder file to make Go vendor this directory properly. 2 | package template 3 | -------------------------------------------------------------------------------- /hack/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | if ! which go >/dev/null; then 8 | echo "Error: go not found in path" 9 | exit 1 10 | fi 11 | 12 | if ! which jq >/dev/null; then 13 | echo "Error: jq not found in path" 14 | exit 1 15 | fi 16 | 17 | cd $(dirname "${BASH_SOURCE[0]}")/.. 18 | 19 | if [ ! -f go.mod ]; then 20 | echo "Error: this is not a go module, is it?" 21 | exit 1 22 | fi 23 | 24 | if [ -z "${CODEGEN_PKG:-}" ]; then 25 | if [ -d ./vendor/k8s.io/code-generator ]; then 26 | CODEGEN_PKG=./vendor/k8s.io/code-generator 27 | else 28 | CODEGEN_PKG=$(go mod download -json k8s.io/code-generator | jq -r '.Dir //empty') 29 | fi 30 | fi 31 | 32 | if [ -z "${GEN_PKG_PATH:-}" ]; then 33 | GEN_PKG_PATH=$(go list -m)/pkg 34 | fi 35 | 36 | echo "PWD: ${PWD}" 37 | echo "CODEGEN_PKG: ${CODEGEN_PKG}" 38 | echo "GEN_PKG_PATH: ${GEN_PKG_PATH}" 39 | 40 | source "${CODEGEN_PKG}/kube_codegen.sh" 41 | 42 | kube::codegen::gen_helpers \ 43 | --boilerplate ./hack/LICENSE_BOILERPLATE.txt \ 44 | ./pkg/apis 45 | 46 | kube::codegen::gen_client \ 47 | --with-watch \ 48 | --with-applyconfig \ 49 | --output-dir "./pkg/client" \ 50 | --output-pkg "${GEN_PKG_PATH}"/client \ 51 | --boilerplate ./hack/LICENSE_BOILERPLATE.txt \ 52 | ./pkg/apis -------------------------------------------------------------------------------- /hack/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | package tools 5 | 6 | import ( 7 | _ "k8s.io/code-generator" 8 | ) 9 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-01.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "" 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-01.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | spec: 12 | btp: 13 | services: 14 | - class: xsuaa 15 | name: cap-uaa 16 | secret: cap-cap-01-uaa-bind-cf 17 | - class: saas-registry 18 | name: cap-saas-registry 19 | secret: cap-cap-01-saas-bind-cf 20 | - class: service-manager 21 | name: cap-service-manager 22 | secret: cap-cap-01-svc-man-bind-cf 23 | btpAppName: test-cap-01 24 | domainRefs: 25 | - kind: Domain 26 | name: test-cap-01-primary 27 | - kind: ClusterDomain 28 | name: test-cap-01-secondary 29 | globalAccountId: btp-glo-acc-id 30 | provider: 31 | subDomain: my-provider 32 | tenantId: tenant-id-for-provider 33 | status: 34 | state: "" 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-02.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | conditions: 39 | - reason: ProcessingSecrets 40 | message: waiting for secrets to get ready for CAPApplication test-cap-01.default 41 | observedGeneration: 2 42 | status: "False" 43 | type: Ready 44 | observedGeneration: 2 45 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 46 | state: Processing 47 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-02.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 39 | state: "Processing" 40 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-03.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 39 | state: "Processing" 40 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-04.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "Processing" 39 | servicesOnly: false 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-05.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 39 | state: "Processing" 40 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-06.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "Processing" 39 | servicesOnly: false 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-provider 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-09.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "Processing" 39 | servicesOnly: false 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-provider 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-12.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "Processing" 39 | servicesOnly: false 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-provider 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-13.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: Processing 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-13.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | generation: 2 5 | name: test-cap-01 6 | namespace: default 7 | resourceVersion: "11373799" 8 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 9 | annotations: 10 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 11 | labels: 12 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 13 | spec: 14 | btp: 15 | services: 16 | - class: xsuaa 17 | name: cap-uaa 18 | secret: cap-cap-01-uaa-bind-cf 19 | - class: saas-registry 20 | name: cap-saas-registry 21 | secret: cap-cap-01-saas-bind-cf 22 | - class: service-manager 23 | name: cap-service-manager 24 | secret: cap-cap-01-svc-man-bind-cf 25 | btpAppName: test-cap-01 26 | domainRefs: 27 | - kind: Domain 28 | name: test-cap-01-primary 29 | - kind: ClusterDomain 30 | name: test-cap-01-secondary 31 | globalAccountId: btp-glo-acc-id 32 | provider: 33 | subDomain: my-provider 34 | tenantId: tenant-id-for-provider 35 | status: 36 | state: "Processing" 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-14.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | generation: 2 6 | name: test-cap-01 7 | namespace: default 8 | resourceVersion: "11373799" 9 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 10 | annotations: 11 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 12 | labels: 13 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 14 | spec: 15 | btp: 16 | services: 17 | - class: xsuaa 18 | name: cap-uaa 19 | secret: cap-cap-01-uaa-bind-cf 20 | - class: saas-registry 21 | name: cap-saas-registry 22 | secret: cap-cap-01-saas-bind-cf 23 | - class: service-manager 24 | name: cap-service-manager 25 | secret: cap-cap-01-svc-man-bind-cf 26 | btpAppName: test-cap-01 27 | domainRefs: 28 | - kind: Domain 29 | name: test-cap-01-primary 30 | - kind: ClusterDomain 31 | name: test-cap-01-secondary 32 | globalAccountId: btp-glo-acc-id 33 | provider: 34 | subDomain: my-provider 35 | tenantId: tenant-id-for-provider 36 | status: 37 | state: Processing 38 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 39 | observedSubdomains: 40 | - my-consumer 41 | - my-provider 42 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-14.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | generation: 2 6 | name: test-cap-01 7 | namespace: default 8 | resourceVersion: "11373799" 9 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 10 | annotations: 11 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 12 | labels: 13 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 14 | spec: 15 | btp: 16 | services: 17 | - class: xsuaa 18 | name: cap-uaa 19 | secret: cap-cap-01-uaa-bind-cf 20 | - class: saas-registry 21 | name: cap-saas-registry 22 | secret: cap-cap-01-saas-bind-cf 23 | - class: service-manager 24 | name: cap-service-manager 25 | secret: cap-cap-01-svc-man-bind-cf 26 | btpAppName: test-cap-01 27 | domainRefs: 28 | - kind: Domain 29 | name: test-cap-01-primary 30 | - kind: ClusterDomain 31 | name: test-cap-01-secondary 32 | globalAccountId: btp-glo-acc-id 33 | provider: 34 | subDomain: my-provider 35 | tenantId: tenant-id-for-provider 36 | status: 37 | state: "Processing" 38 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 39 | observedSubdomains: 40 | - my-consumer 41 | - my-provider 42 | 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-15.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | deletionTimestamp: "2022-03-22T13:24:38Z" 7 | generation: 2 8 | name: test-cap-01 9 | namespace: default 10 | resourceVersion: "11373799" 11 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | labels: 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | spec: 17 | btp: 18 | services: 19 | - class: xsuaa 20 | name: cap-uaa 21 | secret: cap-cap-01-uaa-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | status: 39 | state: "Processing" 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-consumer 43 | - my-provider 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-16.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: [] 5 | deletionTimestamp: "2022-03-22T13:24:38Z" 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: Deleting 39 | conditions: 40 | - type: Ready 41 | reason: DeleteTriggered 42 | status: "False" 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-16.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: 6 | - sme.sap.com/capapplication 7 | generation: 2 8 | name: test-cap-01 9 | namespace: default 10 | resourceVersion: "11373799" 11 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | labels: 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | spec: 17 | btp: 18 | services: 19 | - class: xsuaa 20 | name: cap-uaa 21 | secret: cap-cap-01-uaa-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | status: 39 | state: "Deleting" 40 | conditions: 41 | - type: Ready 42 | reason: DeleteTriggered 43 | status: "False" 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-17.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | deletionTimestamp: "2022-03-22T13:24:38Z" 7 | generation: 2 8 | name: test-cap-01 9 | namespace: default 10 | resourceVersion: "11373799" 11 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | labels: 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | spec: 17 | btp: 18 | services: 19 | - class: xsuaa 20 | name: cap-uaa 21 | secret: cap-cap-01-uaa-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | status: 39 | state: Deleting 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-consumer 43 | - my-provider 44 | conditions: 45 | - type: Ready 46 | reason: DeletionTriggered 47 | status: "False" 48 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-17.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: 6 | - sme.sap.com/capapplication 7 | generation: 2 8 | name: test-cap-01 9 | namespace: default 10 | resourceVersion: "11373799" 11 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | labels: 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | spec: 17 | btp: 18 | services: 19 | - class: xsuaa 20 | name: cap-uaa 21 | secret: cap-cap-01-uaa-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | status: 39 | state: "Deleting" 40 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 41 | observedSubdomains: 42 | - my-consumer 43 | - my-provider 44 | conditions: 45 | - type: Ready 46 | reason: DeletionTriggered 47 | status: "False" 48 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-19.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: 6 | - sme.sap.com/capapplication 7 | generation: 2 8 | name: test-cap-01 9 | namespace: default 10 | resourceVersion: "11373799" 11 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | labels: 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | spec: 17 | btp: 18 | services: 19 | - class: xsuaa 20 | name: cap-uaa 21 | secret: cap-cap-01-uaa-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | status: 39 | state: "Deleting" 40 | conditions: 41 | - type: Ready 42 | reason: DeletionTriggered 43 | status: "False" 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-30.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 0 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | conditions: [] 39 | observedGeneration: 999 40 | state: "Consistent" 41 | servicesOnly: false 42 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 43 | observedSubdomains: 44 | - my-consumer 45 | - my-provider 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-31.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 0 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | observedGeneration: 0 39 | state: "Consistent" 40 | servicesOnly: false 41 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 42 | observedSubdomains: 43 | - my-consumer 44 | - my-provider 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-32.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 0 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | observedGeneration: 0 39 | state: "Consistent" 40 | servicesOnly: false 41 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 42 | observedSubdomains: 43 | - my-consumer 44 | - my-provider 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-33.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 0 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | observedGeneration: 0 39 | state: "Consistent" 40 | servicesOnly: false 41 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 42 | observedSubdomains: 43 | - my-consumer 44 | - my-provider 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-42.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "Processing" 39 | observedGeneration: 2 40 | conditions: 41 | - type: Ready 42 | reason: "ApplicationProcessing" 43 | observedGeneration: 2 44 | status: "False" 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-42.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | state: "" 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-43.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | annotations: 12 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 13 | labels: 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: saas-registry 22 | name: cap-saas-registry 23 | secret: cap-cap-01-saas-bind-cf 24 | - class: service-manager 25 | name: cap-service-manager 26 | secret: cap-cap-01-svc-man-bind-cf 27 | btpAppName: test-cap-01 28 | domainRefs: 29 | - kind: Domain 30 | name: test-cap-01-primary 31 | - kind: ClusterDomain 32 | name: test-cap-01-secondary 33 | globalAccountId: btp-glo-acc-id 34 | provider: 35 | subDomain: my-provider 36 | tenantId: tenant-id-for-provider 37 | status: 38 | conditions: 39 | - reason: ProcessingDomainResources 40 | status: "False" 41 | type: Ready 42 | observedGeneration: 2 43 | servicesOnly: false 44 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 45 | state: Processing 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-services-hostUpdated.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | labels: 9 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 10 | generation: 0 11 | name: test-ca-01 12 | namespace: default 13 | resourceVersion: "11373799" 14 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: xsuaa 22 | name: cap-uaa2 23 | secret: cap-cap-01-uaa2-bind-cf 24 | - class: saas-registry 25 | name: cap-saas-registry 26 | secret: cap-cap-01-saas-bind-cf 27 | - class: service-manager 28 | name: cap-service-manager 29 | secret: cap-cap-01-svc-man-bind-cf 30 | btpAppName: test-cap-01 31 | domainRefs: 32 | - kind: Domain 33 | name: test-cap-01-primary 34 | - kind: ClusterDomain 35 | name: test-cap-01-secondary 36 | globalAccountId: btp-glo-acc-id 37 | status: 38 | state: "Processing" 39 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain-dup.test.local"}' 40 | observedSubdomains: 41 | - api 42 | - router 43 | conditions: [] 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/ca-services.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | labels: 9 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 10 | generation: 0 11 | name: test-ca-01 12 | namespace: default 13 | resourceVersion: "11373799" 14 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 15 | spec: 16 | btp: 17 | services: 18 | - class: xsuaa 19 | name: cap-uaa 20 | secret: cap-cap-01-uaa-bind-cf 21 | - class: xsuaa 22 | name: cap-uaa2 23 | secret: cap-cap-01-uaa2-bind-cf 24 | - class: saas-registry 25 | name: cap-saas-registry 26 | secret: cap-cap-01-saas-bind-cf 27 | - class: service-manager 28 | name: cap-service-manager 29 | secret: cap-cap-01-svc-man-bind-cf 30 | btpAppName: test-cap-01 31 | domainRefs: 32 | - kind: Domain 33 | name: test-cap-01-primary 34 | - kind: ClusterDomain 35 | name: test-cap-01-secondary 36 | globalAccountId: btp-glo-acc-id 37 | status: 38 | state: "Processing" 39 | domainSpecHash: '{"ClusterDomain.test-cap-01-secondary":"foo.bar.local","Domain.default.test-cap-01-primary":"app-domain.test.local"}' 40 | observedSubdomains: 41 | - api 42 | - router 43 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-consumer-no-finalizers-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | annotations: 5 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 6 | sme.sap.com/owner-identifier: default.test-cap-01 7 | labels: 8 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 9 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 10 | sme.sap.com/owner-generation: "2" 11 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 12 | sme.sap.com/tenant-type: consumer 13 | name: test-cap-01-consumer 14 | namespace: default 15 | ownerReferences: 16 | - apiVersion: sme.sap.com/v1alpha1 17 | blockOwnerDeletion: true 18 | controller: true 19 | kind: CAPApplication 20 | name: test-cap-01 21 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 22 | spec: 23 | capApplicationInstance: test-cap-01 24 | subDomain: my-consumer 25 | tenantId: tenant-id-for-consumer 26 | version: 5.6.7 27 | versionUpgradeStrategy: always 28 | status: 29 | conditions: 30 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 31 | reason: ProvisioningCompleted 32 | status: "True" 33 | type: Ready 34 | state: Ready 35 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 36 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-consumer-upg-never-deleting.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | labels: 5 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 6 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 7 | sme.sap.com/owner-generation: "2" 8 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 9 | sme.sap.com/tenant-type: consumer 10 | annotations: 11 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 12 | sme.sap.com/owner-identifier: default.test-cap-01 13 | sme.sap.com/btp-tenant-id: "provider-tenant-id" 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | versionUpgradeStrategy: never 30 | status: 31 | state: Deleting 32 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 33 | conditions: 34 | - message: "waiting for CAPTenantOperation default.test-cap-01-consumer-xyz1 of type deprovisioning to complete" 35 | reason: DeprovisioningOperationCreated 36 | status: "False" 37 | type: Ready 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-consumer-upg-never-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | labels: 5 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 6 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 7 | sme.sap.com/owner-generation: "2" 8 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 9 | sme.sap.com/tenant-type: consumer 10 | annotations: 11 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 12 | sme.sap.com/owner-identifier: default.test-cap-01 13 | sme.sap.com/btp-tenant-id: "provider-tenant-id" 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | versionUpgradeStrategy: never 30 | status: 31 | state: Ready 32 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 33 | conditions: 34 | - message: "CAPTenantOperation default.test-cap-01-consumer-prvn successfully completed" 35 | reason: ProvisioningCompleted 36 | status: "True" 37 | type: Ready 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-consumer-upgrading.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | labels: 5 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 6 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 7 | sme.sap.com/owner-generation: "2" 8 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 9 | sme.sap.com/tenant-type: consumer 10 | annotations: 11 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 12 | sme.sap.com/owner-identifier: default.test-cap-01 13 | sme.sap.com/btp-tenant-id: "provider-tenant-id" 14 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | status: 30 | state: Upgrading 31 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 32 | conditions: 33 | - message: "waiting for CAPTenantOperation default.test-cap-01-consumer-ctop-gen of type upgrade to complete" 34 | reason: UpgradeOperationCreated 35 | status: "False" 36 | type: Ready 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-provider-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "Error" 33 | reason: ProvisioningError 34 | status: "False" 35 | type: Ready 36 | state: ProvisioningError 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-provider-no-finalizers-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | annotations: 5 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 6 | sme.sap.com/owner-identifier: default.test-cap-01 7 | labels: 8 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 9 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 10 | sme.sap.com/owner-generation: "2" 11 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 12 | sme.sap.com/tenant-type: provider 13 | name: test-cap-01-provider 14 | namespace: default 15 | ownerReferences: 16 | - apiVersion: sme.sap.com/v1alpha1 17 | blockOwnerDeletion: true 18 | controller: true 19 | kind: CAPApplication 20 | name: test-cap-01 21 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 22 | spec: 23 | capApplicationInstance: test-cap-01 24 | subDomain: my-provider 25 | tenantId: tenant-id-for-provider 26 | version: 5.6.7 27 | versionUpgradeStrategy: always 28 | status: 29 | conditions: 30 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 31 | reason: ProvisioningCompleted 32 | status: "True" 33 | type: Ready 34 | state: Ready 35 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 36 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplication/cat-provider-upgrade-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "UpgradeError" 33 | reason: UpgradeError 34 | status: "False" 35 | type: Ready 36 | state: UpgradeError 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplicationversion/cat-provider-version.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 1.2.3 29 | versionUpgradeStrategy: always 30 | status: 31 | state: Upgrading 32 | -------------------------------------------------------------------------------- /internal/controller/testdata/capapplicationversion/cav-invalid-ca.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplicationVersion 3 | metadata: 4 | creationTimestamp: "2022-07-18T06:13:52Z" 5 | generation: 1 6 | name: test-cap-01-cav-v1 7 | namespace: default 8 | resourceVersion: "11371108" 9 | uid: 5e64489b-7346-4984-8617-e8c37338b3d8 10 | spec: 11 | capApplicationInstance: test-cap-01 12 | registrySecrets: 13 | - regcred 14 | version: 1.2.3 15 | workloads: 16 | - name: cap-backend-srv 17 | consumedBTPServices: 18 | - cap-uaa 19 | - cap-service-manager 20 | - cap-saas-registry 21 | deploymentDefinition: 22 | image: docker.image.repo/srv/server:latest 23 | type: CAP 24 | - name: app-router 25 | consumedBTPServices: 26 | - cap-uaa 27 | - cap-saas-registry 28 | deploymentDefinition: 29 | image: docker.image.repo/approuter/approuter:latest 30 | type: Router 31 | - name: content-job 32 | consumedBTPServices: 33 | - cap-uaa 34 | jobDefinition: 35 | image: docker.image.repo/content/cap-content:latest 36 | type: Content 37 | - name: mtx-job 38 | consumedBTPServices: 39 | - cap-uaa 40 | - cap-service-manager 41 | - cap-saas-registry 42 | jobDefinition: 43 | image: docker.image.repo/srv/server:latest 44 | type: TenantOperation 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-01.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | name: test-cap-01-provider 5 | namespace: default 6 | spec: 7 | capApplicationInstance: test-cap-01 8 | subDomain: my-provider 9 | tenantId: tenant-id-for-provider 10 | version: 5.6.7 11 | versionUpgradeStrategy: always 12 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-02.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | state: "" 32 | conditions: 33 | - type: Ready 34 | status: "False" 35 | reason: "ProcessingStarted" 36 | message: "" 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-02.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | name: test-cap-01-consumer 5 | namespace: default 6 | spec: 7 | capApplicationInstance: test-cap-01 8 | subDomain: my-consumer 9 | tenantId: tenant-id-for-consumer 10 | version: 5.6.7 11 | versionUpgradeStrategy: always 12 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-03.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | state: "" 32 | conditions: 33 | - type: Ready 34 | status: "False" 35 | reason: "ProcessingStarted" 36 | message: "" 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-05.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" 33 | reason: ProvisioningFailed 34 | status: "False" 35 | type: Ready 36 | state: ProvisioningError 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-06.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" 33 | reason: ProvisioningOperationCreated 34 | status: "False" 35 | type: Ready 36 | state: Provisioning 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-07.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 8.9.10 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 33 | reason: ProvisioningCompleted 34 | status: "True" 35 | type: Ready 36 | state: Ready 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-08.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 8.9.10 29 | versionUpgradeStrategy: never 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 33 | reason: ProvisioningCompleted 34 | status: "True" 35 | type: Ready 36 | state: Ready 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-08.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 8.9.10 29 | versionUpgradeStrategy: never 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 33 | reason: ProvisioningCompleted 34 | status: "True" 35 | type: Ready 36 | state: Ready 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-09.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: 6 | - sme.sap.com/captenant 7 | annotations: 8 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 9 | sme.sap.com/owner-identifier: default.test-cap-01 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 5.6.7 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 34 | reason: ProvisioningCompleted 35 | status: "True" 36 | type: Ready 37 | state: Ready 38 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-10.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: [] 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "created CAPTenantOperation default.test-cap-01-provider-gen of type deprovisioning" 33 | reason: DeprovisioningOperationCreated 34 | status: "False" 35 | type: Ready 36 | state: Deleting 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-11.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: [] 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" 33 | reason: ProvisioningFailed 34 | status: "False" 35 | type: Ready 36 | state: ProvisioningError 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-11.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | deletionTimestamp: "2022-03-22T13:24:38Z" 5 | finalizers: 6 | - sme.sap.com/captenant 7 | annotations: 8 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 9 | sme.sap.com/owner-identifier: default.test-cap-01 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 5.6.7 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l failed" 34 | reason: ProvisioningFailed 35 | status: "False" 36 | type: Ready 37 | state: ProvisioningError 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-14.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-20.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "waiting for CAPTenantOperation default.test-cap-01-provider-gen of type provisioning to complete" 33 | reason: ProvisioningOperationCreated 34 | status: "False" 35 | type: Ready 36 | state: Provisioning 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-20.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 5.6.7 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "waiting for CAPTenantOperation default.test-cap-01-provider-s6f4l of type provisioning to complete" 33 | reason: ProvisioningOperationCreated 34 | status: "False" 35 | type: Ready 36 | state: Provisioning 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-23.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | generation: 2 5 | finalizers: 6 | - sme.sap.com/captenant 7 | annotations: 8 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 9 | sme.sap.com/owner-identifier: default.test-cap-01 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 8.9.10 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" 34 | reason: UpgradeFailed 35 | observedGeneration: 2 36 | status: "False" 37 | type: Ready 38 | state: UpgradeError 39 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 40 | observedGeneration: 2 41 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-25.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | generation: 2 5 | finalizers: 6 | - sme.sap.com/captenant 7 | annotations: 8 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 9 | sme.sap.com/owner-identifier: default.test-cap-01 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 8.9.10 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-upg failed" 34 | reason: UpgradeFailed 35 | status: "True" 36 | type: Ready 37 | state: UpgradeError 38 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 39 | observedGeneration: 2 40 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-28.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | version: 8.9.10 29 | versionUpgradeStrategy: always 30 | status: 31 | state: "" 32 | conditions: 33 | - type: Ready 34 | status: "False" 35 | reason: "ProcessingStarted" 36 | message: "" 37 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-29.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | generation: 2 5 | finalizers: 6 | - sme.sap.com/captenant 7 | annotations: 8 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 9 | sme.sap.com/owner-identifier: default.test-cap-01 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 8.9.10 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-upg successfully completed" 34 | reason: UpgradeCompleted 35 | observedGeneration: 2 36 | status: "True" 37 | type: Ready 38 | state: Ready 39 | currentCAPApplicationVersionInstance: test-cap-01-cav-v2 40 | previousCAPApplicationVersions: 41 | - old-version-2 42 | - old-version-3 43 | - test-cap-01-cav-v1 44 | observedGeneration: 2 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/cat-with-no-version.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | name: test-cap-01-consumer 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-consumer 27 | tenantId: tenant-id-for-consumer 28 | versionUpgradeStrategy: always 29 | status: 30 | state: "" 31 | conditions: 32 | - type: Ready 33 | status: "False" 34 | reason: "ProcessingStarted" 35 | message: "" 36 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/provider-tenant-dr-v1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1 2 | kind: DestinationRule 3 | metadata: 4 | annotations: 5 | sme.sap.com/resource-hash: 76ac6b80ce55711ae052011d8d29727030c897d4869ba6c403ac6842f08b93d6 6 | sme.sap.com/owner-identifier: default.test-cap-01-provider 7 | generation: 1 8 | labels: 9 | sme.sap.com/owner-generation: "0" 10 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 11 | name: test-cap-01-provider 12 | namespace: default 13 | ownerReferences: 14 | - apiVersion: sme.sap.com/v1alpha1 15 | blockOwnerDeletion: true 16 | controller: true 17 | kind: CAPTenant 18 | name: test-cap-01-provider 19 | spec: 20 | host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local 21 | trafficPolicy: 22 | loadBalancer: 23 | consistentHash: 24 | httpCookie: 25 | name: CAPOP_ROUTER_STICKY 26 | path: / 27 | ttl: 0s 28 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenant/provider-tenant-vs-v1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1 2 | kind: VirtualService 3 | metadata: 4 | annotations: 5 | sme.sap.com/resource-hash: c280c17a7d333e1e021bf607951133eeb94506e7c02b2d8d07a858d4fe8818ee 6 | sme.sap.com/owner-identifier: default.test-cap-01-provider 7 | labels: 8 | sme.sap.com/owner-generation: "0" 9 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 10 | name: test-cap-01-provider 11 | namespace: default 12 | ownerReferences: 13 | - apiVersion: sme.sap.com/v1alpha1 14 | blockOwnerDeletion: true 15 | controller: true 16 | kind: CAPTenant 17 | name: test-cap-01-provider 18 | spec: 19 | gateways: 20 | - default-test-cap-01-primary 21 | - default/default-test-cap-01-secondary 22 | hosts: 23 | - my-provider.app-domain.test.local 24 | - my-provider.foo.bar.local 25 | http: 26 | - match: 27 | - uri: 28 | prefix: / 29 | route: 30 | - destination: 31 | host: test-cap-01-cav-v1-app-router-svc.default.svc.cluster.local 32 | port: 33 | number: 5000 34 | weight: 100 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-01.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | sme.sap.com/subscription-context-secret: test-cap-01-gen 12 | labels: 13 | sme.sap.com/tenant-operation-type: provisioning 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: "5.6.7" 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-01.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | spec: 8 | tenantId: tenant-id-for-provider 9 | operation: provisioning 10 | capApplicationVersionInstance: test-cap-01-cav-v1 11 | steps: 12 | - name: mtx 13 | type: TenantOperation 14 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-02.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | sme.sap.com/subscription-context-secret: test-cap-01-gen 12 | labels: 13 | sme.sap.com/tenant-operation-type: provisioning 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: "5.6.7" 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-02.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | operation: provisioning 26 | capApplicationVersionInstance: test-cap-01-cav-v1 27 | steps: 28 | - name: mtx 29 | type: TenantOperation 30 | status: 31 | state: Processing 32 | conditions: [] 33 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-03.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | sme.sap.com/subscription-context-secret: test-cap-01-gen 12 | labels: 13 | sme.sap.com/tenant-operation-type: provisioning 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: "5.6.7" 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: [] 29 | status: 30 | state: Failed 31 | observedGeneration: 1 32 | conditions: 33 | - type: Ready 34 | status: "True" 35 | observedGeneration: 1 36 | reason: StepProcessingError 37 | message: "operation steps missing in CAPTenantOperation default.test-cap-01-provider-abcd" 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-03.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | operation: provisioning 26 | capApplicationVersionInstance: test-cap-01-cav-v1 27 | steps: [] 28 | status: 29 | state: Processing 30 | conditions: [] 31 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-04.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-05.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | operation: upgrade 26 | capApplicationVersionInstance: test-cap-01-cav-v1 27 | steps: 28 | - name: mtx 29 | type: TenantOperation 30 | status: 31 | state: Processing 32 | conditions: [] 33 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-05.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | spec: 8 | tenantId: tenant-id-for-provider 9 | operation: upgrade 10 | capApplicationVersionInstance: test-cap-01-cav-v1 11 | steps: 12 | - name: mtx 13 | type: TenantOperation 14 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-06.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: cap-backend 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-07.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-09.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: 8.9.10 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | observedGeneration: 1 38 | conditions: 39 | - type: Ready 40 | status: "False" 41 | reason: StepCompleted 42 | message: "step 1/3 : job default.test-cap-01-provider-abcd-xyz completed" 43 | currentStep: 2 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-10.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: 8.9.10 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Failed 37 | observedGeneration: 1 38 | conditions: 39 | - type: Ready 40 | status: "True" 41 | observedGeneration: 1 42 | reason: StepFailed 43 | message: "step 2/3 : job default.test-cap-01-provider-mtx-xyz failed" 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-11.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: 8.9.10 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Completed 37 | observedGeneration: 1 38 | conditions: 39 | - type: Ready 40 | status: "True" 41 | observedGeneration: 1 42 | reason: StepCompleted 43 | message: "step 3/3 : job default.test-cap-01-provider-custom-say-xyz completed" 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-12.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | deletionTimestamp: "2022-08-22T13:24:38Z" 7 | generation: 1 8 | finalizers: 9 | - sme.sap.com/captenantoperation 10 | annotations: 11 | sme.sap.com/owner-identifier: default.test-cap-01-provider 12 | labels: 13 | sme.sap.com/tenant-operation-type: upgrade 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: 8.9.10 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | subDomain: my-provider 27 | operation: upgrade 28 | capApplicationVersionInstance: test-cap-01-cav-v2 29 | steps: 30 | - name: custom-say 31 | type: CustomTenantOperation 32 | - name: ten-op 33 | type: TenantOperation 34 | - name: custom-say 35 | type: CustomTenantOperation 36 | status: 37 | state: Deleting 38 | observedGeneration: 1 39 | conditions: 40 | - type: Ready 41 | status: "False" 42 | observedGeneration: 1 43 | reason: StepCompleted 44 | message: "step 1/3 : job default.test-cap-01-provider-custom-say-xyz completed" 45 | currentStep: 2 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-13.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | deletionTimestamp: "2022-08-22T13:24:38Z" 7 | generation: 1 8 | finalizers: 9 | - sme.sap.com/captenantoperation 10 | annotations: 11 | sme.sap.com/owner-identifier: default.test-cap-01-provider 12 | labels: 13 | sme.sap.com/tenant-operation-type: upgrade 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: 8.9.10 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | subDomain: my-provider 27 | operation: upgrade 28 | capApplicationVersionInstance: test-cap-01-cav-v2 29 | steps: 30 | - name: custom-say 31 | type: CustomTenantOperation 32 | - name: ten-op 33 | type: TenantOperation 34 | - name: custom-say 35 | type: CustomTenantOperation 36 | status: 37 | state: Deleting 38 | observedGeneration: 1 39 | conditions: 40 | - type: Ready 41 | status: "True" 42 | observedGeneration: 1 43 | reason: StepFailed 44 | message: "step 2/3 : job default.test-cap-01-provider-ten-op-xyz failed" 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-14.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | deletionTimestamp: "2022-08-22T13:24:38Z" 7 | generation: 1 8 | finalizers: [] 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: 8.9.10 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Deleting 37 | observedGeneration: 1 38 | conditions: 39 | - type: Ready 40 | status: "True" 41 | observedGeneration: 1 42 | reason: StepFailed 43 | message: "step 2/3 : job default.test-cap-01-provider-abcd-xyz failed" 44 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-14.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | deletionTimestamp: "2022-08-22T13:24:38Z" 7 | generation: 1 8 | finalizers: 9 | - sme.sap.com/captenantoperation 10 | annotations: 11 | sme.sap.com/owner-identifier: default.test-cap-01-provider 12 | labels: 13 | sme.sap.com/tenant-operation-type: upgrade 14 | sme.sap.com/owner-generation: "0" 15 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 16 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 17 | sme.sap.com/cav-version: 8.9.10 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPTenant 23 | name: test-cap-01-provider 24 | spec: 25 | tenantId: tenant-id-for-provider 26 | subDomain: my-provider 27 | operation: upgrade 28 | capApplicationVersionInstance: test-cap-01-cav-v2 29 | steps: 30 | - name: custom-say 31 | type: CustomTenantOperation 32 | - name: ten-op 33 | type: TenantOperation 34 | - name: custom-say 35 | type: CustomTenantOperation 36 | status: 37 | state: Deleting 38 | observedGeneration: 1 39 | conditions: 40 | - type: Ready 41 | status: "True" 42 | observedGeneration: 1 43 | reason: StepFailed 44 | message: "step 2/3 : job default.test-cap-01-provider-abcd-xyz failed" 45 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-15.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-invalid-tenant-op 5 | namespace: default 6 | generation: 1 7 | spec: 8 | tenantId: tenant-id-invalid 9 | operation: deprovisioning 10 | capApplicationVersionInstance: test-cap-01-cav-v1 11 | steps: 12 | - name: mtx 13 | type: TenantOperation 14 | status: 15 | state: Processing 16 | conditions: [] 17 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-15.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-invalid-tenant-op 5 | namespace: default 6 | generation: 1 7 | spec: 8 | tenantId: tenant-id-invalid 9 | operation: deprovisioning 10 | capApplicationVersionInstance: test-cap-01-cav-v1 11 | steps: 12 | - name: mtx 13 | type: TenantOperation 14 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-16.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: deprovisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: deprovisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-18.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-19.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: deprovisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: deprovisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-20.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-21.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-22.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-23.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-24.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-25.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-26.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: ten-op 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-init-custom.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-init.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-scheduling-custom.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-scheduling.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-vol-custom.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: "default.test-cap-01-provider" 11 | labels: 12 | sme.sap.com/tenant-operation-type: upgrade 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "8.9.10" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: upgrade 27 | capApplicationVersionInstance: test-cap-01-cav-v2 28 | steps: 29 | - name: custom-say 30 | type: CustomTenantOperation 31 | - name: ten-op 32 | type: TenantOperation 33 | - name: custom-say 34 | type: CustomTenantOperation 35 | status: 36 | state: Processing 37 | conditions: [] 38 | currentStep: 1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/captenantoperation/ctop-vol.initial.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenantOperation 3 | metadata: 4 | name: test-cap-01-provider-abcd 5 | namespace: default 6 | generation: 1 7 | finalizers: 8 | - sme.sap.com/captenantoperation 9 | annotations: 10 | sme.sap.com/owner-identifier: default.test-cap-01-provider 11 | labels: 12 | sme.sap.com/tenant-operation-type: provisioning 13 | sme.sap.com/owner-generation: "0" 14 | sme.sap.com/owner-identifier-hash: db1f1fd7eaeb0e6407c741b7e4b2540044bcc4ec 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | sme.sap.com/cav-version: "5.6.7" 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPTenant 22 | name: test-cap-01-provider 23 | spec: 24 | tenantId: tenant-id-for-provider 25 | subDomain: my-provider 26 | operation: provisioning 27 | capApplicationVersionInstance: test-cap-01-cav-v1 28 | steps: 29 | - name: mtx 30 | type: TenantOperation 31 | status: 32 | state: Processing 33 | conditions: [] 34 | currentStep: 1 35 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/ca-services.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | labels: 9 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 10 | name: test-ca-01 11 | namespace: default 12 | resourceVersion: "11373799" 13 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 14 | spec: 15 | btp: 16 | services: 17 | - class: xsuaa 18 | name: cap-uaa 19 | secret: cap-cap-01-uaa-bind-cf 20 | - class: xsuaa 21 | name: cap-uaa2 22 | secret: cap-cap-01-uaa2-bind-cf 23 | - class: saas-registry 24 | name: cap-saas-registry 25 | secret: cap-cap-01-saas-bind-cf 26 | - class: service-manager 27 | name: cap-service-manager 28 | secret: cap-cap-01-svc-man-bind-cf 29 | btpAppName: test-cap-01 30 | domainRefs: 31 | - kind: Domain 32 | name: test-cap-01-primary 33 | - kind: ClusterDomain 34 | name: test-cap-01-secondary 35 | globalAccountId: btp-glo-acc-id 36 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/capapplication-multi-xsuaa.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | annotations: 5 | "sme.sap.com/primary-xsuaa": "cap-uaa2" 6 | finalizers: 7 | - sme.sap.com/capapplication 8 | generation: 2 9 | name: test-cap-01 10 | namespace: default 11 | resourceVersion: "11373799" 12 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 13 | spec: 14 | btp: 15 | services: 16 | - class: xsuaa 17 | name: cap-uaa 18 | secret: cap-cap-01-uaa-bind-cf 19 | - class: xsuaa 20 | name: cap-uaa2 21 | secret: cap-cap-01-uaa2-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/capapplication-vs-headers-error-req.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/vs-route-request-header-set: | 8 | { 9 | "x-downstream-peer-subject": "%DOWNSTREAM_PEER_SUBJECT%" 10 | "x-tenant-id": "invalid-tenant-id" 11 | } 12 | sme.sap.com/vs-route-response-header-set: | 13 | { 14 | "foo": "bar" 15 | } 16 | generation: 2 17 | name: test-cap-01 18 | namespace: default 19 | resourceVersion: "11373799" 20 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 21 | spec: 22 | btp: 23 | services: 24 | - class: xsuaa 25 | name: cap-uaa 26 | secret: cap-cap-01-uaa-bind-cf 27 | - class: xsuaa 28 | name: cap-uaa2 29 | secret: cap-cap-01-uaa2-bind-cf 30 | - class: saas-registry 31 | name: cap-saas-registry 32 | secret: cap-cap-01-saas-bind-cf 33 | - class: service-manager 34 | name: cap-service-manager 35 | secret: cap-cap-01-svc-man-bind-cf 36 | btpAppName: test-cap-01 37 | domainRefs: 38 | - kind: Domain 39 | name: test-cap-01-primary 40 | - kind: ClusterDomain 41 | name: test-cap-01-secondary 42 | globalAccountId: btp-glo-acc-id 43 | provider: 44 | subDomain: my-provider 45 | tenantId: tenant-id-for-provider 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/capapplication-vs-headers-error-res.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/vs-route-request-header-set: | 8 | { 9 | "x-downstream-peer-subject": "%DOWNSTREAM_PEER_SUBJECT%", 10 | "x-tenant-id": "invalid-tenant-id" 11 | } 12 | sme.sap.com/vs-route-response-header-set: | 13 | { 14 | "foo: "bar" 15 | } 16 | generation: 2 17 | name: test-cap-01 18 | namespace: default 19 | resourceVersion: "11373799" 20 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 21 | spec: 22 | btp: 23 | services: 24 | - class: xsuaa 25 | name: cap-uaa 26 | secret: cap-cap-01-uaa-bind-cf 27 | - class: xsuaa 28 | name: cap-uaa2 29 | secret: cap-cap-01-uaa2-bind-cf 30 | - class: saas-registry 31 | name: cap-saas-registry 32 | secret: cap-cap-01-saas-bind-cf 33 | - class: service-manager 34 | name: cap-service-manager 35 | secret: cap-cap-01-svc-man-bind-cf 36 | btpAppName: test-cap-01 37 | domainRefs: 38 | - kind: Domain 39 | name: test-cap-01-primary 40 | - kind: ClusterDomain 41 | name: test-cap-01-secondary 42 | globalAccountId: btp-glo-acc-id 43 | provider: 44 | subDomain: my-provider 45 | tenantId: tenant-id-for-provider 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/capapplication-vs-headers.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | annotations: 7 | sme.sap.com/vs-route-request-header-set: | 8 | { 9 | "x-downstream-peer-subject": "%DOWNSTREAM_PEER_SUBJECT%", 10 | "x-tenant-id": "invalid-tenant-id" 11 | } 12 | sme.sap.com/vs-route-response-header-set: | 13 | { 14 | "foo": "bar" 15 | } 16 | generation: 2 17 | name: test-cap-01 18 | namespace: default 19 | resourceVersion: "11373799" 20 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 21 | spec: 22 | btp: 23 | services: 24 | - class: xsuaa 25 | name: cap-uaa 26 | secret: cap-cap-01-uaa-bind-cf 27 | - class: xsuaa 28 | name: cap-uaa2 29 | secret: cap-cap-01-uaa2-bind-cf 30 | - class: saas-registry 31 | name: cap-saas-registry 32 | secret: cap-cap-01-saas-bind-cf 33 | - class: service-manager 34 | name: cap-service-manager 35 | secret: cap-cap-01-svc-man-bind-cf 36 | btpAppName: test-cap-01 37 | domainRefs: 38 | - kind: Domain 39 | name: test-cap-01-primary 40 | - kind: ClusterDomain 41 | name: test-cap-01-secondary 42 | globalAccountId: btp-glo-acc-id 43 | provider: 44 | subDomain: my-provider 45 | tenantId: tenant-id-for-provider 46 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/capapplication.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | resourceVersion: "11373799" 10 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 11 | spec: 12 | btp: 13 | services: 14 | - class: xsuaa 15 | name: cap-uaa 16 | secret: cap-cap-01-uaa-bind-cf 17 | - class: xsuaa 18 | name: cap-uaa2 19 | secret: cap-cap-01-uaa2-bind-cf 20 | - class: saas-registry 21 | name: cap-saas-registry 22 | secret: cap-cap-01-saas-bind-cf 23 | - class: service-manager 24 | name: cap-service-manager 25 | secret: cap-cap-01-svc-man-bind-cf 26 | btpAppName: test-cap-01 27 | domainRefs: 28 | - kind: Domain 29 | name: test-cap-01-primary 30 | - kind: ClusterDomain 31 | name: test-cap-01-secondary 32 | globalAccountId: btp-glo-acc-id 33 | provider: 34 | subDomain: my-provider 35 | tenantId: tenant-id-for-provider 36 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/captenant-provider-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | sme.sap.com/subscription-context-secret: test-cap-01-gen 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 5.6.7 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 34 | reason: ProvisioningCompleted 35 | status: "True" 36 | type: Ready 37 | state: Ready 38 | currentCAPApplicationVersionInstance: test-cap-01-cav-v1 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/captenant-provider-upgraded-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 11 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 12 | sme.sap.com/owner-generation: "2" 13 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 14 | sme.sap.com/tenant-type: provider 15 | name: test-cap-01-provider 16 | namespace: default 17 | ownerReferences: 18 | - apiVersion: sme.sap.com/v1alpha1 19 | blockOwnerDeletion: true 20 | controller: true 21 | kind: CAPApplication 22 | name: test-cap-01 23 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 24 | spec: 25 | capApplicationInstance: test-cap-01 26 | subDomain: my-provider 27 | tenantId: tenant-id-for-provider 28 | version: 8.9.10 29 | versionUpgradeStrategy: always 30 | status: 31 | conditions: 32 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 33 | reason: UpgradeCompleted 34 | status: "True" 35 | type: Ready 36 | state: Ready 37 | currentCAPApplicationVersionInstance: test-cap-01-cav-v2 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/cluster-domain-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | spec: 6 | dnsMode: Subdomain 7 | domain: foo.bar.local 8 | ingressSelector: 9 | app: istio-ingressgateway 10 | istio: ingressgateway 11 | tlsMode: Simple 12 | status: 13 | conditions: 14 | - lastTransitionTime: "2025-05-13T18:55:20Z" 15 | message: Domain resources are ready 16 | observedGeneration: 1 17 | reason: Ready 18 | status: "True" 19 | type: Ready 20 | dnsTarget: x.bar.local 21 | observedDomain: foo.bar.local 22 | observedGeneration: 1 23 | state: Ready 24 | 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/credential-secrets.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: cap-cap-01-uaa-bind-cf 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/capapplication 8 | type: Opaque 9 | data: 10 | credentials: ewogICJ1YWFkb21haW4iOiAiYXV0aC5zZXJ2aWNlLmxvY2FsIiwKICAieHNhcHBuYW1lIjogInRlc3QtY2FwLTAxIWIxNCIsCiAgInVybCI6ICJodHRwczovL2FwcC1kb21haW4uYXV0aC5zZXJ2aWNlLmxvY2FsIiwKICAiY3JlZGVudGlhbC10eXBlIjogImluc3RhbmNlLXNlY3JldCIKfQo= 11 | --- 12 | apiVersion: v1 13 | kind: Secret 14 | metadata: 15 | name: cap-cap-01-uaa2-bind-cf 16 | namespace: default 17 | type: Opaque 18 | data: 19 | credentials: eyJ1YWFkb21haW4iOiJhdXRoMi5zZXJ2aWNlLmxvY2FsIiwieHNhcHBuYW1lIjoidGVzdC1jYXAtMDIhYjIxIiwidXJsIjoiaHR0cHM6Ly9hcHAtZG9tYWluMi5hdXRoLnNlcnZpY2UubG9jYWwiLCJjcmVkZW50aWFsLXR5cGUiOiJpbnN0YW5jZS1zZWNyZXQifQ== 20 | --- 21 | apiVersion: v1 22 | kind: Secret 23 | metadata: 24 | name: cap-cap-01-saas-bind-cf 25 | namespace: default 26 | type: Opaque 27 | data: 28 | credentials: ewogICJzYWFzX3JlZ2lzdHJ5X3VybCI6ICJodHRwczovL3NtLnNlcnZpY2UubG9jYWwiLAogICJjbGllbnRpZCI6ICJjbGllbnRpZCIsCiAgImNsaWVudHNlY3JldCI6ICJjbGllbnRzZWNyZXQiLAogICJ1YWFkb21haW4iOiAiYXV0aC5zZXJ2aWNlLmxvY2FsIgp9Cg== 29 | --- 30 | apiVersion: v1 31 | kind: Secret 32 | metadata: 33 | name: cap-cap-01-svc-man-bind-cf 34 | namespace: default 35 | type: Opaque 36 | data: 37 | credentials: ewogICJzbV91cmwiOiAiaHR0cHM6Ly9zbS5zZXJ2aWNlLmxvY2FsIiwKICAiY2xpZW50aWQiOiAiY2xpZW50aWQiLAogICJjbGllbnRzZWNyZXQiOiAiY2xpZW50c2VjcmV0IiwKICAidWFhZG9tYWluIjogImF1dGguc2VydmljZS5sb2NhbCIKfQo= 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/domain-hostUpdated-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | spec: 7 | dnsMode: Wildcard 8 | domain: app-domain-dup.test.local 9 | ingressSelector: 10 | app: istio-ingressgateway 11 | istio: ingressgateway 12 | tlsMode: Simple 13 | status: 14 | conditions: 15 | - lastTransitionTime: "2025-05-13T18:55:20Z" 16 | message: Domain resources are ready 17 | observedGeneration: 1 18 | reason: Ready 19 | status: "True" 20 | type: Ready 21 | dnsTarget: x.test.local 22 | observedDomain: app-domain-dup.test.local 23 | observedGeneration: 1 24 | state: Ready 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/common/domain-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | spec: 7 | dnsMode: Wildcard 8 | domain: app-domain.test.local 9 | ingressSelector: 10 | app: istio-ingressgateway 11 | istio: ingressgateway 12 | tlsMode: Simple 13 | status: 14 | conditions: 15 | - lastTransitionTime: "2025-05-13T18:55:20Z" 16 | message: Domain resources are ready 17 | observedGeneration: 1 18 | reason: Ready 19 | status: "True" 20 | type: Ready 21 | dnsTarget: x.test.local 22 | observedDomain: app-domain.test.local 23 | observedGeneration: 1 24 | state: Ready 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/cluster-domain-deleting-no-finalizer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | labels: 6 | sme.sap.com/domain-host-hash: 367762e6dbe1ec665c949f28406d81b4fe088a87 7 | deletionTimestamp: "2022-03-22T13:24:38Z" 8 | spec: 9 | dnsMode: Subdomain 10 | domain: foo.bar.local 11 | ingressSelector: 12 | app: istio-ingressgateway 13 | istio: ingressgateway 14 | tlsMode: Simple 15 | status: 16 | conditions: 17 | - message: deleting domain resources 18 | reason: Deleting 19 | status: "False" 20 | type: Ready 21 | dnsTarget: x.bar.local 22 | observedDomain: foo.bar.local 23 | observedGeneration: 0 24 | state: Deleting 25 | 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/cluster-domain-deleting.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | finalizers: 6 | - sme.sap.com/domain 7 | labels: 8 | sme.sap.com/domain-host-hash: 367762e6dbe1ec665c949f28406d81b4fe088a87 9 | deletionTimestamp: "2022-03-22T13:24:38Z" 10 | spec: 11 | dnsMode: Subdomain 12 | domain: foo.bar.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: deleting domain resources 20 | reason: Deleting 21 | status: "False" 22 | type: Ready 23 | dnsTarget: x.bar.local 24 | observedDomain: foo.bar.local 25 | observedGeneration: 0 26 | state: Deleting 27 | 28 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/cluster-domain-initial-state-label-finalizer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | finalizers: 6 | - sme.sap.com/domain 7 | labels: 8 | sme.sap.com/domain-host-hash: 367762e6dbe1ec665c949f28406d81b4fe088a87 9 | spec: 10 | dnsMode: Subdomain 11 | domain: foo.bar.local 12 | ingressSelector: 13 | app: istio-ingressgateway 14 | istio: ingressgateway 15 | tlsMode: Simple 16 | status: 17 | state: "" 18 | 19 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/cluster-domain-initial-state.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | spec: 6 | dnsMode: Subdomain 7 | domain: foo.bar.local 8 | ingressSelector: 9 | app: istio-ingressgateway 10 | istio: ingressgateway 11 | tlsMode: Simple 12 | status: 13 | state: "" 14 | 15 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/cluster-domain-ready-withDeletionTimestamp.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: ClusterDomain 3 | metadata: 4 | name: test-cap-01-secondary 5 | finalizers: 6 | - sme.sap.com/domain 7 | labels: 8 | sme.sap.com/domain-host-hash: 367762e6dbe1ec665c949f28406d81b4fe088a87 9 | deletionTimestamp: "2022-03-22T13:24:38Z" 10 | spec: 11 | dnsMode: Subdomain 12 | domain: foo.bar.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Domain resources are ready 20 | reason: Ready 21 | status: "True" 22 | type: Ready 23 | state: Ready 24 | dnsTarget: x.bar.local 25 | observedDomain: foo.bar.local 26 | observedGeneration: 0 27 | 28 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-cert-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: "Certificate has state Error: certificate error" 20 | reason: ProcessingError 21 | status: "False" 22 | type: Ready 23 | state: Error 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-certManager-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: "Certificate not ready: Error cert-manager message error" 20 | reason: ProcessingError 21 | status: "False" 22 | type: Ready 23 | state: Error 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-deleting-no-finalizer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | labels: 7 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 8 | deletionTimestamp: "2022-03-22T13:24:38Z" 9 | spec: 10 | dnsMode: Wildcard 11 | domain: app-domain.test.local 12 | ingressSelector: 13 | app: istio-ingressgateway 14 | istio: ingressgateway 15 | tlsMode: Simple 16 | status: 17 | conditions: 18 | - message: deleting domain resources 19 | reason: Deleting 20 | status: "False" 21 | type: Ready 22 | state: Deleting 23 | dnsTarget: public-ingress.operator.testing.local 24 | observedDomain: app-domain.test.local 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-deleting.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | deletionTimestamp: "2022-03-22T13:24:38Z" 11 | spec: 12 | dnsMode: Wildcard 13 | domain: app-domain.test.local 14 | ingressSelector: 15 | app: istio-ingressgateway 16 | istio: ingressgateway 17 | tlsMode: Simple 18 | status: 19 | conditions: 20 | - message: deleting domain resources 21 | reason: Deleting 22 | status: "False" 23 | type: Ready 24 | state: Deleting 25 | dnsTarget: public-ingress.operator.testing.local 26 | observedDomain: app-domain.test.local 27 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-dns-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: "DNSEntry in state Error for Domain.default.test-cap-01-primary: dns message" 20 | reason: ProcessingError 21 | status: "False" 22 | type: Ready 23 | state: Error 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-duplicate.expected.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary-dup 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | state: Error 19 | conditions: 20 | - message: Identical domain host is specified in another Domain/ClusterDomain resource 21 | reason: DuplicateDomainHost 22 | status: "False" 23 | type: Ready 24 | observedDomain: app-domain.test.local 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-duplicate.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary-dup 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | state: Processing 19 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-initial-state-label-finalizer.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | state: "" 19 | 20 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-initial-state.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | spec: 7 | dnsMode: Wildcard 8 | domain: app-domain.test.local 9 | ingressSelector: 10 | app: istio-ingressgateway 11 | istio: ingressgateway 12 | tlsMode: Simple 13 | status: 14 | state: "" 15 | 16 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-no-ingress-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: "failed to get ingress information for Domain.default.test-cap-01-primary: no matching ingress gateway pods found matching selector from Domain.default.test-cap-01-primary" 20 | reason: ProcessingError 21 | status: "False" 22 | type: Ready 23 | state: Error 24 | 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-processing-observedDom.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Processing domain resources 20 | reason: Processing 21 | status: "False" 22 | type: Ready 23 | state: Processing 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-processing.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Processing domain resources 20 | reason: Processing 21 | status: "False" 22 | type: Ready 23 | state: Processing 24 | 25 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-ready-withDeletionTimestamp.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | deletionTimestamp: "2022-03-22T13:24:38Z" 11 | spec: 12 | dnsMode: Wildcard 13 | domain: app-domain.test.local 14 | ingressSelector: 15 | app: istio-ingressgateway 16 | istio: ingressgateway 17 | tlsMode: Simple 18 | status: 19 | conditions: 20 | - message: Domain resources are ready 21 | reason: Ready 22 | status: "True" 23 | type: Ready 24 | state: Ready 25 | dnsTarget: public-ingress.operator.testing.local 26 | observedDomain: app-domain.test.local 27 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Domain resources are ready 20 | reason: Ready 21 | status: "True" 22 | type: Ready 23 | state: Ready 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-update.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: e68f5960522c10885f02827ee4260e9416eccb70 10 | spec: 11 | dnsMode: Wildcard 12 | domain: app-domain-dup.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Processing domain resources 20 | reason: Processing 21 | status: "False" 22 | type: Ready 23 | state: Processing 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain-dup.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-with-subdomain-processing.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Subdomain 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Processing domain resources 20 | reason: Processing 21 | status: "False" 22 | type: Ready 23 | state: Processing 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/domain-with-subdomain-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: Domain 3 | metadata: 4 | name: test-cap-01-primary 5 | namespace: default 6 | finalizers: 7 | - sme.sap.com/domain 8 | labels: 9 | sme.sap.com/domain-host-hash: d8b11ae7b1f04e357f32290b81db58c247dac748 10 | spec: 11 | dnsMode: Subdomain 12 | domain: app-domain.test.local 13 | ingressSelector: 14 | app: istio-ingressgateway 15 | istio: ingressgateway 16 | tlsMode: Simple 17 | status: 18 | conditions: 19 | - message: Domain resources are ready 20 | reason: Ready 21 | status: "True" 22 | type: Ready 23 | state: Ready 24 | dnsTarget: public-ingress.operator.testing.local 25 | observedDomain: app-domain.test.local 26 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-certManager-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert-manager.io/v1 2 | kind: Certificate 3 | metadata: 4 | name: test-cap-01-certificate 5 | namespace: istio-system 6 | annotations: 7 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 8 | sme.sap.com/resource-hash: 4f15ef7b54d820e54dc376eb08324a635c40dec81e6cc5593fb4ece81c8da776 9 | labels: 10 | sme.sap.com/owner-generation: "0" 11 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 12 | spec: 13 | dnsNames: 14 | - '*.app-domain.test.local' 15 | secretName: default-test-cap-01-primary 16 | issuerRef: 17 | kind: ClusterIssuer 18 | name: cluster-ca 19 | status: 20 | state: Ready 21 | conditions: 22 | - message: "cert-manager message error" 23 | reason: "" 24 | status: "False" 25 | type: Ready 26 | observedGeneration: 0 27 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-certManager-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert-manager.io/v1 2 | kind: Certificate 3 | metadata: 4 | name: test-cap-01-certificate 5 | namespace: istio-system 6 | annotations: 7 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 8 | sme.sap.com/resource-hash: 4f15ef7b54d820e54dc376eb08324a635c40dec81e6cc5593fb4ece81c8da776 9 | labels: 10 | sme.sap.com/owner-generation: "0" 11 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 12 | spec: 13 | dnsNames: 14 | - '*.app-domain.test.local' 15 | secretName: default-test-cap-01-primary 16 | issuerRef: 17 | kind: ClusterIssuer 18 | name: cluster-ca 19 | status: 20 | state: Ready 21 | conditions: 22 | - message: "cert message" 23 | reason: "" 24 | status: "True" 25 | type: Ready 26 | observedGeneration: 0 27 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-certificate-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert.gardener.cloud/v1alpha1 2 | kind: Certificate 3 | metadata: 4 | annotations: 5 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 6 | sme.sap.com/resource-hash: 4f15ef7b54d820e54dc376eb08324a635c40dec81e6cc5593fb4ece81c8da776 7 | finalizers: 8 | - sme.sap.com/domain 9 | generation: 1 10 | labels: 11 | sme.sap.com/owner-generation: "0" 12 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 13 | name: default-test-cap-01-primary 14 | namespace: istio-system 15 | spec: 16 | dnsNames: 17 | - '*.app-domain.test.local' 18 | secretRef: 19 | name: default-test-cap-01-primary 20 | namespace: istio-system 21 | status: 22 | state: Error 23 | message: certificate error 24 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-certificate-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cert.gardener.cloud/v1alpha1 2 | kind: Certificate 3 | metadata: 4 | annotations: 5 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 6 | sme.sap.com/resource-hash: 4f15ef7b54d820e54dc376eb08324a635c40dec81e6cc5593fb4ece81c8da776 7 | finalizers: 8 | - sme.sap.com/domain 9 | generation: 1 10 | labels: 11 | sme.sap.com/owner-generation: "0" 12 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 13 | name: default-test-cap-01-primary 14 | namespace: istio-system 15 | spec: 16 | dnsNames: 17 | - '*.app-domain.test.local' 18 | secretRef: 19 | name: default-test-cap-01-primary 20 | namespace: istio-system 21 | status: 22 | state: Ready 23 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-dns-error.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dns.gardener.cloud/v1alpha1 2 | kind: DNSEntry 3 | metadata: 4 | annotations: 5 | dns.gardener.cloud/class: garden 6 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 7 | sme.sap.com/resource-hash: bcec92268a567aadc243d28dda4ad857a41a858964b920c77f6376849e660419 8 | generateName: default-test-cap-01-primary- 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: "" 11 | sme.sap.com/owner-generation: "0" 12 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 13 | sme.sap.com/subdomain-hash: df58248c414f342c81e056b40bee12d17a08bf61 14 | name: default-test-cap-01-primary-gen 15 | namespace: default 16 | ownerReferences: 17 | - apiVersion: sme.sap.com/v1alpha1 18 | blockOwnerDeletion: true 19 | controller: true 20 | kind: Domain 21 | name: test-cap-01-primary 22 | spec: 23 | cnameLookupInterval: 30 24 | dnsName: '*.app-domain.test.local' 25 | targets: 26 | - public-ingress.operator.testing.local 27 | ttl: 600 28 | status: 29 | state: Error 30 | message: dns message 31 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-dns-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: dns.gardener.cloud/v1alpha1 2 | kind: DNSEntry 3 | metadata: 4 | annotations: 5 | dns.gardener.cloud/class: garden 6 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 7 | sme.sap.com/resource-hash: bcec92268a567aadc243d28dda4ad857a41a858964b920c77f6376849e660419 8 | generateName: default-test-cap-01-primary- 9 | labels: 10 | sme.sap.com/btp-app-identifier-hash: "" 11 | sme.sap.com/owner-generation: "0" 12 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 13 | sme.sap.com/subdomain-hash: df58248c414f342c81e056b40bee12d17a08bf61 14 | name: default-test-cap-01-primary-gen 15 | namespace: default 16 | ownerReferences: 17 | - apiVersion: sme.sap.com/v1alpha1 18 | blockOwnerDeletion: true 19 | controller: true 20 | kind: Domain 21 | name: test-cap-01-primary 22 | spec: 23 | cnameLookupInterval: 30 24 | dnsName: '*.app-domain.test.local' 25 | targets: 26 | - public-ingress.operator.testing.local 27 | ttl: 600 28 | status: 29 | state: Ready 30 | -------------------------------------------------------------------------------- /internal/controller/testdata/domain/primary-gateway.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.istio.io/v1 2 | kind: Gateway 3 | metadata: 4 | annotations: 5 | sme.sap.com/owner-identifier: Domain.default.test-cap-01-primary 6 | sme.sap.com/resource-hash: 88fee3ef7f6c6ad863d66d5932953b7303e4494574ad594a40cfd0894834e34d 7 | labels: 8 | sme.sap.com/owner-generation: "0" 9 | sme.sap.com/owner-identifier-hash: f3b9e769089130d9d80dc05b68fb1564beb8cccc 10 | name: default-test-cap-01-primary 11 | namespace: default 12 | ownerReferences: 13 | - apiVersion: sme.sap.com/v1alpha1 14 | blockOwnerDeletion: true 15 | controller: true 16 | kind: Domain 17 | name: test-cap-01-primary 18 | spec: 19 | selector: 20 | app: istio-ingressgateway 21 | istio: ingressgateway 22 | servers: 23 | - hosts: 24 | - ./*.app-domain.test.local 25 | port: 26 | name: https 27 | number: 443 28 | protocol: HTTPS 29 | tls: 30 | credentialName: default-test-cap-01-primary 31 | mode: SIMPLE 32 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/ca-cleanup-dry-run-enabled.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | annotations: 10 | sme.sap.com/enable-cleanup-monitoring: "dry-run" 11 | resourceVersion: "11373799" 12 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 13 | spec: 14 | btp: 15 | services: 16 | - class: xsuaa 17 | name: cap-uaa 18 | secret: cap-cap-01-uaa-bind-cf 19 | - class: xsuaa 20 | name: cap-uaa2 21 | secret: cap-cap-01-uaa2-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/ca-cleanup-enabled.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPApplication 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/capapplication 6 | generation: 2 7 | name: test-cap-01 8 | namespace: default 9 | annotations: 10 | sme.sap.com/enable-cleanup-monitoring: "true" 11 | resourceVersion: "11373799" 12 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 13 | spec: 14 | btp: 15 | services: 16 | - class: xsuaa 17 | name: cap-uaa 18 | secret: cap-cap-01-uaa-bind-cf 19 | - class: xsuaa 20 | name: cap-uaa2 21 | secret: cap-cap-01-uaa2-bind-cf 22 | - class: saas-registry 23 | name: cap-saas-registry 24 | secret: cap-cap-01-saas-bind-cf 25 | - class: service-manager 26 | name: cap-service-manager 27 | secret: cap-cap-01-svc-man-bind-cf 28 | btpAppName: test-cap-01 29 | domainRefs: 30 | - kind: Domain 31 | name: test-cap-01-primary 32 | - kind: ClusterDomain 33 | name: test-cap-01-secondary 34 | globalAccountId: btp-glo-acc-id 35 | provider: 36 | subDomain: my-provider 37 | tenantId: tenant-id-for-provider 38 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/cat-consumer-v2-upgrading.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | labels: 7 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 8 | sme.sap.com/btp-tenant-id: tenant-id-for-consumer 9 | sme.sap.com/owner-generation: "2" 10 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 11 | sme.sap.com/tenant-type: consumer 12 | annotations: 13 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 14 | sme.sap.com/owner-identifier: default.test-cap-01 15 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 16 | name: test-cap-01-consumer 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-consumer 28 | tenantId: tenant-id-for-consumer 29 | version: 11.12.13 30 | versionUpgradeStrategy: always 31 | status: 32 | state: Upgrading 33 | currentCAPApplicationVersionInstance: test-cap-01-cav-v2 34 | conditions: 35 | - message: "waiting for CAPTenantOperation default.test-cap-01-consumer-ctop-gen of type upgrade to complete" 36 | reason: UpgradeOperationCreated 37 | status: "False" 38 | type: Ready 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/cat-provider-v2-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | sme.sap.com/subscription-context-secret: test-cap-01-gen 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 8.9.10 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 34 | reason: ProvisioningCompleted 35 | status: "True" 36 | type: Ready 37 | state: Ready 38 | currentCAPApplicationVersionInstance: test-cap-01-cav-v2 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/cat-provider-v3-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: sme.sap.com/v1alpha1 2 | kind: CAPTenant 3 | metadata: 4 | finalizers: 5 | - sme.sap.com/captenant 6 | annotations: 7 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 8 | sme.sap.com/owner-identifier: default.test-cap-01 9 | sme.sap.com/subscription-context-secret: test-cap-01-gen 10 | labels: 11 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 12 | sme.sap.com/btp-tenant-id: tenant-id-for-provider 13 | sme.sap.com/owner-generation: "2" 14 | sme.sap.com/owner-identifier-hash: 1f74ae2fbff71a708786a4df4bb2ca87ec603581 15 | sme.sap.com/tenant-type: provider 16 | name: test-cap-01-provider 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplication 23 | name: test-cap-01 24 | uid: 3c7ba7cb-dc04-4fd1-be86-3eb3a5c64a98 25 | spec: 26 | capApplicationInstance: test-cap-01 27 | subDomain: my-provider 28 | tenantId: tenant-id-for-provider 29 | version: 11.12.13 30 | versionUpgradeStrategy: always 31 | status: 32 | conditions: 33 | - message: "CAPTenantOperation default.test-cap-01-provider-s6f4l successfully completed" 34 | reason: ProvisioningCompleted 35 | status: "True" 36 | type: Ready 37 | state: Ready 38 | currentCAPApplicationVersionInstance: test-cap-01-cav-v3 39 | -------------------------------------------------------------------------------- /internal/controller/testdata/version-monitoring/servicemonitors-cav-v1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: monitoring.coreos.com/v1 2 | kind: ServiceMonitor 3 | metadata: 4 | annotations: 5 | sme.sap.com/btp-app-identifier: btp-glo-acc-id.test-cap-01 6 | sme.sap.com/owner-identifier: default.test-cap-01-cav-v1 7 | labels: 8 | app: test-cap-01 9 | sme.sap.com/category: ServiceMonitor 10 | sme.sap.com/workload-name: test-cap-01-cav-v1-app-router-svc 11 | sme.sap.com/workload-type: Router 12 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 13 | sme.sap.com/cav-version: "5.6.7" 14 | sme.sap.com/owner-generation: "1" 15 | sme.sap.com/owner-identifier-hash: e95e0682f33a657e75e1fc435972d19bd407ba3b 16 | name: test-cap-01-cav-v1-app-router-svc 17 | namespace: default 18 | ownerReferences: 19 | - apiVersion: sme.sap.com/v1alpha1 20 | blockOwnerDeletion: true 21 | controller: true 22 | kind: CAPApplicationVersion 23 | name: test-cap-01-cav-v1 24 | uid: 5e64489b-7346-4984-8617-e8c37338b3d8 25 | spec: 26 | endpoints: 27 | - interval: 10s 28 | path: /metrics 29 | port: metrics-port 30 | namespaceSelector: {} 31 | selector: 32 | matchLabels: 33 | app: test-cap-01 34 | sme.sap.com/btp-app-identifier-hash: f20cc8aeb2003b3abc33f749a16bd53544b6bab2 35 | sme.sap.com/category: Service 36 | sme.sap.com/cav-version: "5.6.7" 37 | sme.sap.com/workload-name: test-cap-01-cav-v1-app-router-svc 38 | sme.sap.com/workload-type: Router 39 | -------------------------------------------------------------------------------- /internal/util/uaa.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | package util 7 | 8 | import ( 9 | "slices" 10 | 11 | "github.com/sap/cap-operator/pkg/apis/sme.sap.com/v1alpha1" 12 | ) 13 | 14 | const ( 15 | AnnotationPrimaryXSUAA = "sme.sap.com/primary-xsuaa" 16 | ) 17 | 18 | func GetXSUAAInfo(consumedServiceInfos []v1alpha1.ServiceInfo, ca *v1alpha1.CAPApplication) *v1alpha1.ServiceInfo { 19 | // Get primary xsuaa service instance name 20 | primaryXSUAA := ca.Annotations[AnnotationPrimaryXSUAA] 21 | 22 | serviceIndex := -1 23 | 24 | // Check if matching service with annotated xsuaa name exists 25 | if primaryXSUAA != "" { 26 | serviceIndex = slices.IndexFunc(consumedServiceInfos, func(consumedServiceInfo v1alpha1.ServiceInfo) bool { 27 | return consumedServiceInfo.Name == primaryXSUAA 28 | }) 29 | } 30 | 31 | // Fallback to using 1st matching "xsuaa" class in the list of consumed services 32 | if serviceIndex == -1 { 33 | serviceIndex = slices.IndexFunc(consumedServiceInfos, func(consumedServiceInfo v1alpha1.ServiceInfo) bool { return consumedServiceInfo.Class == "xsuaa" }) 34 | } 35 | 36 | // Return matching service info if any 37 | if serviceIndex > -1 { 38 | return &consumedServiceInfos[serviceIndex] 39 | } 40 | 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /pkg/apis/sme.sap.com/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | // +k8s:deepcopy-gen=package 2 | // +groupName=sme.sap.com 3 | 4 | /* 5 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 6 | SPDX-License-Identifier: Apache-2.0 7 | */ 8 | 9 | package v1alpha1 10 | -------------------------------------------------------------------------------- /pkg/client/applyconfiguration/internal/internal.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by applyconfiguration-gen. DO NOT EDIT. 7 | 8 | package internal 9 | 10 | import ( 11 | fmt "fmt" 12 | sync "sync" 13 | 14 | typed "sigs.k8s.io/structured-merge-diff/v4/typed" 15 | ) 16 | 17 | func Parser() *typed.Parser { 18 | parserOnce.Do(func() { 19 | var err error 20 | parser, err = typed.NewParser(schemaYAML) 21 | if err != nil { 22 | panic(fmt.Sprintf("Failed to parse schema: %v", err)) 23 | } 24 | }) 25 | return parser 26 | } 27 | 28 | var parserOnce sync.Once 29 | var parser *typed.Parser 30 | var schemaYAML = typed.YAMLObject(`types: 31 | - name: __untyped_atomic_ 32 | scalar: untyped 33 | list: 34 | elementType: 35 | namedType: __untyped_atomic_ 36 | elementRelationship: atomic 37 | map: 38 | elementType: 39 | namedType: __untyped_atomic_ 40 | elementRelationship: atomic 41 | - name: __untyped_deduced_ 42 | scalar: untyped 43 | list: 44 | elementType: 45 | namedType: __untyped_atomic_ 46 | elementRelationship: atomic 47 | map: 48 | elementType: 49 | namedType: __untyped_deduced_ 50 | elementRelationship: separable 51 | `) 52 | -------------------------------------------------------------------------------- /pkg/client/applyconfiguration/sme.sap.com/v1alpha1/btp.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by applyconfiguration-gen. DO NOT EDIT. 7 | 8 | package v1alpha1 9 | 10 | // BTPApplyConfiguration represents a declarative configuration of the BTP type for use 11 | // with apply. 12 | type BTPApplyConfiguration struct { 13 | Services []ServiceInfoApplyConfiguration `json:"services,omitempty"` 14 | } 15 | 16 | // BTPApplyConfiguration constructs a declarative configuration of the BTP type for use with 17 | // apply. 18 | func BTP() *BTPApplyConfiguration { 19 | return &BTPApplyConfiguration{} 20 | } 21 | 22 | // WithServices adds the given value to the Services field in the declarative configuration 23 | // and returns the receiver, so that objects can be build by chaining "With" function invocations. 24 | // If called multiple times, values provided by each call will be appended to the Services field. 25 | func (b *BTPApplyConfiguration) WithServices(values ...*ServiceInfoApplyConfiguration) *BTPApplyConfiguration { 26 | for i := range values { 27 | if values[i] == nil { 28 | panic("nil value passed to WithServices") 29 | } 30 | b.Services = append(b.Services, *values[i]) 31 | } 32 | return b 33 | } 34 | -------------------------------------------------------------------------------- /pkg/client/applyconfiguration/sme.sap.com/v1alpha1/captenantoutputspec.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by applyconfiguration-gen. DO NOT EDIT. 7 | 8 | package v1alpha1 9 | 10 | // CAPTenantOutputSpecApplyConfiguration represents a declarative configuration of the CAPTenantOutputSpec type for use 11 | // with apply. 12 | type CAPTenantOutputSpecApplyConfiguration struct { 13 | SubscriptionCallbackData *string `json:"subscriptionCallbackData,omitempty"` 14 | } 15 | 16 | // CAPTenantOutputSpecApplyConfiguration constructs a declarative configuration of the CAPTenantOutputSpec type for use with 17 | // apply. 18 | func CAPTenantOutputSpec() *CAPTenantOutputSpecApplyConfiguration { 19 | return &CAPTenantOutputSpecApplyConfiguration{} 20 | } 21 | 22 | // WithSubscriptionCallbackData sets the SubscriptionCallbackData field in the declarative configuration to the given value 23 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. 24 | // If called multiple times, the SubscriptionCallbackData field is set to the value of the last call. 25 | func (b *CAPTenantOutputSpecApplyConfiguration) WithSubscriptionCallbackData(value string) *CAPTenantOutputSpecApplyConfiguration { 26 | b.SubscriptionCallbackData = &value 27 | return b 28 | } 29 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by client-gen. DO NOT EDIT. 7 | 8 | // This package has the automatically generated fake clientset. 9 | package fake 10 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/scheme/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by client-gen. DO NOT EDIT. 7 | 8 | // This package contains the scheme of the automatically generated clientset. 9 | package scheme 10 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by client-gen. DO NOT EDIT. 7 | 8 | // This package has the automatically generated typed clients. 9 | package v1alpha1 10 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by client-gen. DO NOT EDIT. 7 | 8 | // Package fake has the automatically generated clients. 9 | package fake 10 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/sme.sap.com/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by client-gen. DO NOT EDIT. 7 | 8 | package v1alpha1 9 | 10 | type CAPApplicationExpansion interface{} 11 | 12 | type CAPApplicationVersionExpansion interface{} 13 | 14 | type CAPTenantExpansion interface{} 15 | 16 | type CAPTenantOperationExpansion interface{} 17 | 18 | type CAPTenantOutputExpansion interface{} 19 | 20 | type ClusterDomainExpansion interface{} 21 | 22 | type DomainExpansion interface{} 23 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by informer-gen. DO NOT EDIT. 7 | 8 | package internalinterfaces 9 | 10 | import ( 11 | time "time" 12 | 13 | versioned "github.com/sap/cap-operator/pkg/client/clientset/versioned" 14 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 15 | runtime "k8s.io/apimachinery/pkg/runtime" 16 | cache "k8s.io/client-go/tools/cache" 17 | ) 18 | 19 | // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. 20 | type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer 21 | 22 | // SharedInformerFactory a small interface to allow for adding an informer without an import cycle 23 | type SharedInformerFactory interface { 24 | Start(stopCh <-chan struct{}) 25 | InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer 26 | } 27 | 28 | // TweakListOptionsFunc is a function that transforms a v1.ListOptions. 29 | type TweakListOptionsFunc func(*v1.ListOptions) 30 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/sme.sap.com/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company and cap-operator contributors 3 | SPDX-License-Identifier: Apache-2.0 4 | */ 5 | 6 | // Code generated by informer-gen. DO NOT EDIT. 7 | 8 | package sme 9 | 10 | import ( 11 | internalinterfaces "github.com/sap/cap-operator/pkg/client/informers/externalversions/internalinterfaces" 12 | v1alpha1 "github.com/sap/cap-operator/pkg/client/informers/externalversions/sme.sap.com/v1alpha1" 13 | ) 14 | 15 | // Interface provides access to each of this group's versions. 16 | type Interface interface { 17 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 18 | V1alpha1() v1alpha1.Interface 19 | } 20 | 21 | type group struct { 22 | factory internalinterfaces.SharedInformerFactory 23 | namespace string 24 | tweakListOptions internalinterfaces.TweakListOptionsFunc 25 | } 26 | 27 | // New returns a new Interface. 28 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 29 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 30 | } 31 | 32 | // V1alpha1 returns a new v1alpha1.Interface. 33 | func (g *group) V1alpha1() v1alpha1.Interface { 34 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 35 | } 36 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=SAP_cap-operator 2 | sonar.organization=sap-1 3 | 4 | # This is the name and version displayed in the SonarCloud UI. 5 | #sonar.projectName=CAP Operator 6 | #sonar.projectVersion=1.0 7 | # Go! 8 | sonar.language=go 9 | # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. 10 | sonar.sources=cmd,internal 11 | sonar.exclusions=**/*_test.go,**/*.yaml 12 | sonar.tests=. 13 | sonar.test.inclusions=**/*_test.go 14 | 15 | sonar.coverage.exclusions=**/main.go,**/domain-migration.go,**/*server.go 16 | 17 | sonar.go.coverage.reportPaths=coverage.out 18 | 19 | # Encoding of the source code. Default is default system encoding 20 | #sonar.sourceEncoding=UTF-8 21 | -------------------------------------------------------------------------------- /website/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /website/assets/scss/_styles_project.scss: -------------------------------------------------------------------------------- 1 | @import 'td/code-dark'; 2 | -------------------------------------------------------------------------------- /website/content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Documentation" 3 | linkTitle: "Documentation" 4 | weight: 10 5 | menu: 6 | main: 7 | weight: 10 8 | pre: "" 9 | --- 10 | 11 | [**CAP Operator**](https://github.com/sap/cap-operator) deploys and manages the lifecycle of multi-tenant [SAP Cloud Application Programming Model](https://cap.cloud.sap/docs) based applications and related components, within a Kubernetes cluster. 12 | 13 | What are the main features of CAP Operator? 14 | 15 | - Quick and easy deployment of CAP application back ends, router, and related networking components. 16 | - Integration with SAP Software-as-a-Service Provisioning service to handle asynchronous tenant subscription requests, executing provisioning / deprovisioning tasks as Kubernetes jobs. 17 | - Automated upgrades of known tenants as soon as new application versions are available. 18 | - Support of deployment of service-specific content / configuration as a Kubernetes job with every application version (for example, HTML5 application content to SAP HTML5 Application Repository service). 19 | - Management of TLS certificates and DNS entries related to the deployed application, with support of customer-specific domains. 20 | 21 | Here's an overview of the major automation steps handled by CAP Operator during the deployment of the application: 22 | 23 | ![workflow](/cap-operator/img/workflow.png) 24 | 25 | Explore the following chapters to learn more. 26 | -------------------------------------------------------------------------------- /website/content/en/docs/concepts/operator-components/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "CAP Operator Overview" 3 | linkTitle: "CAP Operator Overview" 4 | weight: 10 5 | type: "docs" 6 | description: > 7 | An overview of the architecture 8 | --- 9 | 10 | CAP Operator is comprised of the following components: 11 | 12 | 1. **CAP Controller**: a native Kubernetes controller that reconciles custom resources defined as part of the operator 13 | 2. **Webhooks**: validating webhooks to ensure consistency of custom resource objects submitted to the Kubernetes API server 14 | 3. **Subscription Server**: web server for handling HTTP requests submitted by the SAP BTP `saas-registry` service instances during tenant subscription (and unsubscribe) 15 | 16 | The following diagram depicts how the main components interact when deployed to a cluster: 17 | 18 | ![cluster-components](/cap-operator/img/block-cluster.drawio.svg) 19 | 20 | Looking for more details about the CAP Operator components? Go to the next pages. 21 | -------------------------------------------------------------------------------- /website/content/en/docs/configuration/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Configuration" 3 | linkTitle: "Configuration" 4 | weight: 40 5 | type: "docs" 6 | tags: ["setup"] 7 | description: > 8 | How to configure 9 | --- 10 | 11 | Here's a list of environment variables used by CAP Operator. 12 | 13 | ### Controller 14 | 15 | - `CERT_MANAGER`: specifies the certificate manager to be used for TLS certificates. Possible values are: 16 | - `gardener`: ["Gardener" certificate management](https://github.com/gardener/cert-management) 17 | - `cert-manager.io`: [cert-manager.io cert-manager](https://github.com/cert-manager/cert-manager) 18 | - `DNS_MANAGER`: specifies the external DNS manager to be used. Possible values are: 19 | - `gardener`: ["Gardener" external DNS manager](https://github.com/gardener/external-dns-management) 20 | - `kubernetes`: [external DNS management from Kubernetes](https://github.com/kubernetes-sigs/external-dns) 21 | - `PROMETHEUS_ADDRESS`: URL of the Prometheus server (or service) for executing PromQL queries e.g. `http://prometheus-operated.monitoring.svc.cluster.local:9090`. If no URL is supplied, the controller will not start the version monitoring function. 22 | - `PROM_ACQUIRE_CLIENT_RETRY_DELAY`: Time delay between retries when a Prometheus client creation and connection check fails. 23 | - `METRICS_EVAL_INTERVAL`: Time interval between subsequent iterations where outdated versions are identified and queued for evaluation. -------------------------------------------------------------------------------- /website/content/en/docs/installation/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Installation" 3 | linkTitle: "Installation" 4 | weight: 30 5 | type: "docs" 6 | description: > 7 | How to install CAP Operator in a Kubernetes cluster 8 | --- 9 | 10 | This page provides an overview of available methods to install CAP Operator on a Kubernetes cluster. 11 | -------------------------------------------------------------------------------- /website/content/en/docs/installation/cap-operator-manager/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Using CAP Operator Manager" 3 | linkTitle: "Using CAP Operator Manager" 4 | weight: 30 5 | type: "docs" 6 | tags: ["setup"] 7 | description: > 8 | How to install CAP Operator using CAP Operator Manager in a Kubernetes cluster 9 | --- 10 | 11 | To install the CAP Operator using CAP Operator Manager, please execute the following commands: 12 | 13 | ```bash 14 | kubectl apply -f https://github.com/SAP/cap-operator-lifecycle/releases/latest/download/manager_manifest.yaml 15 | ``` 16 | 17 | The above command will create namespace `cap-operator-system` with CAP Operator Manager installed. Once the CAP Operator Manager pod is running, you can install the CAP operator by executing the following command: 18 | 19 | ```bash 20 | kubectl apply -n cap-operator-system -f https://github.com/SAP/cap-operator-lifecycle/releases/latest/download/manager_default_CR.yaml 21 | ``` 22 | **This would work only if the `ingressGatewayLabels` in your clusters matches the following values** 23 | 24 | ```yaml 25 | ingressGatewayLabels: 26 | - name: istio 27 | value: ingressgateway 28 | - name: app 29 | value: istio-ingressgateway 30 | ``` 31 | 32 | If not, you will have to manually create the `CAPOperator` resource. For more details on the same, please refer to [link](https://sap.github.io/cap-operator-lifecycle/docs/installation/local-cluster/). 33 | -------------------------------------------------------------------------------- /website/content/en/docs/installation/helm/helm-values.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Helm Values" 3 | linkTitle: "Helm Values" 4 | weight: 10 5 | type: "docs" 6 | tags: ["setup"] 7 | description: > 8 | Discover all values supported by the latest CAP Operator helm chart 9 | --- 10 | 11 | {{% include "includes/chart-values.md" %}} 12 | -------------------------------------------------------------------------------- /website/content/en/docs/reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Reference" 3 | linkTitle: "Reference" 4 | weight: 99 5 | type: "docs" 6 | description: > 7 | API reference 8 | --- 9 | 10 | {{% include "includes/api-reference.html" %}} 11 | -------------------------------------------------------------------------------- /website/content/en/docs/support/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Support 3 | linkTitle: "Support" 4 | weight: 95 5 | type: "docs" 6 | description: > 7 | How to get support and how to reach out 8 | --- 9 | 10 | ### Bugs 11 | 12 | To report a bug, create an [issue](https://github.com/sap/cap-operator/issues). 13 | 14 | Anything missing? Please let us know or [raise a PR](https://github.com/sap/cap-operator/pulls). 15 | 16 | ### Communication Channels 17 | 18 | Reach out to the project team and the project community via the following communication channels: 19 | - Issues: [GitHub](https://github.com/sap/cap-operator/issues) 20 | - Email: [CAP Operator](mailto:cap-operator@sap.com) -------------------------------------------------------------------------------- /website/content/en/docs/usage/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Usage" 3 | linkTitle: "Usage" 4 | weight: 50 5 | type: "docs" 6 | description: > 7 | How to manage the application with CAP Operator 8 | --- 9 | -------------------------------------------------------------------------------- /website/content/en/docs/usage/resources/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Resources" 3 | linkTitle: "Resources" 4 | weight: 80 5 | type: "docs" 6 | description: > 7 | Detailed configuration of resources managed by CAP Operator 8 | --- 9 | -------------------------------------------------------------------------------- /website/content/en/docs/usage/resources/clusterdomain.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "ClusterDomain" 3 | linkTitle: "ClusterDomain" 4 | weight: 70 5 | type: "docs" 6 | tags: ["domains"] 7 | description: > 8 | How to configure the `ClusterDomain` resource 9 | --- 10 | 11 | Here's an example of a fully configured `ClusterDomain` resource: 12 | 13 | ```yaml 14 | apiVersion: sme.sap.com/v1alpha1 15 | kind: ClusterDomain 16 | metadata: 17 | name: common-external-domain 18 | spec: 19 | domain: my.example.com 20 | ingressSelector: 21 | app: istio-ingressgateway 22 | istio: ingressgateway 23 | tlsMode: Simple # Simple (default) or Mutual 24 | dnsMode: Subdomain # Wildcard or Subdomain or None (default) 25 | dnsTarget: public-ingress.cluster.domain # Optional 26 | ``` 27 | 28 | - The `dnsTarget` field is optional. If specified, it will be used; otherwise, it will be derived from the Istio Ingress Gateway via `ingressSelector`. 29 | - `Gateway` and `DNSEntry` will be created in the namespace where the cap-operator is installed, while `Certificates` will be created in the namespace where Istio Ingress Gateway is present. 30 | -------------------------------------------------------------------------------- /website/content/en/docs/usage/resources/domain.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Domain" 3 | linkTitle: "Domain" 4 | weight: 60 5 | type: "docs" 6 | tags: ["domains"] 7 | description: > 8 | How to configure the `Domain` resource 9 | --- 10 | 11 | Here's an example of a fully configured `Domain` resource: 12 | 13 | ```yaml 14 | apiVersion: sme.sap.com/v1alpha1 15 | kind: Domain 16 | metadata: 17 | namespace: cap-app-01 18 | name: cap-app-01-primary 19 | spec: 20 | domain: my.cluster.shoot.url.k8s.example.com 21 | ingressSelector: 22 | app: istio-ingressgateway 23 | istio: ingressgateway 24 | tlsMode: Simple # Simple (default) or Mutual 25 | dnsMode: Wildcard # Wildcard or Subdomain or None (default) 26 | dnsTarget: public-ingress.cluster.domain # Optional 27 | ``` 28 | 29 | - The `dnsTarget` field is optional. If specified, it will be used; otherwise, it will be derived from the Istio Ingress Gateway via `ingressSelector`. 30 | - `Gateway` and `DNSEntry` will be created in the same namespace as the `Domain` resource while the `Certificates` will be created in the namespace where Istio Ingress Gateway is present. 31 | -------------------------------------------------------------------------------- /website/content/en/docs/whats-new.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "What's New" 3 | linkTitle: "What's New" 4 | weight: 20 5 | description: > 6 | Discover new features added to CAP Operator 7 | --- 8 | 9 | ### New updates 10 | 11 | {{% cardpane %}} 12 | {{% card header="Q1 2025" %}} 13 | CAP Operator now supports `Services Only` applications that are tenant independent. Learn more about [Services Only Applications](./usage/services-workload). 14 | {{% /card %}} 15 | {{% card header="Q4 2024" %}} 16 | CAP Operator now emits prometheus metrics for [Controller](docs/concepts/operator-components/controller/) and [Subscription Server](docs/concepts/operator-components/subscription-server/) components. Learn more about [metrics](./usage/operator-metrics). 17 | {{% /card %}} 18 | {{% card header="Q3 2024" %}} 19 | Define monitoring configuration on version workloads which allow outdated versions to be automatically cleaned up based on usage. Learn more about [Version Monitoring](./usage/version-monitoring). 20 | {{% /card %}} 21 | {{% card header="Q3 2024" %}} 22 | New Custom Resource `CAPTenantOutput` can be used to record subscription related data from tenant operations. [Learn more](./usage/resources/captenantoutput). 23 | {{% /card %}} 24 | {{% card header="Q2 2024" %}} 25 | `CAPApplicationVersion` now supports configuration of `initContainers`, `volumes`, `serviceAccountName`, [scheduling related configurations](https://kubernetes.io/docs/concepts/scheduling-eviction/) etc. on workloads. 26 | {{% /card %}} 27 | {{% /cardpane %}} -------------------------------------------------------------------------------- /website/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sap/cap-operator/website 2 | 3 | go 1.24.3 4 | 5 | require github.com/google/docsy v0.12.0 // indirect 6 | -------------------------------------------------------------------------------- /website/go.sum: -------------------------------------------------------------------------------- 1 | github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo= 2 | github.com/google/docsy v0.12.0 h1:CddZKL39YyJzawr8GTVaakvcUTCJRAAYdz7W0qfZ2P4= 3 | github.com/google/docsy v0.12.0/go.mod h1:1bioDqA493neyFesaTvQ9reV0V2vYy+xUAnlnz7+miM= 4 | github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0= 5 | -------------------------------------------------------------------------------- /website/layouts/_shortcodes/include.html: -------------------------------------------------------------------------------- 1 | {{ .Get 0 | readFile | safeHTML }} -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "autoprefixer": "^10.4.21", 4 | "hugo-extended": "^0.147.6", 5 | "postcss-cli": "^11.0.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /website/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP/cap-operator/90dea82286547f83d4a02fc9c84caa675aa5b8ad/website/static/img/logo.png -------------------------------------------------------------------------------- /website/static/img/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP/cap-operator/90dea82286547f83d4a02fc9c84caa675aa5b8ad/website/static/img/workflow.png --------------------------------------------------------------------------------