Skip to content

feat: add T Cloud Public CCE provider support#370

Draft
Matthiator wants to merge 93 commits into
mainfrom
feature/t-cloud-public-provider
Draft

feat: add T Cloud Public CCE provider support#370
Matthiator wants to merge 93 commits into
mainfrom
feature/t-cloud-public-provider

Conversation

@Matthiator

Copy link
Copy Markdown
Contributor

📝 Summary

Adds T Cloud Public CCE provider support, including generated Terraform stacks for backend bootstrap, cluster infrastructure, OpenBao configuration, provider-specific Helm values, and setup documentation.

Main pieces:

  • T Cloud Public provider docs and setup flow
  • Terraform modules for OBS buckets, IAM agencies, DNS, network, keypair, KMS, CCE, storage classes, and OpenBao Helm
  • Generated infrastructure and OpenBao Terraform layers
  • Provider-specific ExternalDNS, External Secrets, Traefik, OpenBao, and Velero wiring
  • Namespace-isolated OpenBao secret access for the T Cloud Public path
  • Shared Terraform override guidance for generated env.auto.tfvars

This draft currently includes PR #366 in its diff because this branch was built on top of that Velero work. Please merge #366 first; after that this branch should be rebased onto main so this PR only shows the T Cloud Public delta.

🧩 Type of change

  • 🔧 CLI / Go code
  • 📦 Helm chart
  • 🧱 Terraform module
  • 📝 Documentation
  • 🧪 Test or CI change
  • ♻️ Refactor / cleanup

⚠️ Is this a breaking change?

  • Yes, this change breaks existing functionality (explain in summary)

No intended breaking changes. T Cloud Public is added as a new provider path.

🧪 Testing

  • CI passed
  • Manually tested (local/dev cluster)
  • Unit tested
  • Not tested (explain why below)

Ran locally:

  • make test
  • make build-binary
  • make docs-validate
  • make docs-build
  • terraform fmt -check -recursive src/internal/catalog/built-in/managed-service-catalog/terraform/providers/t-cloud-public/modules/network
  • terraform init -backend=false and terraform validate for the T Cloud Public network module
  • git diff --check

Cluster-level validation should be confirmed before marking this PR ready for review.

🔗 Related Issues / Tickets

Depends on #366

✅ Checklist

  • Code compiles and passes all tests
  • Linting and style checks pass
  • Comments added for complex logic
  • Documentation updated (if applicable)

📎 Additional Context (optional)

Open as draft until PR #366 is merged and this branch has been rebased onto the updated main.

davrad and others added 30 commits June 2, 2026 15:04
Signed-off-by: Jan Larwig <jan@larwig.com>
…ry page

Signed-off-by: Jan Larwig <jan@larwig.com>
Matthiator and others added 25 commits June 4, 2026 20:42
The OpenTelekomCloud provider marks the identity credential access key as
a sensitive attribute, so the root output that surfaces it must declare
sensitive = true or terraform apply fails with "Output refers to
sensitive values". The secret access key output already had it; this
aligns the access key output. terraform output -raw still works for the
documented set-env workflow.
Collapse the verbose OpenBao/optional-secret section of the set-env
templates. Drop the inline clouds.yaml example, the velero
terraform-output command snippets, and the obvious "don't shadow
AWS_ACCESS_KEY_ID" note. The optional secrets are now three commented
TF_VAR_* exports the user fills in after reading the relevant outputs.
…ed blob

Configuring the ExternalDNS webhook no longer means pasting a whole
multi-line clouds.yaml into a TF_VAR. The OpenBao secrets.tf-example now
builds the clouds.yaml with yamlencode from individual variables:

- external_dns_os_username / external_dns_os_password are the only
  per-deployment values the user sets in set-env
- domain, project and region reuse the TF_VAR_t_cloud_public_* values
  already exported for the other layers

set-env replaces the TF_VAR_t_cloud_public_clouds_yaml placeholder with
the two scalar credential exports. Tests and the provisioning doc are
updated to the field-based form.
Match the clouds.yaml approach for Velero: instead of pasting a whole
AWS credentials file into TF_VAR_velero_s3_credentials_cloud, provide the
two access keys as scalars and let Terraform assemble the [default]
credentials block.

