Validated Patterns

Creating a new pattern with patternizer

Patternizer is a command-line tool that bootstraps a Git repository into a ready-to-use Validated Pattern. It generates all required scaffolding — values files, Makefile, pattern.sh, and Ansible configuration — so you can focus on defining your applications rather than wiring up framework boilerplate.

Prerequisites

  • A container runtime (Podman or Docker)

  • Git

Shell Function

You can add a simple shell function to your shell configuration file (for example ~/.zshrc or ~/.bashrc) to enable easier use of the tool.

pattern() {
  podman run --pull=newer \
    -v "$PWD:$PWD:z" \
    -w "$PWD" \
    quay.io/validatedpatterns/patternizer "$@"
}

With this function, you can run pattern init directly instead of the full podman run command. The examples below assume this function is in place.

Step 1: Create your pattern repository

Create or clone an empty Git repository named after your pattern. The directory name becomes the pattern name in values-global.yaml.

$ mkdir my-pattern && cd my-pattern
$ git init

Step 2: Initialize the pattern

To create a pattern without the secrets framework:

$ pattern init

To create a pattern with HashiCorp Vault and External Secrets Operator scaffolding:

$ pattern init --with-secrets

What patternizer generates

Running pattern init --with-secrets on an empty directory named my-pattern produces the following files:

my-pattern
├── ansible.cfg                 # default Ansible configuration
├── Makefile                    # stub Makefile which includes Makefile-common
├── Makefile-common             # common commands (install, load-secrets, etc.)
├── pattern.sh                  # convenience utility container (has oc, helm, make, etc.)
├── values-global.yaml          # names the pattern based on the directory and sets common defaults
├── values-prod.yaml            # contains the components for the secrets framework
└── values-secret.yaml.template # stub for the secrets file

The generated values-global.yaml contains:

global:
  pattern: my-pattern
  singleArgoCD: true
  secretLoader:
    disabled: false
main:
  clusterGroupName: prod
  multiSourceConfig:
    enabled: true
    clusterGroupChartVersion: 0.9.*

The generated values-prod.yaml contains:

clusterGroup:
  name: prod
  namespaces:
    my-pattern:
    vault:
    external-secrets-operator:
      operatorGroup: true
      targetNamespaces: []
    external-secrets:
  subscriptions:
    eso:
      name: openshift-external-secrets-operator
      namespace: external-secrets-operator
      channel: stable-v1
  applications:
    openshift-external-secrets:
      name: openshift-external-secrets
      namespace: external-secrets
      chart: openshift-external-secrets
      chartVersion: 0.0.*
    vault:
      name: vault
      namespace: vault
      chart: hashicorp-vault
      chartVersion: 0.1.*

If you omit --with-secrets, the generated files will not include the Vault and External Secrets Operator configuration, and secretLoader.disabled will be set to true in values-global.yaml.

Step 3: Define your pattern content

After initialization, you need to add your operators, applications, and Helm charts to the pattern. There are two approaches:

Using the pattern-author AI coding skill

Patternizer installs an AI coding skill to .claude/skills/pattern-author/ and .cursor/skills/pattern-author/ during initialization. This skill teaches AI coding assistants such as Claude Code and Cursor how to author Validated Patterns — defining namespaces, operators, applications, secrets, hub/spoke clusters, and more.

Open the initialized repository in your AI-assisted editor and the skill will be available automatically. You can ask the assistant to add operators, wire in Helm charts, configure secrets, or set up multi-cluster deployments.

Manually editing values files

You can directly edit the generated values files to define your pattern:

  • Add operator subscriptions and namespaces to values-prod.yaml

  • Add Helm chart applications to values-prod.yaml

  • Configure global settings in values-global.yaml

  • Define secrets in values-secret.yaml.template

For detailed guidance on structuring your pattern, see Structuring a validated pattern. For adding operators, see Adding operators to the framework.

Idempotency

The pattern init command is idempotent and can be run multiple times during pattern creation to update the pattern values files. You can go from pattern init to pattern init --with-secrets to add the secrets framework to your pattern. If you use helm create (or ./pattern.sh helm create) to create Helm charts and then run pattern init again, the Helm charts will be automatically added to your values-prod.yaml.

Next steps