GithubHelp home page GithubHelp logo

Comments (2)

JonCrowther avatar JonCrowther commented on June 28, 2024

Investigating. I see it removing my roletemplate called jono-test in the logs.

2024/05/27 19:37:57 [INFO] Starting cluster controllers for local
I0527 19:37:57.842467   35156 leaderelection.go:260] successfully acquired lease kube-system/cattle-controllers
2024/05/27 19:37:57 [INFO] Reconciling GlobalRoles
2024/05/27 19:37:57 [INFO] Reconciling RoleTemplates
2024/05/27 19:37:57 [INFO] Removing jono-test
2024/05/27 19:37:57 [INFO] Registering namespaceHandler for adding labels 

That is coming from here:

logrus.Infof("Removing %v", name)


As I suspected, this is not related to the annotations. The annotations get re-added immediately after deleting them by a controller. Creating the RoleTemplate and not touching the annotations yields the same results. It also happens in v2.9. It doesn't require an upgrade either, for a dev set-up stopping and starting a build triggers the reconcile and deletes the RoleTemplate

from rancher.

JonCrowther avatar JonCrowther commented on June 28, 2024

I believe I've found the root cause. The RoleTemplate provided by @dasarinaidu has the label "authz.management.cattle.io/bootstrapping": "default-roletemplate". That label is meant to specify which RoleTemplates are default RoleTemplates that are created by Rancher. It's so we don't delete them during cleanup. However, on startup (or upgrade), Rancher creates a list of all the expected default RoleTemplates. Then it gets all the RoleTemplates with the label "authz.management.cattle.io/bootstrapping": "default-roletemplate" and makes sure that only the expected default RoleTemplates exist. Because the RoleTemplate created had the default label, Rancher deletes it since it isn't actually part of the default RoleTemplates.

If you remove that label, it does not get deleted on start/upgrade. I would consider this expected behaviour. Users should not be re-using the labels Rancher uses for synchronizing the system. That could lead to inconsistencies across the system.

from rancher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.