Relay Proxy offline mode is an Enterprise feature. To learn more, read Offline mode.
Enabling offline mode on the Relay Proxy lets you run the Relay Proxy without ever connecting it to LaunchDarkly. Instead of retrieving flag and segment values from LaunchDarkly's servers, the Relay Proxy gets them from files located on your local host or filesystem.
When using this Helm chart, the offline file needs to exist in a Kubernetes volume which is mounted to the Relay Proxy container. The example below uses minikube and a local volume mount.
Here's how to enable offline mode when using the Helm chart:
-
Create a Relay Proxy configuration from the Relay proxy tab of the Account settings page in the LaunchDarkly user interface, and save its unique key.
-
A local volume requires a file on the minikube host. Connect to minikube and download a local copy of the flag and segment data using the key from the previous step.
$ minikube ssh $ pwd /home/docker $ curl https://sdk.launchdarkly.com/relay/latest-all \ -H "Authorization: rel-EXAMPLE-RELAY-PROXY-CONFIGURATION-KEY" \ -o EXAMPLE-NAME-OF-OUTPUTTED-FILE.tar.gz
-
Create a volume and associated volume claim. This allows access to this file within the cluster.
# offline-volume.yaml apiVersion: v1 kind: PersistentVolume metadata: name: offline-volume labels: type: local spec: storageClassName: manual capacity: storage: 1Gi accessModes: - ReadOnlyMany hostPath: path: "/home/docker/" # offline-claim.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: offline-volume-claim spec: storageClassName: manual accessModes: - ReadOnlyMany resources: requests: storage: 1Gi
kubectl apply -f offline-volume.yaml kubectl apply -f offline-claim.yaml
-
Now that you have a volume accessible file, configure
values.yaml
to reference this volume claim.# values.yaml relay: volume: # This filename should match the path of the file in the volume used in the # below claim. offline: relay-file.tar.gz definition: persistentVolumeClaim: claimName: offline-volume-claim
-
Install the Helm chart, referencing your updated values configuration file.
helm install relay --values ./values.yaml launchdarkly-ld-relay/ld-relay
Success! Now you should have a working installation of the Relay Proxy, initially configured directly from your pre-downloaded offline file.