diff --git a/.github/workflows/helm-lint.yaml b/.github/workflows/helm-lint.yaml new file mode 100644 index 0000000..68065e3 --- /dev/null +++ b/.github/workflows/helm-lint.yaml @@ -0,0 +1,96 @@ +################################################################################# +# Copyright (c) 2022,2023 T-Systems International GmbH +# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################ + + +name: Lint and Test Chart + +on: + push: + paths: + - 'charts/**' + branches: [main] + pull_request: + paths: + - 'charts/**' + workflow_dispatch: + inputs: + node_image: + description: 'kindest/node image for k8s kind cluster' + # k8s version from 3.1 release + default: 'kindest/node:v1.24.6' + required: false + type: string + upgrade_from: + description: 'portal chart version to upgrade from' + # portal version from 3.1 release + default: '1.3.0' + required: false + type: string + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Kubernetes KinD Cluster + uses: container-tools/kind-action@v2 + with: + version: v0.19.0 + node_image: ${{ github.event.inputs.node_image || 'kindest/node:v1.24.6' }} + + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.10.3 + + # Setup python as a prerequisite for chart linting + - uses: actions/setup-python@v4 + with: + python-version: '3.9' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "CHART_CHANGED=true" >> $GITHUB_ENV + fi + # run chart linting + - name: Run chart-testing (lint) + run: ct lint --charts charts/daps-server --config charts/chart-testing-config.yaml + + # Preparing a kind cluster to install and test charts on + - name: Create kind cluster + uses: helm/kind-action@v1.4.0 + if: ${{ env.CHART_CHANGED == 'true' }} + + # install the chart to the kind cluster and run helm test + # define charts to test with the --charts parameter + - name: Run chart-testing (install) + run: ct install --charts charts/daps-server --config charts/chart-testing-config.yaml + if: ${{ env.CHART_CHANGED == 'true' }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9092b14..c2f5715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [1.8.0] - 2023-06-26 + +### Added +- Added helm lint + ## [1.7.9] - 2023-05-17 ### Changed diff --git a/README.md b/README.md index 20cc7d6..cd28147 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ IMPORTANT: DAPS is meant to be a research sandbox in which we can (re)implement ### Software Version ```shell -Helm version is v1.7.9 +Helm version is v1.8.0 Application version is v1.7.1 ``` diff --git a/charts/chart-testing-config.yaml b/charts/chart-testing-config.yaml new file mode 100644 index 0000000..da6d1b5 --- /dev/null +++ b/charts/chart-testing-config.yaml @@ -0,0 +1 @@ +validate-maintainers: false diff --git a/charts/daps-server/Chart.yaml b/charts/daps-server/Chart.yaml index 26b2dee..6551775 100644 --- a/charts/daps-server/Chart.yaml +++ b/charts/daps-server/Chart.yaml @@ -1,6 +1,6 @@ -#****************************************************************************** -# Copyright (c) 2022, 2023 T-Systems International GmbH -# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation +################################################################################# +# Copyright (c) 2022,2023 T-Systems International GmbH +# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -16,7 +16,7 @@ # under the License. # # SPDX-License-Identifier: Apache-2.0 -#******************************************************************************* +################################################################################ apiVersion: v2 name: daps-server @@ -33,12 +33,12 @@ description: DAPS server helm-chart type: application sources: - - https://github.com/eclipse-tractusx/daps-helm-chart + - https://github.com/eclipse-tractusx/daps-helm-chart # 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: 1.7.10 +version: 1.8.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/daps-server/README.md b/charts/daps-server/README.md index 8f90ff8..4c14b70 100644 --- a/charts/daps-server/README.md +++ b/charts/daps-server/README.md @@ -1,6 +1,6 @@ # daps-server -![Version: 1.7.9](https://img.shields.io/badge/Version-1.7.9-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.1](https://img.shields.io/badge/AppVersion-1.7.1-informational?style=flat-square) +![Version: 1.8.0](https://img.shields.io/badge/Version-1.8.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.1](https://img.shields.io/badge/AppVersion-1.7.1-informational?style=flat-square) DAPS server helm-chart @@ -20,8 +20,8 @@ DAPS server helm-chart | env.secret | object | `{}` | Additional env variables that should be stored in encrypted way | | fullnameOverride | string | `""` | | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | -| image.repository | string | `""` | DAPS docker image | -| image.tag | string | `""` | Image tag. Overrides the image tag whose default is the chart appVersion. | +| image.repository | string | `"ghcr.io/fraunhofer-aisec/omejdn-server"` | DAPS docker image | +| image.tag | string | `"1.7.1"` | Image tag. Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | Secret which contains dockerconfig.json from private container registry with daps image | | ingress.annotations | object | `{}` | Additional ingress annotations | | ingress.enabled | bool | `false` | If set to `true`, DAPS will be exposed with ingress controller at http(s)://(ingress.host)/(ingress.pathPrefix) | @@ -45,7 +45,7 @@ DAPS server helm-chart | omejdn.serverKeyFolderPath | string | `"/opt"` | Path to directory with private server key | | persistence.accessMode | list | `[]` | Storage accessMode, defaults to ReadWriteOnce. | | persistence.enabled | bool | `true` | If `true` persistent volume will be used to store clients and users configuration | -| persistence.storageClass | string | `""` | Storage class to claim a volume, defaults to azurefile. | +| persistence.storageClass | string | `""` | Storage class, defaults to none specified. | | persistence.storageSize | string | `"2Gi"` | Volume size | | podAnnotations | object | `{}` | | | podSecurityContext | object | `{}` | Pod security context configuration | diff --git a/charts/daps-server/templates/tests/test-connection.yaml b/charts/daps-server/templates/tests/test-connection.yaml deleted file mode 100644 index 1c3485e..0000000 --- a/charts/daps-server/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "daps-server.fullname" . }}-test-connection" - labels: - {{- include "daps-server.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "daps-server.fullname" . }}:{{ .Values.service.port }}/.well-known/openid-configuration'] - restartPolicy: Never diff --git a/charts/daps-server/values.yaml b/charts/daps-server/values.yaml index 13d3e41..39aee20 100644 --- a/charts/daps-server/values.yaml +++ b/charts/daps-server/values.yaml @@ -1,6 +1,6 @@ -#****************************************************************************** -# Copyright (c) 2022, 2023 T-Systems International GmbH -# Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation +################################################################################# +# Copyright (c) 2022,2023 T-Systems International GmbH +# Copyright (c) 2022,2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. @@ -16,7 +16,7 @@ # under the License. # # SPDX-License-Identifier: Apache-2.0 -#******************************************************************************* +################################################################################ # Default values for daps-server. # This is a YAML-formatted file. @@ -27,11 +27,11 @@ replicaCount: 1 image: # -- DAPS docker image - repository: "" + repository: "ghcr.io/fraunhofer-aisec/omejdn-server" # -- Image pull policy pullPolicy: IfNotPresent # -- Image tag. Overrides the image tag whose default is the chart appVersion. - tag: "" + tag: "1.7.1" # -- Secret which contains dockerconfig.json from private container registry with daps image imagePullSecrets: []