git clone https://github.com/your-org/your-awesome-app.git
cd your-awesome-app
git checkout -b feature/initialize-pattern
From Helm Charts to Validated Patterns in a Single Command
Validated Patterns provide a powerful, GitOps-based framework for deploying complex cloud-native applications. We have great resources on our Learn and Workshop pages, but the initial learning curve can seem steep.
For developers who just want to package their applications as a pattern, the most common route has been to clone the multicloud-gitops
repository and adapt it. While effective, this process can be a hurdle for a prospective author who simply wants to know: "How can I turn my Helm charts into a pattern as quickly and painlessly as possible?"
To bridge this gap, we are thrilled to introduce Patternizer—a new command-line tool designed specifically to address this pain point.
The Solution: Patternizer
Patternizer is a CLI tool that bootstraps a Git repository containing Helm charts into a ready-to-use Validated Pattern. It automatically generates the necessary scaffolding, configuration files, and utility scripts, so you can get your pattern up and running in minutes.
With Patternizer, you can go from a directory of Helm charts to a fully functional Validated Pattern with a single command.
Getting Started: A Quick Workflow
Let’s walk through an example. All you need is a Git repository containing one or more Helm charts and a container runtime like Podman or Docker.
Prepare your repository:
Clone your repository and create a new branch for the pattern initialization.
Initialize the pattern:
Navigate to your repository’s root and run the Patternizer container, mounting your current directory.
podman run -v "$PWD:/repo:z" quay.io/hybridcloudpatterns/patternizer init
This single command scans your repository for Helm charts and generates all the necessary files to turn it into a Validated Pattern.
Review and commit:
Commit the newly generated files to your branch.
git add . git commit -m 'feat: Initialize Validated Pattern with Patternizer' git push -u origin feature/initialize-pattern
Install your new pattern!
Patternizer also generates a handy utility script. You can now install your pattern just like any other Validated Pattern.
./pattern.sh make install
Under the Hood: What You Get
Running patternizer init
creates a set of files that form the foundation of your pattern:
pattern.sh
: A utility script for common operations likeinstall
andupgrade
.Makefile
&Makefile-pattern
: The core Makefiles with all the pattern-related build logic.values-global.yaml
: A place for global pattern configuration.values-prod.yaml
: A cluster group-specific values file (for the defaultprod
group).
The tool is designed to be idempotent. You can continue adding Helm charts to your repository and just rerun the init
command. It will intelligently update the necessary values files while preserving any manual changes you’ve made.
Need Secrets? We’ve Got You Covered
When your pattern is ready to handle sensitive information, you can easily add scaffolding for secrets management.
Run the init
command with the --with-secrets
flag:
podman run -v "$PWD:/repo:z" quay.io/hybridcloudpatterns/patternizer init --with-secrets
This command updates your configuration to integrate with External Secrets Operator (ESO) and Vault. It generates a values-secret.yaml.template
for defining your secrets and automatically adds the required operator subscriptions to your pattern.
Current Scope and Future Direction
Patternizer is in its infancy, and its initial focus is on solving the Helm-to-Pattern problem. As such, there are a few things to keep in mind:
Helm-Based Patterns Only: The tool is currently designed exclusively for creating patterns from Helm charts. If you need an Ansible-based GitOps pattern, this tool will not be helpful.
Operators Need Manual Addition: Patternizer creates the Argo CD
Applications
,Namespaces
, andProjects
for your Helm charts. If your pattern requires Operators from OperatorHub, you will need to manually add them to thesubscriptions
section in your cluster group values file (e.g.,values-prod.yaml
). Patternizer conveniently creates this section as an empty map for you.Single Cluster Group Focus: The tool generates a single cluster group named
prod
by default. If your use case requires managing multiple, distinct cluster groups, we recommend the traditional approach of cloning themulticloud-gitops
pattern for now.
We Want Your Feedback!
Patternizer is a simple tool today, but it is extendable to cover more use cases if the need arises. We built it to make your life easier, and your feedback is crucial.
Please give it a try and don’t hesitate to ask for features or report bugs on Patternizer’s GitHub issues page. Happy pattern-making!