Automatically track Kubernetes deployments using the OpsTrails operator.
helm install opstrails-operator ./chart \
--set opstrails.apiKey=YOUR_API_KEY \
--namespace opstrails-system \
--create-namespaceAdd annotations to your Kubernetes Deployments to enable tracking:
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
annotations:
opstrails.dev/track: "true"
opstrails.dev/subject: "production"
opstrails.dev/source: "//k8s/my-cluster/my-app"
spec:
replicas: 3
template:
spec:
containers:
- name: my-app
image: my-app:v1.2.3| Annotation | Required | Description |
|---|---|---|
opstrails.dev/track | required | Set to "true" to enable tracking |
opstrails.dev/subject | optional | Target environment (e.g. production) |
opstrails.dev/source | optional | Event source URI |
The operator watches for rollout changes and automatically creates events with the container image tag as the version.