1.3.6.2. PlacementRule matchExpression 没有使用新的 matchLabel 删除
当您将策略 PlacementRule
从 matchExpressions
更新至 matchLabels
时,旧的 matchExpression
不会被删除。
请参阅以下示例中第一个示例中的 matchExpressions
更改为 matchLabels
,但 matchExpressions
不会被删除。
apiVersion: apps.open-cluster-management.io/v1 kind: PlacementRule metadata: name: placement-policy-etcdencryption spec: clusterConditions: - status: "True" type: ManagedClusterConditionAvailable clusterSelector: matchExpressions: - {key: environment, operator: In, values: ["test"]}
spec: clusterConditions: - status: "True" type: ManagedClusterConditionAvailable clusterSelector: matchExpressions: [] matchLabel: {}