The documentation for the Prism Helm charts in charts/prism/README.md
is generated automatically using helm-docs
. It extracts metadata and values from Chart.yaml
and values.yaml
. If you make changes to the charts, you need to update the documentation accordingly.
Before you begin, ensure you have helm-docs
installed on your machine. If not, follow these steps:
-
Install
helm-docs
The easiest way to install
helm-docs
is by using thego
command:go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
If you don't have Go installed, follow the Go installation guide.
-
Navigate to Your Project Directory
Navigate to the root directory where the Helm charts are stored. For this project, it would be:
cd devops
-
Run the
helm-docs
CommandGenerate or update the Helm chart documentation by running:
helm-docs
This command will parse through the charts in the
charts
directory and update thecharts/prism/README.md
file to reflect the latest chart metadata and values.Note: The output you’ll see may vary, but a successful run typically looks something like this:
INFO[2024-09-11T11:34:20+03:00] Found Chart directories [charts/prism] INFO[2024-09-11T11:34:20+03:00] Generating README Documentation for chart charts/prism
-
Review, Commit, and Push Your Changes
After
helm-docs
has updated the documentation, review the changes to ensure everything looks correct. Then, commit the changes to your Git repository:git add charts/prism/README.md git commit -m "Update Helm chart documentation" git push origin <your-branch>
Replace
<your-branch>
with the name of the branch you’re working on.
To check if a namespace exists, run:
kubectl get namespaces
To create a namespace if it does not exist:
kubectl create namespace <namespace-name>
kubectl delete namespace <namespace-name>
kubectl delete all --all -n <namespace-name>
kubectl delete pods --all -n <namespace-name>
kubectl delete pv --all
kubectl delete pvc --all -n <namespace-name>
helm install <release-name> ./charts/prism -n <namespace-name>
helm upgrade <release-name> ./charts/prism -n <namespace-name>
helm uninstall <release-name> -n <namespace-name>
helm list -n <namespace-name>
helm rollback <release-name> <revision-number> -n <namespace-name>
helm status <release-name> -n <namespace-name>
kubectl get pods
kubectl logs <pod-name>
kubectl describe pod <pod-name>
kubectl get events -n <namespace-name>
Create the k8s secret for github registry auth token
kubectl create secret docker-registry ghcr-secret \
--docker-server=ghcr.io \
--docker-username=<user_name> \
--docker-password=<ghcr_token> \
--docker-email=<email> \
--namespace=prism
Create the namespaces and install releases as needed.
kubectl create namespace prism
helm install prism ./charts/prism -n prism
In case you run into this error: Error: INSTALLATION FAILED: cannot re-use a name that is still in use
,
uninstall existing release and then reinstall.
helm uninstall prism -n prism