AI Skill Report Card

Updating IngressClassName in Values YAML

B+79·Sep 30, 2026·Source: Web
13 / 15
Bash
# Find all target files first find . -path "*/qualif/values.yaml"

For each match, apply this logic:

YAML
# Case 1: no "ingresses" key at all -> add block ingresses: ingressClassName: traefik # Case 2: "ingresses" exists but no "ingressClassName" under it -> add key ingresses: someOtherField: value ingressClassName: traefik # <-- added # Case 3: "ingresses.ingressClassName" exists -> force value to traefik ingresses: ingressClassName: traefik # <-- overwritten if it was e.g. nginx

Note: the task description initially says default to nginx, but later clarifies the target value must always end up as traefik. Treat traefik as the single desired final value in all cases — this resolves the contradiction. Confirm this interpretation with the user before a destructive bulk run if any ambiguity remains in their actual repo.

Recommendation▾
Resolve the confusing note about 'nginx vs traefik contradiction' at the top of Quick Start—this reads like leftover reasoning from task drafting rather than clean skill documentation; state the rule plainly instead.
14 / 15

Progress:

  • Step 1: Discover all */qualif/values.yaml files in the project tree
  • Step 2: Parse each file as YAML (preserve comments/formatting if possible)
  • Step 3: Inspect for ingresses key
  • Step 4: Inspect for ingresses.ingressClassName key
  • Step 5: Apply correct mutation (add block / add key / overwrite value)
  • Step 6: Write file back, preserving existing indentation style and other keys untouched
  • Step 7: Produce a summary report (file path, action taken: added-block / added-key / overwritten / already-correct)
  • Step 8: Diff-review before committing

Step-by-step detail

  1. Locate files

    Bash
    find . -type d -name qualif -exec test -f {}/values.yaml \; -print
  2. Read and check structure — use a YAML-aware tool (yq, or a script with ruamel.yaml in Python to preserve comments), not naive text search. Naive grep/sed risks corrupting indentation or missing nested keys.

    Bash
    yq e '.ingresses' qualif/values.yaml yq e '.ingresses.ingressClassName' qualif/values.yaml
  3. Decision tree per file:

    • ingresses is null → insert whole block:
      Bash
      yq e -i '.ingresses.ingressClassName = "traefik"' qualif/values.yaml
    • ingresses exists, ingresses.ingressClassName is null → add key only (same yq command above works for both cases since yq creates missing paths).
    • ingresses.ingressClassName exists but differs from traefik → overwrite:
      Bash
      yq e -i '.ingresses.ingressClassName = "traefik"' qualif/values.yaml
    • Already traefik → skip, log as no-op.
  4. Log every action to a report file ingressclass-update-report.txt:

    ./service-a/qualif/values.yaml: added-block
    ./service-b/qualif/values.yaml: added-key
    ./service-c/qualif/values.yaml: overwritten (was: nginx)
    ./service-d/qualif/values.yaml: already-correct
    
  5. Review diffs with git diff before committing, especially for files where indentation might have shifted.

Recommendation▾
The skill name is oddly specific/narrow (ingressClassName + values.yaml + traefik hardcoded)—consider generalizing to a reusable 'bulk-updating-yaml-values' skill with the ingress case as one example, improving reusability.
17 / 20

Example 1 — no ingresses key

Input (service-a/qualif/values.yaml):

YAML
replicaCount: 2 image: repository: my-app tag: latest

Output:

YAML
replicaCount: 2 image: repository: my-app tag: latest ingresses: ingressClassName: traefik

Example 2 — ingresses present, no ingressClassName

Input:

YAML
ingresses: enabled: true host: app.example.com

Output:

YAML
ingresses: enabled: true host: app.example.com ingressClassName: traefik

Example 3 — ingressClassName present with wrong value

Input:

YAML
ingresses: ingressClassName: nginx host: app.example.com

Output:

YAML
ingresses: ingressClassName: traefik host: app.example.com

Example 4 — already correct

Input:

YAML
ingresses: ingressClassName: traefik

Output: unchanged, logged as already-correct.

Recommendation▾
Description is solid but could tighten by removing the redundant second example trigger phrase; also confirm gerund-noun naming convention is followed consistently (it is, but borderline verbose).
  • Use a real YAML parser/editor (yq, ruamel.yaml) — never blind string replace, since key names like ingressClassName could appear in comments or unrelated blocks.
  • Always run on a git-tracked working tree so changes are reviewable via git diff and revertible.
  • Do a dry-run first: print planned changes without writing, then apply after confirmation.
  • Batch-process with a script rather than manually editing each file — reduces human error across many folders.
  • Keep the per-file action log; it's essential for auditing a bulk change across an unknown number of services.
  • Preserve key ordering and existing comments where the tooling allows (yq in place-edit mode generally preserves comments; naive re-dump of parsed YAML often does not).
  • Don't use sed/regex replace on YAML — breaks on differing indentation, duplicate key names elsewhere in the file, or multi-document files.
  • Don't assume every project folder actually has a qualif subfolder — skip and log missing ones instead of erroring out the whole batch.
  • Don't overwrite unrelated sibling keys under ingresses — only touch ingressClassName.
  • Don't forget files where ingresses is defined as an empty value (ingresses: with nothing under it) — must still correctly nest the new key rather than create a duplicate top-level ingresses block.
  • Don't commit without reviewing the diff — bulk YAML tools can occasionally reformat unrelated parts of the file (quote styles, blank lines).
0
Grade B+AI Skill Framework
Scorecard
Criteria Breakdown
Quick Start
13/15
Workflow
14/15
Examples
17/20
Completeness
17/20
Format
13/15
Conciseness
12/15