crossplane-contrib / crossplane-contrib/function-environment-configs

feat request: namespace scoped EnvironmentConfig

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
28
Forks
25
Avg merge
5d 19h
Merged PRs (30d)
2

Description

### What problem are you facing?

After the change to namespace scoped composites and compositions i v2, it is no longer possible to create an EnvironmentConfig in a (namespaced) composition.

Indirectly creating a cluster scoped EnvironmentConfig, using an Object from provider-kubernetes, is painfull and goes against the move to namespace scoped resources.

### Usecase

One usecase (mentioned on [slack](https://crossplane.slack.com/archives/C08BBMDCH7W/p1769438184689339)) is sharing values between composites, where one composition creates an EnvironmentConfig which the other one imports into its environment. This way, an `id` can be transferred from the `status.atProvider` of one managed resource to the `spec.forProvider` of another managed resource in a different composition.

Image

An alternative is to expose the values in the status of the composite, and use function-extra-resources or required resources to read it in the other composition. However, this results in the end-user seeing what might be confusing internal details in the status of their composites.

### How could this Function help solve your problem?

A namespace scoped EnvironmentConfig CRD could be created (either by Crossplane or the user), which this function would support loading into a composition environment. If created by Crossplane, `EnvironmentConfigs.apiextensions.crossplane.io` is already taken, and another apiGroup or kind would be needed.

The function would need to select between cluster and namespaced scoped EnvironmentConfig (default to cluster scoped), which could be a user defined apiVersion/kind selector as in [function-extra-resources](https://github.com/crossplane-contrib/function-extra-resources/blob/b37f7541731d7d035137a3ae021fd83439261850/input/v1beta1/resource_select.go#L112-L116), or a hardcoded apiVersion/kind if the CRD is created/provided by Crossplane.

The function could support reading namespace scoped EnvironmentConfigs from any namespace, but should default to the same namespace as the composite resource is within.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.