github.com/solo-io/cue@v0.4.7/doc/tutorial/kubernetes/quick/services/mon/prometheus/kube.cue (about)

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