Skip to content

Commit

Permalink
trying vector
Browse files Browse the repository at this point in the history
  • Loading branch information
yerlaser committed Apr 11, 2024
1 parent 81f81f7 commit 51fb92f
Show file tree
Hide file tree
Showing 5 changed files with 310 additions and 0 deletions.
287 changes: 287 additions & 0 deletions newstack/apps/vectoragent/vectoragent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
---
# Source: vector/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

automountServiceAccountToken: true
---
# Source: vector/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

data:
agent.yaml: |
data_dir: /vector-data-dir
api:
enabled: true
address: 127.0.0.1:8686
playground: false
sources:
kubernetes_logs:
type: kubernetes_logs
host_metrics:
filesystem:
devices:
excludes: [binfmt_misc]
filesystems:
excludes: [binfmt_misc]
mountpoints:
excludes: ["*/proc/sys/fs/binfmt_misc"]
type: host_metrics
internal_metrics:
type: internal_metrics
sinks:
opensearch:
type: elasticsearch
inputs: [kubernetes_logs]
endpoints:
- "http://opensearch-cluster-master.vorbereitung.svc.cluster.local:9200/_bulk"
mode: bulk
healthcheck: false
auth:
strategy: basic
user: "admin"
password: "MyStrong123Pass!"
---
# Source: vector/templates/rbac.yaml
# Permissions to use Kubernetes API.
# Requires that RBAC authorization is enabled.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

rules:
- apiGroups:
- ""
resources:
- namespaces
- nodes
- pods
verbs:
- list
- watch
---
# Source: vector/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: vagt1-vector
subjects:
- kind: ServiceAccount
name: vagt1-vector
namespace: vorbereitung
---
# Source: vector/templates/service-headless.yaml
apiVersion: v1
kind: Service
metadata:
name: vagt1-vector-headless
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

annotations:
spec:
clusterIP: None
ports:
- name: datadog-agent
port: 8282
protocol: TCP
- name: fluent
port: 24224
protocol: TCP
- name: logstash
port: 5044
protocol: TCP
- name: splunk-hec
port: 8080
protocol: TCP
- name: statsd
port: 8125
protocol: TCP
- name: syslog
port: 9000
protocol: TCP
- name: vector
port: 6000
protocol: TCP
- name: prom-exporter
port: 9090
protocol: TCP
selector:
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
type: ClusterIP
---
# Source: vector/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

annotations:
spec:
ports:
- name: prom-exporter
port: 9090
protocol: TCP
selector:
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
type: ClusterIP
---
# Source: vector/templates/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: vagt1-vector
labels:
helm.sh/chart: vector-0.32.1
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
app.kubernetes.io/version: "0.37.1-distroless-libc"
app.kubernetes.io/managed-by: Helm

annotations:
{}
spec:
selector:
matchLabels:
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
minReadySeconds: 0
template:
metadata:
annotations:
checksum/config: a342fbe42ad9cf542c1e202a454835d3ae6119e6ac58b076d1afca80ead71d9f
labels:
app.kubernetes.io/name: vector
app.kubernetes.io/instance: vagt1
app.kubernetes.io/component: Agent
vector.dev/exclude: "true"
spec:
serviceAccountName: vagt1-vector
dnsPolicy: ClusterFirst
containers:
- name: vector
image: "timberio/vector:0.37.1-distroless-libc"
imagePullPolicy: IfNotPresent
args:
- --config-dir
- /etc/vector/
env:
- name: VECTOR_LOG
value: "info"
- name: VECTOR_SELF_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: VECTOR_SELF_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: VECTOR_SELF_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: PROCFS_ROOT
value: "/host/proc"
- name: SYSFS_ROOT
value: "/host/sys"
ports:
- name: prom-exporter
containerPort: 9090
protocol: TCP
volumeMounts:
- name: data
mountPath: "/vector-data-dir"
- name: config
mountPath: "/etc/vector/"
readOnly: true
- mountPath: /var/log/
name: var-log
readOnly: true
- mountPath: /var/lib
name: var-lib
readOnly: true
- mountPath: /host/proc
name: procfs
readOnly: true
- mountPath: /host/sys
name: sysfs
readOnly: true
terminationGracePeriodSeconds: 60
volumes:
- name: config
projected:
sources:
- configMap:
name: vagt1-vector
- name: data
hostPath:
path: "/var/lib/vector"
- hostPath:
path: /var/log/
name: var-log
- hostPath:
path: /var/lib/
name: var-lib
- hostPath:
path: /proc
name: procfs
- hostPath:
path: /sys
name: sysfs
17 changes: 17 additions & 0 deletions newstack/node_explorer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Pod
metadata:
name: node-explorer
spec:
nodeName: lima-rancher-desktop
volumes:
- name: host-root
hostPath:
path: /
containers:
- name: node-explorer
image: alpine
command: ["sleep", "9999999999"]
volumeMounts:
- name: host-root
mountPath: /host
1 change: 1 addition & 0 deletions newstack/opensearch/axoflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ config:
kubernetes:
# Collect kubernetes logs
enabled: true
baseDir: /var/log/pods
destinations:
# Send logs to OpenSearch
opensearch:
Expand Down
1 change: 1 addition & 0 deletions newstack/opensearch/vectorvalues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
role: "Agent"
4 changes: 4 additions & 0 deletions newstack/pass.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
admin

Argo(101)

MyStrong123Pass!

0 comments on commit 51fb92f

Please sign in to comment.