File tree Expand file tree Collapse file tree 10 files changed +63
-15
lines changed
Expand file tree Collapse file tree 10 files changed +63
-15
lines changed Original file line number Diff line number Diff line change 111password-credentials.json
2+ secret-op-credentials.yaml
Original file line number Diff line number Diff line change 55if ! env | grep OP_SESSION_ > /dev/null 2>&1 ; then
66 eval " $( op signin) "
77fi
8- op read " op://1pass connect/connect.cp.lsst.org Credentials File/1password-credentials.json" --out-file 1password-credentials.json
8+ ONEPASS_CREDS=" $( op read " op://1pass connect/connect.cp.lsst.org Credentials File/1password-credentials.json" ) "
9+
10+ cat > secret-op-credentials.yaml << END
11+ ---
12+ apiVersion: v1
13+ kind: Secret
14+ metadata:
15+ name: op-credentials
16+ namespace: onepassword-connect
17+ type: Opaque
18+ # The credentials end up being double base64 encoded...
19+ stringData:
20+ 1password-credentials.json: $( echo " ${ONEPASS_CREDS} " | base64 -w 0)
21+ END
Original file line number Diff line number Diff line change 111password-credentials.json
2+ secret-op-credentials.yaml
Original file line number Diff line number Diff line change 55if ! env | grep OP_SESSION_ > /dev/null 2>&1 ; then
66 eval " $( op signin) "
77fi
8- op read " op://1pass connect/connect.dev.lsst.org Credentials File/1password-credentials.json" --out-file 1password-credentials.json
8+ ONEPASS_CREDS=" $( op read " op://1pass connect/connect.dev.lsst.org Credentials File/1password-credentials.json" ) "
9+
10+ cat > secret-op-credentials.yaml << END
11+ ---
12+ apiVersion: v1
13+ kind: Secret
14+ metadata:
15+ name: op-credentials
16+ namespace: onepassword-connect
17+ type: Opaque
18+ # The credentials end up being double base64 encoded...
19+ stringData:
20+ 1password-credentials.json: $( echo " ${ONEPASS_CREDS} " | base64 -w 0)
21+ END
Original file line number Diff line number Diff line change 111password-credentials.json
2+ secret-op-credentials.yaml
Original file line number Diff line number Diff line change 55if ! env | grep OP_SESSION_ > /dev/null 2>&1 ; then
66 eval " $( op signin) "
77fi
8- op read " op://1pass connect/connect.ls.lsst.org Credentials File/1password-credentials.json" --out-file 1password-credentials.json
8+ ONEPASS_CREDS=" $( op read " op://1pass connect/connect.ls.lsst.org Credentials File/1password-credentials.json" ) "
9+
10+ cat > secret-op-credentials.yaml << END
11+ ---
12+ apiVersion: v1
13+ kind: Secret
14+ metadata:
15+ name: op-credentials
16+ namespace: onepassword-connect
17+ type: Opaque
18+ # The credentials end up being double base64 encoded...
19+ stringData:
20+ 1password-credentials.json: $( echo " ${ONEPASS_CREDS} " | base64 -w 0)
21+ END
Original file line number Diff line number Diff line change 111password-credentials.json
2+ secret-op-credentials.yaml
Original file line number Diff line number Diff line change 55if ! env | grep OP_SESSION_ > /dev/null 2>&1 ; then
66 eval " $( op signin) "
77fi
8- op read " op://1pass connect/connect.tu.lsst.org Credentials File/1password-credentials.json" --out-file 1password-credentials.json
8+ ONEPASS_CREDS=" $( op read " op://1pass connect/connect.tu.lsst.org Credentials File/1password-credentials.json" ) "
9+
10+ cat > secret-op-credentials.yaml << END
11+ ---
12+ apiVersion: v1
13+ kind: Secret
14+ metadata:
15+ name: op-credentials
16+ namespace: onepassword-connect
17+ type: Opaque
18+ # The credentials end up being double base64 encoded...
19+ stringData:
20+ 1password-credentials.json: $( echo " ${ONEPASS_CREDS} " | base64 -w 0)
21+ END
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ Deployment
66
77Run the ` fetch-credentials.sh ` script to download the 1pass access token. Note the ` op ` CLI must be installed and configured.
88
9- Once the ` 1password- credentials.json ` file is present, run the ` onepassword-connect.sh ` script.
9+ Once the ` secret-op- credentials.yaml ` file is present, run the ` onepassword-connect.sh ` script.
Original file line number Diff line number Diff line change 22
33set -ex
44
5- helm repo add onepassword-connect https://1password.github.io/connect-helm-charts
6- helm repo update
7-
8- helm upgrade --install \
9- onepassword-connect onepassword-connect/connect \
10- --create-namespace --namespace onepassword-connect \
11- --version v1.14.0 \
12- --atomic \
13- --set-file connect.credentials=1password-credentials.json \
14- -f ./values.yaml
5+ kubectl create namespace onepassword-connect --dry-run=client -o yaml | kubectl apply --server-side -f -
6+ kubectl apply --server-side -f secret-op-credentials.yaml
You can’t perform that action at this time.
0 commit comments