Skip to content

Commit ab2f233

Browse files
committed
statefulset is working
1 parent 46afb33 commit ab2f233

File tree

5 files changed

+74
-53
lines changed

5 files changed

+74
-53
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ e2e-results/
3232
# Editor
3333
.idea
3434

35-
.eslintcache
35+
.eslintcache
36+
37+
.DS_Store

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ZINC LABS, INC. ("LICENSOR")
22

33
COMMERCIAL LICENSE AGREEMENT FOR ZINCOBSERVE PLUGIN ("SOFTWARE")
44

5-
THIS IS A LEGAL AGREEMENT between you ("Licensee") and Zinc Labs, Inc., a Delaware corporation with its principal place of business at [Your Company's Address], San Francisco, California, United States ("Licensor").
5+
THIS IS A LEGAL AGREEMENT between you ("Licensee") and Zinc Labs, Inc., a Delaware corporation with its ts headquarter in San Francisco, California, United States ("Licensor").
66

77
By installing, copying, or otherwise using the ZincObserve Plugin ("Software"), you agree to be bound by the terms of this license agreement. If you do not agree to the terms of this agreement, do not install or use the Software.
88

deployment/grafana_statefulset.yaml

Lines changed: 59 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ spec:
99
name: letsencrypt-prod
1010
server: https://acme-v02.api.letsencrypt.org/directory
1111
solvers:
12-
- http01:
13-
ingress:
14-
class: nginx
12+
- http01:
13+
ingress:
14+
class: nginx
1515
---
16-
1716
apiVersion: apps/v1
1817
kind: StatefulSet
1918
metadata:
@@ -33,23 +32,34 @@ spec:
3332
fsGroup: 2000
3433
runAsUser: 10000
3534
runAsGroup: 3000
36-
# initContainers:
37-
# - name: zincobserve_plugin_loader
38-
# image: busybox
39-
# command: ['sh', '-c', 'cp -R /code/dist/* /var/lib/grafana/plugins/']
35+
initContainers:
36+
- name: zincobserve-plugin-loader
37+
image: wbitt/network-multitool
38+
imagePullPolicy: IfNotPresent
39+
command:
40+
[
41+
"sh",
42+
"-c",
43+
"curl -o /tmp/zo_gp.tar.gz https://zincsearch-releases.s3.us-west-2.amazonaws.com/zo_gp/zo_gp.tar.gz && cd /tmp && cp zo_gp.tar.gz /var/lib/grafana/plugins/zo_gp.tar.gz && cd /var/lib/grafana/plugins && tar -zxvf zo_gp.tar.gz",
44+
]
45+
volumeMounts:
46+
- name: grafana-base
47+
mountPath: /var/lib/grafana
48+
- name: grafana-plugins
49+
mountPath: /var/lib/grafana/plugins
4050
containers:
41-
- name: grafana
42-
image: grafana/grafana:latest
43-
ports:
44-
- containerPort: 3000
45-
name: grafana
46-
volumeMounts:
47-
- name: grafana-base
48-
mountPath: /var/lib/grafana
49-
- name: grafana-plugins
50-
mountPath: /var/lib/grafana/plugins
51-
- name: grafana-config
52-
mountPath: /etc/grafana
51+
- name: grafana
52+
image: grafana/grafana:latest
53+
ports:
54+
- containerPort: 3000
55+
name: grafana
56+
volumeMounts:
57+
- name: grafana-base
58+
mountPath: /var/lib/grafana
59+
- name: grafana-plugins
60+
mountPath: /var/lib/grafana/plugins
61+
- name: grafana-config
62+
mountPath: /etc/grafana
5363
volumes:
5464
- name: grafana-base
5565
persistentVolumeClaim:
@@ -62,34 +72,33 @@ spec:
6272
defaultMode: 420
6373
secretName: grafana-config
6474
volumeClaimTemplates:
65-
- metadata:
66-
name: grafana-base
67-
spec:
68-
accessModes: [ "ReadWriteOnce" ]
69-
resources:
70-
requests:
71-
storage: 1Gi
72-
- metadata:
73-
name: grafana-plugins
74-
spec:
75-
accessModes: [ "ReadWriteOnce" ]
76-
resources:
77-
requests:
78-
storage: 1Gi
75+
- metadata:
76+
name: grafana-base
77+
spec:
78+
accessModes: ["ReadWriteOnce"]
79+
resources:
80+
requests:
81+
storage: 1Gi
82+
- metadata:
83+
name: grafana-plugins
84+
spec:
85+
accessModes: ["ReadWriteOnce"]
86+
resources:
87+
requests:
88+
storage: 1Gi
7989
---
8090
apiVersion: v1
8191
kind: Service
8292
metadata:
8393
name: grafana
8494
spec:
8595
ports:
86-
- port: 3000
87-
targetPort: 3000
96+
- port: 3000
97+
targetPort: 3000
8898
selector:
8999
app: grafana
90100

91101
---
92-
93102
apiVersion: networking.k8s.io/v1
94103
kind: Ingress
95104
metadata:
@@ -99,17 +108,17 @@ metadata:
99108
name: g2.gke.zinclabs.dev
100109
spec:
101110
rules:
102-
- host: g2.gke.zinclabs.dev
103-
http:
104-
paths:
105-
- pathType: Prefix
106-
backend:
107-
service:
108-
name: grafana
109-
port:
110-
number: 3000
111-
path: /
111+
- host: g2.gke.zinclabs.dev
112+
http:
113+
paths:
114+
- pathType: Prefix
115+
backend:
116+
service:
117+
name: grafana
118+
port:
119+
number: 3000
120+
path: /
112121
tls:
113-
- hosts:
114-
- g2.gke.zinclabs.dev
115-
secretName: g2.gke.zinclabs.dev
122+
- hosts:
123+
- g2.gke.zinclabs.dev
124+
secretName: g2.gke.zinclabs.dev

publish.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
npm run build
4+
mv dist zo_gp
5+
tar -czvf zo_gp.tar.gz ./zo_gp/
6+
7+
aws s3 cp zo_gp.tar.gz s3://zincsearch-releases/zo_gp/zo_gp.tar.gz
8+
9+
rm -rf zo_gp.tar.gz zo_gp
10+

src/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ZINC LABS, INC. ("LICENSOR")
22

33
COMMERCIAL LICENSE AGREEMENT FOR ZINCOBSERVE PLUGIN ("SOFTWARE")
44

5-
THIS IS A LEGAL AGREEMENT between you ("Licensee") and Zinc Labs, Inc., a Delaware corporation with its principal place of business at [Your Company's Address], San Francisco, California, United States ("Licensor").
5+
THIS IS A LEGAL AGREEMENT between you ("Licensee") and Zinc Labs, Inc., a Delaware corporation with its ts headquarter in San Francisco, California, United States ("Licensor").
66

77
By installing, copying, or otherwise using the ZincObserve Plugin ("Software"), you agree to be bound by the terms of this license agreement. If you do not agree to the terms of this agreement, do not install or use the Software.
88

0 commit comments

Comments
 (0)