Merge pull request #712 from 3dwardch3ng/infra/logstash

add app logstash
This commit is contained in:
2024-07-29 20:32:44 +10:00
committed by GitHub
7 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: logstash
repo: oci://registry-1.docker.io/bitnamicharts
version: 6.2.14
releaseName: logstash
valuesFile: values.yaml

View File

@@ -0,0 +1,50 @@
clusterDomain: logstash.logstash.svc.cluster.local
diagnosticMode: true
input: ""
output: ""
existingConfiguration: "logstash-pipelines"
enableMultiplePipelines: true
extraVolumes:
- name: logstash-pipeline-configs
hostPath:
path: /mnt/nfs/AppData/logstash/config
type: Directory
extraVolumeMounts:
- name: logstash-pipeline-configs
mountPath: /opt/bitnami/logstash/config/
containerPorts:
- name: http
containerPort: 8080
protocol: TCP
- name: monitoring
containerPort: 9600
protocol: TCP
- name: syslog-udp
containerPort: 1514
protocol: UDP
- name: syslog-tcp
containerPort: 1514
protocol: TCP
service:
type: LoadBalancer
ports:
- name: http
port: 8080
targetPort: http
protocol: TCP
- name: monitoring
port: 9600
targetPort: monitoring
protocol: TCP
- name: syslog-udp
port: 1514
targetPort: syslog-udp
protocol: UDP
- name: syslog-tcp
port: 1514
targetPort: syslog-tcp
protocol: TCP
persistence:
enabled: true
existingClaim: logstash-data-pvc
size: 16Gi

View File

@@ -0,0 +1,12 @@
{
"appName": "logstash",
"userGivenName": "logstash",
"namespace": "logstash",
"destNamespace": "logstash",
"destServer": "https://kubernetes.default.svc",
"srcPath": "infrastructures/logstash/env/k3s-cluster",
"srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./pipelines.yaml
- ../../base

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-pipelines
namespace: logstash
data:
pipelines.yaml: |
- pipeline.id: http
path.config: "/opt/bitnami/logstash/config/http.conf"
- pipeline.id: syslog
path.config: "/opt/bitnami/logstash/config/syslog.conf"

View File

@@ -0,0 +1,30 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: logstash-data-pv
namespace: logstash
labels:
type: local
spec:
storageClassName: local-path
volumeMode: Filesystem
capacity:
storage: 16Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
local:
path: "/mnt/nfs/AppData/logstash/data"
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: logstash-data-pvc
namespace: logstash
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/os
operator: In
values:
- linux

View File

@@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: logstash-data-pvc
namespace: logstash
labels:
name: logstash-data-pvc
spec:
storageClassName: local-path
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 16Gi