Patternizer is a command-line 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. It can also be used to upgrade existing patterns as described in the Validated Pattern's blog.
Note: This repo was developed with AI tools including Cursor, Claude and Gemini.
Prerequisites:
- Podman or Docker
- A Git repository you want to convert into a pattern
Navigate to your repository's root directory and run the initialization command:
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer initThis single command will generate all the necessary files to turn your repository into a Validated Pattern.
-
Clone or create your pattern repository
git clone https://github.com/your-org/your-pattern.git cd your-pattern git checkout -b initialize-pattern -
Initialize the pattern using Patternizer
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer init
-
Review, commit, and push the generated files
git status git add . git commit -m 'initialize pattern using patternizer' git push -u origin initialize-pattern
-
Login to an OpenShift cluster
export KUBECONFIG=/path/to/cluster/kubeconfig -
Install the pattern
./pattern.sh make install
Using the prebuilt container is the easiest way to run Patternizer, as it requires no local installation.
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer initpodman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer init --with-secretsUse this to migrate or refresh an existing pattern repo to the latest common structure and scripts.
# Refresh common assets, keep your Makefile unless it lacks the include
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer upgrade
# Replace your Makefile with the default from Patternizer
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" quay.io/validatedpatterns/patternizer upgrade --replace-makefileWhat upgrade does:
- Removes the
common/directory if it exists - Updates
ansible.cfg,Makefile-common, andpattern.shto the latest versions from the resources directory - Makefile handling:
- If
--replace-makefileis set: replaces an existing Makefile, if present, toMakefilefrom the resources directory - If not set:
- If no
Makefileexists: copies the defaultMakefile - If a
Makefileexists and already containsinclude Makefile-commonanywhere: leaves it unchanged - Otherwise: prepends
include Makefile-commonto the first line so your existing targets are preserved
- If no
- If
You can start simple and add secrets management later.
- By default,
patternizer initdisables secret loading. - To add secrets scaffolding, run
patternizer init --with-secretsat any time. This will update your configuration to enable secrets. - Important: This action is not easily reversible. We recommend committing your work to Git before adding secrets support.
For more details on how secrets work in the framework, see the Secrets Management Documentation.
Running patternizer init creates the following:
values-global.yaml: Global pattern configuration.values-<cluster_group>.yaml: Cluster group-specific values.pattern.sh: A utility script for common pattern operations (install,upgrade, etc.).Makefile: A simple Makefile that includesMakefile-common.Makefile-common: The core Makefile with all pattern-related targets.ansible.cfg: Configuration for the ansible installation used when./pattern.shis called
Using the --with-secrets flag additionally creates:
values-secret.yaml.template: A template for defining your secrets.- It also updates
values-global.yamlto setglobal.secretLoader.disabled: falseand adds Vault and External Secrets Operator to the cluster group values.
This section is for developers who want to contribute to the Patternizer project itself.
- Go (see
go.modfor version) - Podman or Docker
- Git
- Make
# 1. Clone the repository
git clone https://github.com/validatedpatterns/patternizer.git
cd patternizer
# 2. Set up the development environment
make dev-setup
# 3. Make your changes...
# 4. Run the full CI suite locally before committing
make ci- Fork the repository.
- Create a feature branch for your changes.
- Make your changes and ensure they pass the local CI check (
make ci). - Submit a pull request.