diff --git a/README.md b/README.md index 608e8e31..cedc0b39 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The API has the following endpoints: - Type: `POST` - Path: `/api/v1/feel/evaluate` -Request: +Request: ```json { @@ -41,7 +41,7 @@ Response: - Type: `POST` - Path: `/api/v1/feel-unary-tests/evaluate` -Request: +Request: ```json { @@ -89,6 +89,12 @@ kubectl create namespace feel kubectl apply -f service.yaml -n feel ``` +To deploy the secrets, edit `secret.yaml` and set `mixpanel_project_token` to your Mixpanel project token. Then run the following: + +```shell +kubectl apply -f secret.yaml -n feel +``` + To deploy the rest api, edit `deployment.yaml` and set `spec.template.spec.containers[0].img` to point to the latest docker image. Then run the following: diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index c218bcdb..50751dd4 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -21,3 +21,9 @@ spec: port: 8080 initialDelaySeconds: 10 timeoutSeconds: 5 + env: + - name: MIXPANEL_PROJECT_TOKEN + valueFrom: + secretKeyRef: + name: feel-scala-playground-secret + key: mixpanel_project_token diff --git a/k8s/secret.yaml b/k8s/secret.yaml new file mode 100644 index 00000000..068161a2 --- /dev/null +++ b/k8s/secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: feel-scala-playground-secret +type: Opaque +stringData: + mixpanel_project_token: x