Skip to content

Commit

Permalink
patch: added template docs and updated kube-virt
Browse files Browse the repository at this point in the history
  • Loading branch information
drew-viles committed Apr 1, 2024
1 parent 5a1b554 commit 499b3f1
Show file tree
Hide file tree
Showing 17 changed files with 318 additions and 96 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
3 changes: 2 additions & 1 deletion .github/helm-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
set -euxo pipefail

# renovate: datasource=github-releases depName=norwoodj/helm-docs
HELM_DOCS_VERSION=1.11.3
HELM_DOCS_VERSION=1.12.0

# install helm-docs
curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz
tar -xf /tmp/helm-docs.tar.gz helm-docs

# validate docs
chmod +x ./helm-docs
./helm-docs
echo "If this fails, you need to run `helm-docs .`. See https://github.com/norwoodj/helm-docs"
git diff --exit-code
4 changes: 2 additions & 2 deletions .github/kubeconform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ set -euxo pipefail
# renovate: datasource=github-releases depName=yannh/kubeconform
KUBECONFORM_VERSION=0.6.4

#CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- charts | cut -d '/' -f 2 | uniq)"
#CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/main -- apps | cut -d '/' -f 2 | uniq)"
CHART_DIRS=$(ls charts)

# install kubeconform
curl --silent --show-error --fail --location --output /tmp/kubeconform.tar.gz "https://github.com/yannh/kubeconform/releases/download/v${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz"
tar -xf /tmp/kubeconform.tar.gz kubeconform

# validate charts
# validate apps
for CHART_DIR in ${CHART_DIRS}; do
helm template --values charts/"${CHART_DIR}"/ci/test-values.yaml charts/"${CHART_DIR}" | ./kubeconform --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}"
done
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the ref you want to point at
hooks:
- id: trailing-whitespace
- repo: https://github.com/norwoodj/helm-docs.git
rev: v1.13.1
hooks:
- id: helm-docs
args:
- --chart-search-root=charts
- repo: local
hooks:
- id: chart-lint
name: Run Chart Lint Test
language: system
entry: 'ct lint --all --validate-maintainers=false --config .github/ct.yaml'
- repo: https://github.com/drewbernetes/pre-commits.git
rev: v0.1.0
hooks:
- id: trivy
args:
- fs
- .
71 changes: 31 additions & 40 deletions charts/e2e-basic/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# End-2-End-Testing



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

# Generic End-2-End testing
![Version: 0.0.6](https://img.shields.io/badge/Version-0.0.6-informational?style=flat-square) ![AppVersion: 0.0.6](https://img.shields.io/badge/AppVersion-0.0.6-informational?style=flat-square) # Generic End-2-End testing

This setup will deploy a multi-replica deployment with a
web frontend and a database backend.
Expand Down Expand Up @@ -60,39 +55,35 @@ The PDB ensures a pod is always online to ensure no downtime during upgrades
## Automated Testing:
Check out [E2E Tester](https://github.com/drew-viles/k8s-e2e-tester)
for an automated tester which will fire tests against this chart.




## Installation

### Add Helm repository

```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Install chart

Using config from a file:

```bash
helm upgrade --install End-2-End-Testing . --values ./values.yaml
```

## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
yamllint charts/End-2-End-Testing/values.yaml --config-file .github/ct.yaml
helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.



### Add Helm repository

```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Install chart

Using config from a file:

```bash
helm upgrade --install End-2-End-Testing . --values ./values.yaml
```

## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
ct lint charts/End-2-End-Testing/values.yaml --validate-maintainers=false --config .github/ct.yaml
helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.

## Values

| Key | Type | Default | Description |
Expand All @@ -117,4 +108,4 @@ The following table lists the configurable parameters of the chart and the defau
| postgres.statefulset.env.postgresUser | string | `"e2e-user"` | |
| postgres.statefulset.persistentData.className | string | `"fast-disks"` | |
| postgres.statefulset.persistentData.enabled | bool | `true` | |
| postgres.statefulset.persistentData.size | string | `"10Gi"` | |
| postgres.statefulset.persistentData.size | string | `"10Gi"` | |
19 changes: 7 additions & 12 deletions charts/e2e-basic/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

## Installation
{{- template "chart.header" . }}
{{- template "chart.deprecationWarning" . }}
{{- template "chart.versionBadge" . }}{{- template "chart.typeBadge" . }}{{- template "chart.appVersionBadge" . }}
{{- template "chart.description" . }}
{{- template "chart.homepageLine" . }}

### Add Helm repository

Expand All @@ -27,7 +22,7 @@ helm upgrade --install {{ template "chart.name" . }} . --values ./values.yaml
## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
yamllint charts/{{ template "chart.name" . }}/values.yaml --config-file .github/ct.yaml
ct lint charts/{{ template "chart.name" . }}/values.yaml --validate-maintainers=false --config .github/ct.yaml

helm-docs .
```
Expand All @@ -36,4 +31,4 @@ helm-docs .

The following table lists the configurable parameters of the chart and the default values.

{{ template "chart.valuesSection" . }}
{{ template "chart.valuesSection" . }}
33 changes: 24 additions & 9 deletions charts/jellyfin/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# jellyfin
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.18.3](https://img.shields.io/badge/AppVersion-10.18.3-informational?style=flat-square) A Helm chart for Kubernetes

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.18.3](https://img.shields.io/badge/AppVersion-10.18.3-informational?style=flat-square)
### Add Helm repository

A Helm chart for Kubernetes
```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Maintainers
## Install chart

| Name | Email | Url |
| ---- | ------ | --- |
| Drew | <[email protected]> | |
Using config from a file:

```bash
helm upgrade --install jellyfin . --values ./values.yaml
```

## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
ct lint charts/jellyfin/values.yaml --validate-maintainers=false --config .github/ct.yaml
helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.

## Values

Expand Down Expand Up @@ -50,6 +68,3 @@ A Helm chart for Kubernetes
| serviceAccount.name | string | `""` | |
| storageClassName | string | `""` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
34 changes: 34 additions & 0 deletions charts/jellyfin/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- template "chart.header" . }}
{{- template "chart.deprecationWarning" . }}
{{- template "chart.versionBadge" . }}{{- template "chart.typeBadge" . }}{{- template "chart.appVersionBadge" . }}
{{- template "chart.description" . }}
{{- template "chart.homepageLine" . }}

