mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 16:37:04 +02:00
feat(common): Release v3.7.2 (#388)
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com> Co-authored-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
parent
ed1fc273b2
commit
9efa8f0adb
10 changed files with 119 additions and 48 deletions
94
.github/workflows/charts-lint.yaml
vendored
94
.github/workflows/charts-lint.yaml
vendored
|
@ -18,6 +18,76 @@ on:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
validate-required-changes:
|
||||||
|
name: Validate required changes
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chart: ${{ fromJSON(inputs.charts) }}
|
||||||
|
fail-fast: false
|
||||||
|
if: |
|
||||||
|
${{
|
||||||
|
(inputs.charts != '[]' && inputs.charts != '') &&
|
||||||
|
github.event_name == 'pull_request'
|
||||||
|
}}
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout pull request branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: pull
|
||||||
|
|
||||||
|
- name: Checkout default branch
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: "${{ github.event.repository.default_branch }}"
|
||||||
|
path: default
|
||||||
|
|
||||||
|
- name: Get chart details for PR
|
||||||
|
id: chart-details-pr
|
||||||
|
uses: bjw-s/helm-charts-actions/get-chart-details@main
|
||||||
|
with:
|
||||||
|
path: pull/charts/${{ matrix.chart }}
|
||||||
|
validateChartYaml: true
|
||||||
|
requireChangelog: true
|
||||||
|
|
||||||
|
- name: Get chart details for default branch
|
||||||
|
id: chart-details-default
|
||||||
|
uses: bjw-s/helm-charts-actions/get-chart-details@main
|
||||||
|
with:
|
||||||
|
path: default/charts/${{ matrix.chart }}
|
||||||
|
allowChartToNotExist: true
|
||||||
|
validateChartYaml: false
|
||||||
|
requireChangelog: false
|
||||||
|
|
||||||
|
# - name: Check version update
|
||||||
|
# if: ${{ steps.chart-details-pr.outputs.version == steps.chart-details-default.outputs.version }}
|
||||||
|
# uses: actions/github-script@v7
|
||||||
|
# with:
|
||||||
|
# script: |
|
||||||
|
# core.setFailed("Chart version has not been updated for ${{ matrix.chart }}");
|
||||||
|
|
||||||
|
# - name: Check changelog update
|
||||||
|
# if: ${{ steps.chart-details-pr.outputs.changes == steps.chart-details-default.outputs.changes }}
|
||||||
|
# uses: actions/github-script@v7
|
||||||
|
# with:
|
||||||
|
# script: |
|
||||||
|
# core.setFailed("Changelog has not been updated for ${{ matrix.chart }}");
|
||||||
|
|
||||||
|
validate_success:
|
||||||
|
needs:
|
||||||
|
- validate-required-changes
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
name: Validation successful
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Check matrix status
|
||||||
|
if: >-
|
||||||
|
${{
|
||||||
|
(inputs.chartsToLint != '' && inputs.chartsToLint != '[]') &&
|
||||||
|
contains(needs.*.result, 'failure')
|
||||||
|
}}
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
lint-chart:
|
lint-chart:
|
||||||
if: ${{ inputs.charts != '[]' && inputs.charts != '' }}
|
if: ${{ inputs.charts != '[]' && inputs.charts != '' }}
|
||||||
name: Lint chart
|
name: Lint chart
|
||||||
|
@ -25,6 +95,8 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
chart: ${{ fromJSON(inputs.charts) }}
|
chart: ${{ fromJSON(inputs.charts) }}
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
needs:
|
||||||
|
- validate_success
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -47,25 +119,31 @@ jobs:
|
||||||
outputFile: "charts/${{ matrix.chart }}/values.schema.json"
|
outputFile: "charts/${{ matrix.chart }}/values.schema.json"
|
||||||
allowFileNotFound: true
|
allowFileNotFound: true
|
||||||
|
|
||||||
|
- name: Always assume in-repo common library
|
||||||
|
env:
|
||||||
|
COMMON_LIBRARY_LOCATION: ${{ github.workspace }}/charts/library/common
|
||||||
|
working-directory: charts/${{ matrix.chart }}
|
||||||
|
run: |
|
||||||
|
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s.github.io/helm-charts").version = ">0.0.0-0")' Chart.yaml
|
||||||
|
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s.github.io/helm-charts").repository = "file://${{ env.COMMON_LIBRARY_LOCATION }}")' Chart.yaml
|
||||||
|
echo "::group::Modified Chart.yaml"
|
||||||
|
cat Chart.yaml
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Run chart-testing (lint)
|
- name: Run chart-testing (lint)
|
||||||
run: ct lint --config .ci/ct/ct.yaml --charts "charts/${{ matrix.chart }}"
|
run: ct lint --config .ci/ct/ct.yaml --charts "charts/${{ matrix.chart }}"
|
||||||
|
|
||||||
lint_success:
|
lint_success:
|
||||||
needs:
|
needs:
|
||||||
- lint-chart
|
- lint-chart
|
||||||
if: |
|
if: ${{ !cancelled() }}
|
||||||
always()
|
|
||||||
name: Lint successful
|
name: Lint successful
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check matrix status
|
- name: Check matrix status
|
||||||
if: >-
|
if: >-
|
||||||
${{
|
${{
|
||||||
(
|
(inputs.chartsToLint != '' && inputs.chartsToLint != '[]') &&
|
||||||
inputs.chartsToLint != '' && inputs.chartsToLint != '[]'
|
contains(needs.*.result, 'failure')
|
||||||
) &&
|
|
||||||
(
|
|
||||||
contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
33
.github/workflows/charts-test.yaml
vendored
33
.github/workflows/charts-test.yaml
vendored
|
@ -78,6 +78,17 @@ jobs:
|
||||||
outputFile: "charts/${{ matrix.chart }}/values.schema.json"
|
outputFile: "charts/${{ matrix.chart }}/values.schema.json"
|
||||||
allowFileNotFound: true
|
allowFileNotFound: true
|
||||||
|
|
||||||
|
- name: Always assume in-repo common library
|
||||||
|
env:
|
||||||
|
COMMON_LIBRARY_LOCATION: ${{ github.workspace }}/charts/library/common
|
||||||
|
working-directory: charts/${{ matrix.chart }}
|
||||||
|
run: |
|
||||||
|
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s.github.io/helm-charts").version = ">0.0.0-0")' Chart.yaml
|
||||||
|
yq -i '. |= .dependencies |= map(select(.name == "common" and .repository == "https://bjw-s.github.io/helm-charts").repository = "file://${{ env.COMMON_LIBRARY_LOCATION }}")' Chart.yaml
|
||||||
|
echo "::group::Modified Chart.yaml"
|
||||||
|
cat Chart.yaml
|
||||||
|
echo "::endgroup::"
|
||||||
|
|
||||||
- name: Run chart-testing (install)
|
- name: Run chart-testing (install)
|
||||||
working-directory: "charts/${{ matrix.chart }}"
|
working-directory: "charts/${{ matrix.chart }}"
|
||||||
run: |
|
run: |
|
||||||
|
@ -90,20 +101,15 @@ jobs:
|
||||||
install_success:
|
install_success:
|
||||||
needs:
|
needs:
|
||||||
- install-chart
|
- install-chart
|
||||||
if: |
|
if: ${{ !cancelled() }}
|
||||||
always()
|
|
||||||
name: Install successful
|
name: Install successful
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check matrix status
|
- name: Check matrix status
|
||||||
if: >-
|
if: >-
|
||||||
${{
|
${{
|
||||||
(
|
(inputs.chartsToTest != '' && inputs.chartsToTest != '[]') &&
|
||||||
inputs.chartsToTest != '' && inputs.chartsToTest != '[]'
|
contains(needs.*.result, 'failure')
|
||||||
) &&
|
|
||||||
(
|
|
||||||
contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
|
@ -161,19 +167,14 @@ jobs:
|
||||||
unittest_success:
|
unittest_success:
|
||||||
needs:
|
needs:
|
||||||
- unittest-chart
|
- unittest-chart
|
||||||
if: |
|
if: ${{ !cancelled() }}
|
||||||
always()
|
|
||||||
name: Unittest successful
|
name: Unittest successful
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check matrix status
|
- name: Check matrix status
|
||||||
if: >-
|
if: >-
|
||||||
${{
|
${{
|
||||||
(
|
(inputs.chartsToTest != '' && inputs.chartsToTest != '[]') &&
|
||||||
inputs.chartsToTest != '' && inputs.chartsToTest != '[]'
|
contains(needs.*.result, 'failure')
|
||||||
) &&
|
|
||||||
(
|
|
||||||
contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
||||||
)
|
|
||||||
}}
|
}}
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
|
@ -3,7 +3,7 @@ apiVersion: v2
|
||||||
name: common
|
name: common
|
||||||
description: Function library for Helm charts
|
description: Function library for Helm charts
|
||||||
type: library
|
type: library
|
||||||
version: 3.7.1
|
version: 3.7.2
|
||||||
kubeVersion: ">=1.22.0-0"
|
kubeVersion: ">=1.22.0-0"
|
||||||
keywords:
|
keywords:
|
||||||
- common
|
- common
|
||||||
|
@ -17,8 +17,7 @@ annotations:
|
||||||
artifacthub.io/changes: |-
|
artifacthub.io/changes: |-
|
||||||
- kind: fixed
|
- kind: fixed
|
||||||
description: |-
|
description: |-
|
||||||
Values schema is now dereferenced before packaging so it no longer relies on
|
The Apache 2.0 LICENSE file has been added to the chart.
|
||||||
internet connectivity to validate the schema.
|
|
||||||
- kind: fixed
|
- kind: fixed
|
||||||
description: |-
|
description: |-
|
||||||
Add explicit namespace declaration to templates using Release.Namespace
|
Fixed non-deterministic selection of primary service and port.
|
||||||
|
|
1
charts/library/common/LICENSE
Symbolic link
1
charts/library/common/LICENSE
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
# common
|
# common
|
||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Function library for Helm charts
|
Function library for Helm charts
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
|
||||||
# Chart.yaml
|
# Chart.yaml
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
version: 3.7.1
|
version: 3.7.2
|
||||||
repository: https://bjw-s.github.io/helm-charts/
|
repository: https://bjw-s.github.io/helm-charts/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ Return the primary service object for a controller
|
||||||
{{- $result = $service -}}
|
{{- $result = $service -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Return the first Service if none has been explicitly marked as primary */ -}}
|
{{- /* Return the first Service (alphabetically) if none has been explicitly marked as primary */ -}}
|
||||||
{{- if not $result -}}
|
{{- if not $result -}}
|
||||||
{{- $firstServiceKey := keys $enabledServicesForController | first -}}
|
{{- $firstServiceKey := keys $enabledServicesForController | sortAlpha | first -}}
|
||||||
{{- $result = get $enabledServicesForController $firstServiceKey -}}
|
{{- $result = get $enabledServicesForController $firstServiceKey -}}
|
||||||
{{- $identifier = $result.identifier -}}
|
{{- $identifier = $result.identifier -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -15,9 +15,9 @@ Return the primary port for a given Service object.
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Return the first port if none has been explicitly marked as primary */ -}}
|
{{- /* Return the first port (alphabetically) if none has been explicitly marked as primary */ -}}
|
||||||
{{- if not $result -}}
|
{{- if not $result -}}
|
||||||
{{- $firstPortKey := keys $enabledPorts | first -}}
|
{{- $firstPortKey := keys $enabledPorts | sortAlpha | first -}}
|
||||||
{{- if $firstPortKey -}}
|
{{- if $firstPortKey -}}
|
||||||
{{- $result = get $enabledPorts $firstPortKey -}}
|
{{- $result = get $enabledPorts $firstPortKey -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "http://json-schema.org/draft-07/schema",
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.7.1/charts/library/common/values.schema.json",
|
"$id": "https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.7.2/charts/library/common/values.schema.json",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"global": {
|
"global": {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
description: A common powered chart template. This can be useful for small projects that don't have their own chart.
|
description: A common powered chart template. This can be useful for small projects that don't have their own chart.
|
||||||
name: app-template
|
name: app-template
|
||||||
version: 3.7.1
|
version: 3.7.2
|
||||||
kubeVersion: ">=1.22.0-0"
|
kubeVersion: ">=1.22.0-0"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: bjw-s
|
- name: bjw-s
|
||||||
|
@ -10,19 +10,10 @@ maintainers:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
repository: https://bjw-s.github.io/helm-charts
|
repository: https://bjw-s.github.io/helm-charts
|
||||||
version: 3.7.1
|
version: 3.7.2
|
||||||
annotations:
|
annotations:
|
||||||
org.opencontainers.image.source: "https://github.com/bjw-s/helm-charts"
|
org.opencontainers.image.source: "https://github.com/bjw-s/helm-charts"
|
||||||
artifacthub.io/changes: |-
|
artifacthub.io/changes: |-
|
||||||
- kind: fixed
|
- kind: added
|
||||||
description: |-
|
description: |-
|
||||||
Values schema is now dereferenced before packaging so it no longer relies on
|
The Apache 2.0 LICENSE file has been added to the chart.
|
||||||
internet connectivity to validate the schema.
|
|
||||||
- kind: changed
|
|
||||||
description: |
|
|
||||||
Updated library version to 3.7.1.
|
|
||||||
links:
|
|
||||||
- name: Upgrade instructions from v2.x
|
|
||||||
url: https://bjw-s.github.io/helm-charts/docs/app-template/#from-2xx-to-30x
|
|
||||||
- name: Common library chart definition
|
|
||||||
url: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/Chart.yaml
|
|
||||||
|
|
1
charts/other/app-template/LICENSE
Symbolic link
1
charts/other/app-template/LICENSE
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../../LICENSE
|
Loading…
Add table
Add a link
Reference in a new issue