Skip to content

Allow mapping EnvConfigs #82

@blut

Description

@blut

What problem are you facing?

Say I have an environment configuration which has a common structure, but I'm creating multiple EnvConfigs of the same structure (e.g. documenting all configurations relevant to an EKS cluster).
For most use cases I just reference one of these EnvConfigs in a composition, but now I'm facing the situation, that I'm referencing multiple EnvConfigs of the same type in a single composition, overwriting fields in the context.
Instead, I'd like to map subsequent data to a different dict field.

How could this Function help solve your problem?

function-environment-configs could allow mapping data into a sub structure.

apiVersion: environmentconfigs.fn.crossplane.io/v1beta1
kind: Input
spec:
  environmentConfigs:
    - type: Reference
      ref:
      name: cluster-config-one
      mapping: clusterOne
    - type: Reference
      ref:
      name: cluster-config-two
      mapping: clusterTwo

Say clusterFullname is set in both EnvConfigs, it would then be available in two places:
.clusterOne.clusterFullname & .clusterTwo.clusterFullname

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions