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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions