Skip to content

Commit

Permalink
Merge pull request #862 from Missxiaoguo/add_wave_in_source_crs
Browse files Browse the repository at this point in the history
ztp: Add ztp-deploy-wave annotation in source CR
  • Loading branch information
openshift-merge-robot committed Dec 17, 2021
2 parents f18d473 + 166de42 commit bcad6b3
Show file tree
Hide file tree
Showing 46 changed files with 91 additions and 4 deletions.
14 changes: 12 additions & 2 deletions ztp/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: ci-job test-policygen checkExtraManifests test-policygen-kustomize test-siteconfig test-siteconfig-kustomize
.PHONY: ci-job test-policygen checkExtraManifests checkSourceCRsAnnotation test-policygen-kustomize test-siteconfig test-siteconfig-kustomize

ci-job: test-policygen checkExtraManifests test-policygen-kustomize test-siteconfig test-siteconfig-kustomize
ci-job: test-policygen checkExtraManifests checkSourceCRsAnnotation test-policygen-kustomize test-siteconfig test-siteconfig-kustomize

test-policygen:
@echo "ZTP: Build policy generator and run test"
Expand All @@ -9,6 +9,16 @@ test-policygen:
checkExtraManifests:
$(MAKE) -C ./extra-manifests-builder check

checkSourceCRsAnnotation:
for sourcefile in ./source-crs/*.yaml;do \
if [[ "$${sourcefile}" != *"MachineConfig"* ]];then \
if ! grep -qE "ran.openshift.io/ztp-deploy-wave" "$${sourcefile}";then \
echo "Error: missing annotation 'ran.openshift.io/ztp-deploy-wave' in $${sourcefile}"; \
exit 1; \
fi; \
fi; \
done; \

test-policygen-kustomize:
@echo "ZTP: Build policy generator kustomize plugin and run test"
$(MAKE) -C ./policygenerator-kustomize-plugin test
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/AcceleratorsNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ apiVersion: v1
kind: Namespace
metadata:
name: vran-acceleration-operators
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
4 changes: 3 additions & 1 deletion ztp/source-crs/AcceleratorsOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: vran-operators
namespace: vran-acceleration-operators
namespace: vran-acceleration-operators
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- vran-acceleration-operators
4 changes: 3 additions & 1 deletion ztp/source-crs/AcceleratorsSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: sriov-fec-subscription
namespace: vran-acceleration-operators
namespace: vran-acceleration-operators
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: stable
name: sriov-fec
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/AmqInstance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: Interconnect
metadata:
name: amq-router
namespace: amq-router
annotations:
ran.openshift.io/ztp-deploy-wave: "100"
spec:
deploymentPlan:
placement: Any
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/AmqSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: Subscription
metadata:
name: amq7-interconnect-subscription
namespace: amq-router
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: 1.10.x
name: amq7-interconnect-operator
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/AmqSubscriptionNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metadata:
name: amq-router
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
2 changes: 2 additions & 0 deletions ztp/source-crs/AmqSubscriptionOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: OperatorGroup
metadata:
name: amq-router
namespace: amq-router
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- amq-router
1 change: 1 addition & 0 deletions ztp/source-crs/ClusterLogCatSource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: Openshift Cluster Logging Operator
icon:
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/ClusterLogForwarder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ClusterLogForwarder
metadata:
name: instance
namespace: openshift-logging
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
outputs: $outputs
inputs:
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/ClusterLogNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ metadata:
name: openshift-logging
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
2 changes: 2 additions & 0 deletions ztp/source-crs/ClusterLogOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: OperatorGroup
metadata:
name: cluster-logging
namespace: openshift-logging
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- openshift-logging
2 changes: 2 additions & 0 deletions ztp/source-crs/ClusterLogSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Subscription
metadata:
name: cluster-logging
namespace: openshift-logging
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: "stable"
name: cluster-logging
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/ClusterLogging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ClusterLogging
metadata:
name: instance
namespace: openshift-logging
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
managementState: "Managed"
curation:
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/ConsoleOperatorDisable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
include.release.openshift.io/self-managed-high-availability: "false"
include.release.openshift.io/single-node-developer: "false"
release.openshift.io/create-only: "true"
ran.openshift.io/ztp-deploy-wave: "10"
name: cluster
spec:
logLevel: Normal
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/DefaultCatsrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: default-cat-source
image: $imageUrl
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/DisableSnoNetworkDiag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ apiVersion: operator.openshift.io/v1
kind: Network
metadata:
name: cluster
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
disableNetworkDiagnostics: true
2 changes: 2 additions & 0 deletions ztp/source-crs/DisconnectedICSP.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: disconnected-internal-icsp
annotations:
ran.openshift.io/ztp-deploy-wave: "1"
spec:
repositoryDigestMirrors: $mirrors

2 changes: 2 additions & 0 deletions ztp/source-crs/OperatorHub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: config.openshift.io/v1
kind: OperatorHub
metadata:
name: cluster
annotations:
ran.openshift.io/ztp-deploy-wave: "1"
spec:
disableAllDefaultSources: true

2 changes: 2 additions & 0 deletions ztp/source-crs/PaoSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Subscription
metadata:
name: performance-addon-operator
namespace: openshift-performance-addon-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: "4.9"
name: performance-addon-operator
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/PaoSubscriptionCatalogSource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: Openshift Performance Addon Operator
icon:
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/PaoSubscriptionNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ metadata:
name: openshift-performance-addon-operator
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
labels:
openshift.io/cluster-monitoring: "true"
2 changes: 2 additions & 0 deletions ztp/source-crs/PaoSubscriptionOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ kind: OperatorGroup
metadata:
name: performance-addon-operator
namespace: openshift-performance-addon-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
2 changes: 2 additions & 0 deletions ztp/source-crs/PerformanceProfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: performance.openshift.io/v2
kind: PerformanceProfile
metadata:
name: $name
annotations:
ran.openshift.io/ztp-deploy-wave: "100"
spec:
additionalKernelArgs:
- "idle=poll"
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/PtpCatSource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: ptp-operator-disconnected
image: $imageUrl
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpConfigMaster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ kind: PtpConfig
metadata:
name: grandmaster
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
profile:
- name: "grandmaster"
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpConfigSlave.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: PtpConfig
metadata:
name: slave
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
profile:
- name: "slave"
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpConfigSlaveCvl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: PtpConfig
metadata:
name: slave
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
profile:
- name: "slave"
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpOperatorConfigForEvent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: PtpOperatorConfig
metadata:
name: default
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
daemonNodeSelector: {}
ptpEventConfig:
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ kind: Subscription
metadata:
name: ptp-operator-subscription
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: "4.9"
name: ptp-operator
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/PtpSubscriptionNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ metadata:
name: openshift-ptp
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
labels:
openshift.io/cluster-monitoring: "true"
2 changes: 2 additions & 0 deletions ztp/source-crs/PtpSubscriptionOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: OperatorGroup
metadata:
name: ptp-operators
namespace: openshift-ptp
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- openshift-ptp
2 changes: 2 additions & 0 deletions ztp/source-crs/ReduceMonitoringFootprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: ConfigMap
metadata:
name: cluster-monitoring-config
namespace: openshift-monitoring
annotations:
ran.openshift.io/ztp-deploy-wave: "1"
data:
config.yaml: |
grafana:
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/SriovCatSource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: sriov-network-operator-disconnected
image: $imageUrl
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/SriovNetwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: SriovNetwork
metadata:
name: ""
namespace: openshift-sriov-network-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "100"
spec:
resourceName: ""
networkNamespace: openshift-sriov-network-operator
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/SriovNetworkNodePolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: SriovNetworkNodePolicy
metadata:
name: $name
namespace: openshift-sriov-network-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "100"
spec:
# The attributes for Mellanox/Intel based NICs as below.
# deviceType: netdevice/vfio-pci
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/SriovOperatorConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: SriovOperatorConfig
metadata:
name: default
namespace: openshift-sriov-network-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
configDaemonNodeSelector:
"node-role.kubernetes.io/$mcp": ""
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/SriovSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Subscription
metadata:
name: sriov-network-operator-subscription
namespace: openshift-sriov-network-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: "4.9"
name: sriov-network-operator
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/SriovSubscriptionNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ metadata:
name: openshift-sriov-network-operator
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
labels:
openshift.io/run-level: "1"
2 changes: 2 additions & 0 deletions ztp/source-crs/SriovSubscriptionOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: OperatorGroup
metadata:
name: sriov-network-operators
namespace: openshift-sriov-network-operator
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- openshift-sriov-network-operator
1 change: 1 addition & 0 deletions ztp/source-crs/StorageCatSource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: openshift-marketplace
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
ran.openshift.io/ztp-deploy-wave: "1"
spec:
displayName: Openshift Local Storage Operator
icon:
Expand Down
2 changes: 2 additions & 0 deletions ztp/source-crs/StorageLV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: "LocalVolume"
metadata:
name: "local-disks"
namespace: "openshift-local-storage"
annotations:
ran.openshift.io/ztp-deploy-wave: "10"
spec:
logLevel: Normal
managementState: Managed
Expand Down
1 change: 1 addition & 0 deletions ztp/source-crs/StorageNS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ metadata:
name: openshift-local-storage
annotations:
workload.openshift.io/allowed: management
ran.openshift.io/ztp-deploy-wave: "2"
2 changes: 2 additions & 0 deletions ztp/source-crs/StorageOperGroup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: OperatorGroup
metadata:
name: openshift-local-storage
namespace: openshift-local-storage
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
targetNamespaces:
- openshift-local-storage
2 changes: 2 additions & 0 deletions ztp/source-crs/StorageSubscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ kind: Subscription
metadata:
name: local-storage-operator
namespace: openshift-local-storage
annotations:
ran.openshift.io/ztp-deploy-wave: "2"
spec:
channel: "4.9"
installPlanApproval: Automatic
Expand Down

0 comments on commit bcad6b3

Please sign in to comment.