Skip to content

Commit

Permalink
chore: fix license handling
Browse files Browse the repository at this point in the history
License is already base64 encoded, we need to use a different method for
creating the secret.

Signed-off-by: Piotr Zaniewski <[email protected]>
  • Loading branch information
Piotr1215 committed Dec 13, 2024
1 parent 1fbb85f commit 75f3338
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions vcluster/deploy/topologies/air-gapped.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,30 @@ License Setup

Create a Kubernetes `Secret` from the License Key provided by Loft in the `Namespace` where you are installing the air-gapped vCluster instance:

:::tip
License secret is already `base64` encoded.
:::

```bash title="Create Kubernetes Secret"
# Create license key file
cat <<EOF > vcluster-pro-air-gapped-license.txt
YOUR_LICENSE_KEY_HERE
EOF
#!/bin/bash
# Create namespace and secret
# Set the license key as an environment variable (already base64 encoded)
export VCLUSTER_LICENSE_KEY="YOUR_BASE64_ENCODED_LICENSE_KEY_HERE"
# Optionally create the namespace
kubectl create namespace vcluster-ns
kubectl create secret generic vcluster-platform-api-key -n vcluster-ns \
--from-file=license-key=./vcluster-pro-air-gapped-license.txt
# Create secret
kubectl create -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: vcluster-platform-api-key
namespace: vcluster-ns
type: Opaque
data:
license-key: ${VCLUSTER_LICENSE_KEY}
EOF
```
</Step>

Expand Down Expand Up @@ -329,7 +343,6 @@ helm upgrade --install "${VCLUSTER_PRO_NAME}" vcluster-${VERSION}.tgz \
--version ${VERSION} \
--values vcluster.yaml \
--namespace ${VCLUSTER_PRO_NAMESPACE} \
--create-namespace
```

</Step>
Expand Down

0 comments on commit 75f3338

Please sign in to comment.