From e9283060f84ff66f051dffac4a6e3da11914b878 Mon Sep 17 00:00:00 2001 From: Nick Kampe Date: Mon, 2 Mar 2020 22:38:27 -0600 Subject: [PATCH] adding kustomize --- README.md | 22 ++++++++++++++++--- .../fluent-bit-role-binding.yaml | 0 .../fluent-bit-role.yaml | 0 .../fluent-bit-service-account.yaml | 0 base/kustomization.yaml | 9 ++++++++ kustomization.yaml | 5 +++++ output/elasticsearch/kustomization.yaml | 11 ++++++++++ output/kafka/kustomization.yaml | 11 ++++++++++ 8 files changed, 55 insertions(+), 3 deletions(-) rename fluent-bit-role-binding.yaml => base/fluent-bit-role-binding.yaml (100%) rename fluent-bit-role.yaml => base/fluent-bit-role.yaml (100%) rename fluent-bit-service-account.yaml => base/fluent-bit-service-account.yaml (100%) create mode 100644 base/kustomization.yaml create mode 100644 kustomization.yaml create mode 100644 output/elasticsearch/kustomization.yaml create mode 100644 output/kafka/kustomization.yaml diff --git a/README.md b/README.md index ca2986b..5262687 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,15 @@ This repository contains a set of Yaml files to deploy Fluent Bit which consider ``` $ kubectl create namespace logging -$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-service-account.yaml -$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role.yaml -$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/fluent-bit-role-binding.yaml +$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/base/fluent-bit-service-account.yaml +$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/base/fluent-bit-role.yaml +$ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/base/fluent-bit-role-binding.yaml +``` + +Or using [Kustomize](https://kustomize.io/) + +``` +$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging | kubectl create -f - ``` #### Fluent Bit to Elasticsearch @@ -35,6 +41,11 @@ Fluent Bit DaemonSet ready to be used with Elasticsearch on a normal Kubernetes $ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/elasticsearch/fluent-bit-ds.yaml ``` +Or using kustomize: +``` +$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging/output/elasticsearch | kubectl create -f - +``` + #### Fluent Bit to Elasticsearch on Minikube If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest: @@ -57,6 +68,11 @@ Fluent Bit DaemonSet ready to be used with Kafka on a normal Kubernetes Cluster: $ kubectl create -f https://raw.githubusercontent.com/fluent/fluent-bit-kubernetes-logging/master/output/kafka/fluent-bit-ds.yaml ``` +Or using kustomize: +``` +$ kustomize build github.com/fluent/fluent-bit-kubernetes-logging/output/kafka | kubectl create -f - +``` + #### Fluent Bit to Elasticsearch on Minikube If you are using Minikube for testing purposes, use the following alternative DaemonSet manifest: diff --git a/fluent-bit-role-binding.yaml b/base/fluent-bit-role-binding.yaml similarity index 100% rename from fluent-bit-role-binding.yaml rename to base/fluent-bit-role-binding.yaml diff --git a/fluent-bit-role.yaml b/base/fluent-bit-role.yaml similarity index 100% rename from fluent-bit-role.yaml rename to base/fluent-bit-role.yaml diff --git a/fluent-bit-service-account.yaml b/base/fluent-bit-service-account.yaml similarity index 100% rename from fluent-bit-service-account.yaml rename to base/fluent-bit-service-account.yaml diff --git a/base/kustomization.yaml b/base/kustomization.yaml new file mode 100644 index 0000000..105a559 --- /dev/null +++ b/base/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: logging + +resources: + - fluent-bit-service-account.yaml + - fluent-bit-role.yaml + - fluent-bit-role-binding.yaml \ No newline at end of file diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..e8a6261 --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,5 @@ + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- base/ \ No newline at end of file diff --git a/output/elasticsearch/kustomization.yaml b/output/elasticsearch/kustomization.yaml new file mode 100644 index 0000000..3b90a5b --- /dev/null +++ b/output/elasticsearch/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: logging + +bases: + - ../../base + +resources: + - fluent-bit-configmap.yaml + - fluent-bit-ds.yaml \ No newline at end of file diff --git a/output/kafka/kustomization.yaml b/output/kafka/kustomization.yaml new file mode 100644 index 0000000..3b90a5b --- /dev/null +++ b/output/kafka/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: logging + +bases: + - ../../base + +resources: + - fluent-bit-configmap.yaml + - fluent-bit-ds.yaml \ No newline at end of file