mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
Updates for Max David's comments Adding merge comparison Reorg for clarity Updates for David
77 lines
2.8 KiB
Plaintext
77 lines
2.8 KiB
Plaintext
:_mod-docs-content-type: SNIPPET
|
|
[source,yaml]
|
|
----
|
|
apiVersion: policy.open-cluster-management.io/v1
|
|
kind: PolicyGenerator
|
|
metadata:
|
|
name: common-latest
|
|
placementBindingDefaults:
|
|
name: common-latest-placement-binding <1>
|
|
policyDefaults:
|
|
namespace: ztp-common
|
|
placement:
|
|
labelSelector:
|
|
matchExpressions:
|
|
- key: common
|
|
operator: In
|
|
values:
|
|
- "true"
|
|
- key: du-profile
|
|
operator: In
|
|
values:
|
|
- latest
|
|
remediationAction: inform
|
|
severity: low
|
|
namespaceSelector:
|
|
exclude:
|
|
- kube-*
|
|
include:
|
|
- '*'
|
|
evaluationInterval:
|
|
compliant: 10m
|
|
noncompliant: 10s
|
|
policies:
|
|
- name: common-latest-config-policy
|
|
policyAnnotations:
|
|
ran.openshift.io/ztp-deploy-wave: "1"
|
|
manifests:
|
|
- path: source-crs/ReduceMonitoringFootprint.yaml
|
|
- path: source-crs/DefaultCatsrc.yaml <2>
|
|
patches:
|
|
- metadata:
|
|
name: redhat-operators-disconnected
|
|
spec:
|
|
displayName: disconnected-redhat-operators
|
|
image: registry.example.com:5000/disconnected-redhat-operators/disconnected-redhat-operator-index:v4.9
|
|
- path: source-crs/DisconnectedICSP.yaml
|
|
patches:
|
|
- spec:
|
|
repositoryDigestMirrors:
|
|
- mirrors:
|
|
- registry.example.com:5000
|
|
source: registry.redhat.io
|
|
- name: common-latest-subscriptions-policy
|
|
policyAnnotations:
|
|
ran.openshift.io/ztp-deploy-wave: "2"
|
|
manifests: <3>
|
|
- path: source-crs/SriovSubscriptionNS.yaml
|
|
- path: source-crs/SriovSubscriptionOperGroup.yaml
|
|
- path: source-crs/SriovSubscription.yaml
|
|
- path: source-crs/SriovOperatorStatus.yaml
|
|
- path: source-crs/PtpSubscriptionNS.yaml
|
|
- path: source-crs/PtpSubscriptionOperGroup.yaml
|
|
- path: source-crs/PtpSubscription.yaml
|
|
- path: source-crs/PtpOperatorStatus.yaml
|
|
- path: source-crs/ClusterLogNS.yaml
|
|
- path: source-crs/ClusterLogOperGroup.yaml
|
|
- path: source-crs/ClusterLogSubscription.yaml
|
|
- path: source-crs/ClusterLogOperatorStatus.yaml
|
|
- path: source-crs/StorageNS.yaml
|
|
- path: source-crs/StorageOperGroup.yaml
|
|
- path: source-crs/StorageSubscription.yaml
|
|
- path: source-crs/StorageOperatorStatus.yaml
|
|
----
|
|
<1> Applies the policies to all clusters with this label.
|
|
<2> The `DefaultCatsrc.yaml` file contains the catalog source for the disconnected registry and related registry configuration details.
|
|
<3> Files listed under `policies.manifests` create the Operator policies for installed clusters.
|