diff --git a/README.md b/README.md index 7bdd153..8558879 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,22 @@ docker run --name runscope-agent \ -e TOKEN=runscope-token \ -e AGENT_ID=agent-id \ -e TEAM_ID=team-id \ -mmcc/runscope-agent" +mmcc/runscope-agent ``` I took quite a few cues from the [Docker DataDog agent](https://github.com/DataDog/docker-dd-agent) when building this, so big thanks to [DataDog](http://datadog.com). + +## Kubernetes deployment + +- Create secret +``` +kubectl create secret generic runscope-secret \ +--from-literal=token=runscope-token \ +--from-literal=agent_id=agent-id \ +--from-literal=team_id=team-id +``` + +- Deploy +``` +kubectl apply -f k8s/runscope-agent.yaml +``` diff --git a/k8s/runscope-agent.yaml b/k8s/runscope-agent.yaml new file mode 100644 index 0000000..eeb7d67 --- /dev/null +++ b/k8s/runscope-agent.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: runscope-agent + labels: + app: runscope-agent +spec: + replicas: 1 + selector: + matchLabels: + app: runscope-agent + template: + metadata: + labels: + app: runscope-agent + spec: + containers: + - name: runscope-agent + image: mmcc/runscope-agent:latest + env: + - name: NAME + value: runscope-agent + - name: AGENT_ID + valueFrom: + secretKeyRef: + name: runscope-secret + key: agent_id + - name: TOKEN + valueFrom: + secretKeyRef: + name: runscope-secret + key: token + - name: TEAM_ID + valueFrom: + secretKeyRef: + name: runscope-secret + key: team_id + resources: + limits: + cpu: 100m + memory: 100Mi + requests: + cpu: 5m + memory: 5Mi