feat(vault-auth): migrate to crossplane v2 + opentofu via fn-kcl#65
Merged
patrick-hermann-sva merged 1 commit intomainfrom Apr 13, 2026
Merged
feat(vault-auth): migrate to crossplane v2 + opentofu via fn-kcl#65patrick-hermann-sva merged 1 commit intomainfrom
patrick-hermann-sva merged 1 commit intomainfrom
Conversation
Replaces the v1 / provider-terraform / go-templating implementation with a Crossplane v2 namespaced composition that delegates rendering to the xplane-vault-auth KCL module (pulled from OCI by function-kcl): source: oci://ghcr.io/stuttgart-things/xplane-vault-auth:0.3.1 Changes: - XRD: apiextensions.crossplane.io/v1 -> v2, scope: Namespaced, all fields renamed to camelCase, new backendConfig + kubernetesHost + boundServiceAccountNames fields. - Composition: single fn-kcl step + fn-auto-ready, no more inline HCL. - Provider: provider-terraform -> upbound/provider-opentofu:v1.0.3. - ProviderConfig: tf.upbound.io/v1beta1 -> opentofu.m.upbound.io/v1beta1 ClusterProviderConfig. - Vault token Secret: plain HCL terraform.tfvars, co-located with the XR namespace (v2 secretKeyRef is namespace-local). - function.yaml: replaced function-go-templating with function-kcl + function-auto-ready. - README rewritten, stale examples + tests removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the legacy
tf.upbound.io+function-go-templatingimplementation ofbootstrap/vault-authwith a Crossplane v2 namespaced composition that delegates rendering to thexplane-vault-authKCL module (pulled from OCI byfunction-kcl).Source pinned:
oci://ghcr.io/stuttgart-things/xplane-vault-auth:0.3.1Changes
apis/definition.yaml):apiextensions.crossplane.io/v1→v2,scope: Namespaced, all fields camelCase, newbackendConfig/kubernetesHost/boundServiceAccountNamesfields.apis/composition.yaml): singlefunction-kclstep +function-auto-ready. No more inline HCL.provider-terraform→upbound/provider-opentofu:v1.0.3.tf.upbound.io/v1beta1 ProviderConfig→opentofu.m.upbound.io/v1beta1 ClusterProviderConfig.terraform.tfvars, co-located with the XR namespace (v2 secretKeyRef is namespace-local; previous JSON + cross-namespace ref is gone).function-go-templating→function-kcl+function-auto-ready.tf.upbound.io-era test workspaces.Breaking changes (claim shape)
cluster_name→clusterName,vault_addr→vaultAddr,k8s_auths→k8sAuths,token_policies→tokenPolicies,token_ttl→tokenTtlnamespacefield replaced byboundServiceAccountNamespaces[]secretRefremoved; Vault token Secret must live in the XR's namespaceproviderConfigRefsplit intoproviderConfigName+providerConfigKindSee
examples/claim.yamlfor the new shape.Test plan
backendConfigshapes (verified in the kcl repo)provider-opentofuinstalledexamples/claim.yamland confirm Workspaces reach Readyvault login -method=kubernetes ...)Generated with Claude Code