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

Chore(charts): Unit tests for wardend. Updated pipelines, docs #75

Merged
merged 8 commits into from
Nov 28, 2024
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
9 changes: 7 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,27 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Install Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
shopt -s nullglob
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/test-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.13.0
version: "v3.16.3"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: "3.x"

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
uses: helm/chart-testing-action@v2.6.1
with:
version: "v3.10.0"
version: "v3.11.0"

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -45,3 +45,17 @@ jobs:
ct lint
--config ct.yaml
--target-branch ${{ github.event.repository.default_branch }}

- name: Install helm unittest plugin
if: steps.list-changed.outputs.changed == 'true'
run: |
helm env
helm plugin install https://github.com/helm-unittest/helm-unittest.git --version 0.7.0

- name: Run helm unittest on changed charts
if: env.changed != ''
run: |
for chart in $changed; do
echo "Running helm unittest for $chart"
helm unittest -f "$chart/tests/unit/*_test.yaml" "$chart"
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/__snapshot__
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: local
hooks:
- id: helm-docs
name: Helm Docs
args: []
description: >
Uses 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file,
and inserts the result into a corresponding 'README.md' file.
entry: jnorwood/helm-docs:v1.14.2
files: (README\.md\.gotmpl|(Chart|requirements|values)\.yaml)$
language: docker_image
require_serial: true
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ SHELL=/bin/bash
UID := $(shell id -u)
CURRENT_DIR := $(shell pwd)

.PHONY: lint
.PHONY: init lint unit docs clean

init:
@pre-commit install

lint:
@docker run --rm --workdir /charts --volume "$(CURRENT_DIR):/charts" -u $(UID) -e "HOME=/tmp" quay.io/helmpack/chart-testing:v3.11.0 sh -ac 'chown ${UID} .; exec ct lint'

