Skip to content

Fix preference field shown as list in PickN affinity example in crp.md #102

Description

In content/en/docs/how-tos/crp.md, the PickN affinity example shows:

preferredDuringSchedulingIgnoredDuringExecution:
    - weight: 20
      preference:
        - labelSelector:
            matchLabels:
                critical-level: 1

The preference field is typed as ClusterSelectorTerm (a single struct, not a slice) per apis/placement/v1/clusterresourceplacement_types.go. It should not have a leading -. The correct form is:

preferredDuringSchedulingIgnoredDuringExecution:
  - weight: 20
    preference:
      labelSelector:
        matchLabels:
          critical-level: "1"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions