Skip to content

Commit

Permalink
Move OVN backup stuff to a separate directory.
Browse files Browse the repository at this point in the history
This helps make it easy to use:

commonLabels:
  app: ovn-backup

to label all of the resources in kustomization.yaml, and the backup
functionality started cluttering up the main directory.

JIRA:OSPC-432
  • Loading branch information
awfabian-rs committed May 20, 2024
1 parent 8359c43 commit 056e6eb
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 20 deletions.
19 changes: 15 additions & 4 deletions docs/infrastructure-ovn-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,19 @@ If there's ever a need to reconfigure a node, simply remove the label and the Da

!!! note

To upload backups to a Ceph Swift API gateway, edit ovn-backup.config to set
To upload backups to Swift, edit /opt/genestack/kustomize/ovn/ovn-backup/ovn-backup.config to set
`SWIFT_UPLOAD' "true"`, edit the other related options appropriately (i.e.,
set the SWIFT_BASE_URL and CONTAINER) and put the username and secret key of
the account to use in `swift-account.env` before running `kubectl apply` an
indicated above.
set the KEYSTONE_URL and CONTAINER) and fill the username, password or API,
domain name, project ID, and domain ID of an user to use for backup (to get
a scoped token suitable for uploading to Swift) in `swift-account.env` and
then run:

kubectl apply -k /opt/genestack/kustomize/ovn/ovn-backup \
--prune -l app=ovn-backup \
--prune-allowlist=core/v1/Secret \
--prune-allowlist=core/v1/ConfigMap

If you need to change variables in the future, you can edit the relevant
files and use `kubectl` with these prune options to avoid accumulating
old ConfigMaps and Secrets from successive `kubectl apply` operations, but
you can omit the pruning options if desired.
16 changes: 0 additions & 16 deletions kustomize/ovn/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,2 @@
secretGenerator:
- name: ovn-backup-swift-account
namespace: kube-system
envs:
- swift-account.env
configMapGenerator:
- name: ovn-backup-script
namespace: kube-system
files:
- ovn-backup.sh
- get-swift-url.pl
- name: ovn-backup-config
namespace: kube-system
envs:
- ovn-backup.config
resources:
- ovn-setup.yaml
- ovn-backup.yaml
File renamed without changes.
19 changes: 19 additions & 0 deletions kustomize/ovn/ovn-backup/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
commonLabels:
app: ovn-backup
secretGenerator:
- name: ovn-backup-swift-account
namespace: kube-system
envs:
- swift-account.env
configMapGenerator:
- name: ovn-backup-script
namespace: kube-system
files:
- ovn-backup.sh
- get-swift-url.pl
- name: ovn-backup-config
namespace: kube-system
envs:
- ovn-backup.config
resources:
- ovn-backup.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 056e6eb

Please sign in to comment.