Skip to content

Commit

Permalink
Small fixes and improvements (#22)
Browse files Browse the repository at this point in the history
* Minor fixed and workflow changes

- Bumped all charts
- Updated workflow to use GH pages again
- Updated foundry-vtt CI values to use dnsConfig
- Fixed small non-breaking mistake in foundry-vtt deployment
- Updated helm homepage with current chart versions

* Fixed missing newline

* Split lint and install into 2 jobs

* Trigger workflows on workflow file change

* Fixed lint job

* Disabled PSP by default since it is now deprecated
  • Loading branch information
Haloghen authored Nov 11, 2022
1 parent d11619c commit b74e0d9
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 30 deletions.
95 changes: 75 additions & 20 deletions .github/workflows/chart-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ on:
push:
paths:
- charts/**
- .github/workflows/**
pull_request:
paths:
- charts/**
- .github/workflows/**

jobs:
lint-test:
name: "Lint and Test"
lint-charts:
name: Lint Charts
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
Expand Down Expand Up @@ -55,45 +57,98 @@ jobs:
run: ct lint --config ct.yaml
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'

install-charts:
name: Install Charts
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/[email protected]
with:
fetch-depth: 0

- name: "Set Up Helm"
uses: azure/[email protected]
if: github.ref != 'refs/heads/main'
with:
version: v3.4.1

- name: "Set Up Python"
uses: actions/[email protected]
if: github.ref != 'refs/heads/main'
with:
python-version: 3.9

- name: "Set up chart-testing"
uses: helm/[email protected]
if: github.ref != 'refs/heads/main'
with:
version: v3.3.0

- name: "Save Testing Values from Secret"
shell: bash
env:
SECRET_VALUES: ${{ secrets.FOUNDRY_SECRET_VALUES }}
run: echo "$SECRET_VALUES" | base64 -d > ./charts/foundry-vtt/ci/test-values.yaml
if: github.ref != 'refs/heads/main'

- name: "Run chart-testing (list-changed)"
id: list-changed
if: github.ref != 'refs/heads/main'
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Create kind cluster
uses: helm/[email protected]
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'

- name: Run chart-testing (install)
run: ct install --config ct.yaml
run: ct install --config ct.yaml --debug
if: steps.list-changed.outputs.changed == 'true' && github.ref != 'refs/heads/main'

- name: Get Branch name
id: branch-name
uses: tj-actions/branch-names@v6
if: github.ref != 'refs/heads/main'

release_on_nexus:
release-on-nexus:
name: Release Chart on Nexus
runs-on: ubuntu-22.04
needs: lint-test
needs:
- lint-charts
- install-charts
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodule: recursive
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

- name: Run chart-releaser
uses: ntwklr/nexus-helm-chart-releaser-action@v0.0.5
uses: helm/chart-releaser-action@v1.1.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'

- name: Build Hugo
run: |
git submodule init
git submodule update
cd hugo
hugo --minify
cp -r ./public ../public
cd ..
- name: Deploy Hugo
uses: peaceiris/actions-gh-pages@v3
with:
charts_repo_url: https://repo.mahahe.it/repository/helm/
username: "${{ secrets.NEXUS_USERNAME }}"
password: "${{ secrets.NEXUS_PASSWORD }}"
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: helm.mahahe.it
keep_files: true
2 changes: 1 addition & 1 deletion charts/foundry-vtt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: foundry-vtt
description: Foundry Virtual Tabletop
type: application
version: 0.1.1
version: 0.1.2
appVersion: "v10.288"
keywords:
- game
Expand Down
4 changes: 4 additions & 0 deletions charts/foundry-vtt/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ foundryvtt:
password: "password"
persistence:
enabled: false
dnsConfig:
options:
- name: ndots
value: "1"
4 changes: 3 additions & 1 deletion charts/foundry-vtt/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
dnsPolicy: "ClusterFirst"
{{- if .Values.dnsConfig }}
dnsConfig:
{{- toYaml .Values.dnsConfig | indent 6 }}
{{- toYaml .Values.dnsConfig | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-haproxy-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus-haproxy-exporter
description: A Helm chart to export the metrics from haproxy in Prometheus format.
version: 0.1.3
version: 0.1.4
appVersion: "v0.13.0"
keywords:
- haproxy-exporter
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-haproxy-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## @param rbac.pspEnabled Specifies whether a PodSecurityPolicy should be created
rbac:
create: true
pspEnabled: true
pspEnabled: false

## @section serviceAccount
## @param serviceAccount.create Specifies whether a ServiceAccount should be created
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-pve-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus-pve-exporter
description: A Helm chart to export the metrics from pve in Prometheus format.
version: 0.1.14
version: 0.1.15
appVersion: "2.2.3"
keywords:
- pve-exporter
Expand Down
2 changes: 1 addition & 1 deletion charts/prometheus-pve-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ rbac:
# Specifies whether RBAC resources should be created
create: true
# Specifies whether a PodSecurityPolicy should be created
pspEnabled: true
pspEnabled: false

serviceAccount:
# Specifies whether a ServiceAccount should be created
Expand Down
2 changes: 1 addition & 1 deletion charts/youtrack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: youtrack
description: A Helm chart to install YouTrack in your Kubernetes Cluster
version: 0.1.8
version: 0.1.9
appVersion: "2022.2"
keywords:
- youtrack
Expand Down
7 changes: 4 additions & 3 deletions hugo/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ Welcome to the Official MaHaHe Helm Repository! Here you will find various appli

The Applications we offer at the moment are listed down here. Watch this website often to discover new applications and new versions for them.

- ```Prometheus PVE [email protected]```
- ```Prometheus Haproxy [email protected]```
- ```[email protected]```
- ```Prometheus PVE [email protected]```
- ```Prometheus Haproxy [email protected]```
- ```[email protected]```
- ```[email protected]```

#### License

Expand Down

0 comments on commit b74e0d9

Please sign in to comment.