Skip to content

Commit

Permalink
Added base automated readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamingRaven committed Oct 3, 2024
1 parent 066874d commit 64c4983
Show file tree
Hide file tree
Showing 23 changed files with 1,570 additions and 245 deletions.
30 changes: 16 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.12.0
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `example-charts` directory
- --chart-search-root=charts

# The `./` makes it relative to the chart-search-root set above
- --template-files=./_templates.gotmpl

# Repeating the flag adds this to the list, now [./_templates.gotmpl, README.md.gotmpl]
# A base filename makes it relative to each chart directory found
- --template-files=README.md.gotmpl
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.6.0
hooks:
- id: trailing-whitespace
#- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: "https://github.com/norwoodj/helm-docs"
rev: "v1.14.2"
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `charts` directory
- --chart-search-root=charts
26 changes: 26 additions & 0 deletions charts/backupd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# backupd

This chart will provision volsync backupd and restore manifests.
This is to centralize the otherwise repeated backupd and restore manifests, from being ludicrously repetitive.
This chart aims to have reasonable defaults to reduce the amount of customization required.
This chart does not provision the volsync CRDs, this is left to the user, who must install the volsync operator and CRDs.
This chart also does not provision the restic secrets, which necessarily must be generated by the end user.

These manifests will automatically restore from a backupd on volume creation. This means that when a volume is deleted the contents will be restored from the backupd.
This chart makes use of volsyncs volume populator, which sources new volumes from a backupd on volume creation to restore from backupd.

## Changelog

### 0.7.0

This minor patch introduced backwards compatible restore changes. This included being able to select the previous integer, and asOf date so users can select which backup to restore.

No changes are necessary to the values.yaml but if you would like to use the new restore options you need to add `.restore.asOf` or `.restore.previous`. Note this are not populated by the base chart and they should be used mutually exclusively.

```yaml
restore:
...
# define which backup to restore
asOf: "" # string e.g: "2022-08-10T20:01:03-04:00"
previous: # int e.g: 2
```
45 changes: 25 additions & 20 deletions charts/backupd/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# backupd

