From fbe466dde3fedc56d7976b4db956fb40c98e937e Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:34:27 +0000 Subject: [PATCH 1/8] Clean up documentation --- README.md | 14 ++- docs/example.md | 10 ++ docs/hello-world/.helmignore | 23 +++++ docs/hello-world/Chart.yaml | 24 +++++ docs/hello-world/templates/NOTES.txt | 22 +++++ docs/hello-world/templates/_helpers.tpl | 62 ++++++++++++ docs/hello-world/templates/deployment.yaml | 72 ++++++++++++++ docs/hello-world/templates/hpa.yaml | 32 ++++++ docs/hello-world/templates/ingress.yaml | 61 ++++++++++++ docs/hello-world/templates/service.yaml | 15 +++ .../hello-world/templates/serviceaccount.yaml | 13 +++ .../templates/tests/test-connection.yaml | 15 +++ docs/hello-world/values.yaml | 98 +++++++++++++++++++ docs/index.md | 26 ++--- 14 files changed, 475 insertions(+), 12 deletions(-) create mode 100644 docs/example.md create mode 100644 docs/hello-world/.helmignore create mode 100644 docs/hello-world/Chart.yaml create mode 100644 docs/hello-world/templates/NOTES.txt create mode 100644 docs/hello-world/templates/_helpers.tpl create mode 100644 docs/hello-world/templates/deployment.yaml create mode 100644 docs/hello-world/templates/hpa.yaml create mode 100644 docs/hello-world/templates/ingress.yaml create mode 100644 docs/hello-world/templates/service.yaml create mode 100644 docs/hello-world/templates/serviceaccount.yaml create mode 100644 docs/hello-world/templates/tests/test-connection.yaml create mode 100644 docs/hello-world/values.yaml diff --git a/README.md b/README.md index 3bd6584..afd72f6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Features: - Render documentation from your `Chart.yaml` and `values.yaml` files. - Sphinx extension for including in Python documentation. -- Works with `rst` and `md` documentation source files. +- Works with `.rst` and `.md` documentation source files. ## Installation @@ -28,6 +28,18 @@ extensions = ['sphinx-helm.ext'] Use the directive to generate documentation for your helm chart. +### reStructuredText + ```rst .. helm:: path/to/your/helm/chart ``` + +### MyST Markdown + +````markdown + +```{helm} path/to/your/helm/chart + +``` + +```` diff --git a/docs/example.md b/docs/example.md new file mode 100644 index 0000000..755ea94 --- /dev/null +++ b/docs/example.md @@ -0,0 +1,10 @@ +# Example + +*The following was autogenerated from the simple nginx example chart in sphinx-helm's test suite.* + +--- + + +```{helm} ./hello-world + +``` diff --git a/docs/hello-world/.helmignore b/docs/hello-world/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/docs/hello-world/.helmignore @@ -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/ diff --git a/docs/hello-world/Chart.yaml b/docs/hello-world/Chart.yaml new file mode 100644 index 0000000..576f5e9 --- /dev/null +++ b/docs/hello-world/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: hello-world +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/docs/hello-world/templates/NOTES.txt b/docs/hello-world/templates/NOTES.txt new file mode 100644 index 0000000..0830868 --- /dev/null +++ b/docs/hello-world/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "hello-world.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "hello-world.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "hello-world.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "hello-world.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/docs/hello-world/templates/_helpers.tpl b/docs/hello-world/templates/_helpers.tpl new file mode 100644 index 0000000..8ce40d0 --- /dev/null +++ b/docs/hello-world/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "hello-world.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 "hello-world.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 "hello-world.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "hello-world.labels" -}} +helm.sh/chart: {{ include "hello-world.chart" . }} +{{ include "hello-world.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "hello-world.selectorLabels" -}} +app.kubernetes.io/name: {{ include "hello-world.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "hello-world.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "hello-world.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/docs/hello-world/templates/deployment.yaml b/docs/hello-world/templates/deployment.yaml new file mode 100644 index 0000000..f58803b --- /dev/null +++ b/docs/hello-world/templates/deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "hello-world.fullname" . }} + labels: + {{- include "hello-world.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "hello-world.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "hello-world.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "hello-world.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + 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 + readinessProbe: + httpGet: + path: / + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/docs/hello-world/templates/hpa.yaml b/docs/hello-world/templates/hpa.yaml new file mode 100644 index 0000000..4db229d --- /dev/null +++ b/docs/hello-world/templates/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "hello-world.fullname" . }} + labels: + {{- include "hello-world.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "hello-world.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 }} diff --git a/docs/hello-world/templates/ingress.yaml b/docs/hello-world/templates/ingress.yaml new file mode 100644 index 0000000..bbe70bb --- /dev/null +++ b/docs/hello-world/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "hello-world.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 "hello-world.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 }} diff --git a/docs/hello-world/templates/service.yaml b/docs/hello-world/templates/service.yaml new file mode 100644 index 0000000..e6da84e --- /dev/null +++ b/docs/hello-world/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "hello-world.fullname" . }} + labels: + {{- include "hello-world.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "hello-world.selectorLabels" . | nindent 4 }} diff --git a/docs/hello-world/templates/serviceaccount.yaml b/docs/hello-world/templates/serviceaccount.yaml new file mode 100644 index 0000000..63a5a5c --- /dev/null +++ b/docs/hello-world/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "hello-world.serviceAccountName" . }} + labels: + {{- include "hello-world.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/docs/hello-world/templates/tests/test-connection.yaml b/docs/hello-world/templates/tests/test-connection.yaml new file mode 100644 index 0000000..72b1fa5 --- /dev/null +++ b/docs/hello-world/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "hello-world.fullname" . }}-test-connection" + labels: + {{- include "hello-world.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "hello-world.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/docs/hello-world/values.yaml b/docs/hello-world/values.yaml new file mode 100644 index 0000000..de5cd96 --- /dev/null +++ b/docs/hello-world/values.yaml @@ -0,0 +1,98 @@ +# Default values for hello-world. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/docs/index.md b/docs/index.md index 47ba274..9d3a2f6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,6 +3,7 @@ ```{toctree} :maxdepth: 2 :hidden: true +example customizing history ``` @@ -16,7 +17,7 @@ generate the content in a markup language of your choice. - Render documentation from your `Chart.yaml` and `values.yaml` files. - Sphinx extension for including in Python documentation. -- Works with `rst` and `md` documentation source files. +- Works with `.rst` and `.md` documentation source files. ## Installation @@ -33,27 +34,30 @@ $ helm create hello-world Creating hello-world ``` -- Enable the plugin in your Sphinx ``conf.py`` file: +Enable the plugin in your Sphinx `conf.py` file: ```python extensions = ['sphinx-helm.ext'] ``` -- Now you can use the `helm` directive wherever you wish in your documentation. +Now you can use the `helm` directive wherever you wish in your documentation. -```rst -.. helm:: path/to/hello-world +```{note} +Helm Chart paths are relative to the root of your documentation. ``` -```{note} -sphinx-helm paths are relative to the root of your documentation. +### reStructuredText + +```rst +.. helm:: path/to/your/helm/chart ``` - -## Example -*The following was autogenerated from the simple nginx example chart in sphinx-helm's test suite.* +### MyST Markdown +````markdown -```{helm} ../sphinx_helm/tests/mockcharts/simple +```{helm} path/to/your/helm/chart ``` + +```` From 30efee155c002553c7630d89c0757e4775a83384 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:38:38 +0000 Subject: [PATCH 2/8] Tweak example wording --- docs/example.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/example.md b/docs/example.md index 755ea94..4edbcc9 100644 --- a/docs/example.md +++ b/docs/example.md @@ -1,6 +1,6 @@ # Example -*The following was autogenerated from the simple nginx example chart in sphinx-helm's test suite.* +*The following was autogenerated from the simple hello-world Helm Chart in sphinx-helm's docs directory. The chart was created with `helm create hello-world` and is unmodified.* --- From 441fa5ebd9a03a36b04db6788e07109e9f1b63e3 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:40:05 +0000 Subject: [PATCH 3/8] Tweak formatting --- docs/history.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/history.md b/docs/history.md index 5ed5ab2..026b0c2 100644 --- a/docs/history.md +++ b/docs/history.md @@ -2,7 +2,9 @@ This project was forked from [rapidsai/frigate](https://github.com/rapidsai/frigate). Frigate was originally created as a CLI tool for generating the `README` file for the [RAPIDS Helm Chart](https://github.com/rapidsai/helm-chart). +```{note} Fun fact `frigate` was built on Thanksgiving and Good Friday 2019 as a hacky side project. +``` Later `frigate` was extended for use within Sphinx documentation, specifically in [dask/dask-kubernetes](https://github.com/dask/dask-kubernetes). From 55838d9d243cf489ecd43e6ac366bdf804d927a6 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:46:38 +0000 Subject: [PATCH 4/8] Add badges and classifiers --- README.md | 6 +++++- pyproject.toml | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index afd72f6..fbf7402 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # sphinx-helm +![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml) +![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm) + sphinx-helm is a Sphinx plugin for automatically generating documentation for your [Helm charts](https://helm.sh/). - Features: diff --git a/pyproject.toml b/pyproject.toml index 0e443ec..407d81c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,28 @@ [project] name = "sphinx-helm" -description = "Add your description here" +description = "A Sphinx plugin for generating documentation for your Helm charts." +classifiers = [ + # How mature is this project? Common values are + # 3 - Alpha + # 4 - Beta + # 5 - Production/Stable + "Development Status :: 4 - Beta", + + # Indicate who your project is intended for + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", + + # Pick your license as you wish (see also "license" above) + "License :: OSI Approved :: Apache 2.0 License", + + # Specify the Python versions you support here. + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] readme = "README.md" requires-python = ">=3.8" dynamic = ["version"] From f716251103e399071dbdfd99d0db7468cbd63df5 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:48:01 +0000 Subject: [PATCH 5/8] Add more badges --- README.md | 2 ++ docs/index.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/README.md b/README.md index fbf7402..a2eb714 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml) ![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm) +![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm) +[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver) sphinx-helm is a Sphinx plugin for automatically generating documentation for your [Helm charts](https://helm.sh/). diff --git a/docs/index.md b/docs/index.md index 9d3a2f6..287e606 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,12 @@ # Sphinx-helm +![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm) +![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml) +![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm) +![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm) +[![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver) + ```{toctree} :maxdepth: 2 :hidden: true From 3c6f269f4e7dbffcbb1ba0c8c37a1897f9e5c7ea Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:52:23 +0000 Subject: [PATCH 6/8] Fix license classifier --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 407d81c..7eb3ecf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,7 @@ classifiers = [ # Indicate who your project is intended for "Intended Audience :: Developers", "Topic :: Software Development :: Build Tools", - - # Pick your license as you wish (see also "license" above) - "License :: OSI Approved :: Apache 2.0 License", + "License :: OSI Approved :: Apache Software License", # Specify the Python versions you support here. "Programming Language :: Python :: 3", From cff5155cb7bcb50b35a0ea59c50f96704886dba4 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:55:46 +0000 Subject: [PATCH 7/8] Add links to badges --- README.md | 10 +++++----- docs/index.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a2eb714..f06a20d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # sphinx-helm -![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm) -![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml) -![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm) -![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm) +[![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm)](https://pypi.org/project/sphinx-helm/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm)](https://pypi.org/project/sphinx-helm/) +[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml)](https://github.com/kr8s-org/sphinx-helm/actions/workflows/test.yaml) +[![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm)](https://sphinx-helm.readthedocs.io/en/latest/) +[![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm)](https://pypi.org/project/sphinx-helm/) [![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver) sphinx-helm is a Sphinx plugin for automatically generating documentation for your [Helm charts](https://helm.sh/). diff --git a/docs/index.md b/docs/index.md index 287e606..3a35da6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,10 @@ # Sphinx-helm -![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm) -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm) -![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml) -![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm) -![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm) +[![PyPI - Version](https://img.shields.io/pypi/v/sphinx-helm)](https://pypi.org/project/sphinx-helm/) +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sphinx-helm)](https://pypi.org/project/sphinx-helm/) +[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kr8s-org/sphinx-helm/test.yaml)](https://github.com/kr8s-org/sphinx-helm/actions/workflows/test.yaml) +[![Read the Docs](https://img.shields.io/readthedocs/sphinx-helm)](https://sphinx-helm.readthedocs.io/en/latest/) +[![PyPI - License](https://img.shields.io/pypi/l/sphinx-helm)](https://pypi.org/project/sphinx-helm/) [![EffVer Versioning](https://img.shields.io/badge/version_scheme-EffVer-0097a7)](https://jacobtomlinson.dev/effver) ```{toctree} From 56172131302baecebef9903ebc53e3157312cba2 Mon Sep 17 00:00:00 2001 From: Jacob Tomlinson Date: Tue, 10 Dec 2024 09:59:06 +0000 Subject: [PATCH 8/8] Remove unecessary line --- docs/index.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 3a35da6..d6dd770 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,9 +17,6 @@ history `sphinx-helm` is a [Sphinx](https://www.sphinx-doc.org/) plugin for automatically generating documentation for your [Helm charts](https://helm.sh/). -It will use the chart's `Chart.yaml` and `values.yaml` files in order to -generate the content in a markup language of your choice. - ## Features - Render documentation from your `Chart.yaml` and `values.yaml` files.