### Uninstall Old Helm Release and Install New Chart Source: https://github.com/pfnapp/charts/blob/main/MIGRATION.md Provides the necessary commands to first uninstall the existing Helm release and then install the new chart. It shows examples for both `pfnapp/deploy` (for Deployment workloads) and `pfnapp/sts` (for StatefulSet workloads), using the previously updated values file. ```bash # 1. Uninstall the old release helm uninstall my-release # 2. Install with the new chart # For Deployment workloads: helm install my-release pfnapp/deploy -f my-release-values.yaml --version 2.0.0 # For StatefulSet workloads: helm install my-release pfnapp/sts -f my-release-values.yaml --version 2.0.0 ``` -------------------------------- ### Install Helm Charts from Repository Source: https://github.com/pfnapp/charts/blob/main/README.md Provides examples of how to install specific Helm charts from a configured repository. This is the final step for deploying applications using Helm, specifying the release name and chart reference. ```bash helm install my-app pfnapp/deploy ``` ```bash helm install my-nginx pfnapp/nginx ``` -------------------------------- ### Complete Basic Web Application Helm Chart Example Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md A comprehensive example demonstrating the combination of various Helm chart configurations for a basic web application. This includes app metadata, image definition, service port mapping, liveness and readiness probes, and a simplified Ingress setup with TLS. ```yaml app: name: "my-web-app" version: "1.0.0" image: repository: "nginx" tag: "1.21" service: port: 80 targetPort: 80 simpleLivenessProbe: httpGet: path: "/" simpleReadinessProbe: httpGet: path: "/" simpleIngress: - enabled: true domain: "myapp.example.com" className: "nginx" tls: true certManager: enabled: true issuer: "letsencrypt-prod" ``` -------------------------------- ### Install Nginx Helm Chart Locally Source: https://github.com/pfnapp/charts/blob/main/README.md Installs the `pfnapp/nginx` Helm chart from a local path, useful for testing changes during development before publishing. ```bash helm install my-nginx pfnapp/nginx ``` -------------------------------- ### Install Nginx Helm Chart Source: https://github.com/pfnapp/charts/blob/main/README.md Installs the `pfnapp/nginx` Helm chart into your Kubernetes cluster, creating a basic Nginx deployment. ```bash helm install my-nginx pfnapp/nginx ``` -------------------------------- ### Example Custom Helm Values File Source: https://github.com/pfnapp/charts/blob/main/README.md A comprehensive example of a `custom-values.yaml` file demonstrating various configuration options for the `pfnapp/deploy` Helm chart, including image, service, ingress, resource limits, autoscaling, and more. ```yaml deploymentType: "deployment" replicaCount: 3 image: repository: "my-app" tag: "v1.0.0" pullPolicy: Always service: enabled: true type: LoadBalancer port: 8080 targetPort: 8080 ingress: enabled: true className: "haproxy" hosts: - host: myapp.example.com paths: - path: / pathType: Prefix configMap: enabled: true data: DATABASE_URL: "postgresql://localhost:5432/mydb" REDIS_URL: "redis://localhost:6379" secret: enabled: true data: API_KEY: "your-secret-api-key" DB_PASSWORD: "your-db-password" logging: enabled: true nodeSelector: node-type: "worker" tolerations: - key: "logging" operator: "Equal" value: "true" effect: "NoSchedule" resources: limits: cpu: 500m memory: 512Mi requests: cpu: 250m memory: 256Mi autoscaling: enabled: true minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 70 ``` -------------------------------- ### Install Dynamic Deploy Chart as Kubernetes Deployment Source: https://github.com/pfnapp/charts/blob/main/README.md Installs the `pfnapp/deploy` Helm chart, explicitly configuring it to create a standard Kubernetes Deployment for an application, suitable for stateless workloads. ```bash helm install my-app pfnapp/deploy \ --set image.repository=nginx \ --set image.tag=latest \ --set deploymentType=deployment ``` -------------------------------- ### Install Helm Chart for Application Deployment (Bash) Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This Bash command shows how to install the Helm chart named 'my-app' from the 'pfnapp/deploy' repository, applying configurations defined in a `values.yaml` file. ```bash helm install my-app pfnapp/deploy -f values.yaml ``` -------------------------------- ### Example Configuration for a Basic API Service Deployment Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This comprehensive example demonstrates a complete configuration for deploying a basic API service. It includes application name, image details, replica count, service exposure, container ports, simplified health probes, autoscaling, resource limits, and environment variables, providing a ready-to-use template. ```YAML app: name: "api-service" image: repository: "mycompany/api" tag: "v1.2.3" replicaCount: 3 service: port: 8080 targetPort: 8080 containerPorts: - containerPort: 8080 name: http simpleLivenessProbe: httpGet: path: /health port: 8080 simpleReadinessProbe: httpGet: path: /ready port: 8080 autoscaling: enabled: true minReplicas: 3 maxReplicas: 20 resources: requests: memory: "256Mi" cpu: "100m" limits: memory: "512Mi" cpu: "500m" env: - name: PORT value: "8080" - name: NODE_ENV value: "production" ``` -------------------------------- ### Configure Standard Liveness, Readiness, and Startup Probes Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Detailed YAML configuration for Kubernetes health probes, including liveness, readiness, and startup probes. This example uses HTTP GET requests to specific paths and ports, defining parameters like initial delays, periods, timeouts, and failure thresholds for robust application health monitoring. ```yaml livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /ready port: http initialDelaySeconds: 5 periodSeconds: 5 startupProbe: httpGet: path: /health port: http initialDelaySeconds: 10 periodSeconds: 5 failureThreshold: 30 ``` -------------------------------- ### Rollback to Old Helm Chart Structure Source: https://github.com/pfnapp/charts/blob/main/MIGRATION.md Provides a command to revert to the previous chart structure in case a rollback is necessary. It demonstrates how to install the `pfnapp/deploy-old` chart using a backup of the old values file. ```bash # The old chart is preserved as pfnapp/deploy-old helm install my-release pfnapp/deploy-old -f my-old-values.yaml ``` -------------------------------- ### Helm Chart Example: StatefulSet for Database Source: https://github.com/pfnapp/charts/blob/main/README.md Presents a `values.yaml` example for deploying a stateful database application using a Kubernetes StatefulSet via the Helm chart. It includes configuration for persistent storage with volume claim templates, database-specific environment variables, node selection, and resource allocation. ```yaml # database-values.yaml deploymentType: "statefulset" replicaCount: 3 image: repository: "postgres" tag: "13-alpine" service: port: 5432 targetPort: 5432 statefulset: serviceName: "postgres-headless" volumeClaimTemplates: - metadata: name: postgres-data spec: accessModes: ["ReadWriteOnce"] storageClassName: "fast-ssd" resources: requests: storage: 100Gi configMap: enabled: true data: POSTGRES_DB: "myapp" POSTGRES_USER: "myapp_user" secret: enabled: true data: POSTGRES_PASSWORD: "secure-password" nodeSelector: node-type: "database" tolerations: - key: "database" operator: "Equal" value: "true" effect: "NoSchedule" resources: limits: cpu: 2000m memory: 4Gi requests: cpu: 1000m memory: 2Gi ``` -------------------------------- ### Install Dynamic Deploy Chart as Kubernetes StatefulSet Source: https://github.com/pfnapp/charts/blob/main/README.md Installs the `pfnapp/deploy` Helm chart, configuring it to create a Kubernetes StatefulSet, which is ideal for stateful applications like databases that require stable network identities and persistent storage. ```bash helm install my-stateful-app pfnapp/deploy \ --set image.repository=postgres \ --set image.tag=13 \ --set deploymentType=statefulset \ --set statefulset.serviceName=postgres-headless ``` -------------------------------- ### Install Dynamic Deploy Helm Chart with Image Override Source: https://github.com/pfnapp/charts/blob/main/README.md Installs the `pfnapp/deploy` Helm chart, configuring it to deploy a specific container image (e.g., Nginx) and tag by overriding default values using `--set` flags. ```bash helm install my-app pfnapp/deploy \ --set image.repository=nginx \ --set image.tag=latest ``` -------------------------------- ### Helm Chart Example: Microservice with Logging Source: https://github.com/pfnapp/charts/blob/main/README.md Offers a `values.yaml` example for deploying a microservice with integrated logging capabilities using the Helm chart. This configuration details image, service, ingress, environment variables, and enables the chart's logging features, along with node selection and resource requests. ```yaml # microservice-values.yaml deploymentType: "deployment" replicaCount: 2 image: repository: "mycompany/user-service" tag: "v1.5.2" service: port: 8080 targetPort: 8080 ingress: enabled: true hosts: - host: api.company.com paths: - path: /users pathType: Prefix configMap: enabled: true data: SERVICE_NAME: "user-service" LOG_LEVEL: "info" METRICS_PORT: "9090" logging: enabled: true # This will add -service suffix and logging taints nodeSelector: workload-type: "api" resources: limits: cpu: 500m memory: 512Mi requests: cpu: 200m memory: 256Mi ``` -------------------------------- ### Install Helm Chart for Application Deployment Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Instructions to add the pfnapp Helm repository and then install the 'deploy' chart into a Kubernetes cluster, referencing a custom 'values.yaml' file for configuration. ```bash # Add the repository helm repo add pfnapp https://pfnapp.github.io/charts # Install the chart helm install my-app pfnapp/deploy -f values.yaml ``` -------------------------------- ### Install STS Helm Chart Source: https://github.com/pfnapp/charts/blob/main/pfnapp/sts/README.md This `helm install` command deploys the PostgreSQL cluster defined in the `values.yaml` file using the `pfnapp/sts` Helm chart. The `-f values.yaml` flag specifies the custom configuration file to be used during installation. ```bash helm install postgres pfnapp/sts -f values.yaml ``` -------------------------------- ### Helm Chart Example: Web Application with Database Source: https://github.com/pfnapp/charts/blob/main/README.md Provides a complete `values.yaml` example for deploying a web application with database connectivity using the Helm chart. It covers replica counts, image details, service and ingress configuration, environment variables from ConfigMap and Secret, logging, resource limits, and horizontal pod autoscaling. ```yaml # webapp-values.yaml deploymentType: "deployment" replicaCount: 3 image: repository: "mycompany/webapp" tag: "v2.1.0" service: port: 3000 targetPort: 3000 ingress: enabled: true hosts: - host: webapp.company.com paths: - path: / pathType: Prefix configMap: enabled: true data: NODE_ENV: "production" PORT: "3000" DATABASE_HOST: "postgres-service" REDIS_HOST: "redis-service" secret: enabled: true data: DATABASE_PASSWORD: "secure-db-password" JWT_SECRET: "jwt-signing-secret" API_KEY: "third-party-api-key" logging: enabled: true resources: limits: cpu: 1000m memory: 1Gi requests: cpu: 500m memory: 512Mi autoscaling: enabled: true minReplicas: 3 maxReplicas: 20 targetCPUUtilizationPercentage: 60 ``` -------------------------------- ### Complete simpleStorage Example for Web Application (Deploy) Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md A full `values.yaml` example for a web application deployed via a Helm chart, showcasing `simpleStorage` integration. It configures shared storage for uploads and cache, demonstrating how `simpleStorage` simplifies PVC and volumeMount creation for Deployment charts, optimized for multi-replica web services. ```yaml app: name: "web-app" image: repository: "nginx" tag: "latest" replicaCount: 3 # Simple shared storage simpleStorage: - path: "/var/www/uploads" size: "100Gi" class: "fast-ssd" - path: "/tmp/cache" size: "20Gi" class: "standard" # Install # helm install web-app pfnapp/deploy -f values.yaml ``` -------------------------------- ### Install Helm Chart with Custom Values File Source: https://github.com/pfnapp/charts/blob/main/README.md Installs a Helm chart using a local `custom-values.yaml` file to apply extensive configuration overrides, providing a structured way to manage chart values. ```bash helm install my-custom-app pfnapp/deploy -f custom-values.yaml ``` -------------------------------- ### Perform Helm Dry Run Installation Source: https://github.com/pfnapp/charts/blob/main/README.md Demonstrates how to perform a dry run installation of a Helm chart to test its configuration without actually deploying it. This command uses the `--dry-run` and `--debug` flags with a specified values file. ```bash helm install my-app pfnapp/deploy --dry-run --debug -f values.yaml ``` -------------------------------- ### Complete simpleStorage Example for PostgreSQL Cluster (StatefulSet) Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md A full `values.yaml` example for a PostgreSQL cluster deployed via a Helm chart, illustrating `simpleStorage` integration. It configures per-pod storage for database data and WAL files, showing how `simpleStorage` simplifies volumeClaimTemplate creation for StatefulSet charts, ensuring data persistence for each database instance. ```yaml app: name: "postgres" image: repository: "postgres" tag: "14" replicaCount: 3 # Per-pod database storage simpleStorage: - path: "/var/lib/postgresql/data" size: "200Gi" class: "fast-ssd" name: "postgres-data" - path: "/var/lib/postgresql/wal" size: "50Gi" class: "ultra-fast" name: "postgres-wal" env: - name: POSTGRES_DB value: "myapp" # Install # helm install postgres pfnapp/sts -f values.yaml ``` -------------------------------- ### Configure Per-Pod Storage for StatefulSet Charts with simpleStorage Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Example YAML configuration for a Kubernetes StatefulSet chart using `simpleStorage` to provision per-pod storage (ReadWriteOnce) for databases. It shows how to define multiple volumeClaimTemplates with specific paths, sizes, and storage classes, ensuring each pod gets its own dedicated storage. ```yaml simpleStorage: - path: "/database" size: "100Gi" class: "fast-ssd" # Creates: volumeClaimTemplate "database" with ReadWriteOnce (per-pod) - path: "/var/log/app" size: "20Gi" class: "standard" # Creates: volumeClaimTemplate "var-log-app" with ReadWriteOnce ``` -------------------------------- ### Kubernetes Storage Class Examples for simpleStorage Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Provides examples of different storage class names (`class`) that can be used with `simpleStorage` to define performance tiers for various data types, such as NVMe SSDs, standard SSDs, HDDs, and network file systems. ```yaml # Performance tiers class: "ultra-fast" # NVMe SSD for databases class: "fast-ssd" # SSD for application data class: "standard" # HDD for logs, backups class: "nfs-client" # Network storage for shared data ``` -------------------------------- ### Test Helm Chart Configurations with Helm Template Commands Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md This section provides a series of `helm template` commands for thoroughly testing Helm chart configurations, especially those involving volume mounts. These commands allow users to render the final Kubernetes YAML, validate syntax, and test various deployment scenarios. ```bash # Test basic functionality helm template test pfnapp/deploy -f volume-mount-values.yaml --set deploymentType=deployment # Test comprehensive features helm template test pfnapp/deploy -f comprehensive-volume-examples.yaml --set deploymentType=deployment # Test specific use case helm template test pfnapp/deploy -f microservice-volume-examples.yaml --set deploymentType=deployment # Validate chart syntax helm lint pfnapp/deploy ``` -------------------------------- ### Mount Application Configuration with ConfigMap in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Demonstrates how to mount application-specific configuration files using a ConfigMap volume. This example creates an inline ConfigMap named 'app-config' and mounts its 'config.yaml' content to '/etc/config' within the container, allowing applications to read their settings from a well-known path. ```YAML volumeConfigMaps: enabled: true items: - name: "app-config" mountPath: "/etc/config" data: "config.yaml": | app: name: myapp debug: false ``` -------------------------------- ### Configure Simplified HTTP Health Probes Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This configuration defines simplified HTTP GET probes for liveness, readiness, and startup checks. It specifies the path, port, initial delay, and period for each probe, ensuring application health, proper rollout, and graceful handling of startup sequences. ```YAML simpleLivenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 30 periodSeconds: 10 simpleReadinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 5 periodSeconds: 5 simpleStartupProbe: httpGet: path: /startup port: 8080 initialDelaySeconds: 10 periodSeconds: 5 failureThreshold: 30 ``` -------------------------------- ### Simplified Ingress Setup with Cert-Manager and ExternalDNS Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Presents a streamlined Ingress configuration that integrates with Cert-Manager for automated TLS certificate provisioning (e.g., Let's Encrypt) and ExternalDNS for automatic DNS record management, simplifying domain and certificate setup for applications. ```yaml simpleIngress: - enabled: true domain: "myapp.example.com" className: "haproxy" tls: true certManager: enabled: true issuer: "letsencrypt-prod" externalDns: enabled: true target: "cname.example.com" cloudflareProxied: false ``` -------------------------------- ### Helm List Installed Releases Command Source: https://github.com/pfnapp/charts/blob/main/README.md Provides the `helm list` command to display all installed Helm releases in the current Kubernetes context. This command is useful for quickly checking the status and names of deployed applications. ```bash helm list ``` -------------------------------- ### Kubernetes Chart Storage Configuration Examples Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Demonstrates basic configurations for `simpleStorage`, `simpleVolumes`, `simpleMounts`, and standard Kubernetes `volumes` and `volumeMounts` within a chart, showing how to define persistent storage, ephemeral volumes, and config map mounts. ```yaml # Mix all storage types simpleStorage: - path: "/database" size: "100Gi" class: "fast-ssd" simpleVolumes: - mountPath: "/cache" size: "10Gi" storageClass: "standard" simpleMounts: - mountPath: "/config" configMap: "app-config" volumes: - name: custom-volume emptyDir: {} volumeMounts: - name: custom-volume mountPath: /tmp ``` -------------------------------- ### Add PFNApp Helm Repository Source: https://github.com/pfnapp/charts/blob/main/README.md Adds the PFNApp Helm chart repository to your local Helm configuration, enabling you to install charts directly from the published GitHub Pages. ```bash helm repo add pfnapp https://pfnapp.github.io/charts helm repo update ``` -------------------------------- ### Mount Database Credentials with Secret in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Illustrates how to securely mount database credentials using a Secret volume. This example defines an inline Secret named 'db-creds' with 'username' and 'password' string data, mounting it read-only to '/var/secrets/db' with specific file permissions (0400) for enhanced security. ```YAML volumeSecrets: enabled: true items: - name: "db-creds" mountPath: "/var/secrets/db" readOnly: true defaultMode: 0400 stringData: "username": "dbuser" "password": "dbpass" ``` -------------------------------- ### Configure Simplified Ingress for Helm Chart (YAML) Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This YAML snippet presents the recommended simplified ingress configuration pattern. It streamlines ingress setup by auto-generating host and TLS secrets based on the provided domain, and includes options for Cert-Manager and ExternalDNS integration. ```yaml simpleIngress: - enabled: true domain: "myapp.example.com" # Auto-generates host and TLS secret className: "haproxy" tls: true certManager: enabled: true issuer: "letsencrypt" externalDns: enabled: true target: "ingress.example.com" cloudflareProxied: false ``` -------------------------------- ### Search Helm Charts in Repository Source: https://github.com/pfnapp/charts/blob/main/README.md Demonstrates how to search for available charts within a previously added Helm repository. This helps users discover charts by name or keyword before installation. ```bash helm search repo pfnapp ``` -------------------------------- ### Clone PFNApp Helm Charts Repository Source: https://github.com/pfnapp/charts/blob/main/README.md Clones the PFNApp Helm charts Git repository to your local machine for development, testing, or direct installation. ```bash git clone https://github.com/pfnapp/charts.git cd charts ``` -------------------------------- ### Configure Simplified Liveness, Readiness, and Startup Probes Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Minimal YAML configuration for Kubernetes health probes, demonstrating how to define liveness, readiness, and startup probes by only specifying the HTTP GET path. This approach leverages default values for other probe parameters, simplifying the configuration for common use cases. ```yaml # Minimal configuration - uses defaults simpleLivenessProbe: httpGet: path: "/health" simpleReadinessProbe: httpGet: path: "/ready" simpleStartupProbe: httpGet: path: "/health" ``` -------------------------------- ### Mount Single File from ConfigMap in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Shows how to mount only a specific file from a ConfigMap using the `subPath` option. This example creates a ConfigMap named 'nginx-config' containing 'nginx.conf' and mounts only this single file directly to '/etc/nginx/nginx.conf', useful for managing individual configuration files. ```YAML volumeConfigMaps: enabled: true items: - name: "nginx-config" mountPath: "/etc/nginx/nginx.conf" subPath: "nginx.conf" # Only mount this file data: "nginx.conf": "nginx config content..." ``` -------------------------------- ### Reference Existing ConfigMap as Volume in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Demonstrates how to reference and mount an existing ConfigMap that was created outside the current Helm chart. This example uses `existingConfigMap: "shared-config"` to mount a pre-existing ConfigMap named 'shared-config' to '/etc/external', facilitating integration with resources managed by other systems. ```YAML volumeConfigMaps: enabled: true items: - name: "external-config" mountPath: "/etc/external" existingConfigMap: "shared-config" # Created by another system ``` -------------------------------- ### Add Helm Chart Repository Source: https://github.com/pfnapp/charts/blob/main/README.md Instructs users on how to add a new Helm chart repository to their local Helm configuration. This makes charts from the specified URL available for installation and management. ```bash helm repo add pfnapp https://pfnapp.github.io/charts ``` -------------------------------- ### Backup Helm Release Values and Kubernetes Resources Source: https://github.com/pfnapp/charts/blob/main/MIGRATION.md Provides commands to back up the current Helm release's values and all associated Kubernetes resources (deployments, services, configmaps, secrets, ingresses) labeled with the instance name. This is a crucial step before initiating the migration process to ensure data recovery. ```bash helm get values my-release > my-release-values.yaml kubectl get all,configmap,secret,ingress -l app.kubernetes.io/instance=my-release > my-release-backup.yaml ``` -------------------------------- ### Combining simpleStorage with Other Storage Features Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md An example demonstrating how `simpleStorage` can be used alongside other existing storage features within a Helm chart's `values.yaml`. This highlights the flexibility of `simpleStorage` to integrate into more complex storage configurations. ```yaml ```yaml ``` -------------------------------- ### Organize Sensitive Data with Separate Helm Volume Mounts Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md This snippet demonstrates a best practice for organizing sensitive data by using separate volume mounts for different types of secrets (e.g., database credentials, API keys, TLS certificates). This enhances security and maintainability by isolating concerns. ```yaml # Database credentials - name: "db-creds" mountPath: "/var/secrets/db" # API keys - name: "api-keys" mountPath: "/var/secrets/apis" # TLS certificates - name: "tls-certs" mountPath: "/etc/tls" ``` -------------------------------- ### Illustrate Kubernetes Storage Class Examples Source: https://github.com/pfnapp/charts/blob/main/VOLUMES.md This section provides examples of different `storageClass` names that can be used in Kubernetes volume definitions. It highlights how various storage classes can be chosen based on performance requirements, such as fast SSDs, standard HDDs, ultra-fast NVMe, or network-attached storage. ```yaml # Fast SSD for databases storageClass: "fast-ssd" # Standard HDD for logs/backups storageClass: "standard" # Ultra-fast NVMe for high-performance workloads storageClass: "ultra-fast" # Network storage for shared access storageClass: "nfs-client" ``` -------------------------------- ### Kubernetes Simplified HTTP Health Probes Source: https://github.com/pfnapp/charts/blob/main/pfnapp/sts/README.md Configures simplified liveness, readiness, and startup probes using HTTP GET requests, with parameters for initial delay, period, timeout, and failure thresholds. ```YAML simpleLivenessProbe: httpGet: path: /health port: 8080 initialDelaySeconds: 60 # Longer for databases periodSeconds: 30 timeoutSeconds: 10 failureThreshold: 3 simpleReadinessProbe: httpGet: path: /ready port: 8080 initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 simpleStartupProbe: httpGet: path: /startup port: 8080 initialDelaySeconds: 30 periodSeconds: 10 failureThreshold: 60 # Allow longer startup time ``` -------------------------------- ### Enforce Read-Only Mounts for Kubernetes Secrets in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md This example illustrates the critical security practice of mounting Kubernetes Secrets as read-only volumes in a Helm chart. By setting `readOnly: true`, it prevents accidental or malicious modification of sensitive data within the container. ```yaml volumeSecrets: enabled: true items: - name: "sensitive-data" mountPath: "/var/secrets" readOnly: true # Always recommended for secrets ``` -------------------------------- ### Describe Kubernetes Pods by Label Source: https://github.com/pfnapp/charts/blob/main/README.md Explains how to get detailed information about Kubernetes pods, filtered by a label. This command is useful for debugging and understanding the current state, events, and resource usage of specific pods. ```bash kubectl describe pods -l app.kubernetes.io/name=deploy ``` -------------------------------- ### Domain-Based Ingress Configuration with TLS Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Provides an example of configuring Ingress resources based on domain names, including enabling TLS, specifying a TLS secret, and adding annotations for load balancing. This approach simplifies managing ingress for multiple domains. ```yaml ingressDomains: - enabled: true host: "myapp.example.com" className: "haproxy" tls: true tlsSecret: "myapp-example-com-tls" annotations: haproxy.org/load-balance: "roundrobin" paths: - path: / pathType: Prefix ``` -------------------------------- ### Configure Multiple ConfigMaps and Secrets in Helm Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md This YAML snippet demonstrates how to define and mount multiple Kubernetes ConfigMaps and Secrets within a Helm chart's `values.yaml` file. It shows the structure for enabling and listing individual items, specifying their names, mount paths, and data sources. ```yaml volumeConfigMaps: enabled: true items: - name: "app-config" mountPath: "/etc/app" data: {...} - name: "feature-flags" mountPath: "/etc/features" data: {...} volumeSecrets: enabled: true items: - name: "api-keys" mountPath: "/var/secrets/apis" stringData: {...} - name: "certificates" mountPath: "/etc/certs" stringData: {...} ``` -------------------------------- ### Configure Pod and Container Security Contexts Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Example YAML configuration for defining security contexts at both the pod and container levels. This snippet demonstrates how to enforce non-root execution, set user and group IDs, prevent privilege escalation, and drop all capabilities for enhanced security. ```yaml podSecurityContext: runAsNonRoot: true runAsUser: 1001 fsGroup: 2000 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1001 capabilities: drop: - ALL ``` -------------------------------- ### Configure Standard HTTP Liveness Probe Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This snippet shows a standard Kubernetes liveness probe configuration using HTTP GET. It includes parameters like 'initialDelaySeconds' (30s), 'periodSeconds' (10s), 'timeoutSeconds' (5s), and 'failureThreshold' (3) for fine-grained health checking of the '/health' endpoint on the 'http' port. ```YAML livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 ``` -------------------------------- ### Helm Chart Advanced Tolerations Configuration Source: https://github.com/pfnapp/charts/blob/main/README.md Demonstrates how to configure multiple tolerations in a Helm chart to allow pods to be scheduled on nodes with specific taints. This example includes tolerations for dedicated and GPU-specific taints, enhancing scheduling flexibility. ```yaml tolerations: - key: "dedicated" operator: "Equal" value: "compute" effect: "NoSchedule" - key: "gpu" operator: "Exists" effect: "NoExecute" ``` -------------------------------- ### Troubleshooting simpleStorage Access Mode Compatibility Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Demonstrates a common issue with `simpleStorage` related to incompatible access modes and storage classes, providing both an incorrect example (ReadWriteMany with EBS) and a correct solution (ReadWriteMany with EFS). ```yaml # ❌ Won't work with most storage providers simpleStorage: - path: "/shared" class: "gp2" # EBS only supports ReadWriteOnce accessModes: ["ReadWriteMany"] # ✅ Use compatible storage simpleStorage: - path: "/shared" class: "efs" # EFS supports ReadWriteMany accessModes: ["ReadWriteMany"] ``` -------------------------------- ### Configure Shared Storage for Deploy Charts with simpleStorage Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Example YAML configuration for a Kubernetes Deployment chart using `simpleStorage` to provision shared storage (ReadWriteMany) for web applications. It demonstrates how to define multiple storage volumes with specified paths, sizes, and storage classes, which are automatically converted into PersistentVolumeClaims. ```yaml simpleStorage: - path: "/uploads" size: "50Gi" class: "fast-ssd" # Creates: PVC "uploads" with ReadWriteMany (shared across pods) - path: "/app/cache" size: "10Gi" class: "standard" # Creates: PVC "app-cache" with ReadWriteMany ``` -------------------------------- ### Example Volume Claim Templates Configuration Source: https://github.com/pfnapp/charts/blob/main/pfnapp/sts/README.md This YAML snippet demonstrates how to define multiple `volumeClaimTemplates` within the `statefulset` section of `values.yaml`. It shows how to configure separate persistent volumes for different purposes, such as `data-storage` and `logs-storage`, each with its own storage class and requested size. ```yaml statefulset: volumeClaimTemplates: - metadata: name: data-storage annotations: volume.beta.kubernetes.io/storage-class: "fast-ssd" spec: accessModes: ["ReadWriteOnce"] storageClassName: "fast-ssd" resources: requests: storage: 50Gi - metadata: name: logs-storage spec: accessModes: ["ReadWriteOnce"] storageClassName: "standard" resources: requests: storage: 10Gi ``` -------------------------------- ### Helm Upgrade Release Command Source: https://github.com/pfnapp/charts/blob/main/README.md Illustrates the `helm upgrade` command for updating an existing Helm release with new configurations or chart versions. The example includes specifying a custom values file for overriding default chart parameters. ```bash helm upgrade my-nginx pfnapp/nginx -f custom-values.yaml ``` -------------------------------- ### APIDOC: Configure volumeConfigMaps for Helm Charts Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Defines the structure and options for configuring ConfigMaps as volumes in Helm charts. This section details how to enable/disable ConfigMap mounting, specify volume names, mount paths, use existing ConfigMaps, or create new ones with inline data, and set file permissions and subPath options. ```APIDOC volumeConfigMaps: enabled: true|false # Enable/disable ConfigMap volume mounting items: - name: "config-name" # Required: Name for the volume mountPath: "/path/to/mount" # Required: Where to mount in container existingConfigMap: "existing-name" # Optional: Use existing ConfigMap data: # Optional: Create new ConfigMap with this data "file1.yaml": "content..." "file2.json": "content..." subPath: "file1.yaml" # Optional: Mount only specific file readOnly: true|false # Optional: Mount as read-only (default: false) defaultMode: 0644 # Optional: File permissions (default: 0644) ``` -------------------------------- ### Advanced simpleStorage Configuration: Custom Names and Access Modes Source: https://github.com/pfnapp/charts/blob/main/SIMPLE-STORAGE.md Demonstrates advanced usage of `simpleStorage` to override default naming conventions and access modes. This example shows how to specify a custom name for a volume and explicitly set `accessModes` for both Deploy and StatefulSet contexts, providing more granular control over storage behavior. ```yaml simpleStorage: # Override auto-generated name - path: "/data" size: "200Gi" class: "ultra-fast" name: "custom-data-volume" # Override access modes (Deploy chart) - path: "/shared" size: "100Gi" class: "nfs" accessModes: ["ReadWriteMany"] # Override access modes (STS chart) - path: "/backup" size: "500Gi" class: "backup-storage" accessModes: ["ReadWriteOnce"] ``` -------------------------------- ### Define Resource Limits and Node Selectors Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy-old/README.md Example YAML configuration for specifying resource limits and requests (CPU and memory) for containers, along with node selector rules. Node selectors ensure that pods are scheduled only on nodes that match the specified labels, such as disk type or architecture. ```yaml resources: limits: cpu: 500m memory: 512Mi requests: cpu: 250m memory: 256Mi nodeSelector: disktype: ssd kubernetes.io/arch: amd64 ``` -------------------------------- ### Implement Mixed Storage Strategy for StatefulSets Source: https://github.com/pfnapp/charts/blob/main/VOLUMES.md This example demonstrates a mixed storage approach for a StatefulSet, combining per-pod persistent storage (`volumeClaimTemplates`) with shared volumes (`simpleVolumes`) and mounts (`simpleMounts`). It's suitable for applications like Elasticsearch that require both dedicated data volumes per instance and shared configuration/certificate volumes. ```yaml app: name: "elasticsearch" replicaCount: 3 # Per-pod data storage statefulset: volumeClaimTemplates: - metadata: name: es-data spec: accessModes: ["ReadWriteOnce"] storageClassName: "fast-ssd" resources: requests: storage: 200Gi # Per-pod data mount volumeMounts: - name: es-data mountPath: /usr/share/elasticsearch/data # Shared configurations and certificates simpleVolumes: - mountPath: "/usr/share/elasticsearch/config/certs" size: "1Gi" storageClass: "standard" accessModes: ["ReadWriteMany"] name: "shared-certs" simpleMounts: - mountPath: "/usr/share/elasticsearch/config" configMap: "elasticsearch-config" - mountPath: "/usr/share/elasticsearch/config/secrets" secret: "elasticsearch-secrets" ``` -------------------------------- ### APIDOC: Configure volumeSecrets for Helm Charts Source: https://github.com/pfnapp/charts/blob/main/pfnapp/example/README-volume-mounts.md Defines the structure and options for configuring Secrets as volumes in Helm charts. This section details how to enable/disable Secret mounting, specify volume names, mount paths, use existing Secrets, or create new ones with inline string data, and set file permissions and subPath options. ```APIDOC volumeSecrets: enabled: true|false # Enable/disable Secret volume mounting items: - name: "secret-name" # Required: Name for the volume mountPath: "/path/to/mount" # Required: Where to mount in container existingSecret: "existing-name" # Optional: Use existing Secret stringData: # Optional: Create new Secret with this data "username": "value" "password": "value" subPath: "username" # Optional: Mount only specific key readOnly: true|false # Optional: Mount as read-only (default: false) defaultMode: 0400 # Optional: File permissions (default: varies) ``` -------------------------------- ### StatefulSet Per-Pod Storage with Volume Claim Templates Source: https://github.com/pfnapp/charts/blob/main/pfnapp/sts/README.md This YAML example illustrates the recommended pattern for providing per-pod persistent storage to a StatefulSet using `volumeClaimTemplates`. It defines a `data` volume claim with specific access modes, storage class, and requested size, and then mounts it to a designated path within the container. ```yaml statefulset: volumeClaimTemplates: - metadata: name: data spec: accessModes: ["ReadWriteOnce"] storageClassName: "fast-ssd" resources: requests: storage: 100Gi volumeMounts: - name: data mountPath: /var/lib/app/data ``` -------------------------------- ### PFNApp Deploy Helm Chart Configuration Options Source: https://github.com/pfnapp/charts/blob/main/README.md Documentation for the configurable values of the `pfnapp/deploy` Helm chart, detailing available deployment types and their descriptions. ```APIDOC Deploy Chart Configuration: Deployment Types: - deployment: Standard Kubernetes Deployment - statefulset: Kubernetes StatefulSet for stateful applications ``` -------------------------------- ### List Available PFNApp Helm Charts Source: https://github.com/pfnapp/charts/blob/main/README.md Searches the configured Helm repositories for charts published by PFNApp, displaying their names, versions, and descriptions. ```bash helm search repo pfnapp ``` -------------------------------- ### Configure Basic Web Application Deployment with Helm Chart (YAML) Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This YAML snippet demonstrates a `values.yaml` configuration for deploying a basic Nginx web application using the Helm chart. It includes settings for the application name, image, service port, a simplified ingress with TLS, and horizontal pod autoscaling. ```yaml app: name: "my-web-app" image: repository: "nginx" tag: "1.21" service: port: 80 simpleIngress: - enabled: true domain: "myapp.example.com" className: "nginx" tls: true certManager: enabled: true issuer: "letsencrypt" autoscaling: enabled: true minReplicas: 2 maxReplicas: 10 targetCPUUtilizationPercentage: 70 ``` -------------------------------- ### Helm Chart Configuration Parameters (APIDOC) Source: https://github.com/pfnapp/charts/blob/main/pfnapp/deploy/README.md This section details the comprehensive configuration options available for the Helm chart via the `values.yaml` file. It covers application settings, image parameters, and service configurations, including default values and descriptions for each parameter. ```APIDOC Application Configuration: app.name (string): Application name. Default: "myapp" app.version (string): Application version. Default: "latest" replicaCount (integer): Number of pod replicas. Default: 1 Image Settings: image.repository (string): Container image repository. Default: "nginx" image.tag (string): Image tag. Default: "latest" image.pullPolicy (string): Image pull policy. Default: IfNotPresent image.command (array): Container command override. Default: [] image.args (array): Container arguments override. Default: [] imagePullSecrets (array): Image pull secrets. Default: [] Service Configuration: service.enabled (boolean): Enable service creation. Default: true service.type (string): Service type. Default: ClusterIP service.port (integer): Service port. Default: 80 service.targetPort (integer): Target port on pods. Default: 80 service.annotations (object): Service annotations. Default: {} service.ports (array): Multiple ports configuration. Default: [] ``` -------------------------------- ### Describe Kubernetes Ingress Resources Source: https://github.com/pfnapp/charts/blob/main/README.md Provides the command to display detailed information about all Kubernetes Ingress resources. This helps in verifying network routing, host rules, and service backend configurations for external access. ```bash kubectl describe ingress ```