Created
February 25, 2022 10:35
-
-
Save arajkumar/10e77457de08c805a6e53d73d3aa8656 to your computer and use it in GitHub Desktop.
avalanche.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: cluster-monitoring-config | |
namespace: openshift-monitoring | |
data: | |
config.yaml: | | |
enableUserWorkload: true | |
prometheusK8s: | |
volumeClaimTemplate: | |
metadata: | |
name: prometheus-data | |
annotations: | |
openshift.io/cluster-monitoring-drop-pvc: "yes" | |
spec: | |
resources: | |
requests: | |
storage: 50Gi | |
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: user-workload-monitoring-config | |
namespace: openshift-user-workload-monitoring | |
data: | |
config.yaml: | | |
prometheus: | |
volumeClaimTemplate: | |
metadata: | |
name: prometheus-data | |
annotations: | |
openshift.io/cluster-monitoring-drop-pvc: "yes" | |
spec: | |
resources: | |
requests: | |
storage: 50Gi | |
limits: | |
memory: 24Gi | |
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: avalanche | |
labels: | |
openshift.io/cluster-monitoring: "false" | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
# TODO this should be a clusterrole | |
name: prometheus-k8s | |
namespace: avalanche | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- services | |
- endpoints | |
- pods | |
verbs: | |
- get | |
- list | |
- watch | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: prometheus-k8s | |
namespace: avalanche | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: prometheus-k8s | |
subjects: | |
- kind: ServiceAccount | |
name: prometheus-k8s | |
namespace: openshift-monitoring | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: avalanche | |
name: avalanche | |
namespace: avalanche | |
spec: | |
replicas: 10 | |
selector: | |
matchLabels: | |
app: avalanche | |
template: | |
metadata: | |
labels: | |
app: avalanche | |
spec: | |
containers: | |
- image: quay.io/freshtracks.io/avalanche:latest | |
imagePullPolicy: IfNotPresent | |
name: avalanche | |
args: | |
- --metric-count=1000 | |
- --series-count=50 | |
- --port=9001 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: avalanche | |
name: avalanche | |
namespace: avalanche | |
spec: | |
ports: | |
- port: 9001 | |
protocol: TCP | |
targetPort: 9001 | |
name: web | |
selector: | |
app: avalanche | |
type: ClusterIP | |
--- | |
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
name: avalanche-monitor | |
namespace: avalanche | |
spec: | |
endpoints: | |
- interval: 5s | |
port: web | |
selector: | |
matchLabels: | |
app: avalanche | |
--- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment