Commit d3ddcee9 authored by Morten Brekkevold's avatar Morten Brekkevold
Browse files

Add support for the new MIST_API_TOKEN setting

parent 38ed77aa
...@@ -8,15 +8,17 @@ The glue service source code is located here: https://scm.uninett.no/cnaas/mist- ...@@ -8,15 +8,17 @@ The glue service source code is located here: https://scm.uninett.no/cnaas/mist-
## Required K8s secrets ## Required K8s secrets
The deployment uses two K8s secrets: The deployment uses three K8s secrets:
1. The Argus API token to use 1. The Argus API token to use
2. The Secret string required to authenticated requests from our Mist cloud 2. This Mist API token to use
3. The Secret string required to authenticated requests from our Mist cloud
instances. instances.
To create the secrets: To create the secrets:
```sh ```sh
kubectl --namespace=cnaas-mist-argus-run create secret generic argus-api --from-literal=token=$YOUR_SECRET_ARGUS_API_TOKEN kubectl --namespace=cnaas-mist-argus-run create secret generic argus-api --from-literal=token=$YOUR_SECRET_ARGUS_API_TOKEN
kubectl --namespace=cnaas-mist-argus-run create secret generic mist-api --from-literal=token=$YOUR_SECRET_MIST_API_TOKEN
kubectl --namespace=cnaas-mist-argus-run create secret generic mist --from-literal=secret=$YOUR_MIST_SECRET_STRING kubectl --namespace=cnaas-mist-argus-run create secret generic mist --from-literal=secret=$YOUR_MIST_SECRET_STRING
``` ```
...@@ -39,6 +39,11 @@ spec: ...@@ -39,6 +39,11 @@ spec:
secretKeyRef: secretKeyRef:
name: mist name: mist
key: secret key: secret
- name: MIST_API_TOKEN
valueFrom:
secretKeyRef:
name: mist-api
key: token
- name: ARGUS_API_TOKEN - name: ARGUS_API_TOKEN
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
......
import os import os
MIST_SECRET = os.getenv("MIST_SECRET") MIST_SECRET = os.getenv("MIST_SECRET")
MIST_API_TOKEN = os.getenv("MIST_API_TOKEN")
ARGUS_API_URL = os.environ["ARGUS_API_URL"] ARGUS_API_URL = os.environ["ARGUS_API_URL"]
ARGUS_API_TOKEN = os.environ["ARGUS_API_TOKEN"] ARGUS_API_TOKEN = os.environ["ARGUS_API_TOKEN"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment