Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[common]: appVersion available as optional value #146

Merged
merged 2 commits into from
Jan 6, 2025
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
5 changes: 3 additions & 2 deletions charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: common
description: "Bedag's common Helm chart to use for creating other Helm charts"
version: 12.0.0
version: 12.1.0
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
Expand All @@ -27,4 +27,5 @@ annotations:
artifacthub.io/prerelease: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/changes: |
- "[Changed]: extra annotations and labesl support sprig statements"
- "[Changed]: extra annotations and labels support sprig statements"
- "[Added]: Possibility to optionally set appVersion in values"
2 changes: 1 addition & 1 deletion charts/common/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common

![Version: 12.0.0](https://img.shields.io/badge/Version-12.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 12.1.0](https://img.shields.io/badge/Version-12.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

Bedag's common Helm chart to use for creating other Helm charts

Expand Down
2 changes: 1 addition & 1 deletion charts/common/templates/helpers/_labels.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ app.kubernetes.io/name: {{ template "library.name" . }}
helm.sh/chart: {{ template "library.chartrefshort" . }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/version: {{ .Values.appVersion | default .Chart.AppVersion | quote }}
{{- end -}}

{{- /*
Expand Down
11 changes: 11 additions & 0 deletions charts/common/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,17 @@
}
},
"properties": {
"appVersion": {
"title": "SemVer check",
"description": "https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string using ECMA compatible regex with double escaping (\\)",
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"examples": [
"1.0.0",
"1.0.0-beta",
"1.2.1"
]
},
"defaultTag": {
"title": "SemVer check",
"description": "https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string using ECMA compatible regex with double escaping (\\) and option for 'latest' but then be compatible with postgres-tag format of XX.MM (without patch part)",
Expand Down
3 changes: 3 additions & 0 deletions charts/common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# nameSuffix: ""
# nameOverride: ""

## appVersion is optional to override the default .Chart.appVersion
# appVersion: "1.0.0"

# defaultTag is used when no imageTag is specified in .Values.components.*.controller.image.tag
defaultTag: latest

Expand Down
Loading