Comments (2)
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:
rancher/pkg/data/management/rolebuilder.go
Line 203 in 320f350
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.
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)
- Jira Placeholder
- [RFE] PrincipalID refactor HOT 1
- add new agent-tls-mode setting
- add helm chart variable to set agent-tls-mode setting HOT 1
- CA check improvements for `fleet-agent` HOT 1
- Using install-docker script URL from settings.go HOT 1
- [BUG] etcd snapshots in Rancher UI shows incorrect age
- [EPIC] SQLite backed cache in the Steve API: feature parity
- [BUG] LDAP Groups not working correctly when logged in as local admin
- [BUG] Non-ready worker machines after node removal HOT 1
- [BUG] vSphere 3.1.2 CSI drivers CrashLoopbackoff errors (works rolling back to 3.1.1)
- [BUG] Rancher agent not starting on Rancher provisioned RKE1 cluster (Air Gapped) HOT 2
- [BUG] Namespace container default resources don't work if not defined on project level
- Feature Charts: Add Longhorn 1.6.3 Chart in 2.7.x
- Feature Charts: Add Longhorn 1.6.3 Chart in 2.8.x
- [BUG] Restoring downstream cluster from backup taking a very long time to complete
- [BUG] Provisioning RKE1 node-driver cluster fails when extra_env is used for the kube-api service
- [BUG] Deleting An Orphaned Machine Resource Also Deletes A Healthy Node With The Same Node Name
- [Backport v2.8] rancher machines are not removed from the cluster after actual worker nodes removed
- [BUG] Changes made to /etc/init.d/k3s revert to original on reboot of Server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rancher.