This component contains the Helm charts essential for deploying and managing the Kubernetes Pizza Observability project components within a Kubernetes cluster. Helm, as a package manager for Kubernetes, streamlines the deployment process by bundling application components into reusable and configurable packages called charts.
These charts are designed to be modular, allowing for flexible deployment of individual components or the entire stack.
While the current helm/k8s-pizza-observability-chart/ directory suggests a single monolithic chart, a more modular approach often involves separate charts for distinct components. This documentation will describe the logical components that would typically be managed by Helm, whether as subcharts of a parent chart or as individual, deployable charts.
pizza-controller (Logical Component)PizzaOrder Custom Resources (CRs) within the cluster. When a PizzaOrder CR is created or updated, the controller interacts with the Dominos API (or a similar pizza delivery service API) to place an actual pizza order.Deployment: Manages the controller's pod replicas (templates/pizza-controller-deployment.yaml).CustomResourceDefinition (CRD): Defines the PizzaOrder schema (templates/pizzaorders.yaml).ServiceAccount: Provides a dedicated identity for the controller pod.ClusterRole & ClusterRoleBinding (or Role & RoleBinding): Grants necessary RBAC permissions.Secret: For Dominos API credentials and payment information (templates/dominos-payment-secret.yaml).monitoring-stack (Leveraging Community Charts as Dependencies)kube-prometheus-stack as a dependency in the Chart.yaml of the main k8s-pizza-observability-chart or by installing it separately.kube-prometheus-stack or similar):
templates/prometheus-values.yaml or directly in the values for the dependency chart.kubectl: Configured to communicate with your Kubernetes cluster.If your main chart depends on community charts like kube-prometheus-stack:
# Add Prometheus community charts (if not already added)
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
k8s-pizza-observability-chartThe main chart appears to be located at helm/k8s-pizza-observability-chart/.
values.yaml: The primary configuration file is helm/k8s-pizza-observability-chart/values.yaml. Review and customize it. You can also create a separate override file (e.g., my-custom-values.yaml).
Key sections in values.yaml (based on existing README.md structure):
global: Namespace, common labels.pizzaController: Image settings, resources, service account.dominosPayment: Card details for the payment secret.prometheus: Enablement, alert rule parameters (CPU threshold, duration).Example my-custom-values.yaml:
global:
namespace: k8s-pizza-prod
pizzaController:
image:
repository: my-custom-repo/pizza-controller
tag: v1.2.3
resources:
requests:
cpu: "100m"
memory: "128Mi"
dominosPayment:
cardType: "Visa"
cardNumber: "YOUR_VISA_CARD_NUMBER"
# ... other payment details ...
# If kube-prometheus-stack is a subchart, configure it here:
# kube-prometheus-stack:
# grafana:
# adminPassword: "SuperSecurePassword!"
# alertmanager:
# config:
# receivers:
# - name: 'pizza-webhook'
# webhook_configs:
# - url: 'http://YOUR_AZURE_FUNCTION_OR_HANDLER/api/alert'
From the directory containing the helm folder (e.g., project root):
helm install k8s-pizza-release ./helm/k8s-pizza-observability-chart/ -n k8s-pizza-prod --create-namespace -f my-custom-values.yaml
k8s-pizza-release: Your chosen release name../helm/k8s-pizza-observability-chart/: Path to the chart.-n k8s-pizza-prod: Target namespace.--create-namespace: If the namespace doesn't exist.-f my-custom-values.yaml: Your custom values file.Refer to the helm/k8s-pizza-observability-chart/values.yaml file for a comprehensive list of configurable parameters and their default values. The existing README.md provides a good summary table structure for these values, which should be maintained and expanded in the chart's own README.md.
Key Configuration Areas:
kube-prometheus-stack is a subchart, all its extensive configuration options (persistence, Grafana settings, Alertmanager receivers, etc.).To upgrade an existing Helm release to a new chart version or with modified configuration:
helm/k8s-pizza-observability-chart/) has the updated chart version in Chart.yaml and any template changes.my-custom-values.yaml) if needed.helm upgrade:
helm upgrade k8s-pizza-release ./helm/k8s-pizza-observability-chart/ -n k8s-pizza-prod -f my-custom-values.yaml
To remove a deployed Helm release and its associated Kubernetes resources:
helm uninstall k8s-pizza-release -n k8s-pizza-prod
Important Notes on Uninstallation:
pizzaorders.k8spizza.com) are also not removed by default on helm uninstall. If you need to remove the CRD, do so manually:
kubectl delete crd pizzaorders.k8spizza.com
k8s-pizza-observability-chart)The existing README.md outlines this structure:
k8s-pizza-observability-chart/
├── Chart.yaml # Chart metadata (name, version, appVersion, dependencies)
├── values.yaml # Default configuration values for this chart and subcharts.
├── templates/ # Directory of Kubernetes manifest templates.
│ ├── _helpers.tpl # Go template helper functions.
│ ├── dominos-payment-secret.yaml # Template for the payment Secret.
│ ├── pizza-controller-deployment.yaml # Template for the controller Deployment.
│ ├── pizzaorders.yaml # Template for the PizzaOrder CRD.
│ └── prometheus-values.yaml # Potentially a values snippet or ConfigMap for Prometheus rules.
├── .helmignore # Files to ignore when packaging the chart.
└── charts/ # Optional: Directory for subcharts (e.g., if kube-prometheus-stack was vendored).
values.yaml.values.yaml. Use external secrets management (e.g., Vault, Sealed Secrets, SOPS) or rely on pre-created secrets.requests and limits.livenessProbe and readinessProbe for deployments.README.md within the chart directory (helm/k8s-pizza-observability-chart/README.md) detailing all parameters, prerequisites, and usage.helm lint and helm template extensively during development.Chart.yaml.helm/k8s-pizza-observability-chart/)helm lint .
helm template my-release . -f values.yaml -n test-namespace > rendered-manifests.yaml
# or with debug output
helm install my-release . --dry-run --debug -n test-namespace -f values.yaml
helm package .
This creates a .tgz archive of your chart that can be distributed or uploaded to a Helm repository.