unit:
@docker run --rm --workdir /charts --volume "$(CURRENT_DIR):/charts" -u $(UID) -e "HOME=/tmp" helmunittest/helm-unittest -f 'tests/unit/*_test.yaml' charts/*

docs:
@docker run --rm --volume "$(CURRENT_DIR):/helm-docs" -u $(UID) jnorwood/helm-docs:v1.14.2

clean:
@pre-commit uninstall
2 changes: 1 addition & 1 deletion charts/api-signer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
description: A Helm chart for deploying Fordefi's API Signer
name: api-signer
type: application
version: 0.3.0
version: 0.3.1

maintainers:
- name: zavertiaev
Expand Down
43 changes: 43 additions & 0 deletions charts/api-signer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# api-signer

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

A Helm chart for deploying Fordefi's API Signer

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| zavertiaev | | <https://github.com/zavertiaev> |
| mikolajsobolewski | | <https://github.com/mikolajsobolewski> |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| apiSignerConfig.host | string | `"https://api.fordefi.com"` | |
| apiSignerConfig.numThreads | int | `1` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"fordefi.jfrog.io/fordefi/api-signer"` | |
| image.tag | string | `"latest"` | |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| secretManager.enabled | bool | `false` | |
| secretManager.pullSecrets | list | `[]` | |
| secretManager.secrets | list | `[]` | |
| secretManager.serviceAccount.annotations | object | `{}` | |
| secretManager.serviceAccount.create | bool | `false` | |
| secretManager.serviceAccount.name | string | `""` | |
| securityContext | object | `{}` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
10 changes: 9 additions & 1 deletion charts/aws-pod-eip-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ apiVersion: v2
home: https://github.com/aws-samples/aws-pod-eip-controller
name: aws-pod-eip-controller
description: kubernetes aws-pod-eip-controller
version: 0.1.1
version: 0.1.2
maintainers:
- name: jlehtimaki
email: joonas@wardenprotocol.org
url: https://github.com/jlehtimaki
- name: zavertiaev
url: https://github.com/zavertiaev
- name: mikolajsobolewski
url: https://github.com/mikolajsobolewski
33 changes: 30 additions & 3 deletions charts/aws-pod-eip-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
# aws-pod-eip-controller

Helm chart for `aws-pod-eip-controller`.
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square)

This is a fork of to make easier to deploy the controller:
https://github.com/aws-samples/aws-pod-eip-controller/charts/aws-pod-eip-controller
kubernetes aws-pod-eip-controller

**Homepage:** <https://github.com/aws-samples/aws-pod-eip-controller>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| jlehtimaki | <joonas@wardenprotocol.org> | <https://github.com/jlehtimaki> |
| zavertiaev | | <https://github.com/zavertiaev> |
| mikolajsobolewski | | <https://github.com/mikolajsobolewski> |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| clusterName | string | `""` | |
| createServiceAccount | bool | `false` | |
| image | string | `"ghcr.io/warden-protocol/aws-pod-eip-controller:main"` | |
| logLevel | string | `"DEBUG"` | |
| nodeSelector | object | `{}` | |
| region | string | `""` | |
| resyncPeriod | int | `0` | |
| serviceAccountName | string | `""` | |
| vpcID | string | `""` | |
| watchNamespace | string | `""` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/axelar-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: A chart to deploy axelar-node to Kubernetes

type: application

version: 0.1.0
version: 0.1.1

appVersion: "v1.0.1"
maintainers:
Expand Down
45 changes: 45 additions & 0 deletions charts/axelar-node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# axelar-node

![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.1](https://img.shields.io/badge/AppVersion-v1.0.1-informational?style=flat-square)

A chart to deploy axelar-node to Kubernetes

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| zavertiaev | | <https://github.com/zavertiaev> |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| image | string | `"ghcr.io/jlehtimaki/axelar-core/axelar"` | |
| imagePullPolicy | string | `"IfNotPresent"` | |
| imagePullSecrets | list | `[]` | |
| imageTag | string | `"v1.0.1"` | |
| networkPolicy.enabled | bool | `true` | |
| networkPolicy.ingress.namespaceSelector | object | `{}` | |
| networkPolicy.ingress.podSelector | object | `{}` | |
| networkPolicy.metrics.namespaceSelector | object | `{}` | |
| networkPolicy.metrics.podSelector | object | `{}` | |
| node.api.enabled | bool | `false` | |
| node.grpc.enabled | bool | `true` | |
| node.home | string | `"/data/.axelar"` | |
| node.metrics.enabled | bool | `true` | |
| node.name | string | `"node"` | |
| node.p2p.enabled | bool | `false` | |
| node.persistent.size | string | `"100Gi"` | |
| node.replicaCount | int | `1` | |
| node.resources | object | `{}` | |
| node.rpc.enabled | bool | `true` | |
| node.securityContext.runAsGroup | int | `1000` | |
| node.securityContext.runAsNonRoot | bool | `true` | |
| node.securityContext.runAsUser | int | `1000` | |
| persistentVolumeClaimName | string | `""` | |
| podSecurityContext.fsGroup | int | `1000` | |
| serviceAnnotations | object | `{}` | |
| serviceMonitor.extraLabels | object | `{}` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/blockchain-listener/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# 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: 0.3.2
version: 0.3.3

maintainers:
- name: "zavertiaev"
Expand Down
53 changes: 53 additions & 0 deletions charts/blockchain-listener/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# blockchain-listener

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

A Helm chart for Kubernetes

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| zavertiaev | | |
| jlehtimaki | | |
| mikolajsobolewski | | |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| envFrom | string | `""` | |
| extraEnv | list | `[]` | |
| fullnameOverride | string | `""` | |
| image | string | `"ghcr.io/open-custody/keychain-operators/blockchain-listener"` | |
| imagePullPolicy | string | `"IfNotPresent"` | |
| imagePullSecrets | list | `[]` | |
| imageTag | string | `""` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources.limits.memory | string | `"256Mi"` | |
| resources.requests.cpu | string | `"20m"` | |
| resources.requests.memory | string | `"64Mi"` | |
| secretManager.cmd | string | `"yarn blockchain-listener"` | |
| secretManager.enabled | bool | `false` | |
| secretManager.pullSecrets | list | `[]` | |
| secretManager.secrets | list | `[]` | |
| secretManager.serviceAccount.annotations | object | `{}` | |
| secretManager.serviceAccount.create | bool | `false` | |
| secretManager.serviceAccount.name | string | `""` | |
| securityContext | object | `{}` | |
| service.enabled | bool | `true` | |
| service.port | int | `3000` | |
| service.type | string | `"ClusterIP"` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
2 changes: 1 addition & 1 deletion charts/discord-faucet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: discord-faucet
description: A Helm chart for Discord Faucet
type: application
version: 0.4.1
version: 0.4.2
appVersion: 1.2.0
maintainers:
- name: jlehtimaki
Expand Down
Loading