### Add Helm repository

```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Install chart

Using config from a file:

```bash
helm upgrade --install {{ template "chart.name" . }} . --values ./values.yaml
```

## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
ct lint charts/{{ template "chart.name" . }}/values.yaml --validate-maintainers=false --config .github/ct.yaml

helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.

{{ template "chart.valuesSection" . }}
4 changes: 2 additions & 2 deletions charts/kube-virt/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: virt-operator
type: application
version: 0.1.0
appVersion: "1.1.0"
version: 0.1.1
appVersion: "1.2.0"
description: |
# Virt Operator for Kube Virt
Expand Down
39 changes: 25 additions & 14 deletions charts/kube-virt/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# virt-operator

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

# Virt Operator for Kube Virt
![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: 1.2.0](https://img.shields.io/badge/AppVersion-1.2.0-informational?style=flat-square) # Virt Operator for Kube Virt

KubeVirt technology addresses the needs of development teams that have adopted or want to adopt Kubernetes but
possess existing Virtual Machine-based workloads that cannot be easily containerized. More specifically,
Expand All @@ -13,15 +10,32 @@ Benefits are broad and significant. Teams with a reliance on existing virtual ma
to rapidly containerize applications. With virtualized workloads placed directly in development workflows,
teams can decompose them over time while still leveraging remaining virtualized components as is comfortably desired.

## Maintainers
### Add Helm repository

```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Install chart

| Name | Email | Url |
| ---- | ------ | --- |
| Drew | <[email protected]> | |
Using config from a file:

## Source Code
```bash
helm upgrade --install virt-operator . --values ./values.yaml
```

* <https://drew-viles.github.io/helm-charts/virt-operator>
## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
ct lint charts/virt-operator/values.yaml --validate-maintainers=false --config .github/ct.yaml
helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.

## Values

Expand All @@ -36,9 +50,6 @@ teams can decompose them over time while still leveraging remaining virtualized
| image.repository | string | `"quay.io/kubevirt/virt-operator"` | |
| image.tag | string | `""` | |
| kubevirt.useSoftwareEmulation | bool | `false` | |
| kubevirt.version | string | `"1.1.0"` | |
| kubevirt.version | string | `"1.2.0"` | |
| nameOverride | string | `""` | |
| replicaCount | int | `2` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3)
34 changes: 34 additions & 0 deletions charts/kube-virt/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- template "chart.header" . }}
{{- template "chart.deprecationWarning" . }}
{{- template "chart.versionBadge" . }}{{- template "chart.typeBadge" . }}{{- template "chart.appVersionBadge" . }}
{{- template "chart.description" . }}
{{- template "chart.homepageLine" . }}

### Add Helm repository

```shell
helm repo add drew-viles https://drew-viles.github.io/helm-charts
helm repo update
```

## Install chart

Using config from a file:

```bash
helm upgrade --install {{ template "chart.name" . }} . --values ./values.yaml
```

## Updating the Chart
Make sure you've run and resolved any issues using the following as failures of these will cause the pipeline/actions to fail.
```
ct lint charts/{{ template "chart.name" . }}/values.yaml --validate-maintainers=false --config .github/ct.yaml

helm-docs .
```

## Configuration

The following table lists the configurable parameters of the chart and the default values.

{{ template "chart.valuesSection" . }}
Loading

0 comments on commit 499b3f1

Please sign in to comment.