Skip to content

Commit

Permalink
remove job and use nss for 4.5 recipes
Browse files Browse the repository at this point in the history
Signed-off-by: YuChen <[email protected]>
  • Loading branch information
YCShen1010 committed Nov 22, 2024
1 parent 9905f47 commit f7da056
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 110 deletions.
6 changes: 3 additions & 3 deletions velero/backup/common-service/env.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Change the following values to match your environment
OPERATOR_NS="" # Pass the namespace where the cs operator is installed
OPERATOR_NS="test-br" # Pass the namespace where the cs operator is installed

# Pass the namespace where the cs services are installed
# Leave it as empty string if the services are installed in the same namespace as the operator
SERVICES_NS=""
SERVICES_NS="test-br"
CONTROL_NS="" # Pass the control namespace if it is needed to be backed up

#Pass any additional namespaces in the tenant that are not the operator or services namespace. Comma delimited
TETHERED_NS=""
TETHERED_NS="tenant1,tenant2"

# Change to the namespace where cert-manager, licensing and LSR are installed
CERT_MANAGER_NAMESPACE="ibm-cert-manager"
Expand Down
108 changes: 21 additions & 87 deletions velero/spectrum-fusion/recipes/4.0-4.5-example-recipe-multi-ns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,45 +93,20 @@ spec:
includedResourceTypes:
- customresourcedefinitions.apiextensions.k8s.io
labelSelector: foundationservices.cloudpak.ibm.com=crd
name: commonservice-crd
type: resource
- includeClusterResources: true
includedResourceTypes:
- deployments
- roles
- serviceaccounts
- rolebindings
- configmaps
labelSelector: foundationservices.cloudpak.ibm.com=cpfs-util-backup
name: setup-tenant-resources
type: resource
- includeClusterResources: true
includedResourceTypes:
- jobs
labelSelector: foundationservices.cloudpak.ibm.com=setup-tenant-job
name: setup-tenant-job-yaml
restoreStatus:
excludedResources:
- jobs
type: resource
- labelSelector: foundationservices.cloudpak.ibm.com=cpfs-util-backup
name: cpfs-util-volume
type: volume
- includeClusterResources: true
includedResourceTypes:
- customresourcedefinitions.apiextensions.k8s.io
labelSelector: foundationservices.cloudpak.ibm.com=crd
name: nss-crd
name: commonservices-crd
type: resource
- includedResourceTypes:
- commonservices.operator.ibm.com
labelSelector: foundationservices.cloudpak.ibm.com=commonservice
name: commonservice-cr
type: resource
- includedResourceTypes:
- roles
- rolebindings
- serviceaccounts
- namespacescopes.operator.ibm.com
labelSelector: foundationservices.cloudpak.ibm.com=nss
name: nss-cr
name: nss-resources
type: resource
- includedResourceTypes:
- operandrequests.operator.ibm.com
Expand Down Expand Up @@ -215,24 +190,24 @@ spec:
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
- condition: '{$.spec.replicas} == {$.status.readyReplicas}'
name: podReady
onError: fail
timeout: 1200
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
timeout: 600
name: nss-check
nameSelector: ibm-namespace-scope-operator
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 1200
selectResource: deployment
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
name: podReady
onError: fail
timeout: 600
labelSelector: foundationservices.cloudpak.ibm.com=cpfs-util-backup
name: setup-tenant-check
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
namespace: <operator namespace>
onError: fail
selectResource: pod
Expand Down Expand Up @@ -286,42 +261,6 @@ spec:
selectResource: zen.cpd.ibm.com/v1/zenservice
timeout: 1800
type: check
- labelSelector: foundationservices.cloudpak.ibm.com=cpfs-util-backup
name: setup-tenant
namespace: <operator namespace>
onError: fail
ops:
- command: |
["/bin/bash", "-c", "/cs-br/setup_tenant.sh --operator-namespace <operator namespace> --services-namespace <service namespace> --tethered-namespaces <comma delimited (no spaces) list of Cloud Pak workload namespaces that use this foundational services instance> --license-accept -c v<foundational services version number in use i.e. 4.0, 4.1, 4.2, etc> -p <.spec.size value from commonservice cr> -i <install mode, either Manual or Automatic> -s <catalog source name> -n <catalog source namespace> -v"]
container: cpfs-util
name: setup-tenant-command
timeout: 600
selectResource: pod
type: exec
- labelSelector: foundationservices.cloudpak.ibm.com=cpfs-util-backup
name: setup-tenant-job
namespace: <operator namespace>
onError: fail
ops:
- command: |
["/bin/bash", "-c", "oc patch job setup-tenant-job -n <operator namespace> --type=\"json\" -p '[{\"op\": \"remove\", \"path\":\"/spec/suspend\"}]'"]
container: cpfs-util
name: trigger-setup-tenant-job
timeout: 600
selectResource: pod
type: exec
- chks:
- condition: '{$.status.phase} == {"Succeeded"}'
name: jobComplete
onError: fail
timeout: 600
labelSelector: foundationservices.cloudpak.ibm.com=setup-tenant-job
name: setup-tenant-job-check
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 600
type: check
- chks:
- condition: '{$.spec.replicas} == {$.status.readyReplicas}'
name: podReady
Expand Down Expand Up @@ -424,19 +363,17 @@ spec:
- group: mongo-volume
- group: mongo-deployment
- hook: zen5-data/backup
- group: cpfs-util-volume
- group: zen
- group: zen-br-resources
- group: common-services-namespace
- group: pull-secret
- group: common-services-catalogs
- group: common-services-operatorgroups
- group: common-services-configmaps
- group: commonservice-crd
- group: commonservices-crd
- group: commonservice-cr
- group: nss-resources
- group: cs-operator-permissions
- group: setup-tenant-resources
- group: setup-tenant-job-yaml
- group: singleton-subscriptions
- group: cert-manager-resources
- group: common-services-subscriptions
Expand All @@ -453,22 +390,19 @@ spec:
- group: ow-pull-secret
- group: common-services-catalogs
- group: common-services-operatorgroups
- group: common-services-configmaps
- group: commonservice-crd
- group: cert-manager-crd
- group: singleton-subscriptions
- group: commonservice-cr
- hook: cert-manager-operator-check/podReady
- hook: cert-manager-webhook-check/podReady
- group: cert-manager-workload-resources
- group: licensing-resources
# restore common services
- group: common-services-configmaps
- group: commonservices-crd
- group: commonservice-cr
- group: nss-resources
- group: common-services-subscriptions
- group: cpfs-util-volume
- group: setup-tenant-resources
- group: setup-tenant-job-yaml
- hook: setup-tenant-check/podReady
- hook: setup-tenant-job/trigger-setup-tenant-job
- hook: setup-tenant-job-check/jobComplete
- hook: nss-check/podReady
- hook: odlm-check/podReady
- group: odlm-resources
- group: operand-resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,11 @@ spec:
labelSelector: foundationservices.cloudpak.ibm.com=crd
name: commonservice-crd
type: resource
- includeClusterResources: true
includedResourceTypes:
- customresourcedefinitions.apiextensions.k8s.io
labelSelector: foundationservices.cloudpak.ibm.com=crd
name: nss-crd
type: resource
- includedResourceTypes:
- commonservices.operator.ibm.com
labelSelector: foundationservices.cloudpak.ibm.com=commonservice
name: commonservice-cr
type: resource
- includedResourceTypes:
- namespacescopes.operator.ibm.com
labelSelector: foundationservices.cloudpak.ibm.com=nss
name: nss-cr
type: resource
- includedResourceTypes:
- operandrequests.operator.ibm.com
labelSelector: foundationservices.cloudpak.ibm.com=operand
Expand Down Expand Up @@ -177,13 +166,13 @@ spec:
- condition: '{$.status.phase} == {"Running"}'
name: podReady
onError: fail
timeout: 1200
timeout: 600
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 1200
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ spec:
- condition: '{$.status.phase} == {"Running"}'
name: podReady
onError: fail
timeout: 1200
timeout: 600
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 1200
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
Expand Down Expand Up @@ -543,7 +543,6 @@ spec:
- group: ow-pull-secret
- group: common-services-catalogs
- group: common-services-operatorgroups
- group: common-services-configmaps
- group: cert-manager-crd
- group: license-service-reporter-crd
- group: singleton-subscriptions
Expand All @@ -560,6 +559,7 @@ spec:
- hook: lsr-deployment/podReady
- hook: lsr-data/restore
# restore common services
- group: common-services-configmaps
- group: commonservices-crd
- group: commonservice-cr
- group: nss-resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ spec:
- condition: '{$.status.phase} == {"Running"}'
name: podReady
onError: fail
timeout: 1200
timeout: 600
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 1200
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ spec:
- condition: '{$.status.phase} == {"Running"}'
name: podReady
onError: fail
timeout: 1200
timeout: 600
labelSelector: app.kubernetes.io/name=operand-deployment-lifecycle-manager
name: odlm-check
namespace: <operator namespace>
onError: fail
selectResource: pod
timeout: 1200
timeout: 600
type: check
- chks:
- condition: '{$.status.phase} == {"Running"}'
Expand Down

0 comments on commit f7da056

Please sign in to comment.