add logstash alert imgpull

main
ycz008 2024-02-26 15:34:17 +08:00
parent 872c3e3447
commit 28cbe7f7b2
1 changed files with 14 additions and 10 deletions

View File

@ -54,28 +54,31 @@ data:
command => "/usr/local/bin/log-alert.sh '%{@timestamp}' '%{serviceName}' '%{env}' '%{level}' '%{message}'"
}
}
logstash.yml: |-
http.host: "0.0.0.0"
xpack.monitoring.elasticsearch.hosts: [ "http://elastic:9200" ]
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: logstash
name: logstash-alert
labels:
app: logstash
app: logstash-alert
spec:
replicas: 1
selector:
matchLabels:
app: logstash
app: logstash-alert
template:
metadata:
labels:
app: logstash
app: logstash-alert
spec:
imagePullSecrets:
- name: docker-hub
- name: deploy-regcred
containers:
- name: logstash
- name: logstash-alert
image: beaconfireiic/logstash:7.16.3
ports:
- containerPort: 5044
@ -98,7 +101,7 @@ spec:
volumes:
- name: config
configMap:
name: logstash-config-alert
name: logstash-alert-config
items:
- key: logstash.conf
path: logstash.conf
@ -109,13 +112,14 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: logstash
name: logstash-alert
labels:
app: logstash
app: logstash-alert
spec:
ports:
- port: 5044
targetPort: 5044
nodePort: 30011
selector:
app: logstash
app: logstash-alert
type: ClusterIP