Skip to content

Commit

Permalink
helm: Add subcomponent labels for celery beat and worker at deployment (
Browse files Browse the repository at this point in the history
#9865)

* helm: Add subcomponent labels for celery beat and worker at deployment

```
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    defectdojo.org/component: celery
    defectdojo.org/subcomponent: worker
spec:
  selector:
    matchLabels:
      defectdojo.org/component: celery
      defectdojo.org/subcomponent: worker
  template:
    metadata:
      labels:
        defectdojo.org/component: celery
        defectdojo.org/subcomponent: worker
```

1, The first label is for deployment itself, it gives label for that particular deployment.
2, The second label is selector: matchLabels which tells the resources(service etc) to match the pod according to label.
3. The third label is podTemplate labels, the template is actually podTemplate. It describe the pod that it is launched.

* Update helm lock file

Signed-off-by: DefectDojo <defectdojo-project@owasp.org>

* bump chart version

* Update helm lock file

Signed-off-by: DefectDojo <defectdojo-project@owasp.org>

* revert changes

---------

Signed-off-by: DefectDojo <defectdojo-project@owasp.org>
Co-authored-by: Alexander Chebotov <a.chebotov@arenadata.io>
Co-authored-by: DefectDojo <defectdojo-project@owasp.org>
  • Loading branch information
3 people authored Apr 30, 2024
1 parent 24a52eb commit 2bbf8bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/defectdojo/templates/celery-beat-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ spec:
selector:
matchLabels:
defectdojo.org/component: celery
defectdojo.org/subcomponent: beat
app.kubernetes.io/name: {{ include "defectdojo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
defectdojo.org/component: celery
defectdojo.org/subcomponent: beat
app.kubernetes.io/name: {{ include "defectdojo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podLabels }}
Expand Down
2 changes: 2 additions & 0 deletions helm/defectdojo/templates/celery-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ spec:
selector:
matchLabels:
defectdojo.org/component: celery
defectdojo.org/subcomponent: worker
app.kubernetes.io/name: {{ include "defectdojo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
defectdojo.org/component: celery
defectdojo.org/subcomponent: worker
app.kubernetes.io/name: {{ include "defectdojo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Values.podLabels }}
Expand Down

0 comments on commit 2bbf8bc

Please sign in to comment.