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

     1  package kube
     2  
     3  deployment: grafana: {
     4  	metadata: labels: app: "grafana"
     5  	spec: template: spec: {
     6  		volumes: [{
     7  			name: "grafana-volume"
     8  			gcePersistentDisk: {
     9  				// This disk must already exist.
    10  				pdName: "grafana-volume"
    11  				fsType: "ext4"
    12  			}
    13  		}]
    14  		containers: [{
    15  			image: "grafana/grafana:4.5.2"
    16  			ports: [{
    17  				containerPort: 8080
    18  			}]
    19  			resources: {
    20  				// keep request = limit to keep this container in guaranteed class
    21  				limits: {
    22  					cpu:    "100m"
    23  					memory: "100Mi"
    24  				}
    25  				requests: {
    26  					cpu:    "100m"
    27  					memory: "100Mi"
    28  				}
    29  			}
    30  			env: [{
    31  				// This variable is required to setup templates in Grafana.
    32  				// The following env variables are required to make Grafana accessible via
    33  				// the kubernetes api-server proxy. On production clusters, we recommend
    34  				// removing these env variables, setup auth for grafana, and expose the grafana
    35  				// service using a LoadBalancer or a public IP.
    36  				name:  "GF_AUTH_BASIC_ENABLED"
    37  				value: "false"
    38  			}, {
    39  				name:  "GF_AUTH_ANONYMOUS_ENABLED"
    40  				value: "true"
    41  			}, {
    42  				name:  "GF_AUTH_ANONYMOUS_ORG_ROLE"
    43  				value: "admin"
    44  			}]
    45  			volumeMounts: [{
    46  				name:      "grafana-volume"
    47  				mountPath: "/var/lib/grafana"
    48  			}]
    49  		}]
    50  	}
    51  }
    52  service: grafana: spec: ports: [{
    53  	name:       "grafana"
    54  	port:       3000
    55  	targetPort: 3000
    56  }]