github.com/kubeshop/testkube@v1.17.23/contrib/executor/k6/examples/k6-influxdb-grafana.yaml (about) 1 --- 2 apiVersion: v1 3 kind: Service 4 metadata: 5 name: testkube-k6-influxdb 6 namespace: testkube 7 spec: 8 type: ClusterIP 9 ports: 10 - port: 8086 11 protocol: TCP 12 selector: 13 app: influxdb 14 --- 15 apiVersion: apps/v1 16 kind: Deployment 17 metadata: 18 name: testkube-k6-influxdb 19 namespace: testkube 20 labels: 21 app: influxdb 22 spec: 23 replicas: 1 24 strategy: 25 type: RollingUpdate 26 rollingUpdate: 27 maxUnavailable: 1 28 selector: 29 matchLabels: 30 app: influxdb 31 template: 32 metadata: 33 labels: 34 app: influxdb 35 spec: 36 containers: 37 - name: influxdb 38 image: influxdb:1.8-alpine 39 env: 40 - name: INFLUXDB_DB 41 value: k6 42 ports: 43 - name: api 44 containerPort: 8086 45 resources: 46 requests: 47 memory: 64Mi 48 cpu: 100m 49 limits: 50 memory: 256Mi 51 cpu: 500m 52 livenessProbe: 53 httpGet: 54 port: api 55 path: /ping 56 scheme: HTTP 57 initialDelaySeconds: 30 58 timeoutSeconds: 5 59 readinessProbe: 60 httpGet: 61 port: api 62 path: /ping 63 scheme: HTTP 64 initialDelaySeconds: 5 65 timeoutSeconds: 1 66 --- 67 apiVersion: v1 68 kind: Service 69 metadata: 70 name: testkube-k6-grafana 71 namespace: testkube 72 spec: 73 type: NodePort 74 ports: 75 - port: 3000 76 protocol: TCP 77 selector: 78 app: grafana 79 --- 80 apiVersion: v1 81 kind: ConfigMap 82 metadata: 83 name: testkube-k6-grafana-config 84 namespace: testkube 85 data: 86 datasource.yaml: | 87 apiVersion: 1 88 datasources: 89 - name: k6influxdb 90 type: influxdb 91 access: proxy 92 database: k6 93 url: http://influxdb-service:8086 94 isDefault: true 95 --- 96 apiVersion: apps/v1 97 kind: Deployment 98 metadata: 99 name: testkube-k6-grafana 100 namespace: testkube 101 labels: 102 app: grafana 103 spec: 104 replicas: 1 105 strategy: 106 type: RollingUpdate 107 rollingUpdate: 108 maxUnavailable: 1 109 selector: 110 matchLabels: 111 app: grafana 112 template: 113 metadata: 114 labels: 115 app: grafana 116 spec: 117 containers: 118 - name: grafana 119 image: grafana/grafana:7.5.15 120 env: 121 - name: GF_AUTH_ANONYMOUS_ORG_ROLE 122 value: Admin 123 - name: GF_AUTH_ANONYMOUS_ENABLED 124 value: "true" 125 - name: GF_AUTH_BASIC_ENABLED 126 value: "false" 127 ports: 128 - name: web 129 containerPort: 3000 130 livenessProbe: 131 httpGet: 132 path: /metrics 133 port: web 134 initialDelaySeconds: 10 135 readinessProbe: 136 httpGet: 137 path: /api/health 138 port: web 139 initialDelaySeconds: 10 140 resources: 141 requests: 142 cpu: 100m 143 memory: 64Mi 144 limits: 145 cpu: 200m 146 memory: 128Mi 147 volumeMounts: 148 - name: datasource-yaml 149 mountPath: /etc/grafana/provisioning/datasources/ 150 readOnly: true 151 volumes: 152 - name: datasource-yaml 153 configMap: 154 name: testkube-k6-grafana-config 155 items: 156 - key: "datasource.yaml" 157 path: "datasource.yaml"