How hazelcast/charts works
Project Type and Purpose
• The project is an open-source repository for Helm charts.
• Its main purpose is to enable users to deploy Hazelcast clusters on Kubernetes via Helm.
• The README points to installation documentation and guides for both Hazelcast and Hazelcast Enterprise.
File Structure Analysis
• Top-level directories and files:
• .github: Contains CI/CD workflows (e.g., chart update, pull request builder, push charts) which handle automated testing and deployment of the charts.
• stable: The primary location for the two Helm charts (hazelcast and hazelcast-enterprise), each following the common Helm chart structure:
▸ Chart.yaml (defines the chart metadata)
▸ values.yaml (default configurable values)
▸ templates/: Contains Kubernetes resource templates such as StatefulSets, Services, Ingress, Roles, RoleBindings, and tests directories.
• Other files include CONTRIBUTING.md, LICENSE, and artifacthub-repo.yml (indicating integration with Artifact Hub for distribution).
Key Components
a. CI/CD Pipeline:
• Represented by the .github directory and its workflow files.
• How changes are automatically checked (dependabot), built (pr-builder), and deployed (push-charts, chart-update).
b. Helm Charts:
• Two main components: “hazelcast” and “hazelcast-enterprise” located under the stable directory.
• Each chart contains its own metadata (Chart.yaml), configuration (values.yaml), and a rich set of templates for deploying different Kubernetes resources.
c. Testing and Validation:
• The templates/tests directories within each chart include test files (e.g., test-hazelcast.yaml, test-management-center.yaml) used for chart verification.
d. Distribution:
• The artifacthub-repo.yml and README links indicate integration with Artifact Hub. This serves as an external distribution and discovery mechanism.
Architectural Patterns and Design Principles
• Modularization: Separation of concerns by having distinct directories for each chart and for CI/CD workflows.
• Declarative Configuration: The use of Helm charts to declaratively define Kubernetes resources.
• CI/CD Integration: Automated pull request building, testing, and chart updating pipelines.
• Extensibility: Templates are modular with helper templates and separate test files to allow customization and extension.