OpenShift DaemonSet Definition: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:
=Definition=
=Definition=


<syntaxhighlight lang='yaml'>
apiVersion: extensions/v1beta1
oc get -o yaml daemonset/logging-fluentd
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
kind: DaemonSet
  creationTimestamp: 2017-11-11T08:16:24Z
metadata:
  generation: 1
  creationTimestamp: 2017-11-11T08:16:24Z
  labels:
  generation: 1
    component: fluentd
  labels:
    logging-infra: fluentd
    component: fluentd
    provider: openshift
    logging-infra: fluentd
  name: logging-fluentd
    provider: openshift
  namespace: logging
  name: logging-fluentd
  resourceVersion: "2865410"
  namespace: logging
  selfLink: /apis/extensions/v1beta1/namespaces/logging/daemonsets/logging-fluentd
  resourceVersion: "2865410"
  uid: 9b95bf05-c6b8-11e7-9f09-525400360e56
  selfLink: /apis/extensions/v1beta1/namespaces/logging/daemonsets/logging-fluentd
spec:
  uid: 9b95bf05-c6b8-11e7-9f09-525400360e56
  selector:
spec:
    matchLabels:
  selector:
      component: fluentd
    matchLabels:
      provider: openshift
      component: fluentd
  template:
      provider: openshift
    metadata:
  template:
      creationTimestamp: null
    metadata:
      labels:
      creationTimestamp: null
        component: fluentd
      labels:
        logging-infra: fluentd
        component: fluentd
        provider: openshift
        logging-infra: fluentd
      name: fluentd-elasticsearch
        provider: openshift
    spec:
      name: fluentd-elasticsearch
      containers:
    spec:
      - env:
      containers:
        - name: K8S_HOST_URL
      - env:
          value: https://kubernetes.default.svc.cluster.local
        - name: K8S_HOST_URL
        - name: ES_HOST
          value: https://kubernetes.default.svc.cluster.local
          value: logging-es
        - name: ES_HOST
        - name: ES_PORT
          value: logging-es
          value: "9200"
        - name: ES_PORT
        - name: ES_CLIENT_CERT
          value: "9200"
          value: /etc/fluent/keys/cert
        - name: ES_CLIENT_CERT
        - name: ES_CLIENT_KEY
          value: /etc/fluent/keys/cert
          value: /etc/fluent/keys/key
        - name: ES_CLIENT_KEY
        - name: ES_CA
          value: /etc/fluent/keys/key
          value: /etc/fluent/keys/ca
        - name: ES_CA
        - name: OPS_HOST
          value: /etc/fluent/keys/ca
          value: logging-es
        - name: OPS_HOST
        - name: OPS_PORT
          value: logging-es
          value: "9200"
        - name: OPS_PORT
        - name: OPS_CLIENT_CERT
          value: "9200"
          value: /etc/fluent/keys/cert
        - name: OPS_CLIENT_CERT
        - name: OPS_CLIENT_KEY
          value: /etc/fluent/keys/cert
          value: /etc/fluent/keys/key
        - name: OPS_CLIENT_KEY
        - name: OPS_CA
          value: /etc/fluent/keys/key
          value: /etc/fluent/keys/ca
        - name: OPS_CA
        - name: ES_COPY
          value: /etc/fluent/keys/ca
          value: "false"
        - name: ES_COPY
        - name: JOURNAL_SOURCE
          value: "false"
        - name: JOURNAL_READ_FROM_HEAD
        - name: JOURNAL_SOURCE
        - name: BUFFER_QUEUE_LIMIT
        - name: JOURNAL_READ_FROM_HEAD
          value: "1024"
        - name: BUFFER_QUEUE_LIMIT
        - name: BUFFER_SIZE_LIMIT
          value: "1024"
          value: 1m
        - name: BUFFER_SIZE_LIMIT
        - name: FLUENTD_CPU_LIMIT
          value: 1m
          valueFrom:
        - name: FLUENTD_CPU_LIMIT
            resourceFieldRef:
          valueFrom:
              containerName: fluentd-elasticsearch
            resourceFieldRef:
              divisor: "0"
              containerName: fluentd-elasticsearch
              resource: limits.cpu
              divisor: "0"
        - name: FLUENTD_MEMORY_LIMIT
              resource: limits.cpu
            valueFrom:
        - name: FLUENTD_MEMORY_LIMIT
            resourceFieldRef:
          valueFrom:
              containerName: fluentd-elasticsearch
            resourceFieldRef:
              divisor: "0"
              containerName: fluentd-elasticsearch
              resource: limits.memory
              divisor: "0"
        - name: FILE_BUFFER_LIMIT
              resource: limits.memory
          value: 1Gi
        - name: FILE_BUFFER_LIMIT
        image: registry.access.redhat.com/openshift3/logging-fluentd:v3.6
          value: 1Gi
        imagePullPolicy: Always
        image: registry.access.redhat.com/openshift3/logging-fluentd:v3.6
        name: fluentd-elasticsearch
        imagePullPolicy: Always
        resources:
        name: fluentd-elasticsearch
          limits:
        resources:
            cpu: 100m
          limits:
            memory: 512Mi
            cpu: 100m
          requests:
            memory: 512Mi
            memory: 512Mi
          requests:
        securityContext:
            memory: 512Mi
          privileged: true
        securityContext:
        terminationMessagePath: /dev/termination-log
          privileged: true
        terminationMessagePolicy: File
        terminationMessagePath: /dev/termination-log
        volumeMounts:
        terminationMessagePolicy: File
        - mountPath: /run/log/journal
        volumeMounts:
          name: runlogjournal
        - mountPath: /run/log/journal
        - mountPath: /var/log
          name: runlogjournal
          name: varlog
        - mountPath: /var/log
        - mountPath: /var/lib/docker/containers
          name: varlog
          name: varlibdockercontainers
        - mountPath: /var/lib/docker/containers
          readOnly: true
          name: varlibdockercontainers
        - mountPath: /etc/fluent/configs.d/user
          readOnly: true
          name: config
        - mountPath: /etc/fluent/configs.d/user
          readOnly: true
          name: config
        - mountPath: /etc/fluent/keys
          readOnly: true
          name: certs
        - mountPath: /etc/fluent/keys
          readOnly: true
          name: certs
        - mountPath: /etc/docker-hostname
          readOnly: true
          name: dockerhostname
        - mountPath: /etc/docker-hostname
          readOnly: true
          name: dockerhostname
        - mountPath: /etc/localtime
          readOnly: true
          name: localtime
        - mountPath: /etc/localtime
          readOnly: true
          name: localtime
        - mountPath: /etc/sysconfig/docker
          readOnly: true
          name: dockercfg
        - mountPath: /etc/sysconfig/docker
          readOnly: true
          name: dockercfg
        - mountPath: /etc/docker
          readOnly: true
          name: dockerdaemoncfg
        - mountPath: /etc/docker
          readOnly: true
          name: dockerdaemoncfg
        - mountPath: /var/lib/fluentd
          readOnly: true
          name: filebufferstorage
        - mountPath: /var/lib/fluentd
      dnsPolicy: ClusterFirst
          name: filebufferstorage
      nodeSelector:
      dnsPolicy: ClusterFirst
        logging-infra-fluentd: "true"
      nodeSelector:
      restartPolicy: Always
        logging-infra-fluentd: "true"
      schedulerName: default-scheduler
      restartPolicy: Always
      securityContext: {}
      schedulerName: default-scheduler
      serviceAccount: aggregated-logging-fluentd
      securityContext: {}
      serviceAccountName: aggregated-logging-fluentd
      serviceAccount: aggregated-logging-fluentd
      terminationGracePeriodSeconds: 30
      serviceAccountName: aggregated-logging-fluentd
      volumes:
      terminationGracePeriodSeconds: 30
      - hostPath:
      volumes:
          path: /run/log/journal
      - hostPath:
        name: runlogjournal
          path: /run/log/journal
      - hostPath:
        name: runlogjournal
          path: /var/log
      - hostPath:
        name: varlog
          path: /var/log
      - hostPath:
        name: varlog
          path: /var/lib/docker/containers
      - hostPath:
        name: varlibdockercontainers
          path: /var/lib/docker/containers
      - configMap:
        name: varlibdockercontainers
          defaultMode: 420
      - configMap:
          defaultMode: 420
           name: logging-fluentd
           name: logging-fluentd
        name: config
        name: config
      - name: certs
      - name: certs
        secret:
        secret:
          defaultMode: 420
          defaultMode: 420
           secretName: logging-fluentd
           secretName: logging-fluentd
      - hostPath:
      - hostPath:
          path: /etc/hostname
          path: /etc/hostname
        name: dockerhostname
        name: dockerhostname
      - hostPath:
      - hostPath:
          path: /etc/localtime
          path: /etc/localtime
        name: localtime
        name: localtime
      - hostPath:
      - hostPath:
          path: /etc/sysconfig/docker
          path: /etc/sysconfig/docker
        name: dockercfg
        name: dockercfg
      - hostPath:
      - hostPath:
          path: /etc/docker
          path: /etc/docker
        name: dockerdaemoncfg
        name: dockerdaemoncfg
      - hostPath:
      - hostPath:
          path: /var/lib/fluentd
          path: /var/lib/fluentd
        name: filebufferstorage
        name: filebufferstorage
  templateGeneration: 1
  templateGeneration: 1
  updateStrategy:
  updateStrategy:
    rollingUpdate:
    rollingUpdate:
      maxUnavailable: 1
      maxUnavailable: 1
    type: RollingUpdate
    type: RollingUpdate
