fukuops/k8s/charts/_template/README.md

2.8 KiB

chart

A Helm chart template with standardized structure for self-hosted services.

TL;DR

helm install chart oci://git.roboces.dev/catalin/fukuops/chart --version 1.0.0 -n apps-roboces

Prerequisites

  • Kubernetes 1.19+
  • Helm 3+
  • A NFS storage class (default: truenas-nfs-csi) - only if persistence is enabled
  • An existing Secret with credentials if required (see secret.existingSecretName)

Configuration

Basic Configuration

service:
  type: LoadBalancer
  port: 80
ingress:
  enabled: true
  className: "traefik"
  hosts:
    - host: chart.example.com
      paths:
        - path: /
          pathType: Prefix

With Persistence

persistence:
  enabled: true
  storageClass: "truenas-nfs-csi"
  accessMode: ReadWriteMany
  size: 10Gi

With Secrets

secret:
  existingSecretName: chart-secrets

Values Reference

Key Type Default Description
replicaCount int 1 Number of replicas
image.repository string nginx Image repository
image.pullPolicy string IfNotPresent Image pull policy
image.tag string .Chart.AppVersion Image tag
service.type string LoadBalancer Service type
service.port int 80 Service port
service.targetPort int 80 Container port
ingress.enabled bool false Enable ingress
ingress.className string traefik Ingress class
persistence.enabled bool false Enable persistence
persistence.storageClass string truenas-nfs-csi Storage class
persistence.accessMode string ReadWriteMany Access mode
persistence.size string 1Gi PVC size
persistence.name string chart-data PVC name
secret.existingSecretName string "" Existing secret name
resources object {} Container resources
livenessProbe object (see values.yaml) Liveness probe
readinessProbe object (see values.yaml) Readiness probe
nodeSelector object {} Node selector
tolerations array [] Tolerations
affinity object {} Affinity rules

Persistence

When persistence is enabled, a PVC named chart-data is created. The PVC uses the truenas-nfs-csi storage class by default with ReadWriteMany access mode.

Secret Management

The chart looks for an existing Secret with the name specified in secret.existingSecretName. If not provided, no secret is mounted.

Troubleshooting

Pod not starting

kubectl get pvc -n apps-roboces -l app.kubernetes.io/name=chart

Check logs

kubectl logs chart-0 -n apps-roboces

Verify configmap

kubectl get configmap chart-config -n apps-roboces -o yaml