-
The public internet is accessible OR lein dependencies are pre-cached
-
The kubectl context needs to be in the correct namespace (
kubectl config set-context --current --namespace <namespace>
) -
Docker is running and accessible without
sudo
to run theclojure
container -
jq
is installed. -
The API token from your Kubernetes secret is accessible to be used for the import.
-
The Postgres server is internal to the CircleCI installation
- If Postgres has been externalized, please reach out to your account representative.
-
You have a Tink keyset ready to go with
tinkey create-keyset --key-template XCHACHA20_POLY1305
- To successfully run the aforementioned command, Java must be installed. On a Mac you may
brew install openjdk
.
- To successfully run the aforementioned command, Java must be installed. On a Mac you may
-
If on a Mac, please
brew install iproute2mac
Note: This script will open one REPL per context ID, where one ID is one context; not to be confused with individual variables within a context. If you have a firewall that will rate-limit you, please take that into consideration before proceeding.
Warning: There will be downtime for jobs using contexts during this migration; specifically after updating the values.yaml
and before the import script finishes.
Warning: Exporting contexts will create a file on your system named contexts.json
. This file will contain all the names and values of your secrets. It is strongly recommended to rm -f contexts.json
after importing the contexts and verifying the system operates as expected.
- Run a job that uses contexts and verify it worked as expected.
- Navigate to this directory in your terminal
- Run
bash export-contexts.sh
- Update your
values.yaml
to reference Tink and disable Vault:
tink:
enabled: true
keyset: '{"primaryKeyId":1981846258,"key":[{"keyData":{"typeUrl":"type.googleapis.com/google.crypto.tink.XChaCha20Poly1305Key","value":"GiCibSVjG2+bLaeShz+M67BcsEZt7GPI+zcE8J+HKYew==","keyMaterialType":"SYMMETRIC"},"status":"ENABLED","keyId":1981846258,"outputPrefixType":"TINK"}]}'
vault:
internal: false
- Get your API token by running
API_TOKEN=$(kubectl get secrets api-token -o jsonpath="{.data.api-token}" -n <namespace> | base64 --decode)
- Run the import script
bash import-contexts.sh [--hostname <circleci-hostname>] [--token $API_TOKEN]
- Trigger the same pipeline as the preparation phase to ensure contexts work as expected. If things do not work as expected, please reach out to your account representitive.