Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s/kubernettes install #525

Merged
merged 56 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
bba37ee
Create configmap.yaml
cfoos Sep 21, 2024
ea53d99
Create grafanadatasources.yaml
cfoos Sep 21, 2024
d4c8161
Create grafanadeployment.yaml
cfoos Sep 21, 2024
20da10a
Create grafanapvc.yaml
cfoos Sep 21, 2024
505c99d
Create grafanaservice.yaml
cfoos Sep 21, 2024
18b8523
Create influxdbdeployment.yaml
cfoos Sep 21, 2024
21b82a6
Create influxdbpvc.yaml
cfoos Sep 21, 2024
3dcb9fb
Create influxdbservice.yaml
cfoos Sep 21, 2024
7448876
Create namespace.yaml
cfoos Sep 21, 2024
736981b
Create pypowerwalldeployment.yaml
cfoos Sep 21, 2024
5190a9d
Create pypowerwallpvc.yaml
cfoos Sep 21, 2024
c88647c
Create pypowerwallservice.yaml
cfoos Sep 21, 2024
6b62d84
Create telegrafconfig.yaml
cfoos Sep 21, 2024
cb08a1c
Create telegrafdeployment.yaml
cfoos Sep 21, 2024
ad38e74
Create weather411config.yaml
cfoos Sep 21, 2024
a722306
Create weather411deployment.yaml
cfoos Sep 21, 2024
a2740f6
Create weather411service.yaml
cfoos Sep 21, 2024
87a516f
Create readme.md
cfoos Sep 21, 2024
02429a1
Update pypowerwallservice.yaml
cfoos Sep 21, 2024
178ddfd
Update grafanadeployment.yaml
cfoos Sep 21, 2024
c268bee
Update readme.md
cfoos Sep 21, 2024
eb8ec71
Update readme.md
cfoos Sep 23, 2024
d47b02e
Create grafanapvc-local.yaml
cfoos Sep 23, 2024
6eb3291
Create influxdbpvc-local.yaml
cfoos Sep 23, 2024
93d9b7e
Create k3sdashboard.json
cfoos Sep 23, 2024
d034251
Create metalLbL2Advertise.yaml
cfoos Sep 23, 2024
22a1409
Create metallb-config.yml
cfoos Sep 23, 2024
9106752
Create pypowerwallpvc-local.yaml
cfoos Sep 23, 2024
16ac211
Update grafanadeployment.yaml
cfoos Sep 23, 2024
e159abb
Update readme.md
cfoos Sep 23, 2024
9bcb930
Rename k3s/configmap.yaml to tools/k3s/configmap.yaml
cfoos Sep 25, 2024
60e90d5
Rename k3s/grafanadatasources.yaml to tools/k3s/grafanadatasources.yaml
cfoos Sep 25, 2024
0c6e184
Rename k3s/grafanadeployment.yaml to tools/k3s/grafanadeployment.yaml
cfoos Sep 25, 2024
f2978f3
Rename k3s/grafanapvc-local.yaml to tools/k3s/grafanapvc-local.yaml
cfoos Sep 25, 2024
d3e6c33
Rename k3s/grafanapvc.yaml to tools/k3s/grafanapvc.yaml
cfoos Sep 25, 2024
eadb867
Rename k3s/grafanaservice.yaml to tools/k3s/grafanaservice.yaml
cfoos Sep 25, 2024
d9e0698
Rename k3s/influxdbdeployment.yaml to tools/k3s/influxdbdeployment.yaml
cfoos Sep 25, 2024
2b1dc42
Rename k3s/influxdbpvc-local.yaml to tools/k3s/influxdbpvc-local.yaml
cfoos Sep 25, 2024
842c037
Rename k3s/influxdbpvc.yaml to tools/k3s/influxdbpvc.yaml
cfoos Sep 25, 2024
e7a82c0
Rename k3s/influxdbservice.yaml to tools/k3s/influxdbservice.yaml
cfoos Sep 25, 2024
23c2468
Rename k3s/k3sdashboard.json to tools/k3s/k3sdashboard.json
cfoos Sep 25, 2024
65e03cf
Rename k3s/metalLbL2Advertise.yaml to tools/k3s/metalLbL2Advertise.yaml
cfoos Sep 25, 2024
7b874ed
Rename k3s/metallb-config.yml to tools/k3s/metallb-config.yml
cfoos Sep 25, 2024
a5f15a5
Rename k3s/namespace.yaml to tools/k3s/namespace.yaml
cfoos Sep 25, 2024
a2d7db3
Rename k3s/pypowerwalldeployment.yaml to tools/k3s/pypowerwalldeploym…
cfoos Sep 25, 2024
ebf52d3
Rename k3s/pypowerwallpvc-local.yaml to tools/k3s/pypowerwallpvc-loca…
cfoos Sep 25, 2024
e4c76e8
Rename k3s/pypowerwallpvc.yaml to tools/k3s/pypowerwallpvc.yaml
cfoos Sep 25, 2024
3dbc235
Rename k3s/pypowerwallservice.yaml to tools/k3s/pypowerwallservice.yaml
cfoos Sep 25, 2024
bdbe83c
Rename k3s/readme.md to tools/k3s/readme.md
cfoos Sep 25, 2024
aa26170
Rename k3s/telegrafconfig.yaml to tools/k3s/telegrafconfig.yaml
cfoos Sep 25, 2024
c1f2594
Rename k3s/telegrafdeployment.yaml to tools/k3s/telegrafdeployment.yaml
cfoos Sep 25, 2024
e4c4e8b
Rename k3s/weather411config.yaml to tools/k3s/weather411config.yaml
cfoos Sep 25, 2024
6124118
Rename k3s/weather411deployment.yaml to tools/k3s/weather411deploymen…
cfoos Sep 25, 2024
a87cef5
Rename k3s/weather411service.yaml to tools/k3s/weather411service.yaml
cfoos Sep 25, 2024
902aff2
Update readme.md
cfoos Sep 25, 2024
eb2c61a
Fix typo, add author credit
jasonacox Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tools/k3s/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: powerwall-secret
namespace: powerwall
data:
email: "user@domain.tld"
password: "supersecurepass"
host: "xx.xx.xx.xx"
pwtz: "America/Chicago"
timezone: "America/Chicago"
debug: "no"
style: "grafana-dark"
21 changes: 21 additions & 0 deletions tools/k3s/grafanadatasources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-datasources
namespace: powerwall
data:
ds.yaml: |-
{
"apiVersion": 1,
"datasources": [
{
"name": "Sun and Moon (auto provisioned)",
"type": "fetzerch-sunandmoon-datasource",
"jsonData":{
"latitude": "xx.xxxx",
"longitude":"xx.xxxx"
}
}
]
}
{{ end }}
68 changes: 68 additions & 0 deletions tools/k3s/grafanadeployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: grafana
name: grafana
namespace: powerwall
spec:
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
supplementalGroups:
- 0
containers:
- name: grafana
image: grafana/grafana-enterprise
imagePullPolicy: Always
env:
- name: GF_INSTALL_PLUGINS
value: "grafana-piechart-panel,fetzerch-sunandmoon-datasource,vonage-status-panel,lehmannch-flow-panel,simpod-json-datasource"
ports:
- containerPort: 3000
name: http-grafana
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /robots.txt
port: 3000
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 2
livenessProbe:
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
tcpSocket:
port: 3000
timeoutSeconds: 1
resources:
requests:
cpu: 250m
memory: 750Mi
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-pv
- mountPath: /etc/grafana/provisioning/datasources
name: grafana-datasources
readOnly: false
volumes:
- name: grafana-pv
persistentVolumeClaim:
claimName: grafana-pvc
- name: grafana-datasources
configMap:
defaultMode: 420
name: grafana-datasources
13 changes: 13 additions & 0 deletions tools/k3s/grafanapvc-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-pvc
namespace: powerwall
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
storageClassName: local-path
14 changes: 14 additions & 0 deletions tools/k3s/grafanapvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-pvc
namespace: powerwall
spec:
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 500Gi
storageClassName: rook-cephfs
22 changes: 22 additions & 0 deletions tools/k3s/grafanaservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: powerwall
spec:
allocateLoadBalancerNodePorts: true
externalTrafficPolicy: Local
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
loadBalancerIP: xx.xx.xx.xx
ports:
- port: 3000
protocol: TCP
targetPort: http-grafana
selector:
app: grafana
sessionAffinity: None
type: LoadBalancer
31 changes: 31 additions & 0 deletions tools/k3s/influxdbdeployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: influxdb
name: influxdb
namespace: powerwall
spec:
selector:
matchLabels:
app: influxdb
template:
metadata:
labels:
app: influxdb
spec:
containers:
- image: influxdb:1.8
name: influxdb
imagePullPolicy: Always
ports:
- containerPort: 8086
name: influxdb
volumeMounts:
- mountPath: /var/lib/influxdb
name: influx-data
volumes:
- name: influx-data
persistentVolumeClaim:
claimName: influx-data
14 changes: 14 additions & 0 deletions tools/k3s/influxdbpvc-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: influx-data
namespace: powerwall
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 5Gi
storageClassName: local-path
14 changes: 14 additions & 0 deletions tools/k3s/influxdbpvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: influx-data
namespace: powerwall
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 500Gi
storageClassName: rook-cephfs
14 changes: 14 additions & 0 deletions tools/k3s/influxdbservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: influxdb
namespace: powerwall
spec:
externalTrafficPolicy: Local
ports:
- name: influxdb
port: 8086
targetPort: influxdb
selector:
app: influxdb
type: NodePort
Loading