feat(sb-server-monitor): move deployment to core repo
All checks were successful
ci/woodpecker/push/yamllint Pipeline was successful
All checks were successful
ci/woodpecker/push/yamllint Pipeline was successful
This commit is contained in:
parent
c2240f1fac
commit
fb55a81677
7 changed files with 130 additions and 0 deletions
|
@ -93,3 +93,24 @@ spec:
|
|||
automated:
|
||||
selfHeal: false
|
||||
prune: true
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: sb-server-monitor
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.ar21.de/yolokube/core-deployments.git
|
||||
targetRevision: HEAD
|
||||
path: sb-server-monitor
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: sb-server-monitor
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
automated:
|
||||
selfHeal: true
|
||||
prune: true
|
||||
|
|
5
sb-server-monitor/0-namespace.yaml
Normal file
5
sb-server-monitor/0-namespace.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: sb-server-monitor
|
9
sb-server-monitor/1-service-account.yaml
Normal file
9
sb-server-monitor/1-service-account.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
||||
name: sb-server-monitor-exporter-service-account
|
||||
namespace: sb-server-monitor
|
42
sb-server-monitor/2-deployment.yaml
Normal file
42
sb-server-monitor/2-deployment.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: sb-server-monitor-exporter
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
||||
name: sb-server-monitor-exporter
|
||||
namespace: sb-server-monitor
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sb-server-monitor-exporter
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sb-server-monitor-exporter
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: SBSERVERMONITOR_SCRAPE_INTERVAL
|
||||
value: "300"
|
||||
image: git.ar21.de/yolokube/sb-server-monitor:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: sb-server-monitor-exporter
|
||||
ports:
|
||||
- containerPort: 9192
|
||||
name: http-metrics
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 2Gi
|
||||
restartPolicy: Always
|
||||
serviceAccountName: sb-server-monitor-exporter-service-account
|
19
sb-server-monitor/3-service.yaml
Normal file
19
sb-server-monitor/3-service.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: sb-server-monitor-exporter
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
||||
name: sb-server-monitor-exporter
|
||||
namespace: sb-server-monitor
|
||||
spec:
|
||||
ports:
|
||||
- name: http-metrics
|
||||
port: 9192
|
||||
protocol: TCP
|
||||
targetPort: http-metrics
|
||||
selector:
|
||||
app: sb-server-monitor-exporter
|
||||
type: ClusterIP
|
21
sb-server-monitor/4-service-monitor.yaml
Normal file
21
sb-server-monitor/4-service-monitor.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
labels:
|
||||
app: sb-server-monitor-exporter
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
||||
name: sb-server-monitor-exporter-servicemonitor
|
||||
namespace: sb-server-monitor
|
||||
spec:
|
||||
endpoints:
|
||||
- interval: 5m
|
||||
path: /metrics
|
||||
port: http-metrics
|
||||
scheme: http
|
||||
jobLabel: jobLabel
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: sb-server-monitor
|
||||
app.kubernetes.io/name: sb-server-monitor-exporter
|
13
sb-server-monitor/kustomization.yaml
Normal file
13
sb-server-monitor/kustomization.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
resources:
|
||||
- ./0-namespace.yaml
|
||||
- ./1-service-account.yaml
|
||||
- ./2-deployment.yaml
|
||||
- ./3-service.yaml
|
||||
- ./4-service-monitor.yaml
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
images:
|
||||
- name: git.ar21.de/yolokube/sb-server-monitor
|
||||
newName: git.ar21.de/yolokube/sb-server-monitor
|
||||
newTag: "12"
|
||||
namespace: fail2ban-prometheus
|
Loading…
Reference in a new issue