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

Enhance ApplicationSet generator #12454

Closed
nerzhul opened this issue Feb 14, 2023 · 2 comments
Closed

Enhance ApplicationSet generator #12454

nerzhul opened this issue Feb 14, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@nerzhul
Copy link
Contributor

nerzhul commented Feb 14, 2023

Summary

Currently application set can generate various things, but it's only strings.

This doesn't permit to handle properly the arrays, like ignoreDifferences.

Motivation

See the way we currently do to use a big appset generator permitting to ignore one object difference with max 5 fields

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: cluster-main
spec:
  generators:
  - matrix:
      generators:
      - git:
          files:
          - path: '*/config.json'
          repoURL: https://git.repo/git
          revision: 'main'
      - clusters: {}
  template:
    metadata:
      name: '{{path[0]}}-{{name}}'
    spec:
      ignoreDifferences:
      - group: '{{ignoreDifferences.0.group}}'
        kind: '{{ignoreDifferences.0.kind}}'
        name: '{{ignoreDifferences.0.name}}'
        namespace: '{{ignoreDifferences.0.namespace}}'
        jsonPointers:
          - '{{ignoreDifferences.0.jsonPointers.0}}'
          - '{{ignoreDifferences.0.jsonPointers.1}}'
          - '{{ignoreDifferences.0.jsonPointers.2}}'
          - '{{ignoreDifferences.0.jsonPointers.3}}'
          - '{{ignoreDifferences.0.jsonPointers.4}}'

Proposal

I think it should be possible to put an array in config.json files and argo uses it for ignore differences. It's clearly harder for validation webhook to ensure it's always proper

@nerzhul nerzhul added the enhancement New feature or request label Feb 14, 2023
@crenshaw-dev
Copy link
Member

I think this is a duplicate of #11213.

Please lmk if that issue doesn't completely cover your use case!

@crenshaw-dev crenshaw-dev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@nerzhul
Copy link
Contributor Author

nerzhul commented Feb 14, 2023

clearly, thanks, i added a comment there

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