Compare commits
10 commits
ccac1f1b86
...
f09c1ec86b
| Author | SHA1 | Date | |
|---|---|---|---|
| f09c1ec86b | |||
| 7734c642e1 | |||
| f16a7aa365 | |||
| 4f0927c6bf | |||
| e7d20864a9 | |||
| b192ffe85d | |||
| 1b290d7cb2 | |||
| 43f2caa087 | |||
| 4c114a5010 | |||
| ac16fabbd5 |
16 changed files with 170 additions and 41 deletions
19
README.md
19
README.md
|
|
@ -6,11 +6,28 @@ Underlying Kubernetes cluster components for [KISSJ](https://github.com/skautdev
|
||||||
|
|
||||||
- namespaces
|
- namespaces
|
||||||
- `kissj-db`
|
- `kissj-db`
|
||||||
|
- `kissj-dev`
|
||||||
- `kissj-prod`
|
- `kissj-prod`
|
||||||
- `kissj-staging`
|
- `kissj-staging`
|
||||||
|
- `kissj-monitoring`
|
||||||
- PostgreSQL instance
|
- PostgreSQL instance
|
||||||
|
- monitoring
|
||||||
|
- Prometheus
|
||||||
|
- AlertManager
|
||||||
|
- Grafana
|
||||||
|
- blackbox exporter
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
- Users
|
- Users
|
||||||
- ServiceAccounts
|
- lung
|
||||||
|
- majkl
|
||||||
|
|
||||||
|
## Monitoring
|
||||||
|
|
||||||
|
As mentione before in [components](#components), the monitoring consists of:
|
||||||
|
- [Prometheus](https://prometheus.monitoring.kissj.net)
|
||||||
|
- [AlertManager](https://alertmanager.monitoring.kissj.net)
|
||||||
|
- [Grafana](https://grafana.monitoring.kissj.net)
|
||||||
|
|
||||||
|
To monitor everything, we also deploy [prometheus/blackbox_exporter](https://github.com/prometheus/blackbox_exporter) to monitor the overall availability of the site.
|
||||||
|
|
|
||||||
18
_apps/kissj-production-quotas.yml
Normal file
18
_apps/kissj-production-quotas.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kissj-production-quotas
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: kissj-production
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: kissj
|
||||||
|
source:
|
||||||
|
path: quotas/production
|
||||||
|
repoURL: https://gitlab.mareshq.com/gitops/skautdevs/kissj.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
18
_apps/kissj-staging-quotas.yml
Normal file
18
_apps/kissj-staging-quotas.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kissj-staging-quotas
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: kissj-staging
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: kissj
|
||||||
|
source:
|
||||||
|
path: quotas/staging
|
||||||
|
repoURL: https://gitlab.mareshq.com/gitops/skautdevs/kissj.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|
@ -2,5 +2,8 @@ dependencies:
|
||||||
- name: kube-prometheus-stack
|
- name: kube-prometheus-stack
|
||||||
repository: https://prometheus-community.github.io/helm-charts
|
repository: https://prometheus-community.github.io/helm-charts
|
||||||
version: 39.11.0
|
version: 39.11.0
|
||||||
digest: sha256:2000f95ea7c9e6ac6ec0cc0ed3f08ee6adebf5e3ad383a0e8d89d80ab61439eb
|
- name: prometheus-blackbox-exporter
|
||||||
generated: "2022-09-03T10:54:33.34106+02:00"
|
repository: https://prometheus-community.github.io/helm-charts
|
||||||
|
version: 7.0.0
|
||||||
|
digest: sha256:7a9382529ff259e31426aa23cf9eea9a0dc5fe7d6950339133bc78bcb310fa30
|
||||||
|
generated: "2022-09-03T16:06:15.239791+02:00"
|
||||||
|
|
|
||||||
|
|
@ -9,3 +9,6 @@ dependencies:
|
||||||
- name: kube-prometheus-stack
|
- name: kube-prometheus-stack
|
||||||
version: 39.11.0
|
version: 39.11.0
|
||||||
repository: https://prometheus-community.github.io/helm-charts
|
repository: https://prometheus-community.github.io/helm-charts
|
||||||
|
- name: prometheus-blackbox-exporter
|
||||||
|
version: 7.0.0
|
||||||
|
repository: https://prometheus-community.github.io/helm-charts
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,27 @@ kube-prometheus-stack:
|
||||||
kubeStateMetrics:
|
kubeStateMetrics:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
|
kubeApiServer:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
kubelet:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
kubeControllerManager:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
coreDns:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
kubeScheduler:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
kubeProxy:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
defaultRules:
|
||||||
|
create: false
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
prometheusSpec:
|
prometheusSpec:
|
||||||
serviceMonitorSelectorNilUsesHelmValues: false
|
serviceMonitorSelectorNilUsesHelmValues: false
|
||||||
|
|
@ -96,34 +117,5 @@ kube-prometheus-stack:
|
||||||
serviceMonitor:
|
serviceMonitor:
|
||||||
selfMonitor: true
|
selfMonitor: true
|
||||||
|
|
||||||
# This AM is for KISSJ, cluster components are monitored by different instance
|
prometheus-blackbox-exporter:
|
||||||
kubeApiServer:
|
fullnameOverride: kissj-blackbox-exporter
|
||||||
enabled: false
|
|
||||||
|
|
||||||
kubelet:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
kubeControllerManager:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
coreDns:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
kubeScheduler:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
kubeProxy:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
kubeStateMetrics:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
nodeExporter:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
prometheusOperator:
|
|
||||||
serviceMonitor:
|
|
||||||
selfMonitor: false
|
|
||||||
|
|
||||||
defaultRules:
|
|
||||||
create: false
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: kissj-prod
|
|
||||||
labels:
|
|
||||||
prometheus: kissj
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: kissj-dev
|
name: kissj-production
|
||||||
labels:
|
labels:
|
||||||
prometheus: kissj
|
prometheus: kissj
|
||||||
10
quotas/production/compute-resources.yml
Normal file
10
quotas/production/compute-resources.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: compute-resources
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
requests.cpu: 6000m
|
||||||
|
requests.memory: 16384Mi
|
||||||
|
limits.cpu: 8000m
|
||||||
|
limits.memory: 20480Mi
|
||||||
13
quotas/production/kube-objects.yml
Normal file
13
quotas/production/kube-objects.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: kube-objects
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
count/deployments.apps: "5"
|
||||||
|
count/statefulsets.apps: "0"
|
||||||
|
count/cronjobs.batch: "0"
|
||||||
|
count/jobs.batch: "5"
|
||||||
|
count/pods: "50"
|
||||||
|
|
||||||
|
count/persistentvolumeclaims: "1"
|
||||||
9
quotas/production/network.yml
Normal file
9
quotas/production/network.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: network
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
services.loadbalancers: "0"
|
||||||
|
services.nodeports: "0"
|
||||||
10
quotas/production/storage.yml
Normal file
10
quotas/production/storage.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: storage
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
requests.storage: 1Gi
|
||||||
|
persistentvolumeclaims: "3"
|
||||||
|
local-path.storageclass.storage.k8s.io/requests.storage: 0Mi
|
||||||
|
local-path.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
|
||||||
10
quotas/staging/compute-resources.yml
Normal file
10
quotas/staging/compute-resources.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: compute-resources
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
requests.cpu: 800m
|
||||||
|
requests.memory: 1536Mi
|
||||||
|
limits.cpu: 1200m
|
||||||
|
limits.memory: 2048Mi
|
||||||
13
quotas/staging/kube-objects.yml
Normal file
13
quotas/staging/kube-objects.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: kube-objects
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
count/deployments.apps: "5"
|
||||||
|
count/statefulsets.apps: "0"
|
||||||
|
count/cronjobs.batch: "0"
|
||||||
|
count/jobs.batch: "5"
|
||||||
|
count/pods: "20"
|
||||||
|
|
||||||
|
count/persistentvolumeclaims: "1"
|
||||||
9
quotas/staging/network.yml
Normal file
9
quotas/staging/network.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: network
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
services.loadbalancers: "0"
|
||||||
|
services.nodeports: "0"
|
||||||
10
quotas/staging/storage.yml
Normal file
10
quotas/staging/storage.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ResourceQuota
|
||||||
|
metadata:
|
||||||
|
name: storage
|
||||||
|
spec:
|
||||||
|
hard:
|
||||||
|
requests.storage: 1Gi
|
||||||
|
persistentvolumeclaims: "3"
|
||||||
|
local-path.storageclass.storage.k8s.io/requests.storage: 0Mi
|
||||||
|
local-path.storageclass.storage.k8s.io/persistentvolumeclaims: "0"
|
||||||
Reference in a new issue