Skip to content

Commit

Permalink
Generate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Dec 1, 2024
1 parent a85673c commit cdb5b65
Show file tree
Hide file tree
Showing 33 changed files with 741 additions and 17 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
charts/**/charts
charts/**/charts
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
3 changes: 3 additions & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
charts/commento
charts/commentoplusplus
charts/horizontal-pod-autoscalers
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# set all to phony
SHELL=bash

.PHONY: *

generate:
docker run -v $$(pwd):/helm-docs jnorwood/helm-docs:v1.9.1 --document-dependency-values=true

2 changes: 2 additions & 0 deletions charts/commento/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Commento

> **:exclamation: This Helm Chart is deprecated!**
<p align="center">
<img width="200" height="200" src="https://cdn.commento.io/images/logo.svg">
</p>
Expand Down
2 changes: 2 additions & 0 deletions charts/commentoplusplus/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Commento++

> **:exclamation: This Helm Chart is deprecated!**
<p align="center">
<img width="200" height="200" src="https://helm.wyrihaximus.net/images/charts/commento.svg">
</p>
Expand Down
7 changes: 7 additions & 0 deletions charts/commons/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# Chart testing
ci/
library-ci/
# README template
*.gotmpl
1 change: 1 addition & 0 deletions charts/commons/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ version: 0.1.1
maintainers:
- name: WyriHaximus
email: [email protected]
url: https://wyrihaximus.net
11 changes: 11 additions & 0 deletions charts/commons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<img src="https://helm.wyrihaximus.net/images/charts/commons.png">
</p>

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

Opinionated helm library chart containing metadata helpers for helm application charts.

Example deployment using helpers from this chart:
Expand Down Expand Up @@ -74,3 +76,12 @@ spec:
topologyKey: "kubernetes.io/hostname"

```

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| WyriHaximus | <[email protected]> | <https://wyrihaximus.net> |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
90 changes: 90 additions & 0 deletions charts/commons/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Commons

{{ template "chart.deprecationWarning" . }}

<p align="center">
<img src="https://helm.wyrihaximus.net/images/charts/commons.png">
</p>

{{ template "chart.badgesSection" . }}

Opinionated helm library chart containing metadata helpers for helm application charts.

Example deployment using helpers from this chart:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ "{{" }} template "commons.fullname" . {{ "}}" }}
labels:
{{ "{{-" }} include "commons.labels" . | nindent 4 {{ "}}" }}
app.kubernetes.io/component: controller
spec:
selector:
matchLabels:
{{ "{{-" }} include "commons.selectorLabels" . | nindent 6 {{ "}}" }}
replicas: 1
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9696"
labels:
{{ "{{-" }} include "commons.labels" . | nindent 8 {{ "}}" }}
spec:
containers:
- name: default-backend
image: "ghcr.io/wyrihaximusnet/default-backend:random"
imagePullPolicy: Always
ports:
- name: default-backend
containerPort: 6969
protocol: TCP
- name: metrics
containerPort: 9696
protocol: TCP
livenessProbe:
failureThreshold: 6
httpGet:
path: /
port: metrics
readinessProbe:
failureThreshold: 6
httpGet:
path: /
port: metrics
startupProbe:
httpGet:
path: /
port: metrics
failureThreshold: 90
periodSeconds: 1
resources:
limits:
cpu: 75m
memory: 64Mi
requests:
cpu: 75m
memory: 64Mi
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: appRevision
operator: In
values:
- {{ "{{" }} template "commons.nameRevision" . {{ "}}" }}
topologyKey: "kubernetes.io/hostname"

```

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
7 changes: 7 additions & 0 deletions charts/cron-jobs/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# Chart testing
ci/
library-ci/
# README template
*.gotmpl
1 change: 1 addition & 0 deletions charts/cron-jobs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ kubeVersion: ">= 1.21"
maintainers:
- name: WyriHaximus
email: [email protected]
url: https://wyrihaximus.net
23 changes: 22 additions & 1 deletion charts/cron-jobs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<img src="https://helm.wyrihaximus.net/images/charts/cron-jobs.png">
</p>

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

Opinionated helm library chart for easy creation of cron jobs.

# Example
Expand Down Expand Up @@ -49,4 +51,23 @@ jobs:
* No restarts
* No concurrently
* A single container per cron job
* `cron` and `name` labels are set on each cron job with the name you give it
* `cron` and `name` labels are set on each cron job with the name you give it

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| WyriHaximus | <[email protected]> | <https://wyrihaximus.net> |

