Path: blob/main/pkg/operator/testdata/test-metrics-instance.out.yaml
4095 views
# Resources to assert to exist when reconciling test-metrics-instance.in.yaml.12apiVersion: apps/v13kind: StatefulSet4metadata:5name: grafana-agent-example6namespace: default7labels:8operator.agent.grafana.com/name: grafana-agent-example9operator.agent.grafana.com/shard: "0"10operator.agent.grafana.com/type: metrics11app.kubernetes.io/instance: grafana-agent-example12app.kubernetes.io/managed-by: grafana-agent-operator13app.kubernetes.io/name: grafana-agent14grafana-agent: grafana-agent-example15ownerReferences:16- apiVersion: monitoring.grafana.com/v1alpha117blockOwnerDeletion: true18controller: true19kind: GrafanaAgent20name: grafana-agent-example21spec:22replicas: 123serviceName: grafana-agent-example-operated24template:25spec:26containers:27- name: config-reloader28args:29- --config-file=/var/lib/grafana-agent/config-in/agent.yml30- --config-envsubst-file=/var/lib/grafana-agent/config/agent.yml31- --watch-interval=1m32- --statefulset-ordinal-from-envvar=POD_NAME33- --reload-url=http://127.0.0.1:8080/-/reload34env:35- name: POD_NAME36valueFrom:37fieldRef:38apiVersion: v139fieldPath: metadata.name40- name: SHARD41value: "0"42- name: SHARDS43value: "1"44volumeMounts:45- mountPath: /var/lib/grafana-agent/config-in46name: config47readOnly: true48- mountPath: /var/lib/grafana-agent/config49name: config-out50- mountPath: /var/lib/grafana-agent/secrets51name: secrets52readOnly: true53- mountPath: /var/lib/grafana-agent/data54name: grafana-agent-example-wal55- name: grafana-agent56args:57- -config.file=/var/lib/grafana-agent/config/agent.yml58- -config.expand-env=true59- -server.http.address=0.0.0.0:808060- -enable-features=integrations-next61env:62- name: POD_NAME63valueFrom:64fieldRef:65apiVersion: v166fieldPath: metadata.name67- name: SHARD68value: "0"69- name: SHARDS70value: "1"71ports:72- containerPort: 808073name: http-metrics74protocol: TCP75readinessProbe:76httpGet:77path: /-/ready78port: http-metrics79scheme: HTTP80volumeMounts:81- mountPath: /var/lib/grafana-agent/config-in82name: config83readOnly: true84- mountPath: /var/lib/grafana-agent/config85name: config-out86- mountPath: /var/lib/grafana-agent/secrets87name: secrets88readOnly: true89- mountPath: /var/lib/grafana-agent/data90name: grafana-agent-example-wal91serviceAccount: grafana-agent92serviceAccountName: grafana-agent93terminationGracePeriodSeconds: 480094volumes:95- name: config96secret:97secretName: grafana-agent-example-config98- name: config-out99emptyDir: {}100- name: secrets101secret:102secretName: grafana-agent-example-secrets103volumeClaimTemplates:104- metadata:105name: grafana-agent-example-wal106spec:107accessModes: [ReadWriteOnce]108resources:109requests:110storage: 1Gi111112---113114apiVersion: v1115kind: Secret116metadata:117name: grafana-agent-example-config118namespace: default119labels:120app.kubernetes.io/managed-by: grafana-agent-operator121ownerReferences:122- apiVersion: monitoring.grafana.com/v1alpha1123kind: GrafanaAgent124name: grafana-agent-example125# We don't test the contents of the secret here; we use unit-level tests for126# asserting that the generated config is correct.127128---129130apiVersion: v1131kind: Service132metadata:133name: grafana-agent-example-operated134namespace: default135labels:136app.kubernetes.io/managed-by: grafana-agent-operator137operated-agent: "true"138operator.agent.grafana.com/name: grafana-agent-example139ownerReferences:140- apiVersion: monitoring.grafana.com/v1alpha1141kind: GrafanaAgent142name: grafana-agent-example143spec:144type: ClusterIP145ports:146- name: http-metrics147port: 8080148protocol: TCP149targetPort: http-metrics150selector:151app.kubernetes.io/name: grafana-agent152operator.agent.grafana.com/name: grafana-agent-example153154155