Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions infrastructure/scripts/rucio_escape_policy_package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

echo " *** START rucio POLICY PACKAGE Secret and Deployment Script ***"

SECRET_RAW_DIR="/root/software/vre/infrastructure/secrets/tmp_local_secrets"
SECRETS_DIR="/root/software/vre/infrastructure/secrets/rucio"

echo " *** Uploading ESCAPE Rucio Policy package ***"

# Yes, this file is created by hand as follows.
# An automatic way of dumping new releases of the policy package would save
# a lot of problems and headaches.
#
# rucio_escape_policy_package.yaml
# apiVersion: v1
# kind: Secret
# metadata:
# namespace: rucio
# name: escape-rucio-policy-package
# type: Opaque
# stringData:
# __init__.py: |-
# SUPPORTED_VERSION = [ "1.28", "1.29", "1.30", "1.31", "32" "33", "34", "35"]
# permission.py: |-
# (...)
# schema.py: |-
# (...)
#
FILENAME_SECRET="escape-rucio-policy-package.yaml"
SECRET_FILE="${SECRET_RAW_DIR}/${FILENAME_SECRET}"
cat $SECRET_FILE | kubeseal --controller-name=sealed-secrets-controller --controller-namespace=sealed-secrets --format yaml --namespace=${RUCIO_NS} > ${SECRETS_DIR}/ss_${FILENAME_SECRET}
kubectl apply -f ${SECRETS_DIR}/ss_${FILENAME_SECRET}

echo " *** DONE *** "
Loading