Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Environment Configs #25

Closed
stevendborrelli opened this issue Dec 11, 2023 · 2 comments
Closed

Support Environment Configs #25

stevendborrelli opened this issue Dec 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@stevendborrelli
Copy link

What problem are you facing?

Support generating manifests with EnvironmentConfig support

How could Crossplane help solve your problem?

Add support for top level environment config, (patches, selectors, etc.) and setting ToEnvironmentFieldPath and FromEnvironmentFieldPath.

@stevendborrelli stevendborrelli added the enhancement New feature or request label Dec 11, 2023
@haarchri
Copy link
Member

@stevendborrelli after we merge #29 we have the option to use EnvironmentConfig like this - does this makes sense for your ?

group: eks.aws.example.cloud
name: Cluster
version: v1beta1
provider:
  baseURL: https://raw.githubusercontent.com/crossplane-contrib/%s/%s/package/crds/%s
  name: provider-upjet-aws
  version: v1.3.1
  crd:
    file: eks.aws.upbound.io_clusters.yaml
    version: v1beta1
compositions:
  - name: xcluster.eks.aws.example.cloud
    provider: example
    default: true
overrideFieldsInClaim:
  - claimPath: spec.forProvider.vpcConfig
    ignore: true
    overrideSettings:
      patches:
        - type: FromEnvironmentFieldPath
          fromFieldPath: aws.vpc.subnetIds
          toFieldPath: spec.forProvider.vpcConfig[0].subnetIds
          policy:
            fromFieldPath: Required
usePipeline: true
additionalPipelineSteps:
  - before: true
    step: environmentConfigs
    functionRef:
      name: function-environment-configs
    input:
      apiVersion: environmentconfigs.fn.crossplane.io/v1beta1
      kind: Input
      spec:
        environmentConfigs:
          - type: Selector
            selector:
              matchLabels:
                - key: region
                  type: FromCompositeFieldPath
                  valueFromFieldPath: spec.forProvider.region
                - key: type
                  type: Value
                  value: network

@haarchri
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants