grafana configuration
This commit is contained in:
parent
89c09df7bf
commit
14342f2136
|
@ -32,6 +32,10 @@ spec:
|
|||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
|
|
|
@ -41,9 +41,10 @@ spec:
|
|||
secretKeyRef:
|
||||
name: drone-secret
|
||||
key: rpc_secret
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
|
|
@ -56,14 +56,18 @@ spec:
|
|||
- name: http
|
||||
containerPort: 3000
|
||||
- name: ssh
|
||||
containerPort: 22
|
||||
containerPort: 22
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: gitea-data
|
||||
- name: gitea-pv
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: gitea-data
|
||||
- name: gitea-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: gitea-data
|
||||
claimName: gitea-pvc
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: PersistentVolume
|
||||
|
@ -84,7 +88,7 @@ spec:
|
|||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gitea-data
|
||||
name: gitea-pvc
|
||||
labels:
|
||||
app: gitea
|
||||
spec:
|
||||
|
@ -93,7 +97,7 @@ spec:
|
|||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
storage: 10Gi
|
||||
# selector:
|
||||
# matchLabels:
|
||||
# app: gitea
|
||||
|
|
|
@ -20,39 +20,77 @@ spec:
|
|||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Admin
|
||||
- name: GF_DATABASE_TYPE
|
||||
value: postgres
|
||||
- name: GF_DATABASE_HOST
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-credentials-secret
|
||||
key: host
|
||||
- name: GF_DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-credentials-secret
|
||||
key: database
|
||||
- name: GF_DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-credentials-secret
|
||||
key: username
|
||||
- name: GF_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: postgres-credentials-secret
|
||||
key: password
|
||||
value: Viewer
|
||||
# - name: GF_DATABASE_TYPE
|
||||
# value: postgres
|
||||
# - name: GF_DATABASE_HOST
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: host
|
||||
# - name: GF_DATABASE_NAME
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: database
|
||||
# - name: GF_DATABASE_USER
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: username
|
||||
# - name: GF_DATABASE_PASSWORD
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: postgres-credentials-secret
|
||||
# key: password
|
||||
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
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 750Mi
|
||||
volumeMounts:
|
||||
- name: grafana-datasources
|
||||
mountPath: /etc/grafana/provisioning/datasources
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana-pv
|
||||
volumes:
|
||||
- name: grafana-datasources
|
||||
configMap:
|
||||
name: grafana-datasources
|
||||
- name: grafana-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
@ -60,7 +98,6 @@ metadata:
|
|||
name: grafana
|
||||
labels:
|
||||
app: grafana
|
||||
monitor: main
|
||||
spec:
|
||||
selector:
|
||||
app: grafana
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana
|
||||
labels:
|
||||
app: grafana
|
||||
annotations:
|
||||
# nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
# cert-manager.io/cluster-issuer: letsencrypt
|
||||
spec:
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - ${GRAFANA_EXTERNAL_HOST}
|
||||
# secretName: letsencrypt-cert
|
||||
rules:
|
||||
- host: ${GRAFANA_EXTERNAL_HOST}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: grafana
|
||||
port:
|
||||
name: http
|
|
@ -1,22 +0,0 @@
|
|||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana
|
||||
labels:
|
||||
app: grafana
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /
|
||||
cert-manager.io/cluster-issuer: letsencrypt
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- ${GRAFANA_EXTERNAL_HOST}
|
||||
secretName: letsencrypt-cert
|
||||
rules:
|
||||
- host: ${GRAFANA_EXTERNAL_HOST}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: grafana
|
||||
servicePort: http
|
|
@ -1,18 +1,21 @@
|
|||
resources:
|
||||
- grafana-deployment.yaml
|
||||
- ingress.yaml
|
||||
- grafana-ingress.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: grafana-datasources
|
||||
files:
|
||||
- datasources.yaml=provision/datasources.yaml
|
||||
|
||||
secretGenerator:
|
||||
- name: postgres-credentials-secret
|
||||
type: Opaque
|
||||
behavior: create
|
||||
literals:
|
||||
- host=172.18.1.2:5432
|
||||
- database=grafana
|
||||
- username=grafana
|
||||
- password=changeme
|
||||
# secretGenerator:
|
||||
# - name: postgres-credentials-secret
|
||||
# type: Opaque
|
||||
# behavior: create
|
||||
# literals:
|
||||
# - host=172.18.1.2:5432
|
||||
# - database=grafana
|
||||
# - username=grafana
|
||||
# - password=changeme
|
||||
|
||||
# default username: admin
|
||||
# default password: admin
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
bases:
|
||||
- ../../namespaces/kubernetes-dashboard
|
||||
- ../../namespaces/gitea
|
||||
# - ../../namespaces/grafana
|
||||
- ../../namespaces/grafana
|
||||
# - ../../namespaces/nextcloud
|
||||
|
||||
# resources:
|
||||
|
|
Loading…
Reference in New Issue