## Requirements

Kubernetes: `>= 1.21`

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| jobs | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
66 changes: 66 additions & 0 deletions charts/cron-jobs/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Cron Jobs

{{ template "chart.deprecationWarning" . }}

<p align="center">
<img src="https://helm.wyrihaximus.net/images/charts/cron-jobs.png">
</p>

{{ template "chart.badgesSection" . }}

Opinionated helm library chart for easy creation of cron jobs.

# Example

Very basic example without any customization:

```gotemplate
{{ "{{-" }} range $job := .Values.jobs {{ "}}" }}
{{ "{{-" }} include "cron-jobs.cronjob" $job {{ "-}}" }}
{{ "{{-" }} end {{ "}}" }}
```

The following values will run a cronjob that sleeps for 1 second any minute

```yaml
jobs:
- name: sleep
schedule: "* * * * *"
labels:
cronjob:
key: value
jobTemplate:
key: value
container:
command: ["sleep"]
args: ["1"]
resources:
limits:
cpu: 1m
memory: 12Mi
requests:
cpu: 1m
memory: 12Mi
image:
repository: alpine
tag: 3.12
pullPolicy: IfNotPresent
```

## Opinionated decisions

* A history of `3` failed and `3` successful jobs are kept around for log checking.
* No restarts
* No concurrently
* A single container per cron job
* `cron` and `name` labels are set on each cron job with the name you give it

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
1 change: 1 addition & 0 deletions charts/default-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ appVersion: random
maintainers:
- name: WyriHaximus
email: [email protected]
url: https://wyrihaximus.net
dependencies:
- name: commons
version: ^0.1
Expand Down
51 changes: 45 additions & 6 deletions charts/default-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<img src="https://helm.wyrihaximus.net/images/charts/default-backend.png">
</p>

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

Opinionated helm chart for [`wyrihaximusnet/default-backend`](https://github.com/wyrihaximusnet/docker-default-backend).

## Provided tags
Expand All @@ -13,11 +15,11 @@ Opinionated helm chart for [`wyrihaximusnet/default-backend`](https://github.com

## Configuration

This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's
(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal
configuration. Both [`k8s.wyrihaximus.net`](https://k8s.wyrihaximus.net/) and
[`default-backend.k8s.wyrihaximus.net`](https://default-backend.k8s.wyrihaximus.net/) are active, refresh the pages a
few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest,
This chart has very little configuration, it runs without any. But it is recommended to set the number of replica's
(until autoscaling support has been added), and optionally configure ingress hosts. Listed below is my personal
configuration. Both [`k8s.wyrihaximus.net`](https://k8s.wyrihaximus.net/) and
[`default-backend.k8s.wyrihaximus.net`](https://default-backend.k8s.wyrihaximus.net/) are active, refresh the pages a
few times. This configuration example also enables the cronjob that replaces the oldest pod, and forces the latest,
hourly retagged, Docker image to be used. It also has the horizontal pod autoscaler enabled.

```yaml
Expand All @@ -35,7 +37,7 @@ ingress:
- default-backend.k8s.wyrihaximus.net
```
###
###
## Opinionated decisions
Expand All @@ -48,3 +50,40 @@ ingress:
* Comes with a pod
* Replace oldest pod every hour to hook into the hourly random image retagging

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| WyriHaximus | <[email protected]> | <https://wyrihaximus.net> |

## Requirements

Kubernetes: `^1.23`

| Repository | Name | Version |
|------------|------|---------|
| https://helm.wyrihaximus.net/ | commons | ^0.1 |
| https://helm.wyrihaximus.net/ | cron-jobs | ^1 |
| https://helm.wyrihaximus.net/ | horizontal-pod-autoscalers | ^1 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| cron.replaceOldestPodHourly | bool | `false` | |
| hpa.enable | bool | `false` | |
| hpa.maxReplicas | int | `1024` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"ghcr.io/wyrihaximusnet/default-backend"` | |
| image.tag | string | `"random"` | |
| ingress.annotations."kubernetes.io/ingress.class" | string | `"nginx"` | |
| ingress.annotations."kubernetes.io/tls-acme" | string | `"true"` | |
| ingress.hosts | list | `[]` | |
| replicas | int | `2` | |
| resources.limits.cpu | string | `"75m"` | |
| resources.limits.memory | string | `"64Mi"` | |
| resources.requests.cpu | string | `"75m"` | |
| resources.requests.memory | string | `"64Mi"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
Loading

0 comments on commit cdb5b65

Please sign in to comment.