aboutsummaryrefslogtreecommitdiffstats
path: root/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
diff options
context:
space:
mode:
authorTodd Malsbary <todd.malsbary@intel.com>2020-08-07 10:20:12 -0700
committerRitu Sood <ritu.sood@intel.com>2020-09-23 20:00:03 +0000
commit2cbcccc6d06324f3c91306ed73f262b631457a23 (patch)
treea9365925c2b1362c0cafec15cb79e9446e1c470c /deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
parent18c0ffea7babfcda74e4367413a331259c406c10 (diff)
Add playbooks for v2 emco chart.
Rename v2/onap4k8s to v2/emco, and rename sanity-check-for-v2.sh to emco.sh. This allows --plugins emco to be passed to installer.sh in place of --plugins onap4k8s. Issue-ID: MULTICLOUD-1181 Signed-off-by: Todd <todd.malsbary@intel.com> Change-Id: Idb427a8aa4c8aaff181965a540078c8cf6dd88aa
Diffstat (limited to 'deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml')
-rw-r--r--deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml135
1 files changed, 135 insertions, 0 deletions
diff --git a/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml b/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
new file mode 100644
index 00000000..40957cf2
--- /dev/null
+++ b/deployments/helm/v2/emco/fluentd/templates/aggregator-statefulset.yaml
@@ -0,0 +1,135 @@
+{{- if .Values.aggregator.enabled -}}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ app.kubernetes.io/component: aggregator
+ serviceName: {{ include "fluentd.fullname" . }}-headless
+ replicas: {{ .Values.aggregator.replicaCount }}
+ updateStrategy: {{- toYaml .Values.aggregator.updateStrategy | nindent 4 }}
+ template:
+ metadata:
+ labels: {{- include "fluentd.labels" . | nindent 8 }}
+ app.kubernetes.io/component: aggregator
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/aggregator-configmap.yaml") . | sha256sum }}
+ {{- if .Values.aggregator.podAnnotations }}
+ {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- include "fluentd.imagePullSecrets" . | nindent 6 }}
+ {{- if .Values.aggregator.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.aggregator.securityContext.runAsUser }}
+ fsGroup: {{ .Values.aggregator.securityContext.fsGroup }}
+ {{- end }}
+ {{- if .Values.aggregator.affinity }}
+ affinity: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.affinity "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.nodeSelector }}
+ nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.tolerations }}
+ tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: fluentd
+ image: {{ include "fluentd.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ env:
+ - name: FLUENTD_CONF
+ value: {{ .Values.aggregator.configFile }}
+ - name: FLUENTD_OPT
+ value: {{ .Values.aggregator.extraArgs | quote }}
+ {{- if .Values.aggregator.extraEnv }}
+ {{- toYaml .Values.aggregator.extraEnv | nindent 12 }}
+ {{- end }}
+ ports:
+ {{- if .Values.aggregator.port }}
+ - name: tcp
+ containerPort: {{ .Values.aggregator.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.containerPorts }}
+ {{- toYaml .Values.aggregator.containerPorts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ containerPort: {{ .Values.metrics.service.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.livenessProbe.enabled }}
+ livenessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.livenessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.readinessProbe.enabled }}
+ readinessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.readinessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.readinessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.readinessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.readinessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.resources }}
+ resources: {{- toYaml .Values.aggregator.resources | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /opt/bitnami/fluentd/conf
+ {{- if .Values.aggregator.persistence.enabled }}
+ - name: {{ include "fluentd.fullname" . }}-buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- else }}
+ - name: buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ mountPath: /opt/bitnami/fluentd/certs
+ {{- end }}
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ secret:
+ secretName: {{ template "fluentd.tls.secretName" . }}
+ items:
+ - key: tls.crt
+ path: tls.crt
+ - key: tls.key
+ path: tls.key
+ {{- end }}
+ - name: fluentd-config
+ configMap:
+ name: {{ template "fluentd.aggregator.configMap" . }}
+ {{- if not .Values.aggregator.persistence.enabled }}
+ - name: buffer
+ emptyDir: {}
+ {{- end }}
+
+ {{- if .Values.aggregator.persistence.enabled }}
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "fluentd.fullname" . }}-buffer
+ spec:
+ accessModes: [{{ .Values.aggregator.persistence.accessMode }}]
+ storageClassName: {{ .Values.aggregator.persistence.storageClass }}
+ resources:
+ requests:
+ storage: {{ .Values.aggregator.persistence.size }}
+ {{- end }}
+{{- end -}}