| name | patternizer |
| description | AI assistance for Patternizer — a CLI tool that bootstraps Git repositories containing Helm charts into ready-to-use Validated Patterns for OpenShift. Use when initializing, upgrading, or working with Validated Patterns. |
| related_skills | ["vp-refactor","vp-deploy-test"] |
Patternizer Skill
When to Use
- Initializing a new Validated Pattern from a Git repository with Helm charts
- Upgrading an existing Validated Pattern to the latest common structure
- Understanding the generated scaffolding files (values-global.yaml, pattern.sh, Makefile)
- Configuring secrets management for Validated Patterns
- Working with the
pattern.sh utility script
- Troubleshooting pattern initialization or upgrade issues
Instructions
- Reference the documentation in
references/ for detailed guidance
- See
references/REFERENCE.md for an index of available documentation files
- Patternizer runs as a container via Podman or Docker — no local Go installation required
Quick Start
cd my-pattern-repo
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" \
quay.io/validatedpatterns/patternizer init
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" \
quay.io/validatedpatterns/patternizer init --with-secrets
Key Commands
patternizer init
patternizer init --with-secrets
patternizer upgrade
patternizer upgrade --replace-makefile
All commands are typically run via the container image:
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" \
quay.io/validatedpatterns/patternizer <command>
Independent Deployment Scripts
Every Validated Pattern project should have standalone shell scripts that wrap pattern.sh commands. These scripts live in the pattern repo root, are committed to git (they contain no secrets), and serve as the single entry point for deploying and tearing down the pattern.
When activating this section
Before generating any script, check whether one already exists:
ls deploy.sh teardown.sh
If the scripts exist, use them instead of raw pattern.sh commands. If they do not exist, generate them from the templates below.
After generating:
chmod +x deploy.sh teardown.sh
git add deploy.sh teardown.sh
git commit -m "feat: add independent deploy and teardown scripts"
deploy.sh
#!/usr/bin/env bash
set -euo pipefail
PATTERN_ROOT="${PATTERN_ROOT:-$(cd "$(dirname "$0")" && pwd)}"
cd "$PATTERN_ROOT"
if [ ! -f values-secret.yaml ]; then
echo "ERROR: values-secret.yaml not found."
echo "Copy values-secret.yaml.template, populate it, and place it in the pattern root."
echo "Do NOT commit values-secret.yaml to git."
exit 1
fi
echo "==> Installing Validated Pattern ..."
./pattern.sh make install
echo "==> Install complete. Run vp-deploy-validator to confirm ArgoCD convergence."
teardown.sh
#!/usr/bin/env bash
set -euo pipefail
PATTERN_ROOT="${PATTERN_ROOT:-$(cd "$(dirname "$0")" && pwd)}"
cd "$PATTERN_ROOT"
read -rp "This will uninstall the pattern and remove all ArgoCD Applications. Continue? [y/N] " confirm
[[ "$confirm" =~ ^[Yy]$ ]] || exit 0
echo "==> Uninstalling Validated Pattern ..."
./pattern.sh make uninstall
echo "==> Uninstall complete."
Important reminders
deploy.sh and teardown.sh are safe to commit — they contain no secrets
values-secret.yaml must never be committed (add to .gitignore if not already present)
- The
deploy.sh pre-check for values-secret.yaml is a vp-deploy-test submission-blocking requirement — a pattern that deploys without this check fails the non-interactive install test
- Add a "Quick Deploy" section to
README.md referencing these scripts so new contributors know how to get started
Generated Files
Running patternizer init creates:
| File | Purpose |
|---|
values-global.yaml | Global pattern configuration |
values-<cluster_group>.yaml | Cluster group-specific values |
pattern.sh | Utility script for install, upgrade operations |
Makefile | Simple Makefile including Makefile-common |
Makefile-common | Core Makefile with pattern-related targets |
ansible.cfg | Ansible configuration for pattern.sh |
With --with-secrets, additionally:
values-secret.yaml.template — template for defining secrets
- Updates
values-global.yaml to enable secret loading
Workflow
git clone https://github.com/your-org/your-pattern.git
cd your-pattern && git checkout -b initialize-pattern
podman run --pull=newer -v "$PWD:$PWD:z" -w "$PWD" \
quay.io/validatedpatterns/patternizer init
git add . && git commit -m 'initialize pattern using patternizer'
git push -u origin initialize-pattern
export KUBECONFIG=/path/to/cluster/kubeconfig
./pattern.sh make install
Best Practices
- Commit your work to git before running
init --with-secrets (not easily reversible)
- Use the container image rather than building from source
- The
upgrade command removes the common/ directory if it exists
- After upgrade, verify
Makefile contains include Makefile-common
- See Validated Patterns documentation for pattern design guidance