Skip to content

Conversation

@megian
Copy link
Collaborator

@megian megian commented Jan 4, 2024

Most of the things in cattle-system are not Project syn managed and this can cause an unexpected loss of not Project Syn managed things.

Checklist

  • The PR has a meaningful title. It will be used to auto generate the
    changelog.
    The PR has a meaningful description that sums up the change. It will be
    linked in the changelog.
  • PR contains a single logical change (to build a better changelog).
  • Categorize the PR by adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog.

Most of the things in cattle-system are not Project syn managed and
this can cause an unexpected loss of not Project Syn managed things.
@megian megian added the bug Something isn't working label Jan 4, 2024
@megian megian requested a review from simu January 4, 2024 13:25
Copy link
Member

@simu simu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this would achieve the desired result (cattle-system namespace isn't deleted when the SUC component is removed), wouldn't it make more sense to not manage the namespace at all if the user specifies namespace: cattle-system? Something along the lines of

local controller_definition = {
  [if params.namespace != 'cattle-system' then '00_namespace']: namespace,
  '01_serviceaccount': serviceaccount,
  '02_clusterrolebinding': clusterrolebinding,
  '03_configmap': configmap,
  '04_deployment': deployment,
  [if !params.disable_grafana_dashboard then '06_dashboard']: dashboard.dashboard,
};

@megian
Copy link
Collaborator Author

megian commented Jan 4, 2024

This would actually cause the ArgoCD would prune the cattle-agent on a component-upgrade, which I've accidentally tried out a month ago.

I agree on that not managing the namespace at all would be a future improvement and ArgoCD should be able to create the namespace themself . However I don't know how to archive this without an intermediate step.

@megian megian requested a review from simu January 4, 2024 15:43
@simu
Copy link
Member

simu commented Jan 4, 2024

This would actually cause the ArgoCD would prune the cattle-agent on a component-upgrade, which I've accidentally tried out a month ago.

Ah good point, then this is fine as a first step.

@megian megian merged commit df6fd2d into master Jan 4, 2024
@megian megian deleted the no-prune-of-ns-cattle-system branch January 4, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants