Skip to content

Commit

Permalink
Merge pull request #146 from gnaex/master
Browse files Browse the repository at this point in the history
[common]: appVersion available as optional value
  • Loading branch information
wthhub authored Jan 6, 2025
2 parents b244440 + ebdb948 commit 68c1c42
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
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

0 comments on commit 68c1c42

Please sign in to comment.