-
Notifications
You must be signed in to change notification settings - Fork 30
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
feature: podLabels and podAnnotations #36
feature: podLabels and podAnnotations #36
Conversation
veezhang
commented
Jun 24, 2021
- podLabels
- podAnnotations
- helm&doc
For examples: helm install nc ./charts/nebula-cluster --namespace=default \
--set 'nameOverride'='nc' \
--set 'nebula.storageClassName'=standard \
--set 'nebula.podLabels.A='A \
--set 'nebula.podLabels.app\.kubernetes\.io/component='NoExists \
--set 'nebula.podAnnotations.A='A \
--set 'nebula.podAnnotations.nebula-graph\.io/cm-hash='NoExists
kubectl get pod -l app.kubernetes.io/cluster=nc \
-o custom-columns='NAME:.metadata.name,LabelsA:.metadata.labels.A,Component:.metadata.labels.app\.kubernetes\.io/component,AnnotationsA:.metadata.annotations.A,CMHash:.metadata.annotations.nebula-graph\.io/cm-hash'
NAME LabelsA Component AnnotationsA CMHash
nc-graphd-0 A graphd A 94ea457be88fae25
nc-graphd-1 A graphd A 94ea457be88fae25
nc-metad-0 A metad A ff6a3a99d3b3fc58
nc-metad-1 A metad A ff6a3a99d3b3fc58
nc-metad-2 A metad A ff6a3a99d3b3fc58
nc-storaged-0 A storaged A 563a13ee319762c8
nc-storaged-1 A storaged A 563a13ee319762c8
nc-storaged-2 A storaged A 563a13ee319762c8
|
@@ -434,3 +435,30 @@ func generateConfigMap(c NebulaClusterComponentter) *corev1.ConfigMap { | |||
|
|||
return cm | |||
} | |||
|
|||
func mergeStringMaps(overwrite bool, ms ...map[string]string) map[string]string { |
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.
This is a utility function, move it to pkg/util/maputil more better, what do you think?
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.
In the future, it may come out separately to create a golang mod or repo, so consider making him less dependent.
Or we will provide a golang pkg in the future that does not depend on Nebula Operator?
Or as you said, move it to pkg/util/maputil
?
What do you think?
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.
We need make a plan to refactor this part, you can commit another pr to complete it.
cb8fc4c
to
a0c1e95
Compare