From 1016a4bb551baec565d9881934263f7f781f3a89 Mon Sep 17 00:00:00 2001 From: Dries De Peuter Date: Tue, 14 Mar 2023 09:11:52 +0100 Subject: [PATCH] docs: More info --- Makefile | 21 ++++++ README.md | 2 +- charts/well-known/README.md | 70 ++++++++++++++++++++ charts/well-known/templates/README.md.gotmpl | 57 ++++++++++++++++ 4 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 Makefile create mode 100644 charts/well-known/README.md create mode 100644 charts/well-known/templates/README.md.gotmpl diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fdf57f8 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ + + +HELM_DOCS = $(shell pwd)/bin/helm-docs +helm-docs: ## Download helm-docs locally if necessary. + $(call go-get-tool,$(HELM_DOCS),github.com/norwoodj/helm-docs/cmd/helm-docs@v1.6.0) + helm-docs + + +# go-get-tool will 'go get' any package $2 and install it to $1. +PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) +define go-get-tool +@[ -f $(1) ] || { \ +set -e ;\ +TMP_DIR=$$(mktemp -d) ;\ +cd $$TMP_DIR ;\ +go mod init tmp ;\ +echo "Downloading $(2)" ;\ +GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\ +rm -rf $$TMP_DIR ;\ +} +endef \ No newline at end of file diff --git a/README.md b/README.md index 4a218f2..b0ae2b8 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Well-known A tiny service collecting and aggregating [well-known](https://www.rfc-editor.org/rfc/rfc5785) data from -services in the same namespace. The data is merged and exposed as a JSON object. +services in the same Kubernetes namespace. The data is merged and exposed as a JSON object. ## Usage diff --git a/charts/well-known/README.md b/charts/well-known/README.md new file mode 100644 index 0000000..03ee36b --- /dev/null +++ b/charts/well-known/README.md @@ -0,0 +1,70 @@ +# well-known + +![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.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) + +A Helm chart for Kubernetes + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Stenic | | | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"Always"` | | +| image.repository | string | `"ghcr.io/stenic/well-known"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/.well-known/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| networkpolicies.enabled | bool | `false` | | +| networkpolicies.kubeApiServerCIDR | string | `"/32"` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `2` | | +| resources.limits.cpu | string | `"50m"` | | +| resources.limits.memory | string | `"64Mi"` | | +| resources.requests.cpu | string | `"20m"` | | +| resources.requests.memory | string | `"32Mi"` | | +| securityContext.allowPrivilegeEscalation | bool | `false` | | +| securityContext.capabilities.drop[0] | string | `"ALL"` | | +| securityContext.readOnlyRootFilesystem | bool | `true` | | +| securityContext.runAsNonRoot | bool | `true` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| webserver.image.pullPolicy | string | `"Always"` | | +| webserver.image.repository | string | `"nginxinc/nginx-unprivileged"` | | +| webserver.image.tag | string | `"1.23"` | | +| webserver.resources.limits.cpu | string | `"50m"` | | +| webserver.resources.limits.memory | string | `"24Mi"` | | +| webserver.resources.requests.cpu | string | `"10m"` | | +| webserver.resources.requests.memory | string | `"10Mi"` | | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/well-known/templates/README.md.gotmpl b/charts/well-known/templates/README.md.gotmpl new file mode 100644 index 0000000..2c017f0 --- /dev/null +++ b/charts/well-known/templates/README.md.gotmpl @@ -0,0 +1,57 @@ +{{ template "chart.header" . }} + +## TL;DR; + +```console +helm repo add k8status https://stenic.github.io/well-known/ +helm install well-known --namespace well-known well-known/{{ template "chart.name" . }} +``` + +## Introduction + +This chart installs `{{ template "chart.name" . }}` on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.18+ +- Helm 3.0+ + + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +helm repo add well-known https://stenic.github.io/well-known/ +helm install well-known --namespace well-known well-known/{{ template "chart.name" . }} +``` + +These commands deploy {{ template "chart.name" . }} on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + + +## Configuration + +The following tables list the configurable parameters of the {{ template "chart.name" . }} chart and their default values. + +{{ template "chart.valuesTable" . }} + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```console +helm install my-release -f values.yaml well-known/{{ template "chart.name" . }} +``` \ No newline at end of file