Compare commits

..

25 Commits

Author SHA1 Message Date
e7acff7893 chore(deps): update ghcr.io/remvze/moodist docker tag to v1.5.1 (#12)
* chore(deps): update ghcr.io/remvze/moodist docker tag to v1.5.1

* chore: Update chart metadata

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: plcnk-bot <178334506+plcnk-bot[bot]@users.noreply.github.com>
2024-08-17 12:22:41 +02:00
61d0653c14 feat(actions): Add PR labeler workflow 2024-08-17 12:15:50 +02:00
7a7a1af76e fix(renovate): Edit bot data 2024-08-17 12:05:35 +02:00
0cf760a6a0 fix(renovate): Add ignored authors 2024-08-17 11:59:44 +02:00
0f8b576241 feat(moodist): Initial release (#10) 2024-08-17 11:51:08 +02:00
36dce8cb0c feat(it-tools): Added replicas key (#9) 2024-08-16 23:03:31 +02:00
392a30a3c9 Revert "feat(doc): Update README.md"
This reverts commit 7ee7a18896.
2024-08-16 17:49:01 +02:00
7ee7a18896 feat(doc): Update README.md 2024-08-16 17:47:57 +02:00
882dc805cf feat(it-tools): Change service port to 8080 (#8)
* fix(actions): Add NET_BIND_SERVICE capability

* test(it-tools): Remove capabilities options

* feat(it-tools): Removed liveness & readiness probes

* feat(actions): Update chart testing workflow

* test(actions): Re-add probes & test security context

* feat(it-tools): Changed service port to 8080

* feat(doc): Be more specific in the changelog
2024-08-16 17:30:20 +02:00
6afaf6cf65 fix(actions): Fix testing workflow 2024-08-16 12:22:01 +02:00
4aa55b6b26 fix(actions): Fix linting workflow 2024-08-16 12:19:54 +02:00
d9f460f93a feat(actions): Add linting and testing 2024-08-16 12:17:13 +02:00
aa0dd39801 fix(doc): Change links for gh-pages 2024-08-16 01:25:47 +02:00
31bbf1ca94 feat(charts): Now using bjw-s's common library chart (#7) 2024-08-16 01:09:32 +02:00
8a84b5e13a Update README.md 2024-08-14 19:11:37 +02:00
6655b6bb97 Update README.md 2024-08-14 19:11:09 +02:00
4c3749aa12 Update release.yaml 2024-08-14 14:14:48 +02:00
60408a5fd4 feat(it-tools): Update Chart version 2024-08-14 07:17:14 +02:00
e476ff3c5b feat(doc): Update README.md 2024-08-14 01:01:50 +02:00
6877ce65df feat(doc): Update README.md 2024-08-14 00:59:48 +02:00
668781b2aa fix(doc): Fix chart link 2024-08-14 00:54:52 +02:00
65985fa488 feat(doc): Edit Chart README.md 2024-08-14 00:44:40 +02:00
afd6a5141e test(release): Test release again 2024-08-14 00:19:04 +02:00
1c16ee1558 test(release): Test ghcr release 2024-08-14 00:13:29 +02:00
26326862fc feat(release): Configure ghcr releases (#4) 2024-08-14 00:11:47 +02:00
41 changed files with 1386 additions and 558 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1 @@
* @plcnk

2
.github/cr-config.yaml vendored Normal file
View File

@ -0,0 +1,2 @@
generate-release-notes: true
skip-existing: true

4
.github/ct-install-config.yaml vendored Normal file
View File

@ -0,0 +1,4 @@
debug: true
all: true
chart-repos:
- bjw-s=https://bjw-s.github.io/helm-charts

5
.github/ct-lint-config.yaml vendored Normal file
View File

@ -0,0 +1,5 @@
debug: true
all: true
validate-maintainers: false
chart-repos:
- bjw-s=https://bjw-s.github.io/helm-charts

7
.github/labeler.yaml vendored Normal file
View File

@ -0,0 +1,7 @@
---
area/ci:
- changed-files:
- any-glob-to-any-file: ".github/**/*"
area/charts:
- changed-files:
- any-glob-to-any-file: "charts/**/*"

View File

@ -4,6 +4,12 @@
"github>plcnk/.github:default.json5",
":semanticCommitTypeAll(chore)"
],
"gitIgnoredAuthors": [
"renovate[bot]@users.noreply.github.com",
"178334506+plcnk-bot[bot]@users.noreply.github.com"
],
"regexManagers": [
{
"fileMatch": ["\\.yaml$"],
@ -16,21 +22,6 @@
{
"matchDatasources": ["helm"],
"commitMessageTopic": "{{depName}} Helm release"
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["ghcr.io/dgtlmoon/changedetection.io"],
"versioning": "loose"
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["ghcr.io/juanfont/headscale"],
"allowedVersions": "!/^0.23.0$/"
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["eqalpha/keydb"],
"versioning": "regex:^(?<compatability>.+?)_v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$"
}
]
}

27
.github/workflows/labeler.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
---
name: Label PR
on:
workflow_dispatch:
pull_request:
branches:
- master
jobs:
labeler:
name: Labeler
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Labeler
uses: actions/labeler@v5
with:
repo-token: "${{ steps.app-token.outputs.token }}"
configuration-path: .github/labeler.yaml

56
.github/workflows/lint-test.yaml vendored Normal file
View File

@ -0,0 +1,56 @@
name: Linting and Testing
on:
push:
branches: [master]
paths:
- "charts/**"
- ".github/workflows/**"
pull_request:
branches: [master]
paths:
- "charts/**"
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (lint)
run: ct lint --config .github/ct-lint-config.yaml
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v4
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.10.0
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config .github/ct-install-config.yaml

View File

@ -1,4 +1,4 @@
name: Release Charts
name: Release
on:
workflow_dispatch:
@ -8,12 +8,31 @@ on:
paths:
- charts/**
permissions:
contents: write
packages: write
pages: write
id-token: write
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
permissions:
contents: write
release-charts:
name: Release Charts
runs-on: ubuntu-latest
env:
AUTHOR_USER: plcnk-bot
AUTHOR_EMAIL: 178334506+plcnk-bot[bot]@users.noreply.github.com
steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
@ -21,10 +40,56 @@ jobs:
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
git config user.name "${{ env.AUTHOR_USER }}"
git config user.email "${{ env.AUTHOR_EMAIL }}"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
- name: Add Helm repos
run: helm repo add bjw-s https://bjw-s.github.io/helm-charts
- name: Install chart-releaser
uses: helm/chart-releaser-action@v1.5.0
with:
install_only: true
- name: Package charts
id: package_charts
run: |
changed_charts=""
for dir in charts/*; do
chart_name="$(basename "$dir")"
version="$(yq '.version' "$dir/Chart.yaml")"
if ! git rev-parse "$chart_name-${version#v}" &>/dev/null; then
echo "Packaging chart $chart_name..."
cr package --package-path=.cr-release-packages "$dir"
changed_charts+="$chart_name,"
fi
done
echo "changed_charts=${changed_charts%,}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: steps.package_charts.outputs.changed_charts != ''
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Push charts to GHCR
if: steps.package_charts.outputs.changed_charts != ''
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
echo "Pushing $pkg..."
helm push "$pkg" "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER/charts"
done
- name: Publish charts
uses: helm/chart-releaser-action@v1.5.0
if: steps.package_charts.outputs.changed_charts != ''
with:
config: .github/cr-config.yaml
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_TOKEN: ${{ steps.app-token.outputs.token }}

115
.github/workflows/renovate.yaml vendored Normal file
View File

@ -0,0 +1,115 @@
name: Renovate
on:
push:
branches:
- renovate/**
env:
COMMIT_MESSAGE: "chore: Update chart metadata"
jobs:
update-chart-metadata:
name: Update Chart Metadata
runs-on: ubuntu-latest
env:
AUTHOR_USER: plcnk-bot
AUTHOR_EMAIL: 178334506+plcnk-bot[bot]@users.noreply.github.com
steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
list-files: shell
filters: |
charts:
- charts/**
- name: Fetch PR
id: pr
uses: actions/github-script@v7
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const response = await github.rest.repos.listPullRequestsAssociatedWithCommit({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
});
const pr = response.data.shift();
core.setOutput("title", pr.title);
core.setOutput("base_ref", pr.base.ref);
core.setOutput("labels", pr.labels.map((e) => e.name).filter((e) => e));
- name: Update changelog
env:
TITLE: ${{ steps.pr.outputs.title }}
CHANGELOG_APPEND: ${{ contains(steps.pr.outputs.labels, 'changelog-append') }}
BREAKING_CHANGE: ${{ contains(steps.pr.outputs.labels, 'breaking-change') }}
run: |
set -eux
export DESCRIPTION="$(perl -pe 's/^.+?: (.)/\U$1/' <<<"$TITLE")"
if [[ "$BREAKING_CHANGE" == "true" ]]; then
DESCRIPTION="BREAKING - $DESCRIPTION"
fi
CHANGELOG="$(yq -o json '[{"kind": "changed", "description": strenv(DESCRIPTION)}]')"
UPDATE_TYPE=replace
if [[ "$CHANGELOG_APPEND" == "true" ]]; then
UPDATE_TYPE=append
fi
./hack/update-changelog.sh "$UPDATE_TYPE" "$CHANGELOG" ${{ steps.changes.outputs.charts_files }}
- name: Set type to patch
if: contains(steps.pr.outputs.labels, 'patch') || contains(steps.pr.outputs.labels, 'digest')
run: echo TYPE=patch >>$GITHUB_ENV
- name: Set type to minor
if: contains(steps.pr.outputs.labels, 'major') || contains(steps.pr.outputs.labels, 'minor')
run: echo TYPE=minor >>$GITHUB_ENV
- name: Update chart version
if: "!contains(steps.pr.outputs.labels, 'skip-version-bump')"
run: |
set -eux
./hack/update-version.sh "$TYPE" ${{ steps.changes.outputs.charts_files }}
- name: Install helm-docs
uses: gabe565/setup-helm-docs-action@v1
- name: Generate Helm docs
run: |
set -eu
./hack/gen-helm-docs.sh
- name: Check if commit exists
id: commit_exists
env:
BASE_REF: ${{ steps.pr.outputs.base_ref }}
run: |
set -eu
IFS=$'\n\t'
commits="$(git rev-list --pretty=oneline "origin/$BASE_REF..HEAD" | cut -d' ' -f2-)"
if grep -F -e "$COMMIT_MESSAGE" <<<"$commits"; then
echo 'result=true' >>$GITHUB_OUTPUT
else
echo 'result=false' >>$GITHUB_OUTPUT
fi
- name: Commit chart version
uses: stefanzweifel/git-auto-commit-action@v5
if: steps.commit_exists.outputs.result == 'false' && !contains(steps.pr.outputs.labels, 'skip-chart-meta')
with:
commit_user_name: ${{ env.AUTHOR_USER }}
commit_user_email: ${{ env.AUTHOR_EMAIL }}
commit_author: ${{ env.AUTHOR_USER }} <${{ env.AUTHOR_EMAIL }}>
commit_message: ${{ env.COMMIT_MESSAGE }}

6
.gitignore vendored
View File

@ -1 +1,5 @@
test_values/
# Test values
test_values/
# Helm resources
charts/**/charts

View File

@ -3,37 +3,29 @@
</p>
<p align="center">
<a href="https://github.com/minicloudlabs/helm-charts/blob/main/LICENSE"><img src="https://img.shields.io/github/license/minicloudlabs/helm-charts" /></a>
<a href="https://github.com/plcnk/charts/blob/master/LICENSE"><img src="https://img.shields.io/github/license/plcnk/charts" /></a>
<a href="https://artifacthub.io/packages/search?repo=plcnk"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/plcnk" /></a>
<a href="https://github.com/plcnk/charts/actions/workflows/release.yaml"><img src="https://github.com/plcnk/charts/actions/workflows/release.yaml/badge.svg" /></a>
<a href="https://github.com/plcnk/charts/actions/workflows/lint-test.yaml"><img src="https://github.com/plcnk/charts/actions/workflows/lint-test.yaml/badge.svg" /></a>
</p>
# plcnk's Helm Charts
# Charts
Charts for deploying applications on [Kubernetes](https://kubernetes.io/) using [Helm](https://helm.sh/).
A collection of [Helm](https://helm.sh) charts for [Kubernetes](https://kubernetes.io/).
All charts are based on the [bjw-s common library chart](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common).
Also available on [Artifact Hub](https://artifacthub.io/packages/search?repo=plcnk).
The code in this repository is provided as-is with no warranties.
## Usage
[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.
Once Helm is set up properly, add the repo as follows:
```console
helm repo add plcnk https://charts.plcnk.net
helm repo update
```
You can then run `helm search repo plcnk` to see the charts.
## Available charts
## Chart Overview
| Chart | Description |
| ----- | ----------- |
| [IT-Tools <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg' alt='it-tools icon' width='18px' align='right' loading='lazy'>](charts/it-tools/) | Collection of handy online tools for developers, with great UX. |
| [# it-tools <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg' alt='it-tools icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/it-tools/) | Collection of handy online tools for developers, with great UX. |
| [# moodist <img src='https://raw.githubusercontent.com/plcnk/charts/master/charts/moodist/icon.svg' alt='moodist icon' width='18px' align='right' loading='lazy'>](https://github.com/plcnk/charts/tree/master/charts/moodist/) | Ambient sounds for focus and calm. |
## License
This project is licensed under the [MIT License](https://github.com/plcnk/charts/blob/master/LICENSE).
This project is licensed under the [MIT License](./LICENSE).

View File

@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 3.3.2
digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24
generated: "2024-08-15T17:47:53.312594+02:00"

View File

@ -4,7 +4,7 @@ description: Collection of handy online tools for developers, with great UX.
home: https://github.com/plcnk/charts/tree/master/charts/it-tools
icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg
type: application
version: 1.0.2
version: 2.1.1
# renovate datasource=docker depName=ghcr.io/corentinth/it-tools
appVersion: "2024.5.13-a0bc346"
kubeVersion: ">=1.22.0-0"
@ -12,12 +12,16 @@ keywords:
- it-tools
- it
- tools
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 3.3.2
sources:
- https://github.com/CorentinTh/it-tools
annotations:
artifacthub.io/changes: |
- kind: changed
description: Changed chart metadata
artifacthub.io/changes: |-
- kind: added
description: Added replicas key
artifacthub.io/links: |-
- name: App Source
url: https://github.com/CorentinTh/it-tools

View File

@ -1,109 +1,106 @@
# it-tools
# # it-tools
Helm chart for deploying [it-tools](https://it-tools.tech/).
<img src="https://raw.githubusercontent.com/plcnk/charts/master/charts/it-tools/icon.svg" align="right" width="92" alt="it-tools logo">
it-tools is a collection of handy online tools for developers, with great UX.
![Version: 2.1.1](https://img.shields.io/badge/Version-2.1.1-informational?style=flat)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
![AppVersion: 2024.5.13-a0bc346](https://img.shields.io/badge/AppVersion-2024.5.13--a0bc346-informational?style=flat)
> [!NOTE]
> This chart is not maintained by the original author of it-tools and any problems with this chart should be submitted [here](https://github.com/plcnk/charts/issues/new).
Collection of handy online tools for developers, with great UX.
## Source code
**Homepage:** <https://github.com/plcnk/charts/tree/master/charts/it-tools>
**This chart is not maintained by the upstream project and any issues with the chart should be raised
[here](https://github.com/plcnk/charts/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name=it-tools&version=2.1.1)**
## Source Code
* <https://github.com/CorentinTh/it-tools>
## Get repo
## Requirements
Kubernetes: `>=1.22.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| <https://bjw-s.github.io/helm-charts> | common | 3.3.2 |
## Installing the Chart
To install the chart with the release name `it-tools`
### OCI (Recommended)
```console
helm install it-tools oci://ghcr.io/plcnk/charts/it-tools
```
### Traditional
```console
helm repo add plcnk https://charts.plcnk.net
helm repo update
helm install it-tools plcnk/it-tools
```
## Install chart
## Uninstalling the Chart
To uninstall the `it-tools` deployment
```console
helm install [RELEASE_NAME] plcnk/it-tools
helm uninstall it-tools
```
## Uninstall chart
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
## Configuration
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common).
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
```console
helm uninstall [RELEASE_NAME]
helm install it-tools \
--set env.TZ="America/New York" \
plcnk/it-tools
```
## Parameters
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
### Global parameters
```console
helm install it-tools plcnk/it-tools -f values.yaml
```
| Name | Description | Value |
| ------------------ | ---------------------------------------------- | ----- |
| `replicaCount` | Number of replicas for the it-tools Deployment | `1` |
| `imagePullSecrets` | Docker registry pull secrets | `[]` |
| `nameOverride` | Name override | `""` |
| `fullnameOverride` | Full name override | `""` |
| `podAnnotations` | Additional annotations for the Pod resource | `{}` |
| `podLabels` | Additional labels for the Pod resource | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |
## Custom configuration
### Image parameters
N/A
| Name | Description | Value |
| ------------------ | ------------------------------------------------------------- | ----------------------------- |
| `image.repository` | Docker image repository | `ghcr.io/corentinth/it-tools` |
| `image.pullPolicy` | Docker image pull policy | `IfNotPresent` |
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
## Values
### Service account parameters
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common)
| Name | Description | Value |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------- |
| `serviceAccount.create` | Specifies whether a service account should be created | `false` |
| `serviceAccount.automount` | Automatically mount a ServiceAccount's API credentials? | `true` |
| `serviceAccount.annotations` | Additional annotations for the ServiceAccount resource | `{}` |
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `""` |
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controllers.main.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables |
| controllers.main.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| controllers.main.containers.app.image.repository | string | `"ghcr.io/corentinth/it-tools"` | Image repository |
| controllers.main.containers.app.image.tag | string | `"2024.5.13-a0bc346"` | Image tag |
| controllers.main.containers.app.securityContext.allowPrivilegeEscalation | bool | `false` | Disable privilege escalations |
| controllers.main.containers.app.securityContext.capabilities | object | `{"drop":["ALL"]}` | Drop all capabilities |
| controllers.main.containers.app.securityContext.readOnlyRootFilesystem | bool | `true` | Mount the container's root filesystem as read-only |
| controllers.main.pod.securityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group |
| controllers.main.pod.securityContext.runAsGroup | int | `65534` | Run as `nobody` group |
| controllers.main.pod.securityContext.runAsNonRoot | bool | `true` | Run container as a non-root user |
| controllers.main.pod.securityContext.runAsUser | int | `65534` | Run as `nobody` user |
| controllers.main.replicas | int | `1` | Number of desired pods |
| controllers.main.resources | object | `{}` | Set the resource requests / limits for the container. |
| controllers.main.type | string | `"deployment"` | Controller type |
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. |
| service | object | See [values.yaml](./values.yaml) | Configure the services for the chart here. |
### Security context parameters
| Name | Description | Value |
| ------------------------------------------ | ----------------------------------------- | ---------------- |
| `securityContext.capabilities.drop` | Capabilities to drop | `["ALL"]` |
| `securityContext.readOnlyRootFilesystem` | If root filesystem should be read-only | `true` |
| `securityContext.runAsNonRoot` | If pod should be run as non-root | `true` |
| `securityContext.runAsUser` | User to run pod as | `10099` |
| `securityContext.runAsGroup` | Group to run pod as | `10099` |
| `securityContext.allowPrivilegeEscalation` | If privilege escalation should be allowed | `false` |
| `securityContext.seccompProfile.type` | seccomp profile type | `RuntimeDefault` |
### Service parameters
| Name | Description | Value |
| -------------- | ---------------------- | ----------- |
| `service.type` | Service type to create | `ClusterIP` |
| `service.port` | Service port to use | `80` |
### Ingress parameters
| Name | Description | Value |
| --------------------- | ------------------------------------------------------------------------ | ------- |
| `ingress.enabled` | Enable ingress record generation | `false` |
| `ingress.className` | IngressClass that will be be used to implement the Ingress | `""` |
| `ingress.annotations` | Additional annotations for the Ingress resource | `{}` |
| `ingress.hosts` | An array with hostname(s) to be covered with the ingress record | `[]` |
| `ingress.tls` | TLS configuration for hostname(s) to be covered with this ingress record | `[]` |
### Resources parameters
| Name | Description | Value |
| ----------- | -------------------- | ----- |
| `resources` | Kubernetes resources | `{}` |
### Autoscaling parameters
| Name | Description | Value |
| ----------------------------------------------- | ------------------------------------ | ------- |
| `autoscaling.enabled` | Enable Horizontal POD autoscaling | `false` |
| `autoscaling.minReplicas` | Minimum number of replicas | `1` |
| `autoscaling.maxReplicas` | Maximum number of replicas | `100` |
| `autoscaling.targetCPUUtilizationPercentage` | Target CPU utilization percentage | `80` |
| `autoscaling.targetMemoryUtilizationPercentage` | Target Memory utilization percentage | `80` |
---
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

View File

@ -0,0 +1,13 @@
{{- define "custom.chart.name" -}}
# {{ .Name }}
{{- end -}}
{{- define "custom.custom.configuration.header" -}}
## Custom configuration
{{- end -}}
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
N/A
{{- end -}}

View File

@ -1,62 +0,0 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "it-tools.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "it-tools.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "it-tools.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "it-tools.labels" -}}
helm.sh/chart: {{ include "it-tools.chart" . }}
{{ include "it-tools.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "it-tools.selectorLabels" -}}
app.kubernetes.io/name: {{ include "it-tools.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "it-tools.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "it-tools.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,93 @@
{{/* Append the hardcoded settings */}}
{{- define "it-tools.harcodedValues" -}}
configMaps:
nginx-conf:
enabled: true
data:
nginx.conf: |
worker_processes auto;
error_log /tmp/nginx/error.log warn;
pid /tmp/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
}
persistence:
cache:
enabled: true
type: emptyDir
advancedMounts:
main:
app:
- path: /var/cache/nginx
tmp:
enabled: true
type: emptyDir
advancedMounts:
main:
app:
- path: /tmp/nginx
nginx-conf:
enabled: true
type: configMap
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-nginx-conf
advancedMounts:
main:
app:
- path: /etc/nginx/nginx.conf
subPath: nginx.conf
controllers:
main:
containers:
app:
ports:
- containerPort: 8080
name: http
protocol: TCP
probes:
liveness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
readiness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
{{- end -}}
{{- $tmplVars := deepCopy . -}}
{{ include "bjw-s.common.loader.init" $tmplVars }}
{{- $defaultValues := include "it-tools.harcodedValues" $tmplVars | fromYaml -}}
{{- $_ := mustMerge .Values $defaultValues -}}
{{/* Render the templates */}}
{{ include "bjw-s.common.loader.init" . }}
{{ include "bjw-s.common.loader.generate" . }}

View File

@ -1,29 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
worker_processes auto;
error_log /tmp/nginx/error.log warn;
pid /tmp/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
}

View File

@ -1,82 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "it-tools.fullname" . }}
labels:
{{- include "it-tools.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "it-tools.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "it-tools.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "it-tools.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
- name: cache
mountPath: "/var/cache/nginx"
- name: tmp
mountPath: "/tmp/nginx"
- name: conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: cache
emptyDir: {}
- name: tmp
emptyDir: {}
- name: conf
configMap:
name: nginx-conf
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

View File

@ -1,32 +0,0 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "it-tools.fullname" . }}
labels:
{{- include "it-tools.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "it-tools.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@ -1,61 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "it-tools.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "it-tools.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -1,15 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "it-tools.fullname" . }}
labels:
{{- include "it-tools.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "it-tools.selectorLabels" . | nindent 4 }}

View File

@ -1,13 +0,0 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "it-tools.serviceAccountName" . }}
labels:
{{- include "it-tools.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
{{- end }}

View File

@ -1,15 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "it-tools.fullname" . }}-test-connection"
labels:
{{- include "it-tools.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "it-tools.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never

View File

@ -1,128 +1,97 @@
# Default values for it-tools.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
---
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
#
## @section Global parameters
## @param replicaCount Number of replicas for the it-tools Deployment
replicaCount: 1
controllers:
main:
# -- Controller type
type: deployment
# -- Number of desired pods
replicas: 1
containers:
app:
image:
# -- Image repository
repository: ghcr.io/corentinth/it-tools
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Image tag
tag: 2024.5.13-a0bc346
## @param imagePullSecrets Docker registry pull secrets
## @param nameOverride Name override
## @param fullnameOverride Full name override
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
# -- Environment variables
# @default -- See [values.yaml](./values.yaml)
env: {}
# TZ: UTC
## @param podAnnotations Additional annotations for the Pod resource
## @param podLabels Additional labels for the Pod resource
podAnnotations: {}
podLabels: {}
securityContext:
# -- Mount the container's root filesystem as read-only
readOnlyRootFilesystem: true
# -- Disable privilege escalations
allowPrivilegeEscalation: false
# -- Drop all capabilities
capabilities:
drop:
- ALL
## @param nodeSelector Node labels for pod assignment
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
nodeSelector: {}
pod:
securityContext:
# -- Run container as a non-root user
runAsNonRoot: true
# -- Run as `nobody` user
runAsUser: 65534
# -- Run as `nobody` group
runAsGroup: 65534
# -- Volume binds will be granted to `nobody` group
fsGroup: 65534
## @param tolerations Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []
# -- Set the resource requests / limits for the container.
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## @param affinity Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
## @section Image parameters
## @param image.repository Docker image repository
## @param image.pullPolicy Docker image pull policy
## @param image.tag Overrides the image tag whose default is the chart appVersion
image:
repository: ghcr.io/corentinth/it-tools
pullPolicy: IfNotPresent
tag: ""
## @section Service account parameters
## @param serviceAccount.create Specifies whether a service account should be created
## @param serviceAccount.automount Automatically mount a ServiceAccount's API credentials?
## @param serviceAccount.annotations Additional annotations for the ServiceAccount resource
## @param serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template
serviceAccount:
create: false
automount: true
annotations: {}
name: ""
## @section Security context parameters
## @param securityContext.capabilities.drop Capabilities to drop
## @param securityContext.readOnlyRootFilesystem If root filesystem should be read-only
## @param securityContext.runAsNonRoot If pod should be run as non-root
## @param securityContext.runAsUser User to run pod as
## @param securityContext.runAsGroup Group to run pod as
## @param securityContext.allowPrivilegeEscalation If privilege escalation should be allowed
## @param securityContext.seccompProfile.type seccomp profile type
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10099
runAsGroup: 10099
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
## @section Service parameters
## @param service.type Service type to create
## @param service.port Service port to use
# -- Configure the services for the chart here.
# @default -- See [values.yaml](./values.yaml)
service:
type: ClusterIP
port: 80
main:
controller: main
ports:
http:
port: 8080
# -- Configure persistence for the chart under this key.
# @default -- See [values.yaml](./values.yaml)
persistence:
data:
enabled: false
retain: true
# storageClass: ""
# accessMode: ReadWriteOnce
# size: 1Gi
## @section Ingress parameters
## Configure the ingress resource that allows you to access the installation
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
##
## @param ingress.enabled Enable ingress record generation
## @param ingress.className IngressClass that will be be used to implement the Ingress
## @param ingress.annotations Additional annotations for the Ingress resource
## @param ingress.hosts An array with hostname(s) to be covered with the ingress record
## @param ingress.tls TLS configuration for hostname(s) to be covered with this ingress record
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts: []
# - host: it-tools.example.local
# paths:
# - path: /
# pathType: Prefix
tls: []
# - secretName: it-tools-tls
# hosts:
# - it-tools.example.local
## @section Resources parameters
## @param resources Kubernetes resources
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## @section Autoscaling parameters
## Autoscaling parameters
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
## @param autoscaling.enabled Enable Horizontal POD autoscaling
## @param autoscaling.minReplicas Minimum number of replicas
## @param autoscaling.maxReplicas Maximum number of replicas
## @param autoscaling.targetCPUUtilizationPercentage Target CPU utilization percentage
## @param autoscaling.targetMemoryUtilizationPercentage Target Memory utilization percentage
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See [values.yaml](./values.yaml)
main:
enabled: false
# className: ""
# annotations: {}
# hosts:
# - host: &host-main "chart-example.local"
# paths:
# - path: /
# pathType: Prefix
# service:
# identifier: main
# port: http
# tls:
# - secretName: chart-example-tls
# hosts:
# - *host-main

View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 3.3.2
digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24
generated: "2024-08-17T11:26:39.224544+02:00"

31
charts/moodist/Chart.yaml Normal file
View File

@ -0,0 +1,31 @@
apiVersion: v2
name: moodist
description: Ambient sounds for focus and calm.
home: https://github.com/plcnk/charts/tree/master/charts/moodist
icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/moodist/icon.svg
type: application
version: 0.1.1
# renovate datasource=docker depName=ghcr.io/remvze/moodist
appVersion: "v1.5.1"
kubeVersion: ">=1.22.0-0"
keywords:
- ambient
- ambient-sounds
- calm
- white-noise
- focus
dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 3.3.2
sources:
- https://github.com/remvze/moodist
annotations:
artifacthub.io/changes: |-
- kind: changed
description: Update ghcr.io/remvze/moodist docker tag to v1.5.1
artifacthub.io/links: |-
- name: App Source
url: https://github.com/remvze/moodist
- name: Chart Source
url: https://github.com/plcnk/charts/tree/master/charts/moodist

106
charts/moodist/README.md Normal file
View File

@ -0,0 +1,106 @@
# # moodist
<img src="https://raw.githubusercontent.com/plcnk/charts/master/charts/moodist/icon.svg" align="right" width="92" alt="moodist logo">
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
![AppVersion: v1.5.1](https://img.shields.io/badge/AppVersion-v1.5.1-informational?style=flat)
Ambient sounds for focus and calm.
**Homepage:** <https://github.com/plcnk/charts/tree/master/charts/moodist>
**This chart is not maintained by the upstream project and any issues with the chart should be raised
[here](https://github.com/plcnk/charts/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name=moodist&version=0.1.1)**
## Source Code
* <https://github.com/remvze/moodist>
## Requirements
Kubernetes: `>=1.22.0-0`
## Dependencies
| Repository | Name | Version |
|------------|------|---------|
| <https://bjw-s.github.io/helm-charts> | common | 3.3.2 |
## Installing the Chart
To install the chart with the release name `moodist`
### OCI (Recommended)
```console
helm install moodist oci://ghcr.io/plcnk/charts/moodist
```
### Traditional
```console
helm repo add plcnk https://charts.plcnk.net
helm repo update
helm install moodist plcnk/moodist
```
## Uninstalling the Chart
To uninstall the `moodist` deployment
```console
helm uninstall moodist
```
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
## Configuration
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common).
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
```console
helm install moodist \
--set env.TZ="America/New York" \
plcnk/moodist
```
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
```console
helm install moodist plcnk/moodist -f values.yaml
```
## Custom configuration
N/A
## Values
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common)
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controllers.main.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables |
| controllers.main.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| controllers.main.containers.app.image.repository | string | `"ghcr.io/remvze/moodist"` | Image repository |
| controllers.main.containers.app.image.tag | string | `"v1.5.1"` | Image tag |
| controllers.main.containers.app.securityContext.allowPrivilegeEscalation | bool | `false` | Disable privilege escalations |
| controllers.main.containers.app.securityContext.capabilities | object | `{"drop":["ALL"]}` | Drop all capabilities |
| controllers.main.containers.app.securityContext.readOnlyRootFilesystem | bool | `true` | Mount the container's root filesystem as read-only |
| controllers.main.pod.securityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group |
| controllers.main.pod.securityContext.runAsGroup | int | `65534` | Run as `nobody` group |
| controllers.main.pod.securityContext.runAsNonRoot | bool | `true` | Run container as a non-root user |
| controllers.main.pod.securityContext.runAsUser | int | `65534` | Run as `nobody` user |
| controllers.main.replicas | int | `1` | Number of desired pods |
| controllers.main.resources | object | `{}` | Set the resource requests / limits for the container. |
| controllers.main.type | string | `"deployment"` | Controller type |
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. |
| service | object | See [values.yaml](./values.yaml) | Configure the services for the chart here. |
---
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

View File

@ -0,0 +1,13 @@
{{- define "custom.chart.name" -}}
# {{ .Name }}
{{- end -}}
{{- define "custom.custom.configuration.header" -}}
## Custom configuration
{{- end -}}
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
N/A
{{- end -}}

11
charts/moodist/icon.svg Normal file
View File

@ -0,0 +1,11 @@
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M100 150C127.614 150 150 127.614 150 100C150 72.3858 127.614 50 100 50C72.3858 50 50 72.3858 50 100C50 127.614 72.3858 150 100 150ZM100 125C113.807 125 125 113.807 125 100C125 86.1929 113.807 75 100 75C86.1929 75 75 86.1929 75 100C75 113.807 86.1929 125 100 125Z" fill="#FAFAFA"/>
<path d="M50 50C22.3858 50 2.00172e-06 72.3857 7.94663e-07 100C-4.12393e-07 127.614 22.3858 150 50 150V125C36.1929 125 25 113.807 25 100C25 86.1929 36.1929 75 50 75V50Z" fill="#D4D4D8"/>
<path d="M150 50C150 22.3858 127.614 2.41411e-06 100 0C72.3858 -2.41411e-06 50 22.3858 50 50L75 50C75 36.1929 86.1929 25 100 25C113.807 25 125 36.1929 125 50H150Z" fill="#D4D4D8"/>
<path d="M150 150C177.614 150 200 127.614 200 100C200 72.3858 177.614 50 150 50V75C163.807 75 175 86.1929 175 100C175 113.807 163.807 125 150 125V150Z" fill="#D4D4D8"/>
<path d="M50 150C50 177.614 72.3857 200 100 200C127.614 200 150 177.614 150 150H125C125 163.807 113.807 175 100 175C86.1929 175 75 163.807 75 150H50Z" fill="#D4D4D8"/>
<path d="M25 50C25 36.1929 36.1929 25 50 25V1.39091e-06C22.3858 1.83851e-07 2.00172e-06 22.3857 7.94663e-07 50H25Z" fill="#A1A1AA"/>
<path d="M150 25C163.807 25 175 36.1929 175 50H200C200 22.3858 177.614 3.24858e-06 150 8.34465e-07L150 25Z" fill="#A1A1AA"/>
<path d="M175 150C175 163.807 163.807 175 150 175V200C177.614 200 200 177.614 200 150H175Z" fill="#A1A1AA"/>
<path d="M50 175C36.1929 175 25 163.807 25 150H0C0 177.614 22.3857 200 50 200V175Z" fill="#A1A1AA"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,104 @@
{{/* Append the hardcoded settings */}}
{{- define "moodist.harcodedValues" -}}
configMaps:
nginx-conf:
enabled: true
data:
nginx.conf: |
worker_processes 1;
error_log /tmp/nginx/error.log warn;
pid /tmp/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
include /etc/nginx/mime.types;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
internal;
}
location / {
try_files $uri $uri/index.html =404;
}
}
}
persistence:
cache:
enabled: true
type: emptyDir
advancedMounts:
main:
app:
- path: /var/cache/nginx
tmp:
enabled: true
type: emptyDir
advancedMounts:
main:
app:
- path: /tmp/nginx
nginx-conf:
enabled: true
type: configMap
name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-nginx-conf
advancedMounts:
main:
app:
- path: /etc/nginx/nginx.conf
subPath: nginx.conf
controllers:
main:
containers:
app:
ports:
- containerPort: 8080
name: http
protocol: TCP
probes:
liveness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
readiness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: http
periodSeconds: 30
timeoutSeconds: 30
{{- end -}}
{{- $tmplVars := deepCopy . -}}
{{ include "bjw-s.common.loader.init" $tmplVars }}
{{- $defaultValues := include "moodist.harcodedValues" $tmplVars | fromYaml -}}
{{- $_ := mustMerge .Values $defaultValues -}}
{{/* Render the templates */}}
{{ include "bjw-s.common.loader.init" . }}
{{ include "bjw-s.common.loader.generate" . }}

View File

@ -0,0 +1,97 @@
---
#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
#
controllers:
main:
# -- Controller type
type: deployment
# -- Number of desired pods
replicas: 1
containers:
app:
image:
# -- Image repository
repository: ghcr.io/remvze/moodist
# -- Image pull policy
pullPolicy: IfNotPresent
# -- Image tag
tag: v1.5.1
# -- Environment variables
# @default -- See [values.yaml](./values.yaml)
env: {}
# TZ: UTC
securityContext:
# -- Mount the container's root filesystem as read-only
readOnlyRootFilesystem: true
# -- Disable privilege escalations
allowPrivilegeEscalation: false
# -- Drop all capabilities
capabilities:
drop:
- ALL
pod:
securityContext:
# -- Run container as a non-root user
runAsNonRoot: true
# -- Run as `nobody` user
runAsUser: 65534
# -- Run as `nobody` group
runAsGroup: 65534
# -- Volume binds will be granted to `nobody` group
fsGroup: 65534
# -- Set the resource requests / limits for the container.
resources: {}
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# -- Configure the services for the chart here.
# @default -- See [values.yaml](./values.yaml)
service:
main:
controller: main
ports:
http:
port: 8080
# -- Configure persistence for the chart under this key.
# @default -- See [values.yaml](./values.yaml)
persistence:
data:
enabled: false
retain: true
# storageClass: ""
# accessMode: ReadWriteOnce
# size: 1Gi
ingress:
# -- Enable and configure ingress settings for the chart under this key.
# @default -- See [values.yaml](./values.yaml)
main:
enabled: false
# className: ""
# annotations: {}
# hosts:
# - host: &host-main "chart-example.local"
# paths:
# - path: /
# pathType: Prefix
# service:
# identifier: main
# port: http
# tls:
# - secretName: chart-example-tls
# hosts:
# - *host-main

39
hack/gen-chart-summary.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
# require yq
command -v yq >/dev/null 2>&1 || {
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
exit 1
}
# Absolute path of repository
repository="$(git rev-parse --show-toplevel)"
charts_folder="$repository/charts"
charts_summary_file="$repository/README.md"
charts_header='## Chart Overview'
# Gather all charts
stable_charts="$(find "$charts_folder" -name "Chart.yaml" | sort)"
sed -i '' '/^'"$charts_header"'$/,$d' "$charts_summary_file"
{
echo "$charts_header"
echo
echo "| Chart | Description |"
echo "| ----- | ----------- |"
for chart_yaml in ${stable_charts[@]}; do
if ! git ls-files --error-unmatch "$chart_yaml" &>/dev/null; then continue; fi
IFS=$'\t' read -r chart_name chart_description chart_icon < <(yq eval -o=tsv '[.name, .description, .icon // ""]' "$chart_yaml")
if [[ -n "$chart_icon" ]]; then
width=18
if [[ "$chart_name" == mnemonic-ninja ]]; then
width=12
fi
chart_icon="<img src='$chart_icon' alt='$chart_name icon' width='${width}px' align='right' loading='lazy'>"
fi
pretty_name="$(head -n1 "$(dirname "$chart_yaml")/README.md" | sed 's/^# //')"
echo "| [$pretty_name $chart_icon](https://github.com/plcnk/charts/tree/master/charts/$chart_name/) | $chart_description |"
done
} >> "$charts_summary_file"

59
hack/gen-helm-docs.sh Executable file
View File

@ -0,0 +1,59 @@
#!/usr/bin/env bash
set -euo pipefail
# Generate helm-docs for Helm charts
# Usage ./gen-helm-docs.sh [chart]
# require helm-docs
command -v helm-docs >/dev/null 2>&1 || {
echo >&2 'helm-docs (https://github.com/norwoodj/helm-docs) is not installed. Aborting.'
exit 1
}
# require yq
command -v yq >/dev/null 2>&1 || {
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
exit 1
}
# Absolute path of repository
repository="$(git rev-parse --show-toplevel)"
charts_folder="$repository/charts"
# Templates to copy into each chart directory
template_dir="$repository/hack/templates"
readme_config_template="$template_dir/README_CONFIG.md.gotmpl"
icon_template=$(<"$template_dir/icon.gotmpl")
# Gather all charts using the common library, excluding common-test
charts="$(find "$charts_folder" -name Chart.yaml)"
# Allow for a specific chart to be passed in as a argument
if [ $# -ge 1 ] && [ -n "$1" ]; then
root="$(find "$charts_folder" -name "$1")"
charts="$root/Chart.yaml"
if [ ! -f "$charts" ]; then
echo "Chart $1 does not exist."
exit 1
fi
else
root="$charts_folder"
fi
for chart in $charts; do (
chart_directory="$(dirname "$chart")"
icon="$(yq eval '.icon // ""' "$chart" 2>/dev/null)"
# Copy CONFIG template to each Chart directory, do not overwrite if exists
cp -n "$readme_config_template" "$chart_directory" || true
# Run helm-docs for charts
helm-docs \
--log-level=warning \
--template-files="$template_dir/README.md.gotmpl" \
--template-files=<(echo "${icon_template/\$ICON/$icon}") \
--template-files="$(basename "$readme_config_template")" \
--badge-style=flat \
--chart-search-root="$root" \
--chart-to-generate="$chart_directory"
) done

View File

@ -0,0 +1,170 @@
{{- define "custom.repository.organization" -}}
plcnk
{{- end -}}
{{- define "custom.repository.url" -}}
https://github.com/plcnk/charts
{{- end -}}
{{- define "custom.helm.url" -}}
https://charts.plcnk.net
{{- end -}}
{{- define "custom.helm.path" -}}
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
{{- end -}}
{{- define "custom.helm.oci_url" -}}
oci://ghcr.io/plcnk/charts
{{- end -}}
{{- define "custom.notes" -}}
**This chart is not maintained by the upstream project and any issues with the chart should be raised
[here]({{ template "custom.repository.url" . }}/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name={{ template "chart.name" . }}&version={{ template "chart.version" . }})**
{{- end -}}
{{- define "custom.requirements" -}}
## Requirements
{{ template "chart.kubeVersionLine" . }}
{{- end -}}
{{- define "custom.dependencies" -}}
## Dependencies
{{ if gt (len .Dependencies) 0 }}
| Repository | Name | Version |
|------------|------|---------|
{{- range .Dependencies }}
{{- if .Alias }}
| <{{ .Repository }}> | {{ .Alias }}({{ .Name }}) | {{ .Version }} |
{{- else }}
| <{{ .Repository }}> | {{ .Name }} | {{ .Version }} |
{{- end }}
{{- end }}
{{ else }}
This chart has no dependencies.
{{- end }}
{{- end -}}
{{- define "custom.install" -}}
## Installing the Chart
To install the chart with the release name `{{ template "chart.name" . }}`
### OCI (Recommended)
```console
helm install {{ template "chart.name" . }} {{ template "custom.helm.oci_url" . }}/{{ template "chart.name" . }}
```
### Traditional
```console
helm repo add {{ template "custom.repository.organization" . }} {{ template "custom.helm.url" . }}
helm repo update
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }}
```
{{- end -}}
{{- define "custom.uninstall" -}}
## Uninstalling the Chart
To uninstall the `{{ template "chart.name" . }}` deployment
```console
helm uninstall {{ template "chart.name" . }}
```
The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
{{- end -}}
{{- define "custom.configuration.header" -}}
## Configuration
{{- end -}}
{{- define "custom.bjwsRef" -}}
{{- $ref := "" -}}
{{- range .Dependencies -}}
{{- if and (eq .Repository "https://bjw-s.github.io/helm-charts") (eq .Name "common") (semverCompare "^1.x" .Version) -}}
{{- $ref = "a081de5" -}}
{{- end -}}
{{- end -}}
{{- default "main" $ref -}}
{{- end -}}
{{- define "custom.configuration.readValues" -}}
Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common).
{{- end -}}
{{- define "custom.configuration.example.set" -}}
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
```console
helm install {{ template "chart.name" . }} \
--set env.TZ="America/New York" \
{{ template "custom.helm.path" . }}
```
{{- end -}}
{{- define "custom.configuration.example.file" -}}
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
```console
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -f values.yaml
```
{{- end -}}
{{- define "custom.valuesSection" -}}
## Values
**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common)
{{ template "chart.valuesTable" . }}
{{- end -}}
{{- define "custom.helm-docs.versionFooter" -}}
---
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
{{- end -}}
# {{ template "custom.chart.name" . }}
{{ template "custom.chart.icon" . }}
{{ template "chart.versionBadge" . }}
{{ template "chart.typeBadge" . }}
{{ template "chart.appVersionBadge" . }}
{{ template "chart.description" . }}
{{ template "chart.homepageLine" . }}
{{ template "custom.notes" . }}
{{ template "chart.sourcesSection" . }}
{{ template "custom.requirements" . }}
{{ template "custom.dependencies" . }}
{{ template "custom.install" . }}
{{ template "custom.uninstall" . }}
{{ template "custom.configuration.header" . }}
{{ template "custom.configuration.readValues" . }}
{{ template "custom.configuration.example.set" . }}
{{ template "custom.configuration.example.file" . }}
{{ template "custom.custom.configuration" . }}
{{ template "custom.valuesSection" . }}
{{ template "custom.helm-docs.versionFooter" . }}
{{ "" }}

View File

@ -0,0 +1,13 @@
{{- define "custom.chart.name" -}}
# {{ .Name }}
{{- end -}}
{{- define "custom.custom.configuration.header" -}}
## Custom configuration
{{- end -}}
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
N/A
{{- end -}}

View File

@ -0,0 +1,5 @@
{{- define "custom.chart.icon" -}}
{{- with "$ICON" -}}
<img src="{{ . }}" align="right" width="92" alt="{{ template "chart.name" $ }} logo">
{{- end -}}
{{- end -}}

56
hack/update-changelog.sh Executable file
View File

@ -0,0 +1,56 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# require yq
command -v yq >/dev/null 2>&1 || {
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
exit 1
}
if [ "$#" -lt 2 ]; then
echo 'Usage: {append | replace} changelog [chart...]'
exit
fi
update_type="$1"
shift
changelog="$(yq -P <<<"$1")"
export changelog
shift
CHARTS=()
if [ "$#" -gt 0 ]; then
# Get changed dirs from params
for file in "$@"; do
CHARTS+=( "$(dirname "$file")" )
done
else
# Get changed dirs from uncommitted changes
for file in $(git status --porcelain charts | grep '^M' | cut -c4-); do
CHARTS+=( "$(dirname "$file")" )
done
fi
CHARTS=( $(sort -u <<<"${CHARTS[*]}") )
case "$update_type" in
append)
expression='.annotations."artifacthub.io/changes" |= (@yamld + (strenv(changelog) | @yamld) | @yaml | trim)'
;;
replace)
expression='.annotations."artifacthub.io/changes" = (env(changelog) | @yaml | trim)'
;;
*)
echo "Invalid update type: $update_type" >&2
exit 1
;;
esac
for chart in "${CHARTS[@]}"; do (
meta_file="$chart/Chart.yaml"
if [ ! -f "$meta_file" ]; then echo >&2 "Invalid file: $meta_file"; exit; fi
yq --inplace "$expression" "$meta_file"
echo "Updated $(basename "$chart") changelog"
) done

53
hack/update-version.sh Executable file
View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# require yq
command -v yq >/dev/null 2>&1 || {
echo >&2 'yq (https://github.com/mikefarah/yq) is not installed. Aborting.'
exit 1
}
function _print_usage() {
echo 'Usage: {major|minor|patch} [chart...]'
exit "${1:-0}"
}
if [ "$#" -eq 0 ]; then
_print_usage
fi
UPDATE_TYPE="$(tr '[:upper:]' '[:lower:]' <<<"$1")"
shift
case "$UPDATE_TYPE" in
major) SCRIPT='[(.0 | @yamld | . + 1), 0, 0]' ;;
minor) SCRIPT='[.0, (.1 | @yamld | . + 1), 0]' ;;
patch) SCRIPT='[.0, .1, (.2 | @yamld | . + 1)]' ;;
*) echo >&2 "Invalid update type: $UPDATE_TYPE"; _print_usage 1 ;;
esac
echo "Performing $UPDATE_TYPE version bump"
CHARTS=()
if [ "$#" -gt 0 ]; then
# Get changed dirs from params
for file in "$@"; do
CHARTS+=( "$(dirname "$file")" )
done
else
# Get changed dirs from uncommitted changes
for file in $(git status --porcelain charts | grep '^M' | cut -c4-); do
CHARTS+=( "$(dirname "$file")" )
done
fi
CHARTS=( $(sort -u <<<"${CHARTS[*]}") )
for chart in "${CHARTS[@]}"; do (
meta_file="$chart/Chart.yaml"
if [ ! -f "$meta_file" ]; then echo >&2 "Invalid file: $meta_file"; exit; fi
current="$(yq '.version' "$meta_file")"
yq -i '.version |= (split(".") | '"$SCRIPT"' | join("."))' "$meta_file"
new="$(yq '.version' "$meta_file")"
echo "Updated $(basename "$chart") from v$current to v$new"
) done