...

Text file src/cuelang.org/go/doc/tutorial/kubernetes/quick/services/mon/prometheus/kube.cue

Documentation: cuelang.org/go/doc/tutorial/kubernetes/quick/services/mon/prometheus

     1package kube
     2
     3service: prometheus: {
     4	metadata: annotations: "prometheus.io/scrape": "true"
     5	spec: {
     6		type: "NodePort"
     7		ports: [{
     8			name:     "main"
     9			nodePort: 30900
    10		}]
    11	}
    12}
    13deployment: prometheus: spec: {
    14	strategy: {
    15		rollingUpdate: {
    16			maxSurge:       0
    17			maxUnavailable: 1
    18		}
    19		type: "RollingUpdate"
    20	}
    21	selector: matchLabels: app: "prometheus"
    22	template: {
    23		metadata: {
    24			name: "prometheus"
    25			annotations: "prometheus.io.scrape": "true"
    26		}
    27		spec: {
    28			containers: [{
    29				image: "prom/prometheus:v2.4.3"
    30				args: [
    31					"--config.file=/etc/prometheus/prometheus.yml",
    32					"--web.external-url=https://prometheus.example.com",
    33				]
    34				ports: [{
    35					name:          "web"
    36					containerPort: 9090
    37				}]
    38				volumeMounts: [{
    39					name:      "config-volume"
    40					mountPath: "/etc/prometheus"
    41				}]
    42			}]
    43			volumes: [{
    44				name: "config-volume"
    45				configMap: name: "prometheus"
    46			}]
    47		}
    48	}
    49}

View as plain text