Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #43 from catenax-ng/lint
Browse files Browse the repository at this point in the history
feat: _addition of helm lint_
  • Loading branch information
almadigabor authored Jun 28, 2023
2 parents e760176 + c8a162c commit 8722509
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 32 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- 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/[email protected]
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' }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 1 addition & 0 deletions charts/chart-testing-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
validate-maintainers: false
12 changes: 6 additions & 6 deletions charts/daps-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -16,7 +16,7 @@
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#*******************************************************************************
################################################################################

apiVersion: v2
name: daps-server
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions charts/daps-server/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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) |
Expand All @@ -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 |
Expand Down
15 changes: 0 additions & 15 deletions charts/daps-server/templates/tests/test-connection.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions charts/daps-server/values.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -16,7 +16,7 @@
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#*******************************************************************************
################################################################################

# Default values for daps-server.
# This is a YAML-formatted file.
Expand All @@ -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: []
Expand Down

0 comments on commit 8722509

Please sign in to comment.