feat: add cp storage demo#16
Conversation
PetterTech
commented
Jun 22, 2026
- Adds stuff for a demo of storage provisioning via cloud-agnostic api with crossplane
There was a problem hiding this comment.
Pull request overview
Adds a Crossplane-based demo for provisioning Azure Storage Accounts via a platform-facing Composite Resource (XRD + Composition), while updating the Azure provider packages to newer versions.
Changes:
- Bump Upbound Azure provider package versions to
v2.6.0. - Add a
StorageAccountCompositeResourceDefinition and Pipeline-mode Composition usingfunction-patch-and-transform. - Add demo
StorageAccountinstances to exercise zone-redundant vs geo-redundant replication mapping.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Crossplane/kubernetes/providers/provider-family-azure.yaml | Updates provider-family-azure package version used by the demo. |
| Crossplane/kubernetes/providers/provider-azure-storage.yaml | Updates provider-azure-storage package version used by the demo. |
| Crossplane/kubernetes/platform/storage-account.yaml | Introduces the XRD + Composition pipeline for provisioning a Storage Account. |
| Crossplane/demo-storage.yaml | Adds sample composite instances for the demo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| resources: | ||
| - name: storage-account | ||
| base: | ||
| apiVersion: storage.azure.m.upbound.io/v1beta1 |
| providerConfigRef: | ||
| kind: ClusterProviderConfig | ||
| name: default |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85be2913d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| kind: ClusterProviderConfig | ||
| name: default |
There was a problem hiding this comment.
Create the matching ClusterProviderConfig
This composition creates a v2 namespaced Account whose providerConfigRef must point at an azure.m.upbound.io provider config (the v2 Account CRD requires kind and name), but the deploy flow only applies Crossplane/kubernetes/providers/provider-config.yaml as azure.upbound.io/v1beta1, kind: ProviderConfig. Because no azure.m.upbound.io/v1beta1 ClusterProviderConfig named default is created, any demo-storage.yaml XR will compose an Account that cannot resolve credentials; add the matching ClusterProviderConfig or reference a matching namespaced ProviderConfig.
Useful? React with 👍 / 👎.
| accountTier: Standard | ||
| accountReplicationType: ZRS | ||
| location: swedencentral | ||
| resourceGroupName: rg-crossplanedemo |
There was a problem hiding this comment.
Parameterize the composed resource group
The composed storage account is always sent to rg-crossplanedemo, while the existing deploy path replaces <RESOURCE_GROUP_NAME> and grants the provider identity access to the -ResourceGroupName value (default rg-crossplane). In the normal demo deployment this resource group either does not exist or is not the one the identity was scoped to, so StorageAccount claims fail even after the platform API is installed; make this a parameter/placeholder or match the deployment resource group.
Useful? React with 👍 / 👎.
| properties: | ||
| accountName: | ||
| type: string | ||
| additionalPrinterColumns: |
There was a problem hiding this comment.
Move printer columns under the XRD version
additionalPrinterColumns is a field of each spec.versions[] entry in the Crossplane v2 XRD API, not a top-level spec field (see CompositeResourceDefinitionVersion in the Crossplane v2 API). With this indentation, strict Kubernetes validation can reject the XRD or the columns are pruned/ignored, so the new platform manifest is not installed as intended; move the block under the v1alpha1 version.
Useful? React with 👍 / 👎.
| providerConfigRef: | ||
| kind: ClusterProviderConfig | ||
| name: default |
| name: zone-storage-account | ||
| spec: | ||
| parameters: | ||
| name: democrossplane123zone |
| name: geo-storage-account | ||
| spec: | ||
| parameters: | ||
| name: democrossplane123geo |