-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #525 from cfoos/main
k3s/kubernettes install
- Loading branch information
Showing
24 changed files
with
10,979 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.