This chart will provision volsync backupd and restore manifests.
This is to centralize the otherwise repeated backupd and restore manifests, from being ludicrously repetitive.
This chart aims to have reasonable defaults to reduce the amount of customization required.
This chart does not provision the volsync CRDs, this is left to the user, who must install the volsync operator and CRDs.
This chart also does not provision the restic secrets, which necessarily must be generated by the end user.
![Version: 0.7.0](https://img.shields.io/badge/Version-0.7.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)

These manifests will automatically restore from a backupd on volume creation. This means that when a volume is deleted the contents will be restored from the backupd.
This chart makes use of volsyncs volume populator, which sources new volumes from a backupd on volume creation to restore from backupd.
Corvid approved backupd manifests

## Changelog
## Values

### 0.7.0
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| backup.copyMethod | string | `"Snapshot"` | |
| backup.enabled | bool | `false` | |
| backup.pruneIntervalDays | int | `1` | |
| backup.retain.daily | int | `4` | |
| backup.retain.hourly | int | `5` | |
| backup.retain.monthly | int | `2` | |
| backup.retain.weekly | int | `3` | |
| backup.retain.yearly | int | `1` | |
| backup.schedule | string | `"0 * * * 1"` | |
| backup.trigger | object | `{}` | |
| existingPVC | string | `""` | |
| existingSecret | string | `""` | |
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.generate | bool | `true` | |
| persistence.size | string | `"8Gi"` | |
| restore.asOf | string | `""` | |
| restore.enabled | bool | `false` | |
| restore.previous | string | `nil` | |
| restore.schedule | string | `"1 * * * 1"` | |
| restore.trigger | string | `nil` | |

This minor patch introduced backwards compatible restore changes. This included being able to select the previous integer, and asOf date so users can select which backup to restore.

No changes are necessary to the values.yaml but if you would like to use the new restore options you need to add `.restore.asOf` or `.restore.previous`. Note this are not populated by the base chart and they should be used mutually exclusively.

```yaml
restore:
...
# define which backup to restore
asOf: "" # string e.g: "2022-08-10T20:01:03-04:00"
previous: # int e.g: 2
```
78 changes: 78 additions & 0 deletions charts/corvid-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# corvid-test

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

A Helm chart for Kubernetes

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| file://../corvid | corvid | 0.8.0 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| args | string | `nil` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| command | string | `nil` | |
| dnsConfig | object | `{}` | |
| dnsPolicy | string | `""` | |
| envFrom | string | `nil` | |
| env[0].name | string | `"corvid-test_EXAMPLE_VARIABLE"` | |
| env[0].value | string | `"false"` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.registry | string | `"docker.io"` | |
| image.repository | string | `"corvid-test/corvid-test"` | |
| image.tag | string | `""` | |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"corvid-test.org.example"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| initContainers | list | `[]` | |
| livenessProbe.httpGet.path | string | `"/"` | |
| livenessProbe.httpGet.port | string | `"http"` | |
| nameOverride | string | `""` | |
| netpol.enabled | bool | `true` | |
| nodeSelector | object | `{}` | |
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.enabled | bool | `false` | |
| persistence.existingClaim | string | `""` | |
| persistence.size | string | `"8Gi"` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| ports[0].containerPort | int | `8080` | |
| ports[0].name | string | `"http"` | |
| ports[0].protocol | string | `"TCP"` | |
| ports[0].servicePort | int | `80` | |
| readinessProbe.httpGet.path | string | `"/"` | |
| readinessProbe.httpGet.port | string | `"http"` | |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| restartPolicy | string | `"Always"` | |
| runtimeClassName | string | `nil` | |
| schedule | string | `"@midnight"` | |
| secrets | list | `[]` | |
| securityContext | object | `{}` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automount | bool | `true` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| startupProbe.httpGet.path | string | `"/"` | |
| startupProbe.httpGet.port | string | `"http"` | |
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |

88 changes: 88 additions & 0 deletions charts/corvid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Corvid

## Changelog

### 0.8.0

This release adds dnsPolicy and dnsConfig to the podSpec template.
This is backwards compatible since this will be ignored if the values do not exist.
To use this new template you can do something akin to the following as per your needs:

```yaml
dnsPolicy: "None"
dnsConfig:
nameservers:
- 1.1.1.1
options:
- name: ndots
value: "1"
```

However this should only be used if you know what you are doing, there are very specific cases where this might be required.
One such instance is VPNs in containers.
Otherwise it should be left empty:

```yaml
dnsPolicy: ""
dnsConfig: {}
```
see: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
### 0.7.1
This release adds previously missing inbuilt startup probe configuration.
This is backwards compatible since no changes to values.yaml and it does not change the default behaviour.
To add a startup probe you can add the following to your values.yaml for the most basic startup probe:
```yaml
startupProbe:
httpGet:
path: /
port: http # the port name if it is not call http
```

### 0.7.0

This release introduces a daemonset template. This is backwards compatible since no changes to values.yaml. If you would like to use this new template you can do something akin to the following. Replace ``corvid-test`` with your charts name:

```yaml
{{- define "corvid-test.daemonset" }}
# your daemonset overrides here
{{- end }}
{{- include "corvid.daemonset" (list . "corvid-test.daemonset") }}
```

### 0.6.5

This release introduces existingClaim persistence for the podSpec template. Thus this effects almost all usages, but only if ``.persistence.existingClaim`` is set.

By default please add the following to your values.yaml, although this is not required:

```yaml
persistence:
existingClaim: ""
```

No changes are required in the templating itself, this is backwards compatible.

### 0.6.4

This release of corvid introduces CronJob templates. This is backwards compatible since the only new variables are part of a new template altogether to define a CronJob.
Any users seeking to invoke this new CronJob will need to add the following to their values.yaml:

```yaml
schedule: "@midnight" # or some other cron schedule, try: https://crontab.guru/
```
They will also need to invoke this new template in their templates (substituting ``corvid-test`` for their chart name):
```yaml
{{- define "corvid-test.cronjob" -}}
# your cronjob overrides here
{{- end -}}
{{- include "corvid.cronjob" (list . "corvid-test.cronjob") -}}
```

This is backwards compatible.
Loading

0 comments on commit 64c4983

Please sign in to comment.