diff --git a/demo/daemonset.yaml b/demo/daemonset.yaml index 291213c..5211691 100644 --- a/demo/daemonset.yaml +++ b/demo/daemonset.yaml @@ -1,46 +1,46 @@ ---- - apiVersion: "apps/v1" - kind: "DaemonSet" - metadata: - name: "kube-iptables-tailer" - namespace: "kube-system" - spec: - selector: - matchLabels: - app: "kube-iptables-tailer" - template: - metadata: - labels: - app: "kube-iptables-tailer" - spec: - serviceAccount: kube-iptables-tailer - containers: - - name: "kube-iptables-tailer" - command: - - "/kube-iptables-tailer" - - "--log_dir=/my-service-logs" # change the output directory of service logs - - "--v=4" # enable V-leveled logging at this level - env: - - name: "IPTABLES_LOG_PATH" - value: "/var/log/iptables.log" - - name: "IPTABLES_LOG_PREFIX" - # log prefix defined in your iptables chains - value: "calico-drop:" - image: "boxinc/kube-iptables-tailer:v0.1.0" - volumeMounts: - - name: "iptables-logs" - mountPath: "/var/log" - readOnly: true - - name: "service-logs" - mountPath: "/my-service-logs" +# An example DaemonSet spec for kube-iptables-tailer, with the required RBAC roles defined. - volumes: - - name: "iptables-logs" - hostPath: - # absolute path of the directory containing iptables log file on your host - path: "/var/log" - - name: "service-logs" - emptyDir: {} +apiVersion: "apps/v1" +kind: "DaemonSet" +metadata: + name: "kube-iptables-tailer" + namespace: "kube-system" +spec: + selector: + matchLabels: + app: "kube-iptables-tailer" + template: + metadata: + labels: + app: "kube-iptables-tailer" + spec: + containers: + - name: "kube-iptables-tailer" + command: + - "/kube-iptables-tailer" + - "--log_dir=/my-service-logs" # change the output directory of service logs + - "--v=4" # enable V-leveled logging at this level + env: + - name: "IPTABLES_LOG_PATH" + value: "/var/log/iptables.log" + - name: "IPTABLES_LOG_PREFIX" + # log prefix defined in your iptables chains + value: "calico-drop:" + image: "boxinc/kube-iptables-tailer:v0.2.0" + volumeMounts: + - name: "iptables-logs" + mountPath: "/var/log" + readOnly: true + - name: "service-logs" + mountPath: "/my-service-logs" + volumes: + - name: "iptables-logs" + hostPath: + # absolute path of the directory containing iptables log file on your host + path: "/var/log" + - name: "service-logs" + emptyDir: {} + serviceAccountName: kube-iptables-tailer --- @@ -60,9 +60,9 @@ rules: - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch"] - - apiGroups: ["v1"] - resources: ["pods"] - verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["create"] ---