Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.0
version: 0.9.0
2 changes: 1 addition & 1 deletion charts/common/templates/_podSpec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ affinity:
tolerations:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 2 additions & 4 deletions charts/common/templates/_serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{{- define "common.serviceaccount.tpl" -}}
{{- if .Values.serviceAccount.create -}}
{{- if .Values.serviceAccount }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccount.name | default (include "onechart.fullname" .) }}
name: {{ .Values.serviceAccount }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "onechart.labels" . | nindent 4 }}
{{- end }}
Comment on lines +2 to 9

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This implementation forces the creation of a ServiceAccount if a name is provided, which prevents using an existing ServiceAccount without the chart trying to manage it. This is a regression from the previous, more flexible behavior. It's better to use a create flag to control creation explicitly, which is a common pattern in Helm charts.

{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ .Values.serviceAccount.name | default (include "onechart.fullname" .) }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "onechart.labels" . | nindent 4 }}
{{- end }}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert to before flow

{{- end -}}
6 changes: 3 additions & 3 deletions charts/cron-job/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2026-02-06T16:56:07.364305478+07:00"
version: 0.9.0
digest: sha256:c691781bff5490003ec6b84de1a1f71ab89d193325e5f5fe1c83b8c1398e2273
generated: "2026-02-09T14:46:51.755970924+07:00"
2 changes: 1 addition & 1 deletion charts/cron-job/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ version: 0.78.0

dependencies:
- name: common
version: 0.8.0
version: 0.9.0
repository: file://../common
Binary file removed charts/cron-job/charts/common-0.8.0.tgz
Binary file not shown.
Binary file added charts/cron-job/charts/common-0.9.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions charts/onechart/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2026-02-06T14:23:44.297299351+07:00"
version: 0.9.0
digest: sha256:c691781bff5490003ec6b84de1a1f71ab89d193325e5f5fe1c83b8c1398e2273
generated: "2026-02-09T14:47:43.892718793+07:00"
2 changes: 1 addition & 1 deletion charts/onechart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ version: 0.78.0

dependencies:
- name: common
version: 0.8.0
version: 0.9.0
repository: file://../common
Binary file removed charts/onechart/charts/common-0.8.0.tgz
Binary file not shown.
Binary file added charts/onechart/charts/common-0.9.0.tgz
Binary file not shown.
8 changes: 8 additions & 0 deletions charts/onechart/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,14 @@
}
]
}
},
"serviceAccount": {
"$id": "#/properties/serviceAccount",
"type": "string",
"title": "The name of service account",
"description": "Name of the Kubernetes ServiceAccount to associate with this workload.It only creates one if a name is specified.",
"default": "",
"examples": []
}
},
"additionalProperties": true
Expand Down
4 changes: 0 additions & 4 deletions charts/onechart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ image:
# vars:
# MY_VAR: "value"

serviceAccount:
create: false
# name: my-service-account

replicas: 1

nameOverride: ""
Expand Down
6 changes: 3 additions & 3 deletions charts/static-site/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.8.0
digest: sha256:ffc064a8d35b9d9d6e48490b41d0caef00096b0c8f9d1b773dfd9380efdff440
generated: "2026-02-06T16:56:24.024306149+07:00"
version: 0.9.0
digest: sha256:c691781bff5490003ec6b84de1a1f71ab89d193325e5f5fe1c83b8c1398e2273
generated: "2026-02-09T15:31:53.899987212+07:00"
2 changes: 1 addition & 1 deletion charts/static-site/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ version: 0.78.0

dependencies:
- name: common
version: 0.8.0
version: 0.9.0
repository: file://../common
Binary file removed charts/static-site/charts/common-0.8.0.tgz
Binary file not shown.
Binary file added charts/static-site/charts/common-0.9.0.tgz
Binary file not shown.
Binary file removed common-0.8.0.tgz
Binary file not shown.
Binary file added common-0.9.0.tgz
Binary file not shown.
Binary file removed docs/cron-job-0.78.0.tgz
Binary file not shown.
Binary file removed docs/onechart-0.78.0.tgz
Binary file not shown.
Binary file removed docs/static-site-0.78.0.tgz
Binary file not shown.