Skip to content
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

Merged

Conversation

veezhang
Copy link
Contributor

  • podLabels
  • podAnnotations
  • helm&doc

@veezhang veezhang added type/feature req Type: feature request ready-for-testing Progress: ready for the CI test labels Jun 24, 2021
@veezhang
Copy link
Contributor Author

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

MegaByte875
MegaByte875 previously approved these changes Jun 24, 2021
@@ -434,3 +435,30 @@ func generateConfigMap(c NebulaClusterComponentter) *corev1.ConfigMap {

return cm
}

func mergeStringMaps(overwrite bool, ms ...map[string]string) map[string]string {
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@MegaByte875 MegaByte875 merged commit ee50fb4 into vesoft-inc:master Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing Progress: ready for the CI test type/feature req Type: feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants