Skip to content

Add in-process no-fork runtime for Provider OCI - #152

Open
kousalya-kethavath wants to merge 6 commits into
oracle:mainfrom
kousalya-kethavath:feature/crossplane-no-fork-support
Open

kousalya-kethavath wants to merge 6 commits into
oracle:mainfrom
kousalya-kethavath:feature/crossplane-no-fork-support

Conversation

@kousalya-kethavath

Copy link
Copy Markdown
Member

Description of your changes

This PR adds no-fork execution support for Crossplane Provider OCI using the public Terraform Provider OCI package.

Key changes include:

  1. 4b7b5f0 : Add public-package OCI v9 no-fork runtime
    • Integrates the Terraform Provider OCI public Go package.
    • Adds in-process SDKv2 and Plugin Framework provider construction.
    • Adds no-fork configuration, routing, server-side apply support, and runtime resource registration.
    • Generates cluster-scoped and namespaced runtime schemes and service-provider entry points.
    • Adds tests for generation, provider configuration, routing, and server-side apply behavior.
  2. 421b16f : Remove Terraform CLI from provider runtime image
    • Removes the Terraform CLI binary and Terraform CLI configuration from the provider runtime image.
    • Keeps the no-fork service runtime limited to the compiled Go provider process.
  3. c86c2e7 : Optimize no-fork provider package publishing
    • Adds reusable Go build-cache warming for service packages.
    • Improves package batching and multi-architecture publishing.
    • Reduces repeated compilation and manages runner disk usage during package publication.
  4. b1b823a : Use selective lazy OCI provider construction
    • Constructs the SDKv2 provider only when the reconciled resource requires it.
    • Uses service-scoped Terraform resource inventories instead of eagerly constructing the full provider.
    • Preserves the Plugin Framework execution path for applicable resources.
  5. 23ea29a : Honor provider meta cache size in service runtimes
    • Propagates --provider-meta-cache-size to generated service-provider binaries.
    • Uses a bounded, provider-instance-owned cache rather than shared global state.
    • Supports concurrent initialization coalescing, configuration changes, and LRU eviction.
    • Adds regression and concurrency tests for cache behavior.
  6. edf1fe9 : Add no-fork runtime metrics collector
    • Exposes Prometheus metrics for cache hits, misses, initialization results and duration, waiting callers, entries, capacity, inflight initialization, and evictions.
    • Avoids ProviderConfig identifiers or credential-derived metric labels.
    • Adds a reusable collector for pod resource usage, reconciliation state, restarts, process evidence, controller metrics, and no-fork cache metrics.
    • Adds focused metrics and cache tests.

The PR currently consumes Terraform Provider OCI’s feature/crossplane-support branch containing the required public-package and in-process changes.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make generate and committed the results.
  • Not made manual changes to generated files, and verified this with make check-diff.

How has this code been tested

The no-fork provider was validated through correctness, smoke, upgrade/rollback, authentication, provider-isolation, restart, and scale testing. Tests covered cluster-scoped and namespaced resources using API-key credentials, Instance Principal, and OKE Workload Identity.

Resources reconciled successfully without unexpected drift or recreation. In scale testing, no-fork reconciled all 100 resources with zero provider restarts and substantially lower peak memory than the Terraform CLI-based provider.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 17, 2026
Comment thread internal/clients/oci.go Outdated
@kousalya-kethavath
kousalya-kethavath force-pushed the feature/crossplane-no-fork-support branch 2 times, most recently from cd5a45b to 93ba84e Compare September 18, 2026 16:17
@kousalya-kethavath
kousalya-kethavath force-pushed the feature/crossplane-no-fork-support branch from 93ba84e to 3c45794 Compare September 18, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants