Skip to content

Instantly share code, notes, and snippets.

View anilsakr's full-sized avatar
🎯
Focusing

Anil Saripiralla anilsakr

🎯
Focusing
View GitHub Profile
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1598920838" LAST_MODIFIED="1599585610">kubernetes</H3>
<DL><p>
@anilsakr
anilsakr / import-job.yaml
Created September 1, 2020 09:10
Kubernetes Setup for Prometheus and Grafana
apiVersion: batch/v1
kind: Job
metadata:
name: grafana-import-dashboards
namespace: monitoring
labels:
app: grafana
component: import-dashboards
spec:
template:
worker_processes 1;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
include /etc/nginx/conf.d/*.conf;
location /sumdemo {
set $diff ''; # we have to predefine the $diff variable here
set_by_lua $sum '
local a = 32
local b = 56
ngx.var.diff = a - b; -- write to $diff directly
return a + b; -- return the $sum value normally
';