mirror of
https://gitlab.com/shouptech/flux.git
synced 2026-02-03 13:39:42 +00:00
Add grafana postgres
This commit is contained in:
parent
83523d3531
commit
f57803dc8e
4 changed files with 88 additions and 0 deletions
4
namespaces/grafana.yml
Normal file
4
namespaces/grafana.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: grafana
|
||||||
56
workloads/grafana/postgres-deploy.yml
Normal file
56
workloads/grafana/postgres-deploy.yml
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: postgres
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: postgres
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: postgres
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: postgres:12.2-alpine
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
name: postgres
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres
|
||||||
|
key: POSTGRES_USER
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: postgres
|
||||||
|
key: POSTGRES_PASSWORD
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "512Mi"
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 5432
|
||||||
|
initialDelaySeconds: 15
|
||||||
|
periodSeconds: 30
|
||||||
|
timeoutSeconds: 5
|
||||||
|
successThreshold: 1
|
||||||
|
failureThreshold: 2
|
||||||
|
ports:
|
||||||
|
- containerPort: 5432
|
||||||
|
volumeMounts:
|
||||||
|
- name: postgres-data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
volumes:
|
||||||
|
- name: postgres-data
|
||||||
|
hostPath:
|
||||||
|
path: /opt/grafana/postgres
|
||||||
|
type: Directory
|
||||||
16
workloads/grafana/postgres-secret.yml
Normal file
16
workloads/grafana/postgres-secret.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
apiVersion: bitnami.com/v1alpha1
|
||||||
|
kind: SealedSecret
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: postgres
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
encryptedData:
|
||||||
|
POSTGRES_PASSWORD: AgAJaiGYVsZ/hn8hHW99/jm0dizfnGSLCp3B1DLb3g0sCkD7wdVf/eZh5htKxDymnOl0FR7ieaI4SQig7MFMj4azqRxV5R7TxIME+aNdytcNNM6iUY/vLDzq+f6/AaFWxJFPNHl/uQM4fq3kgk93P62mn+Zp3u7hIQ9rEeK5rU22LZmtWAePF/HZjIfpBwIZkiAiUEYyIdi9gTmH1a5+vosjWhXnRJ1ZPdEDkvj40FeCTqri5PrD5WzdszCv1CRvTliCr76VJRjy7+28uo2sssWkzRKg7GTseELqI91QQ2/Pf0Ghq38DqDYpvxbRTXs3uVyTqn3aUjOP9sb7vMolTUKiuc9P/T/6lD8gHMLgUJrV9bHZLDXkRetGKicU6cXNkEX+QPyTeBUe3QlA8IwCh6mi8CY1XT4gu58DPXyKIFsp9R2VvBeYw+2MBseS9qzwRvBuOEKDfFoZvcZjHtOIb59GY4tIR3tiUXIQUh9jhjsdZY1GdARRXNjF26MRRtrf06ShQ/QpaMBWq7OpcpilLwTywSx5S4xyYaMt2GmHCtpYOqeEDAUDA3Ko2gJNTvkFj23jl7JH4rg7jUPxu+wEHv66ta8+cl0PMvI0w4SvrraT2pdL5doirSN20moaQjTDa7AW+s0XsJxPA2W3vWGT9KWA4X/gawJA5T+cgL84auoVbtL2IaWXo/LJeKZ9587rkcVzLFgpDom5hqOMNlZv20stAzix4ph3ANA=
|
||||||
|
POSTGRES_USER: AgChL3vTqhcvLAgw9/1fBjKcZ/yTEREwAraNUBxfOT0/IeBkzA5RNCIzzdTabe0xselbQC0jv8nTPzenP1RermpA9ozDN3KANE8W7+T/ERDURsOpPP4fiRQ0Nq49g8l9hNEQVjYCRAI82qlpuGm3gCg0gvGe+l9zxNwJKkDlelDz/hsP3rylbK+3N45f5+NTd/4lBWBzfYwD+6Ub1MU7eFaKNb8JX64rKYX8WVyuAyNvrVyckZzfPa+uVYG/k2K5YLGrAe3W97DxaM56vRCR9fZ+pRXF+Ju9YbWyQ7I4cW4tQoIjimIwKqEoJv/MgREmLtMWnnhlonhR5C2tNDpmudMTQLvq2q4KeAxgEcBbYoguP7XmEH1GhiE5JlAbpxWiMvSrqI88i/5fFERxOGTGLotkA7IDS0KlOcSsYyeQQpqWVw+DgAkHgCdahrVs6NNqtiYiE+MAmYMnLXGelQ3muk6Di0ZFWm8gzN37wd0z5bPY6+M8LyizcUzuNw1teHE6rvm75ihK9lvPs3//Mb186KdSjtTLNHzszN+rSNR2FNZjpupxV5CttT+f/0Rl8PIO0kUQ7WJjO1fFyq+u4+RlOGs5YZpKKKZbKXbaomkxXjLB2QQh/ahhcTiDLTjUx0rVppB1dLZ6kJqW+TRCc3NtRmCX96gT8Xmdz7egB+953KW9+z0s8Z9VFOIxawJeB1Tabi1o43qnlCMh
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: postgres
|
||||||
|
namespace: grafana
|
||||||
|
status: {}
|
||||||
12
workloads/grafana/postgres-service.yml
Normal file
12
workloads/grafana/postgres-service.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: postgres
|
||||||
|
namespace: grafana
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: postgres
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 5432
|
||||||
|
targetPort: 5432
|
||||||
Loading…
Add table
Reference in a new issue