-
Notifications
You must be signed in to change notification settings - Fork 231
Feature/OADP migration SREP-1607 #2531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
charlesgong
wants to merge
13
commits into
openshift:master
Choose a base branch
from
charlesgong:feature/oadp-migration-srep-1607
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f891f63
Add OADP configuration to replace MVO for Red Hat managed clusters
charlesgong e17c1b3
Use environment variables for OADP bucket configuration
charlesgong 2997192
Address reviewer feedback for OADP configuration
charlesgong 7abe844
Update OWNERS file with correct SREP team assignments
charlesgong b0bed6d
Add generated template files for OADP configuration
charlesgong 191817a
Add srep-functional-team-hulk to OADP configuration OWNERS
charlesgong 08635ec
Convert OADP configuration to enable-only mode
charlesgong 45bd460
Add OADP operator installation for Red Hat managed clusters
charlesgong e4f3b07
Update OADP operator installation to target Hive clusters only
charlesgong 4d07af9
Consolidate OADP configuration into velero-configuration/hive-specific
charlesgong 7c6ca71
Add resourceApplyMode: Upsert for safe OADP deployment
charlesgong 2bab8d0
Fix OADP subscription channel from 'stable' to 'stable-1.4'
charlesgong 1be082c
Generate Hive templates after OADP channel fix
charlesgong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| apiVersion: operators.coreos.com/v1alpha1 | ||
| kind: Subscription | ||
| metadata: | ||
| name: redhat-oadp-operator | ||
| namespace: openshift-adp | ||
| spec: | ||
| channel: stable-1.4 | ||
charlesgong marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: redhat-oadp-operator | ||
| source: redhat-operators | ||
| sourceNamespace: openshift-marketplace | ||
| installPlanApproval: Automatic | ||
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: openshift-adp | ||
| labels: | ||
| name: openshift-adp | ||
| openshift.io/cluster-monitoring: "true" |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| apiVersion: operators.coreos.com/v1 | ||
| kind: OperatorGroup | ||
| metadata: | ||
| name: redhat-oadp-operator | ||
charlesgong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| namespace: openshift-adp | ||
| spec: | ||
| targetNamespaces: | ||
| - openshift-adp | ||
36 changes: 36 additions & 0 deletions
36
deploy/oadp-configuration/130-oadp.DataProtectionApplication.yaml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| apiVersion: oadp.openshift.io/v1alpha1 | ||
| kind: DataProtectionApplication | ||
| metadata: | ||
| name: dpa-sample | ||
| namespace: openshift-adp | ||
| spec: | ||
| configuration: | ||
| velero: | ||
| defaultPlugins: | ||
| - openshift | ||
| - aws | ||
| - csi | ||
charlesgong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| resourceAllocations: | ||
| limits: | ||
| cpu: "1" | ||
| memory: 1Gi | ||
| requests: | ||
| cpu: 500m | ||
| memory: 256Mi | ||
| logLevel: info | ||
| podConfig: | ||
| nodeSelector: | ||
| kubernetes.io/os: linux | ||
| backupLocations: | ||
| - velero: | ||
| provider: aws | ||
| default: true | ||
| config: | ||
| region: ${AWS_REGION} | ||
| profile: "default" | ||
| credential: | ||
| name: cloud-credentials | ||
| key: cloud | ||
| objectStorage: | ||
| bucket: ${OADP_BACKUP_BUCKET} | ||
| prefix: velero | ||
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: velero.io/v1 | ||
| kind: Backup | ||
| metadata: | ||
| name: oadp-validation-backup | ||
| namespace: openshift-adp | ||
| labels: | ||
| managed.openshift.io/oadp-validation: "true" | ||
| spec: | ||
| includedNamespaces: | ||
| - openshift-adp | ||
| excludedResources: | ||
| - events | ||
| - events.events.k8s.io | ||
| snapshotVolumes: false | ||
| ttl: 1h0m0s |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| reviewers: | ||
| - app-sre | ||
| approvers: | ||
| - app-sre |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # OADP Configuration for Red Hat Managed Clusters | ||
|
|
||
| This directory contains OpenShift API for Data Protection (OADP) operator configurations to replace the deprecated Managed Velero Operator (MVO) on Red Hat managed clusters. | ||
|
|
||
| ## Overview | ||
|
|
||
| OADP provides backup and restore capabilities for OpenShift clusters and is the supported data protection solution for Red Hat managed clusters going forward. | ||
|
|
||
| ## Components | ||
|
|
||
| ### Main Configuration | ||
| - `100-oadp.Subscription.yaml` - OADP operator subscription | ||
| - `110-oadp.Namespace.yaml` - openshift-adp namespace creation | ||
| - `120-oadp.OperatorGroup.yaml` - Operator group for OADP | ||
| - `130-oadp.DataProtectionApplication.yaml` - Main DPA configuration | ||
| - `140-oadp.TestBackup.yaml` - Validation backup for testing | ||
|
|
||
| ### Hive-Specific Configuration | ||
| - `hive-specific/config.yaml` - SelectorSyncSet configuration for Hive clusters | ||
| - `hive-specific/05-oadp-schedule-admins-cluster.ClusterRole.yaml` - RBAC for backup management | ||
| - `hive-specific/111-oadp.Schedules.yaml` - Backup schedule configuration | ||
|
|
||
| ## Migration from MVO | ||
|
|
||
| This configuration replaces the Managed Velero Operator (MVO) with the following changes: | ||
|
|
||
| 1. **Namespace**: Changed from `openshift-velero` to `openshift-adp` | ||
| 2. **Operator**: Uses OADP operator instead of MVO | ||
| 3. **API**: Uses DataProtectionApplication CRD instead of VeleroInstall | ||
| 4. **RBAC**: Updated cluster roles to include OADP resources | ||
|
|
||
| ## Environment Variables | ||
|
|
||
| The following environment variables must be configured for the DataProtectionApplication: | ||
|
|
||
| - `OADP_BACKUP_BUCKET` - S3 bucket name for storing backups | ||
| - `AWS_REGION` - AWS region where the bucket is located | ||
|
|
||
| ## Deployment | ||
|
|
||
| This configuration is deployed via Hive SelectorSyncSets to clusters matching the selector criteria: | ||
| - Clusters with `ext-managed.openshift.io/hive-shard: "true"` label | ||
| - Excludes FedRAMP clusters | ||
|
|
||
| ## Validation | ||
|
|
||
| After deployment, validate the installation: | ||
|
|
||
| 1. Verify OADP operator is running: | ||
| ```bash | ||
| oc get pods -n openshift-adp | ||
| ``` | ||
|
|
||
| 2. Check DataProtectionApplication status: | ||
| ```bash | ||
| oc get dpa -n openshift-adp | ||
| ``` | ||
|
|
||
| 3. Verify backup schedule is created: | ||
| ```bash | ||
| oc get schedule -n openshift-adp | ||
| ``` | ||
|
|
||
| 4. Test backup creation: | ||
| ```bash | ||
| oc create -f 140-oadp.TestBackup.yaml | ||
| oc get backup -n openshift-adp | ||
| ``` | ||
|
|
||
| ## Related Issues | ||
|
|
||
| - SREP-1607: Setup OADP for RH Internal Clusters after MVO Removal | ||
|
|
||
| ## References | ||
|
|
||
| - [OADP Documentation](https://docs.openshift.com/container-platform/latest/backup_and_restore/application_backup_and_restore/oadp-features-plugins.html) | ||
| - [Original Velero Configuration](../velero-configuration/hive-specific/) |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| deploymentMode: "SelectorSyncSet" | ||
| selectorSyncSet: | ||
| matchExpressions: | ||
| - key: api.openshift.com/product | ||
| operator: In | ||
| values: | ||
| - osd | ||
| - rosa | ||
| - key: api.openshift.com/fedramp | ||
| operator: NotIn | ||
| values: | ||
| - "true" | ||
| resourceApplyMode: "Sync" |
25 changes: 25 additions & 0 deletions
25
deploy/oadp-configuration/hive-specific/05-oadp-schedule-admins-cluster.ClusterRole.yaml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| labels: | ||
| managed.openshift.io/aggregate-to-dedicated-admins: "cluster" | ||
| name: oadp-schedule-admins-cluster | ||
| rules: | ||
| - apiGroups: | ||
| - velero.io | ||
| attributeRestrictions: null | ||
| resources: | ||
| - schedules | ||
| - backups | ||
| - restores | ||
| verbs: | ||
| - "*" | ||
| - apiGroups: | ||
| - oadp.openshift.io | ||
| attributeRestrictions: null | ||
| resources: | ||
| - dataprotectionapplications | ||
| verbs: | ||
| - get | ||
| - list | ||
| - watch |
29 changes: 29 additions & 0 deletions
29
deploy/oadp-configuration/hive-specific/111-oadp.Schedules.yaml
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| apiVersion: velero.io/v1 | ||
| kind: Schedule | ||
| metadata: | ||
| name: 5min-object-backup | ||
| namespace: openshift-adp | ||
| spec: | ||
| schedule: '*/5 * * * *' | ||
| template: | ||
| includedNamespaces: | ||
| - '*' | ||
| excludedResources: | ||
| - imagetags.image.openshift.io | ||
| - images.image.openshift.io | ||
| - oauthaccesstokens.oauth.openshift.io | ||
| - oauthauthorizetokens.oauth.openshift.io | ||
| - templateinstances.template.openshift.io | ||
| - clusterserviceversions.operators.coreos.com | ||
| - packagemanifests.packages.operators.coreos.com | ||
| - operatorgroups.operators.coreos.com | ||
| - subscriptions.operators.coreos.com | ||
| - servicebrokers.servicecatalog.k8s.io | ||
| - servicebindings.servicecatalog.k8s.io | ||
| - serviceclasses.servicecatalog.k8s.io | ||
| - serviceinstances.servicecatalog.k8s.io | ||
| - serviceplans.servicecatalog.k8s.io | ||
| - events.events.k8s.io | ||
| - events | ||
| snapshotVolumes: false | ||
| ttl: 0h25m0s |
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 characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| deploymentMode: "SelectorSyncSet" | ||
| selectorSyncSet: | ||
| matchLabels: | ||
| ext-managed.openshift.io/hive-shard: "true" | ||
| matchExpressions: | ||
| - key: api.openshift.com/fedramp | ||
| operator: NotIn | ||
| values: | ||
| - "true" |
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.
Uh oh!
There was an error while loading. Please reload this page.