status:
status:
  currentNumberScheduled: 3
  currentNumberScheduled: 3
  desiredNumberScheduled: 3
  desiredNumberScheduled: 3
  numberAvailable: 3
  numberAvailable: 3
  numberMisscheduled: 0
  numberMisscheduled: 0
  numberReady: 3
  numberReady: 3
  observedGeneration: 1
  observedGeneration: 1
  updatedNumberScheduled: 3
  updatedNumberScheduled: 3
</syntaxhighlight>

Revision as of 17:56, 9 February 2018

Internal

Overview

Definition

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  creationTimestamp: 2017-11-11T08:16:24Z
  generation: 1
  labels:
    component: fluentd
    logging-infra: fluentd
    provider: openshift
  name: logging-fluentd
  namespace: logging
  resourceVersion: "2865410"
  selfLink: /apis/extensions/v1beta1/namespaces/logging/daemonsets/logging-fluentd
  uid: 9b95bf05-c6b8-11e7-9f09-525400360e56
spec:
  selector:
    matchLabels:
      component: fluentd
      provider: openshift
  template:
    metadata:
      creationTimestamp: null
      labels:
        component: fluentd
        logging-infra: fluentd
        provider: openshift
      name: fluentd-elasticsearch
    spec:
      containers:
      - env:
        - name: K8S_HOST_URL
          value: https://kubernetes.default.svc.cluster.local
        - name: ES_HOST
          value: logging-es
        - name: ES_PORT
          value: "9200"
        - name: ES_CLIENT_CERT
          value: /etc/fluent/keys/cert
        - name: ES_CLIENT_KEY
          value: /etc/fluent/keys/key
        - name: ES_CA
          value: /etc/fluent/keys/ca
        - name: OPS_HOST
          value: logging-es
        - name: OPS_PORT
          value: "9200"
        - name: OPS_CLIENT_CERT
          value: /etc/fluent/keys/cert
        - name: OPS_CLIENT_KEY
          value: /etc/fluent/keys/key
        - name: OPS_CA
          value: /etc/fluent/keys/ca
        - name: ES_COPY
          value: "false"
        - name: JOURNAL_SOURCE
        - name: JOURNAL_READ_FROM_HEAD
        - name: BUFFER_QUEUE_LIMIT
          value: "1024"
        - name: BUFFER_SIZE_LIMIT
          value: 1m
        - name: FLUENTD_CPU_LIMIT
          valueFrom:
            resourceFieldRef:
              containerName: fluentd-elasticsearch
              divisor: "0"
              resource: limits.cpu
        - name: FLUENTD_MEMORY_LIMIT
           valueFrom:
            resourceFieldRef:
              containerName: fluentd-elasticsearch
              divisor: "0"
              resource: limits.memory
        - name: FILE_BUFFER_LIMIT
          value: 1Gi
        image: registry.access.redhat.com/openshift3/logging-fluentd:v3.6
        imagePullPolicy: Always
        name: fluentd-elasticsearch
        resources:
          limits:
            cpu: 100m
            memory: 512Mi
          requests:
            memory: 512Mi
        securityContext:
          privileged: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /run/log/journal
          name: runlogjournal
        - mountPath: /var/log
          name: varlog
        - mountPath: /var/lib/docker/containers
          name: varlibdockercontainers
          readOnly: true
        - mountPath: /etc/fluent/configs.d/user
          name: config
          readOnly: true
        - mountPath: /etc/fluent/keys
          name: certs
          readOnly: true
        - mountPath: /etc/docker-hostname
          name: dockerhostname
          readOnly: true
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
        - mountPath: /etc/sysconfig/docker
          name: dockercfg
          readOnly: true
        - mountPath: /etc/docker
          name: dockerdaemoncfg
          readOnly: true
        - mountPath: /var/lib/fluentd
          name: filebufferstorage
      dnsPolicy: ClusterFirst
      nodeSelector:
        logging-infra-fluentd: "true"
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: aggregated-logging-fluentd
      serviceAccountName: aggregated-logging-fluentd
      terminationGracePeriodSeconds: 30
      volumes:
      - hostPath:
          path: /run/log/journal
        name: runlogjournal
      - hostPath:
          path: /var/log
        name: varlog
      - hostPath:
          path: /var/lib/docker/containers
        name: varlibdockercontainers
      - configMap:
          defaultMode: 420
         name: logging-fluentd
        name: config
      - name: certs
        secret:
          defaultMode: 420
         secretName: logging-fluentd
      - hostPath:
          path: /etc/hostname
        name: dockerhostname
      - hostPath:
          path: /etc/localtime
        name: localtime
      - hostPath:
          path: /etc/sysconfig/docker
        name: dockercfg
      - hostPath:
          path: /etc/docker
        name: dockerdaemoncfg
      - hostPath:
          path: /var/lib/fluentd
        name: filebufferstorage
  templateGeneration: 1
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
status:
  currentNumberScheduled: 3
  desiredNumberScheduled: 3
  numberAvailable: 3
  numberMisscheduled: 0
  numberReady: 3
  observedGeneration: 1
  updatedNumberScheduled: 3