Skip to content

Commit 97f7a21

Browse files
andrewlecuyerJeff McCormick
authored andcommitted
Only create secret 'pgo-backrest-repo-config' in (#789)
the Operator namespace
1 parent 1ba4992 commit 97f7a21

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

deploy/create-target-rbac.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,6 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2121
# into which the operator is deployed
2222

2323

24-
echo ""
25-
echo "creating pgo-backrest-repo-config in namespace " $1
26-
27-
$PGO_CMD --namespace=$1 delete secret pgo-backrest-repo-config
28-
29-
$PGO_CMD --namespace=$1 create secret generic pgo-backrest-repo-config \
30-
--from-file=config=$PGOROOT/conf/pgo-backrest-repo/config \
31-
--from-file=sshd_config=$PGOROOT/conf/pgo-backrest-repo/sshd_config \
32-
--from-file=aws-s3-credentials.yaml=$PGOROOT/conf/pgo-backrest-repo/aws-s3-credentials.yaml \
33-
--from-file=aws-s3-ca.crt=$PGOROOT/conf/pgo-backrest-repo/aws-s3-ca.crt
34-
35-
3624
echo ""
3725
echo "creating target rbac role and rolebinding in namespace " $1
3826
echo "operator is assumed to be deployed into " $2

deploy/install-rbac.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,9 @@ source $DIR/gen-sshd-keys.sh
4646
IFS=', ' read -r -a array <<< "$NAMESPACE"
4747

4848
echo ""
49-
echo "create pgo-backrest-repo-config Secret into each namespace the Operator is watching..."
49+
echo "create required rbac in each namespace the Operator is watching..."
5050
for ns in "${array[@]}"
5151
do
52-
$PGO_CMD get secret pgo-backrest-repo-config --namespace=$ns > /dev/null 2> /dev/null
53-
if [ $? -eq 0 ]
54-
then
55-
$PGO_CMD delete secret pgo-backrest-repo-config --namespace=$ns > /dev/null 2> /dev/null
56-
fi
5752
$DIR/create-target-rbac.sh $ns $PGO_OPERATOR_NAMESPACE
5853
done
5954

0 commit comments

Comments
 (0)