Last active
July 23, 2021 13:43
-
-
Save dofinn/00a39c272bfadb67eb4da84d168c204d to your computer and use it in GitHub Desktop.
Revisions
-
Dominic Finn revised this gist
Jun 4, 2021 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,10 @@ OPERATOR=managed-upgrade-operator # Set replicas to 0 oc -n ${NAMESPACE} scale deployment ${OPERATOR} --replicas=0 # Patch config to query OCM every minute oc -n ${NAMESPACE} patch cm ${OPERATOR}-config -p '"data": {"config.yaml": "configManager:\n source: OCM\n ocmBaseUrl: https://api.stage.openshift.com\n watchInterval: 1\nmaintenance:\n controlPlaneTime: 90\n ignoredAlerts:\n controlPlaneCriticals:\n # ClusterOperatorDown - OSD-6330\n - ClusterOperatorDown\n # ClusterOperatorDegraded - OSD-6330\n - ClusterOperatorDegraded\n # CloudCredentialOperatorDown - BZ 1889540\n - CloudCredentialOperatorDown\nscale:\n timeOut: 30\nupgradeWindow:\n delayTrigger: 30\n timeOut: 120\nnodeDrain:\n timeOut: 45\n expectedNodeDrainTime: 8\nhealthCheck:\n ignoredCriticals:\n - DNSErrors05MinSRE\n - MetricsClientSendFailingSRE\n - UpgradeNodeScalingFailedSRE\n - UpgradeClusterCheckFailedSRE\n - PrometheusRuleFailures\n - CannotRetrieveUpdates\nextDependencyAvailabilityChecks:\n http:\n timeout: 10\n urls:\n - https://quay.io/health\n - https://api.stage.openshift.com\nverification:\n ignoredNamespaces:\n - openshift-logging\n namespacePrefixesToCheck:\n - openshift\n - kube\n - default\n"}' # Get MUO token OPERATOR_TOKEN=$(oc serviceaccounts get-token ${OPERATOR} -n ${NAMESPACE}) echo "OPTIONAL: Log into API with ${OPERATOR} token" -
Dominic Finn created this gist
Jun 4, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/bash set -e NAMESPACE=openshift-managed-upgrade-operator OPERATOR=managed-upgrade-operator # Set replicas to 0 oc -n ${NAMESPACE} scale deployment ${OPERATOR} --replicas=0 oc -n ${NAMESPACE} patch cm ${OPERATOR}-config -p '"data": {"config.yaml": "configManager:\n source: OCM\n ocmBaseUrl: https://api.stage.openshift.com\n watchInterval: 1\nmaintenance:\n controlPlaneTime: 90\n ignoredAlerts:\n controlPlaneCriticals:\n # ClusterOperatorDown - OSD-6330\n - ClusterOperatorDown\n # ClusterOperatorDegraded - OSD-6330\n - ClusterOperatorDegraded\n # CloudCredentialOperatorDown - BZ 1889540\n - CloudCredentialOperatorDown\nscale:\n timeOut: 30\nupgradeWindow:\n delayTrigger: 30\n timeOut: 120\nnodeDrain:\n timeOut: 45\n expectedNodeDrainTime: 8\nhealthCheck:\n ignoredCriticals:\n - DNSErrors05MinSRE\n - MetricsClientSendFailingSRE\n - UpgradeNodeScalingFailedSRE\n - UpgradeClusterCheckFailedSRE\n - PrometheusRuleFailures\n - CannotRetrieveUpdates\nextDependencyAvailabilityChecks:\n http:\n timeout: 10\n urls:\n - https://quay.io/health\n - https://api.stage.openshift.com\nverification:\n ignoredNamespaces:\n - openshift-logging\n namespacePrefixesToCheck:\n - openshift\n - kube\n - default\n"}' OPERATOR_TOKEN=$(oc serviceaccounts get-token ${OPERATOR} -n ${NAMESPACE}) echo "OPTIONAL: Log into API with ${OPERATOR} token" echo echo "${OPERATOR_TOKEN}"