OpenShift DaemonSet Definition: Difference between revisions
Jump to navigation
Jump to search
(8 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
The <tt>.spec.template</tt> is a pod template. It has exactly the same schema as a Pod, except it is nested and does not have an apiVersion or kind. | |||
The pod template in a DaemonSet must have a RestartPolicy equal to Always, or be unspecified, which defaults to Always. | |||
=Definition= | =Definition= | ||
apiVersion: extensions/v1beta1 | |||
kind: DaemonSet | |||
apiVersion: extensions/v1beta1 | metadata: | ||
kind: DaemonSet | creationTimestamp: 2017-11-11T08:16:24Z | ||
metadata: | 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''': | |||
<span id='spec_selector'></span>'''selector''': | |||
spec: | '''matchLabels''': | ||
<font color=teal>component</font>: <font color=teal>fluentd</font> | |||
<font color=teal>provider</font>: <font color=teal>openshift</font> | |||
'''template''': | |||
'''metadata''': | |||
<span id='template_metadata_labels'></span>'''labels''': | |||
<font color=teal>component</font>: <font color=teal>fluentd</font> | |||
<font color=teal>provider</font>: <font color=teal>openshift</font> | |||
logging-infra: fluentd | |||
name: fluentd-elasticsearch | |||
'''spec''': | |||
<span id='node-selector'></span>'''nodeSelector''': | |||
logging-infra-fluentd: "true" | |||
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 | |||
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: logging-fluentd | ||
name: config | |||
- name: certs | |||
secret: | |||
defaultMode: 420 | |||
secretName: logging-fluentd | 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: | status: | ||
currentNumberScheduled: 3 | |||
desiredNumberScheduled: 3 | |||
numberAvailable: 3 | |||
numberMisscheduled: 0 | |||
numberReady: 3 | |||
observedGeneration: 1 | |||
updatedNumberScheduled: 3 | |||
Latest revision as of 18:30, 9 February 2018
Internal
Overview
The .spec.template is a pod template. It has exactly the same schema as a Pod, except it is nested and does not have an apiVersion or kind.
The pod template in a DaemonSet must have a RestartPolicy equal to Always, or be unspecified, which defaults to Always.
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: labels: component: fluentd provider: openshift logging-infra: fluentd name: fluentd-elasticsearch spec: nodeSelector: logging-infra-fluentd: "true" 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 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