Skip to content

Instantly share code, notes, and snippets.

@mffiedler
Last active September 7, 2017 14:50
Show Gist options
  • Save mffiedler/7e8b63bfa742ca3935460d45287429a4 to your computer and use it in GitHub Desktop.
Save mffiedler/7e8b63bfa742ca3935460d45287429a4 to your computer and use it in GitHub Desktop.
Sample StatefulSet for logging-mux
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
creationTimestamp: null
generation: 1
labels:
component: mux
logging-infra: mux
provider: openshift
name: logging-mux
selfLink: /apis/apps/v1beta1/namespaces//statefulsets/logging-mux
spec:
replicas: 3
selector:
matchLabels:
component: mux
logging-infra: mux
provider: openshift
serviceName: logging-mux
template:
metadata:
creationTimestamp: null
labels:
component: mux
logging-infra: mux
provider: openshift
name: logging-mux
spec:
containers:
- env:
- name: K8S_HOST_URL
value: https://ec2-54-202-6-118.us-west-2.compute.amazonaws.com:8443
- 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: JOURNAL_SOURCE
- name: JOURNAL_READ_FROM_HEAD
- name: FORWARD_LISTEN_HOST
value: mux.router.default.svc.cluster.local
- name: FORWARD_LISTEN_PORT
value: "24284"
- name: USE_MUX
value: "true"
- name: BUFFER_QUEUE_LIMIT
value: "1024"
- name: BUFFER_SIZE_LIMIT
value: 16m
- name: MUX_CPU_LIMIT
valueFrom:
resourceFieldRef:
containerName: mux
divisor: "0"
resource: limits.cpu
- name: MUX_MEMORY_LIMIT
valueFrom:
resourceFieldRef:
containerName: mux
divisor: "0"
resource: limits.memory
- name: FILE_BUFFER_LIMIT
value: 2Gi
image: registry.ops.openshift.com/openshift3/logging-fluentd:v3.6.173.0.27
imagePullPolicy: Always
name: mux
ports:
- containerPort: 24284
name: mux-forward
protocol: TCP
resources:
limits:
cpu: "1"
memory: 2Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- 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/fluent/muxkeys
name: muxcerts
readOnly: true
- mountPath: /var/lib/fluentd
name: filebufferstorage
dnsPolicy: ClusterFirst
nodeSelector:
logging-mux: logging-mux
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: aggregated-logging-mux
serviceAccountName: aggregated-logging-mux
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: logging-mux
name: config
- name: certs
secret:
defaultMode: 420
secretName: logging-fluentd
- hostPath:
path: /etc/hostname
name: dockerhostname
- hostPath:
path: /etc/localtime
name: localtime
- name: muxcerts
secret:
defaultMode: 420
secretName: logging-mux
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: filebufferstorage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
storageClassName: io1
status:
phase: Pending
status:
replicas: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment