Skip to content

Upgrade crossplane runtime and add namespaced resources#147

Closed
ricCap wants to merge 13 commits intocrossplane-contrib:mainfrom
ricCap:upgrade-crossplane-runtime-and-add-namespaced-resources
Closed

Upgrade crossplane runtime and add namespaced resources#147
ricCap wants to merge 13 commits intocrossplane-contrib:mainfrom
ricCap:upgrade-crossplane-runtime-and-add-namespaced-resources

Conversation

@ricCap
Copy link
Contributor

@ricCap ricCap commented Nov 17, 2025

Description of your changes

This PR contains the changes from #139 and #141, and implements namespaced MRs #128.

This PR includes:

  • bump up the crossplane runtime to v2
  • use chainsaw for e2e tests
  • ⚠️ External Secret Store support is removed from ALL MRs (spec.publishConnectionDetailsTo is removed). This feature was alpha and it was decided to be removed from crossplane.
  • all other changes are backwards-compatible
  • adding namespaced resources and moving v1 resources to a different subfolder (cluster)
  • new resources are in the api group http.m.crossplane.io
  • adds e2e tests for new resources and adds to the Github Actions workflow jobs for running e2e tests with both crossplane v1 and v2
  • similar changes to crossplane v2: Generate namespace-scoped MRs provider-upjet-azure#1019 (comment)
  • skip secret injection during deletion of resources (fixes deletion, all namespaced e2e tests can now be deleted using foreground deletion). You can test this using the example application below

The aim of this PR is to avoid any breaking changes to the existing resources

The changes are based on the following examples:

Warning Not sure how to modify the hack folder, I left it as it was

Fixes #128

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • e2e tests in the pipeline
  • deployed with argocd (foreground delete in ArgoCD works now as well)
image

Test in ArgoCD

Install using helm and use this application

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: provider-http-namespaced-examples
  namespace: argocd
spec:
  project: default
  source:
    repoURL: https://github.com/ricCap/provider-http
    targetRevision: upgrade-crossplane-runtime-and-add-namespaced-resources
    path: examples/namespaced
  destination:
    server: https://kubernetes.default.svc
    namespace: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - CreateNamespace=true

ricCap added 12 commits October 22, 2025 10:15
- Update crossplane-runtime from v1.20.0 to v2.0.0
- Implement missing interface methods for crossplane-runtime v2 compatibility:
  - Add GetUsers/SetUsers for UserCounter interface on ProviderConfig
  - Add GetItems for ProviderConfigUsageList interface
  - Add SetResourceReference/GetResourceReference for ProviderConfigUsage
- Add compile-time interface validation with var _ assignments
- Fix JQ expression syntax in e2e test examples:
  - Remove problematic outer parentheses from URL expressions
  - Fix Authorization header secret injection syntax
- Add interface casting tests to prevent runtime panics
- Update go.mod and go.sum for crossplane-runtime v2 dependencies
- Use chainsaw for e2e tests

Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
Key changes include:
- Complete API reorganization with cluster/ and namespaced/ separation
- Enhanced controller architecture with dual registration
- Comprehensive examples and documentation for both scopes
- Updated build configuration and CRD generation

All changes are backwards compatible

Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
…sues

- Fix DisposableRequest deletion logic to skip secret injection during deletion
- Fix cross-namespace owner reference validation in data-patcher to prevent errors
- Add unit tests for DisposableRequest namespaced controller
- Update example configuration to remove invalid setOwnerReference for cross-namespace secrets
- Add data-patcher tests for cross-namespace scenarios
- Fix secret name mismatch in request-with-clusterproviderconfig.yaml example

Signed-off-by: Riccardo Capraro <capraroriccardo@gmail.com>
@ricCap
Copy link
Contributor Author

ricCap commented Nov 18, 2025

Closing in favour of #148, which adds also tls support and fixes the commit history

@ricCap ricCap closed this Nov 18, 2025
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.

Support Crossplane v2 and namespaced resources

1 participant