diff --git a/charts/dependency-track/Chart.yaml b/charts/dependency-track/Chart.yaml index e93f1a1..e5b0220 100644 --- a/charts/dependency-track/Chart.yaml +++ b/charts/dependency-track/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: dependency-track -version: 0.4.0 +version: 0.4.1 type: application appVersion: 4.11.0 description: |- @@ -8,9 +8,9 @@ description: |- that allows organizations to identify and reduce risk in the software supply chain. home: https://github.com/DependencyTrack/dependency-track sources: -- https://github.com/DependencyTrack/helm-charts/tree/main/charts/dependency-track + - https://github.com/DependencyTrack/helm-charts/tree/main/charts/dependency-track icon: https://avatars.githubusercontent.com/u/40258585 maintainers: -- name: nscuro - email: nscuro@protonmail.com - url: https://github.com/nscuro + - name: nscuro + email: nscuro@protonmail.com + url: https://github.com/nscuro diff --git a/charts/dependency-track/README.md b/charts/dependency-track/README.md index 4db78be..6650362 100644 --- a/charts/dependency-track/README.md +++ b/charts/dependency-track/README.md @@ -65,6 +65,10 @@ that allows organizations to identify and reduce risk in the software supply cha | common.nameOverride | string | `""` | | | common.secretKey.createSecret | bool | `false` | Whether the chart should generate a secret key upon deployment. | | common.secretKey.existingSecretName | string | `""` | Use the secret key defined in an existing secret. | +| common.serviceAccount.annotations | object | `{}` | | +| common.serviceAccount.automount | bool | `false` | Whether the serviceAccount should mount the token. | +| common.serviceAccount.create | bool | `true` | Whether the chart should generate a serviceAccount | +| common.serviceAccount.name | string | `""` | Use the name of the name of the release by default, or specify a custom name. | | extraObjects | list | `[]` | Create extra manifests via values. | | frontend.additionalVolumeMounts | list | `[]` | | | frontend.additionalVolumes | list | `[]` | | @@ -105,3 +109,5 @@ that allows organizations to identify and reduce risk in the software supply cha | ingress.ingressClassName | string | `""` | | | ingress.tls | list | `[]` | | +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1) diff --git a/charts/dependency-track/templates/_helpers.tpl b/charts/dependency-track/templates/_helpers.tpl index 34dcef9..eaeada5 100644 --- a/charts/dependency-track/templates/_helpers.tpl +++ b/charts/dependency-track/templates/_helpers.tpl @@ -133,4 +133,17 @@ Frontend image {{- else if .Values.common.secretKey.createSecret -}} {{- printf "%s-secret-key" (include "dependencytrack.fullname" .) -}} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}} + + +{{/* +Create the name of the service account +*/}} +{{- define "dependencytrack.serviceAccountName" -}} +{{- if .Values.common.serviceAccount.create }} +{{- default (include "dependencytrack.fullname" .) .Values.common.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.common.serviceAccount.name }} +{{- end }} +{{- end }} + diff --git a/charts/dependency-track/templates/api-server/statefulset.yaml b/charts/dependency-track/templates/api-server/statefulset.yaml index 62a28ab..734dd86 100644 --- a/charts/dependency-track/templates/api-server/statefulset.yaml +++ b/charts/dependency-track/templates/api-server/statefulset.yaml @@ -27,6 +27,7 @@ spec: {{- if .Values.apiServer.initContainers }} {{- toYaml .Values.apiServer.initContainers | nindent 6 }} {{- end }} + serviceAccount: {{ include "dependencytrack.serviceAccountName" . }} containers: - name: {{ include "dependencytrack.apiServerName" . }} image: {{ include "dependencytrack.apiServerImage" . }} diff --git a/charts/dependency-track/templates/frontend/deployment.yaml b/charts/dependency-track/templates/frontend/deployment.yaml index baac0d8..cf99548 100644 --- a/charts/dependency-track/templates/frontend/deployment.yaml +++ b/charts/dependency-track/templates/frontend/deployment.yaml @@ -23,6 +23,7 @@ spec: {{- if .Values.frontend.initContainers }} {{- toYaml .Values.frontend.initContainers | nindent 6 }} {{- end }} + serviceAccount: {{ include "dependencytrack.serviceAccountName" . }} containers: - name: {{ include "dependencytrack.frontendName" . }} image: {{ include "dependencytrack.frontendImage" . }} diff --git a/charts/dependency-track/templates/serviceaccount.yaml b/charts/dependency-track/templates/serviceaccount.yaml new file mode 100644 index 0000000..a10bb56 --- /dev/null +++ b/charts/dependency-track/templates/serviceaccount.yaml @@ -0,0 +1,9 @@ +{{- if .Values.common.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "dependencytrack.serviceAccountName" . }} + labels: {{- include "dependencytrack.commonLabels" . | nindent 4 }} + annotations: {{- toYaml .Values.common.serviceAccount.annotations | nindent 4 }} +automountServiceAccountToken: {{ .Values.common.serviceAccount.automount }} +{{- end }} \ No newline at end of file diff --git a/charts/dependency-track/values.yaml b/charts/dependency-track/values.yaml index e5ca59d..a47cd97 100644 --- a/charts/dependency-track/values.yaml +++ b/charts/dependency-track/values.yaml @@ -10,6 +10,14 @@ common: createSecret: false # -- Use the secret key defined in an existing secret. existingSecretName: "" + serviceAccount: + # -- Whether the chart should generate a serviceAccount + create: true + annotations: {} + # -- Use the name of the name of the release by default, or specify a custom name. + name: "" + # -- Whether the serviceAccount should mount the token. + automount: false apiServer: annotations: {} @@ -146,7 +154,8 @@ ingress: # - example.com # -- Create extra manifests via values. -extraObjects: [] +extraObjects: + [] # - apiVersion: "kubernetes-client.io/v1" # kind: ExternalSecret # metadata: