instana / instana-autotrace-webhook

Apache License 2.0
7 stars 8 forks source link

Webhook RBAC template bug #4

Open r00tvvm opened 2 years ago

r00tvvm commented 2 years ago

Looks like these are bugs in RBAC template.

  1. ServiceAccount name and namespace are same values https://github.com/instana/instana-autotrace-webhook/blob/main/incubator/instana-autotrace-webhook/templates/mutating-webhook-rbac.yaml#L6-L7 Fix: name: {{ .Release.Name }}

  2. Static defining of app.kubernetes.io/instance https://github.com/instana/instana-autotrace-webhook/blob/main/incubator/instana-autotrace-webhook/templates/deployment.yml#L18 is causing conflict in case webhook deployed under other release name https://github.com/instana/instana-autotrace-webhook/blob/main/incubator/instana-autotrace-webhook/templates/_helpers.tpl#L43 Fix:

    L18:
    selector:
    matchLabels:
      app.kubernetes.io/name: {{ include "instana-autotrace-webhook.name" . }}