[patch] Fix Backup Maximo Manage script: Maximo Manage Operator group not found error #938
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolved the issue by fetching the operator group and eliminating the reliance on the hardcoded value.
Test Result:
bash-3.2$ bash backup.sh -w main -i auto-qa -f /Users/danninarajesh/BACKUP -m backup
Starting MAS Managebackup using the instance id auto-qa to /Users/danninarajesh/BACKUP
Backing up Subscription/ibm-mas-manage in the mas-auto-qa-manage namespace...
Saving Subscription/ibm-mas-manage to /Users/danninarajesh/BACKUP/Subscription-ibm-mas-manage.yaml
Backing up OperatorGroup/mas-auto-qa-manage-operator-group in the mas-auto-qa-manage namespace...
Saving OperatorGroup/mas-auto-qa-manage-operator-group to /Users/danninarajesh/BACKUP/OperatorGroup-mas-auto-qa-manage-operator-group.yaml
Backing up Secret/ibm-entitlement in the mas-auto-qa-manage namespace...
Saving Secret/ibm-entitlement to /Users/danninarajesh/BACKUP/Secret-ibm-entitlement.yaml
Backing up Secret/main-manage-encryptionsecret in the mas-auto-qa-manage namespace...
Saving Secret/main-manage-encryptionsecret to /Users/danninarajesh/BACKUP/Secret-main-manage-encryptionsecret.yaml
Backing up Secret/main-manage-encryptionsecret-operator in the mas-auto-qa-manage namespace...
Saving Secret/main-manage-encryptionsecret-operator to /Users/danninarajesh/BACKUP/Secret-main-manage-encryptionsecret-operator.yaml
Backing up ManageApp/auto-qa in the mas-auto-qa-manage namespace...
Saving ManageApp/auto-qa to /Users/danninarajesh/BACKUP/ManageApp-auto-qa.yaml
Backing up all ManageWorkspace resources in the mas-auto-qa-manage namespace...
secretList are - secretName: s3secretkey
secret
Backing up Secret/s3secretkey in the mas-auto-qa-manage namespace...
Saving Secret/s3secretkey to /Users/danninarajesh/BACKUP/Secret-s3secretkey.yaml
Saving ManageWorkspace named auto-qa-main to /Users/danninarajesh/BACKUP/ManageWorkspace-auto-qa-main.yaml
Backing up all jdbccfgs resources in the mas-auto-qa-manage namespace...
secretList are - secretName: jdbc-auto-qadb2umanage-credentials
secret
Backing up Secret/jdbc-auto-qadb2umanage-credentials in the mas-auto-qa-core namespace...
Saving Secret/jdbc-auto-qadb2umanage-credentials to /Users/danninarajesh/BACKUP/Secret-jdbc-auto-qadb2umanage-credentials.yaml
Saving JdbcCfg named auto-qa-jdbc-wsapp-main-manage to /Users/danninarajesh/BACKUP/JdbcCfg-auto-qa-jdbc-wsapp-main-manage.yaml
Determining if Manual Certificate Management is enabled...
bash-3.2$ ls
JdbcCfg-auto-qa-jdbc-wsapp-main-manage.yaml OperatorGroup-mas-auto-qa-manage-operator-group.yaml Secret-main-manage-encryptionsecret-operator.yaml Subscription-ibm-mas-manage.yaml
ManageApp-auto-qa.yaml Secret-ibm-entitlement.yaml Secret-main-manage-encryptionsecret.yaml backup.sh
ManageWorkspace-auto-qa-main.yaml Secret-jdbc-auto-qadb2umanage-credentials.yaml Secret-s3secretkey.yaml