- secrets.tf-example: velero_s3_credentials_cloud -> velero_access_key_id
  + velero_secret_access_key; the resource builds the cloud value inline.
- set-env: the single velero export becomes TF_VAR_velero_access_key_id
  and TF_VAR_velero_secret_access_key (fill from the infrastructure
  outputs velero_credential_access_key / velero_credential_secret_access_key).
- render tests updated.
ESO's Vault kubernetes auth schema has no audiences field directly under
auth.kubernetes; the token audiences belong to the ServiceAccountSelector
(serviceAccountRef.audiences). The misplaced field made the SecretStore /
ClusterSecretStore apply fail with:

  field not declared in schema:
  .spec.provider.vault.auth.kubernetes.audiences

Move audiences under serviceAccountRef in all six stores (the cluster-wide
external-secrets ClusterSecretStore plus the namespaced SecretStores for
external-dns, argo-cd, kube-prometheus-stack, oauth2-proxy and velero).
The OpenBao k8s-auth roles require the vault audience, so the token must
still carry it - just declared in the correct place.
With Traefik forwardAuth, oauth2-proxy reconstructs the originally
requested URL as an absolute redirect from the X-Forwarded-* headers and
validates it against whitelist_domains. The generated config never set
whitelist_domains, so after a successful login every redirect back to the
app was rejected with "domain / port not in whitelist" (403 on /oauth2/),
dead-ending the user before they reached homer-dashboard / argocd / etc.

Add whitelist_domains = [ <cluster dnsName> ] so the post-auth redirect
to the cluster host is allowed.
# Conflicts:
#	docs/content/3_components/backup_and_recovery.md
#	docs/content/3_components/components_overview.md
#	src/internal/catalog/built-in/customer-service-catalog/helm/example/velero/values.yaml.tplt
#	src/internal/catalog/built-in/managed-service-catalog/helm/kyverno-policies/CHANGELOG.md
#	src/internal/catalog/built-in/managed-service-catalog/helm/kyverno-policies/Chart.yaml
#	src/internal/catalog/built-in/managed-service-catalog/helm/velero/CHANGELOG.md
#	src/internal/catalog/built-in/managed-service-catalog/helm/velero/templates/volumesnapshotclass.yaml
#	src/internal/catalog/built-in/managed-service-catalog/helm/velero/values.yaml
#	src/internal/catalog/built-in/services/velero.yaml
#	src/internal/config/factory_test.go
#	src/internal/config/store_test.go
#	src/internal/render/render_test.go
@Matthiator

Copy link
Copy Markdown
Contributor Author

I agree that this PR would benefit from being split before it becomes review-ready.

The first step should be to get #366 merged and then rebase this branch, because the current diff still includes the Velero work. After that, I would suggest splitting the remaining T Cloud Public work roughly like this:

  1. Prep/refactoring PR

    • ExternalDNS provider values split
    • Stackit-related adjustments
    • shared bootstrap/render/config changes that are not T Cloud Public-specific
  2. OpenBao secret isolation PR

    • ADR for namespace-isolated secret access
    • OpenBao policy/role changes and related tests
  3. T Cloud Public core provider PR

    • managed Terraform modules for OBS/IAM/DNS/network/keypair/KMS/CCE/storage
    • generated customer Terraform infrastructure/backend templates
    • provider registration/config schema changes
  4. T Cloud Public integration/wiring PR

    • provider-specific Helm values
    • ExternalDNS, External Secrets, Traefik, OpenBao, Homer, Velero wiring
    • final T Cloud Public setup documentation

This keeps the architectural decisions and shared refactoring separate from the provider implementation, makes each review focused, and avoids asking reviewers to reason about 100+ files at once.

We can already prepare the branch split before #366 is merged, but I would avoid opening final review-ready PRs against main until #366 is merged or the new PRs are explicitly stacked on top of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants