Workstation Configurations

A WorkstationConfig defines what tools, runtimes, and settings to apply to matching workstations. It uses label selectors for targeting, enabling a layered configuration model.

API Definition

apiVersion: werkr.dev/v1alpha1
kind: WorkstationConfig
metadata:
  name: <string>
spec:
  selector:
    matchLabels:
      <key>: <value>     # Match workstations with these labels
  devtools:
    asdf:
      plugins:
        - name: <string>   # Tool name (asdf plugin)
          version: <string> # Desired version

Label Selectors

The selector.matchLabels field determines which workstations this configuration applies to. A workstation must have all specified labels to match.

Example: Match by dev type

spec:
  selector:
    matchLabels:
      devtype: k8s

Example: Match by multiple labels

spec:
  selector:
    matchLabels:
      devtype: k8s
      shell: zsh

Tool Provisioning

werkr uses asdf as the underlying version manager for installing development tools. Any tool with an asdf plugin can be provisioned.

Common Tools

devtools:
  asdf:
    plugins:
      - name: nodejs
        version: "22.0.0"
      - name: golang
        version: "1.23.0"
      - name: terraform
        version: "1.9.0"
      - name: kubectl
        version: "1.31.4"
      - name: helm
        version: "3.16.4"
      - name: k9s
        version: "0.32.7"

Configuration Layering

Multiple WorkstationConfigs can match a single workstation. They are merged in order, with later configurations taking precedence for conflicting values. This enables a hierarchical configuration model:

  • Base config — Common tools for all workstations
  • Team config — Team-specific tools (matched by team label)
  • Project config — Project-specific dependencies

Common Operations

# Apply a configuration
wer apply -f config.yaml

# List configurations
wer get workstationconfigs

# View details
wer get workstationconfig k8s-tools

# Edit
wer edit workstationconfig k8s-tools

# Delete
wer delete workstationconfig k8s-tools