Skip to content

add support for finalizers in metadata.  #391

@KyriosGN0

Description

@KyriosGN0

Description

we recently had a use case of migration from one appset to another and needed an ability to set a finalizer on the appset

Potential Terraform Configuration

resource "argocd_application_set" "services-test" {
  metadata {
    name = "appsetname"
    finalizers = [
    - final
    ]
  }


  spec {
    generator {
      git {
        repo_url = "server"
        revision = "master"

        file {
          path = "clusters/*/*/*/values.yaml"
        }
      }
    }

    template {
      metadata {
        name = "{{path[3]}}-{{path[2]}}"

        labels = {
          env = "{{path[1]}}"
        }
      }

      spec {
        project                = "default"
        revision_history_limit = 3

        source {
          repo_url        = "server"
          target_revision = "master"
          path            = "charts/"
          helm {
            release_name               = "{{path[3]}}"
            value_files                = ["values.yaml", "../../clusters/{{path[1]}}/{{path[2]}}/{{path[3]}}/values.yaml"]

            parameter {
              name  = "clusterName"
              value = "{{path[2]}}"
            }
          }
        }

        destination {
          name      = "{{path[2]}}"
          namespace = "{{path[3]}}"
        }

        sync_policy {
          sync_options = [
            "ServerSideApply=true",
            "CreateNamespace=true"
          ]
        }
      }
    }
  }
}

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedCommunity help wanted! Similar to "good first issue" but bigger changes required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions