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

fix: apply ssa namespace twice #537

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Oct 13, 2023

  1. fix: apply ssa namespace twice

    In argoproj/argo-cd#13965, upgrading to client-go 0.26 uncovered an
    issue with existing namespaces not preserving labels and annotations
    when converting an existing namespace to use `managedNamespaceMetadata`.
    
    From 0.26 up, in order to preserve the existing behaviour what we need
    to do is to first apply the existing namespace with SSA and its
    preexisting labels and annotations. This also needs to be applied with
    another manager than the default one.
    
    After that initial apply, we proceed as normal with a ServerSideApply.
    This is a one-time thing for any existing namespace; we check if we need
    to perform this action by detecting if there is a preexisting SSA
    annotation on the namespace.
    
    Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
    blakepettersson committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    cb534a8 View commit details
    Browse the repository at this point in the history
  2. chore: golangci-lint fixes

    Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
    blakepettersson committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    826d56f View commit details
    Browse the repository at this point in the history
  3. Update pkg/sync/sync_context.go

    Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
    Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
    blakepettersson and crenshaw-dev committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    69558bb View commit details
    Browse the repository at this point in the history
  4. Update pkg/sync/sync_context.go

    Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
    Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
    blakepettersson and crenshaw-dev committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    45d4394 View commit details
    Browse the repository at this point in the history
  5. chore: go mod tidy

    Signed-off-by: Blake Pettersson <blake.pettersson@gmail.com>
    blakepettersson committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    0115c94 View commit details
    Browse the repository at this point in the history