-
Notifications
You must be signed in to change notification settings - Fork 44
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
chore: add managed by label to namespace #604
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #604 +/- ##
==========================================
- Coverage 60.73% 60.70% -0.03%
==========================================
Files 274 275 +1
Lines 22150 22171 +21
==========================================
+ Hits 13452 13460 +8
- Misses 7835 7847 +12
- Partials 863 864 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @bthari
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀 Just left a couple of comments but everything looks good! Thanks for the refactoring!
if _, usingReservedKeys := reservedKeys[prefix+label.Key]; usingReservedKeys { | ||
if labeller.IsReservedKey(labeller.GetPrefix() + label.Key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hang on if we add the prefix to the label key, e.g. gojek.com/
+ team
, and look up its result in the reservedKeys
map, we won't be able to find gojek.com/team
in the map right? Since the map contains the label key values only i.e. team
. Was this even working before? 😦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, this will only work if the prefix is ""
(but it can't be ""
). Was this working before? I honestly don't think so 😅 but Turing also work the same way, so I just keep the functionality as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm alright I'll create a card for this in the backlog so that we can fix this in the future. Thanks for clarifying!
Description
When creating a namespace object in Kubernetes, add label “{prefix}/managed: true”. This will help when we want to modify resources created by CaraML services in a shared cluster, e.g. configuring log for the managed namespace only
By default the namespace prefix would
caraml.dev/
, and it can be configured in the config yamlModifications
InitKubernetesLabeller
initiation{prefix}/managed: true
when creating namespaceTests
Checklist
Release Notes