github.com/munnerz/test-infra@v0.0.0-20190108210205-ce3d181dc989/logexporter/cluster/logexporter-daemonset.yaml (about) 1 # Template job config for running the log exporter on the cluster as a daemonset. 2 # Creates everything within 'logexporter' namespace. 3 # 4 # Note: Since daemonsets have "AlwaysRestart" policy for pods, we provide a long 5 # sleep-duration (24 hr) to the logexporter pods so they don't finish the work and 6 # get restarted while some pods are still running. So it is your duty to detect 7 # the work has been done (or use some timeout) and delete the daemonset yourself. 8 9 apiVersion: v1 10 kind: Namespace 11 metadata: 12 name: logexporter 13 --- 14 apiVersion: v1 15 kind: Secret 16 metadata: 17 name: google-service-account 18 namespace: logexporter 19 type: Opaque 20 data: 21 service-account.json: {{.ServiceAccountCredentials}} 22 --- 23 apiVersion: extensions/v1beta1 24 kind: DaemonSet 25 metadata: 26 name: logexporter 27 namespace: logexporter 28 spec: 29 template: 30 metadata: 31 labels: 32 app: logexporter 33 spec: 34 containers: 35 - name: logexporter-test 36 image: gcr.io/k8s-testimages/logexporter:v0.1.3 37 env: 38 - name: NODE_NAME 39 valueFrom: 40 fieldRef: 41 fieldPath: spec.nodeName 42 command: 43 - logexporter 44 - --node-name=$(NODE_NAME) 45 - --cloud-provider={{.CloudProvider}} 46 - --gcs-path={{.GCSPath}} 47 - --gcloud-auth-file-path=/etc/service-account/service-account.json 48 - --enable-hollow-node-logs={{.EnableHollowNodeLogs}} 49 - --sleep-duration=24h 50 - --alsologtostderr 51 volumeMounts: 52 - mountPath: /etc/service-account 53 name: service 54 readOnly: true 55 - mountPath: /var/log 56 name: varlog 57 readOnly: true 58 - mountPath: /workspace/etc 59 name: hostetc 60 readOnly: true 61 resources: 62 requests: 63 cpu: 10m 64 memory: 10Mi 65 volumes: 66 - name: service 67 secret: 68 secretName: google-service-account 69 - name: varlog 70 hostPath: 71 path: /var/log 72 - name: hostetc 73 hostPath: 74 path: /etc