github.com/grafana/synthetic-monitoring-agent@v0.64.2/scripts/agent.yaml.tmpl (about) 1 apiVersion: v1 2 kind: Pod 3 metadata: 4 name: sm-agent 5 labels: 6 app: sm-agent 7 env: development 8 spec: 9 containers: 10 - image: grafana/synthetic-monitoring-agent:latest 11 name: agent 12 imagePullPolicy: Never 13 args: 14 - -api-server-address 15 - {{ has (ds "config") SM_API_URL | ternary (ds "config").SM_API_URL "sm-api:4031" }} 16 - -api-token 17 - {{ required "Missing API_TOKEN var" (ds "config").API_TOKEN }} 18 - -debug 19 - -api-insecure 20 ports: 21 - name: http 22 containerPort: 4050 23 protocol: TCP 24 --- 25 apiVersion: v1 26 kind: Service 27 metadata: 28 name: sm-agent 29 spec: 30 ports: 31 - name: http 32 port: 4050 33 targetPort: http 34 selector: 35 app: sm-agent 36 env: development 37 --- 38 apiVersion: networking.k8s.io/v1 39 kind: Ingress 40 metadata: 41 name: sm-agent-ingress 42 namespace: default 43 spec: 44 rules: 45 - host: sm-agent.k3d.localhost 46 http: 47 paths: 48 - backend: 49 service: 50 name: sm-agent 51 port: 52 number: 4050 53 path: / 54 pathType: Prefix