charts icon indicating copy to clipboard operation
charts copied to clipboard

adding correct annotations for svcms and fixing sa

Open tkennes opened this issue 1 year ago • 8 comments

Provide a description of what has been changed

  • Wrong annotations for Prometheus service monitors
  • Bug in indentation of the keda-operator serviceaccount

Fixes https://github.com/kedacore/charts/issues/437#issuecomment-1539898047

tkennes avatar May 09 '23 10:05 tkennes

@tomkerkhove : I don't really understand the lack of flexible when it comes to setting annotations for specific resources, could you explain?

Also, would it not make more sense to opt for some sort of global + local mechanism to set labels? See also here for example: https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml#L3

tkennes avatar May 09 '23 11:05 tkennes

@tomkerkhove : I don't really understand the lack of flexible when it comes to setting annotations for specific resources, could you explain?

Also, would it not make more sense to opt for some sort of global + local mechanism to set labels? See also here for example: argoproj/argo-helm@main/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml#L3

Can you elaborate on this please? My comments were only to keep supporting what we already support, I'm find adding more annotations if there is a need, as long as it does not break things =)

tomkerkhove avatar May 10 '23 06:05 tomkerkhove

@tomkerkhove , in that case, it depends a bit on the cluster whether annotations are heavily used for individual resources. As a rule of thumb, you would use labels for most things especially when it comes to managing infrastructure and tying certain resources together. E.g. a service binds to a pod based on the label, same for servicemonitors and podmonitors. This is also why you cannot really use labels if you intend to segment resources further, as you will have to be careful not to misuse any labels. Hence, you use annotations. I have seen companies use annotations to route alerts to the right teams for example.

Therefore, it might make sense to allow for individual annotations per resource rather than having only one global annotation. If you see benefit in the approach, I can set this up for all resources like for ArgoCD (https://github.com/argoproj/argo-helm/blob/main/charts/argo-cd/templates/argocd-application-controller/statefulset.yaml#L3), e.g., we merge global .Values.additionalAnnotations with local resource specific ones, like for example .Values.prometheus.metricServer.serviceMonitor.additionalAnnotations.

tkennes avatar May 10 '23 07:05 tkennes

Added some breaking changes, but would you mind also fixing DCO?

@tomkerkhove , this should be resolved by now right?

tkennes avatar May 16 '23 10:05 tkennes

This is OK for me, can you pull in the changes from main & document the new options please?

tomkerkhove avatar Jun 08 '23 12:06 tomkerkhove

This is OK for me, can you pull in the changes from main & document the new options please?

I don't think you need documentation here, since you are not documenting the other fields of these service- and podmonitors and since they are basic fields. This approach is also more common, instead of setting annotations over all resoruces using one global value.

Let me know if you disagree, I can add a comment in the values.yaml if you really insist, or let me know where you want these comments.

tkennes avatar Jun 09 '23 08:06 tkennes

We should document all options, even if they are well-known ones because people who are new to the cloud-native space would not know about them unfortunately.

Given https://github.com/kedacore/charts/issues/444 is being done, it's OK to just document them in the values file, thanks!

tomkerkhove avatar Jun 09 '23 11:06 tomkerkhove

We should document all options, even if they are well-known ones because people who are new to the cloud-native space would not know about them unfortunately.

Given #444 is being done, it's OK to just document them in the values file, thanks!

I disagree on this one, but sure, there you go

tkennes avatar Jun 09 '23 11:06 tkennes