apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: thanos-receive labels: app: thanos-receive spec: replicas: 1 selector: matchLabels: app: thanos-receive serviceName: thanos-receive template: metadata: labels: app: thanos-receive spec: serviceAccountName: thanos-receive containers: - name: oauth-proxy args: - -provider=openshift - -https-address=:9091 - -http-address= - -email-domain=* - -upstream=http://localhost:19291 - -openshift-service-account=thanos-receive - '-openshift-sar={"resource":"namespaces","resourceName":"thanos","namespace":"thanos","verb":"get"}' - '-openshift-delegate-urls={"/":{"resource":"namespaces","resourceName":"thanos","namespace":"thanos","verb":"get"}}' - -tls-cert=/etc/tls/private/tls.crt - -tls-key=/etc/tls/private/tls.key - -cookie-secret-file=/etc/proxy/secrets/session_secret - -skip-auth-regex=^/metrics image: quay.io/openshift/origin-oauth-proxy:4.1 ports: - containerPort: 9091 name: web-proxy volumeMounts: - mountPath: /etc/tls/private name: secret-thanos-receive-tls - mountPath: /etc/proxy/secrets name: secret-thanos-receive-proxy - name: thanos-receive image: quay.io/thanos/thanos:v0.8.1 args: - receive - --tsdb.path=/data/remote-write-receive-data - --debug.name=receive - --log.level=debug - --grpc-address=0.0.0.0:19891 - --http-address=0.0.0.0:18091 - --remote-write.address=0.0.0.0:19291 - --objstore.config-file=/etc/prometheus/store-s3-secret.yaml ports: - name: http containerPort: 19291 - name: grpc containerPort: 19891 volumeMounts: - name: s3-store-credentials mountPath: /etc/prometheus/ readOnly: true - name: remote-write-data mountPath: /data/remote-write-receive-data volumes: - name: s3-store-credentials secret: secretName: store-s3-credentials - name: remote-write-data emptyDir: {} - name: secret-thanos-receive-tls secret: secretName: thanos-receive-tls - name: secret-thanos-receive-proxy secret: secretName: thanos-receive-proxy --- apiVersion: v1 kind: Service metadata: annotations: service.alpha.openshift.io/serving-cert-secret-name: thanos-receive-tls labels: app: thanos-receive name: thanos-receive spec: ports: - port: 9091 protocol: TCP targetPort: web-proxy name: web-proxy - port: 19891 protocol: TCP targetPort: grpc name: grpc selector: app: thanos-receive type: ClusterIP