Created
June 23, 2020 16:18
-
-
Save adnanrahic/294d0361c25880d39a430b511181c892 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cluster Role bindings for Logagent | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: sematext-logagent | |
labels: | |
app: sematext-logagent | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: sematext-logagent | |
subjects: | |
- kind: ServiceAccount | |
name: sematext-logagent | |
namespace: default | |
--- | |
# Cluster Role for Logagent | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: sematext-logagent | |
labels: | |
app: sematext-logagent | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- events | |
- pods | |
verbs: | |
- list | |
- get | |
- watch | |
--- | |
# Service Account for Logagent | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: sematext-logagent | |
labels: | |
app: sematext-logagent | |
--- | |
# Daemonset | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
name: st-logagent | |
spec: | |
selector: | |
matchLabels: | |
app: st-logagent | |
template: | |
metadata: | |
labels: | |
app: st-logagent | |
spec: | |
nodeSelector: {} | |
serviceAccountName: sematext-logagent | |
hostNetwork: true | |
dnsPolicy: "ClusterFirst" | |
restartPolicy: "Always" | |
containers: | |
- name: sematext-logagent | |
image: sematext/logagent:latest | |
imagePullPolicy: "Always" | |
env: | |
- name: LA_CONFIG_OVERRIDE | |
value: true | |
volumeMounts: | |
- mountPath: /var/log | |
name: var-log | |
- mountPath: /var/data/kubeletlogs | |
name: kubeletlogs | |
- mountPath: /etc/localtime | |
name: localtime | |
- mountPath: /etc/sematext | |
name: config | |
securityContext: | |
privileged: true | |
volumes: | |
- name: var-log | |
hostPath: | |
path: /var/log | |
- name: kubeletlogs | |
hostPath: | |
path: /var/data/kubeletlogs | |
- name: localtime | |
hostPath: | |
path: /etc/localtime | |
- name: config | |
configMap: | |
name: ibm-kube-audit | |
items: | |
- key: logagent.conf | |
path: logagent.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment