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

Pluralise FieldExport into many rather than one mapping #1887

Closed
danielloader opened this issue Sep 2, 2023 · 3 comments
Closed

Pluralise FieldExport into many rather than one mapping #1887

danielloader opened this issue Sep 2, 2023 · 3 comments
Labels
area/field-export Issues or PRs related to Field Export kind/enhancement Categorizes issue or PR as related to existing feature enhancements. needs-priority Indicates a PR lacks a `priority/foo` label and requires one.

Comments

@danielloader
Copy link

danielloader commented Sep 2, 2023

Is your feature request related to a problem?

Currently I need to have multiple field exports for objects created by ACK, and resources created with more usable and pertinent data fields incur even more field exports.

apiVersion: services.k8s.aws/v1alpha1
kind: FieldExport
metadata:
  name: export-user-data-bucket
spec:  
  to:
    name: application-user-data-cm # Matches the ConfigMap we created above
    kind: configmap
  from:
    path: ".status.location"
    resource:
      group: s3.services.k8s.aws
      kind: Bucket
      name: application-user-data

Describe the solution you'd like

Allow FieldExport to take an array of field exports to minimise the object count. Either an array top level on the .spec or nested under .spec.exports should the need to add additional configuration come up. Could extrapolate the .spec.to.name and .spec.to.kind to a shared key in the spec and only denote only the .spec.to.key spec per field export, but that may be over optimisation.

apiVersion: services.k8s.aws/v1alpha2
kind: FieldExport
metadata:
  name: export-user-data-bucket
spec:  
  - to:
      name: application-user-data-cm # Matches the ConfigMap we created above
      kind: configmap
      key: region
    from:
      path: ".status.location"
      resource:
        group: s3.services.k8s.aws
        kind: Bucket
        name: application-user-data
  - to:
      name: application-user-data-cm # Matches the ConfigMap we created above
      kind: configmap
      key: name
    from:
      path: ".spec.name"
      resource:
        group: s3.services.k8s.aws
        kind: Bucket
        name: application-user-data
apiVersion: services.k8s.aws/v1alpha2
kind: FieldExport
metadata:
  name: export-user-data-bucket
spec:  
  fields:
    - to:
        name: application-user-data-cm # Matches the ConfigMap we created above
        kind: configmap
        key: region
      from:
        path: ".status.location"
        resource:
          group: s3.services.k8s.aws
          kind: Bucket
          name: application-user-data
    - to:
        name: application-user-data-cm # Matches the ConfigMap we created above
        kind: configmap
        key: name
      from:
        path: ".spec.name"
        resource:
          group: s3.services.k8s.aws
          kind: Bucket
          name: application-user-data

Describe alternatives you've considered
Multiple FieldExports for objects with multiple fields I wish to map to a configmap/secret.

@a-hilaly a-hilaly added kind/enhancement Categorizes issue or PR as related to existing feature enhancements. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/field-export Issues or PRs related to Field Export labels Sep 6, 2023
@ack-bot
Copy link
Collaborator

ack-bot commented Mar 4, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 4, 2024
@a-hilaly a-hilaly removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 4, 2024
@ack-bot
Copy link
Collaborator

ack-bot commented Aug 31, 2024

Issues go stale after 180d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 60d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 31, 2024
@ack-bot
Copy link
Collaborator

ack-bot commented Oct 30, 2024

Stale issues rot after 60d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 60d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle rotten

@ack-prow ack-prow bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 30, 2024
@a-hilaly a-hilaly removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/field-export Issues or PRs related to Field Export kind/enhancement Categorizes issue or PR as related to existing feature enhancements. needs-priority Indicates a PR lacks a `priority/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants