From 9eee6ac9daa5b82946b4f7c7eaa817ae3e1f4cab Mon Sep 17 00:00:00 2001 From: Michael O'Brien Date: Mon, 25 Jun 2018 13:59:31 -0400 Subject: logging library use and k8s Change-Id: I264f6dd5270543a216612c50fd5806458e0e806a Issue-ID: LOG-135 Signed-off-by: Michael O'Brien --- .../logging-kubernetes/logdemoservice/Chart.yaml | 4 ++ .../logdemoservice/templates/all-services.yaml | 14 ++++++ .../log-mock-demo-service-deployment.yaml | 57 ++++++++++++++++++++++ .../logging-kubernetes/logdemoservice/values.yaml | 7 +++ 4 files changed, 82 insertions(+) create mode 100644 reference/logging-kubernetes/logdemoservice/Chart.yaml create mode 100644 reference/logging-kubernetes/logdemoservice/templates/all-services.yaml create mode 100644 reference/logging-kubernetes/logdemoservice/templates/log-mock-demo-service-deployment.yaml create mode 100644 reference/logging-kubernetes/logdemoservice/values.yaml (limited to 'reference/logging-kubernetes/logdemoservice') diff --git a/reference/logging-kubernetes/logdemoservice/Chart.yaml b/reference/logging-kubernetes/logdemoservice/Chart.yaml new file mode 100644 index 0000000..b9eed13 --- /dev/null +++ b/reference/logging-kubernetes/logdemoservice/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for Kubernetes +name: logdemoservice +version: 0.1.0 diff --git a/reference/logging-kubernetes/logdemoservice/templates/all-services.yaml b/reference/logging-kubernetes/logdemoservice/templates/all-services.yaml new file mode 100644 index 0000000..10b7109 --- /dev/null +++ b/reference/logging-kubernetes/logdemoservice/templates/all-services.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: logdemoservice + name: logdemoservice + namespace: "{{ .Values.nsPrefix }}-logdemoservice" +spec: + ports: + - port: 8080 + nodePort: {{ .Values.nodePortPrefix }}98 + selector: + app: logdemoservice + type: NodePort diff --git a/reference/logging-kubernetes/logdemoservice/templates/log-mock-demo-service-deployment.yaml b/reference/logging-kubernetes/logdemoservice/templates/log-mock-demo-service-deployment.yaml new file mode 100644 index 0000000..f40da2f --- /dev/null +++ b/reference/logging-kubernetes/logdemoservice/templates/log-mock-demo-service-deployment.yaml @@ -0,0 +1,57 @@ +#{{ if not .Values.disableLogdemoserviceLogdemoservice }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: logdemoservice + namespace: "{{ .Values.nsPrefix }}-logdemoservice" +spec: + selector: + matchLabels: + app: logdemoservice + template: + metadata: + labels: + app: logdemoservice + name: logdemoservice + spec: + containers: + - image: {{ .Values.image.logdemoservice }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: logdemoservice + volumeMounts: + - mountPath: /var/log/onap + name: log-mock-demo-service-logs + ports: + - containerPort: 8080 + readinessProbe: + tcpSocket: + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + - image: {{ .Values.image.filebeat }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: filebeat-onap + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + name: filebeat-conf + - mountPath: /var/log/onap + name: log-mock-demo-service-logs + - mountPath: /usr/share/filebeat/data + name: log-mock-demo-service-data-filebeat + volumes: + - name: filebeat-conf + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + - name: log-mock-demo-service-logs + emptyDir: {} + - name: log-mock-demo-service-data-filebeat + emptyDir: {} + - name: localtime + hostPath: + path: /etc/localtime + - name: logdemoservice-eteshare + hostPath: + path: /dockerdata-nfs/{{ .Values.nsPrefix }}/logdemoservice/eteshare + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/reference/logging-kubernetes/logdemoservice/values.yaml b/reference/logging-kubernetes/logdemoservice/values.yaml new file mode 100644 index 0000000..3b89a4b --- /dev/null +++ b/reference/logging-kubernetes/logdemoservice/values.yaml @@ -0,0 +1,7 @@ +nsPrefix: onap +pullPolicy: Always +nodePortPrefix: 302 +image: + readiness: oomk8s/readiness-check:1.0.0 + logdemoservice: oomk8s/logging-demo-service:0.0.1 + filebeat: docker.elastic.co/beats/filebeat:5.5.0 -- cgit 1.2.3-korg