diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f7a772ec..44901459 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -22,14 +22,14 @@ updates: timezone: "Europe/Warsaw" - package-ecosystem: "docker" - directory: "/sidecar" + directory: "/sidecar/fluentbit" schedule: interval: "daily" time: "06:27" timezone: "Europe/Warsaw" - package-ecosystem: "gomod" - directory: "/sidecar/out_gstdout" + directory: "/sidecar/fluentbit/out_gstdout" schedule: interval: "daily" time: "06:27" diff --git a/.github/workflows/dev_builds.yml b/.github/workflows/dev_builds.yml index 382a4c06..82a66b4e 100644 --- a/.github/workflows/dev_builds.yml +++ b/.github/workflows/dev_builds.yml @@ -38,10 +38,10 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Build and push tailing sidecar multiplatform image run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ steps.extract_tag.outputs.tag }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Push tailing sidecar image with latest tag run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Log in to AWS Public ECR to publish tailing sidecar image run: make login-ecr env: @@ -49,10 +49,10 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TAILING_SIDECAR_DEV }} - name: Build and push to ECR tailing sidecar multiplatform image run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Push tailing sidecar image with latest tag to ECR run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit build-operator: runs-on: ubuntu-20.04 diff --git a/.github/workflows/release_builds.yml b/.github/workflows/release_builds.yml index 1c0ebfef..12637838 100644 --- a/.github/workflows/release_builds.yml +++ b/.github/workflows/release_builds.yml @@ -37,10 +37,10 @@ jobs: password: ${{ secrets.CR_PAT }} - name: Push tailing sidecar image run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ steps.extract_tag.outputs.tag }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Push tailing sidecar image with latest tag run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE }}:${{ env.LATEST_TAG }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Log in to AWS Public ECR to publish tailing sidecar image run: make login-ecr env: @@ -48,10 +48,10 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_TAILING_SIDECAR }} - name: Build and push to ECR tailing sidecar multiplatform image run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ steps.extract_tag.outputs.tag }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit - name: Push tailing sidecar image with latest tag to ECR run: make build-push-multiplatform TAG=${{ env.SIDECAR_IMAGE_ECR }}:${{ env.LATEST_TAG }} - working-directory: ./sidecar + working-directory: ./sidecar/fluentbit build-operator: runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index 78d6f863..1a13669c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,9 @@ ubuntu-bionic-18.04-cloudimg-console.log .kube-config # Fluent Bit ignores -sidecar/out_gstdout/out_gstdout.h -sidecar/out_gstdout/out_gstdout.so -sidecar/var/ +sidecar/fluentbit/out_gstdout/out_gstdout.h +sidecar/fluentbit/out_gstdout/out_gstdout.so +sidecar/fluentbit/var/ .vscode/* !.vscode/snippets.code-snippets diff --git a/Makefile b/Makefile index b06e35c3..fee7568d 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ markdownlint: mdl mdl: mdl --style .markdownlint/style.rb \ README.md \ - sidecar/README.md \ + sidecar/fluentbit/README.md \ operator/README.md \ docs/*.md @@ -26,7 +26,7 @@ login-ecr: e2e: IMG="registry.localhost:5000/sumologic/tailing-sidecar-operator:test" e2e: TAILING_SIDECAR_IMG = "registry.localhost:5000/sumologic/tailing-sidecar:test" e2e: - $(MAKE) -C ./sidecar build TAG=$(TAILING_SIDECAR_IMG) + $(MAKE) -C ./sidecar/fluentbit build TAG=$(TAILING_SIDECAR_IMG) $(MAKE) -C ./operator docker-build IMG=$(IMG) TAILING_SIDECAR_IMG=$(TAILING_SIDECAR_IMG) kubectl-kuttl test --config $(KUTTL_CONFIG) diff --git a/operator/README.md b/operator/README.md index a25ae234..2cff5b40 100644 --- a/operator/README.md +++ b/operator/README.md @@ -94,7 +94,7 @@ vagrant ssh Build and push tailing sidecar image to local container registry: ```bash -/tailing-sidecar/sidecar/Makefile +/tailing-sidecasidecar/fluentbit/akefile ``` Go to operator directory: diff --git a/sidecar/Dockerfile b/sidecar/fluentbit/Dockerfile similarity index 100% rename from sidecar/Dockerfile rename to sidecar/fluentbit/Dockerfile diff --git a/sidecar/Makefile b/sidecar/fluentbit/Makefile similarity index 82% rename from sidecar/Makefile rename to sidecar/fluentbit/Makefile index cad205bc..3a5f6498 100755 --- a/sidecar/Makefile +++ b/sidecar/fluentbit/Makefile @@ -12,7 +12,7 @@ TAG ?= "localhost:32000/sumologic/tailing-sidecar:latest" all: build push build: - docker build --tag $(TAG) --file ${root_dir}sidecar/Dockerfile ${root_dir}sidecar/ + docker build --tag $(TAG) --file Dockerfile . run: build docker run --rm -it \ @@ -32,11 +32,11 @@ push: docker push $(TAG) deploy-examples: - kubectl apply -f ${root_dir}sidecar/examples/pod_with_tailing_sidecars.yaml + kubectl apply -f examples/pod_with_tailing_sidecars.yaml kubectl wait --for=condition=ready --timeout 60s pod example-with-tailling-sidecars test-examples: - ${root_dir}sidecar/tests/test.sh + tests/test.sh teardown-examples: kubectl delete pod example-with-tailling-sidecars diff --git a/sidecar/README.md b/sidecar/fluentbit/README.md similarity index 97% rename from sidecar/README.md rename to sidecar/fluentbit/README.md index ce7ae11a..f7ebf48f 100644 --- a/sidecar/README.md +++ b/sidecar/fluentbit/README.md @@ -237,11 +237,11 @@ vagrant ssh Build and push docker image to local container registry: ```bash -/tailing-sidecar/sidecar/Makefile +/tailing-sidecar/sidecar/fluentbit/Makefile ``` Run example Pod: ```bash -kubectl apply -f /tailing-sidecar/sidecar/examples/pod_with_tailing_sidecars.yaml +kubectl apply -f /tailing-sidecar/sidecar/fluentbit/examples/pod_with_tailing_sidecars.yaml ``` diff --git a/sidecar/conf/fluent-bit.conf b/sidecar/fluentbit/conf/fluent-bit.conf similarity index 100% rename from sidecar/conf/fluent-bit.conf rename to sidecar/fluentbit/conf/fluent-bit.conf diff --git a/sidecar/conf/plugins.conf b/sidecar/fluentbit/conf/plugins.conf similarity index 100% rename from sidecar/conf/plugins.conf rename to sidecar/fluentbit/conf/plugins.conf diff --git a/sidecar/examples/example1.log b/sidecar/fluentbit/examples/example1.log similarity index 100% rename from sidecar/examples/example1.log rename to sidecar/fluentbit/examples/example1.log diff --git a/sidecar/examples/example2.log b/sidecar/fluentbit/examples/example2.log similarity index 100% rename from sidecar/examples/example2.log rename to sidecar/fluentbit/examples/example2.log diff --git a/sidecar/examples/pod_with_tailing_sidecars.yaml b/sidecar/fluentbit/examples/pod_with_tailing_sidecars.yaml similarity index 100% rename from sidecar/examples/pod_with_tailing_sidecars.yaml rename to sidecar/fluentbit/examples/pod_with_tailing_sidecars.yaml diff --git a/sidecar/out_gstdout/Makefile b/sidecar/fluentbit/out_gstdout/Makefile similarity index 100% rename from sidecar/out_gstdout/Makefile rename to sidecar/fluentbit/out_gstdout/Makefile diff --git a/sidecar/out_gstdout/README.md b/sidecar/fluentbit/out_gstdout/README.md similarity index 100% rename from sidecar/out_gstdout/README.md rename to sidecar/fluentbit/out_gstdout/README.md diff --git a/sidecar/out_gstdout/go.mod b/sidecar/fluentbit/out_gstdout/go.mod similarity index 100% rename from sidecar/out_gstdout/go.mod rename to sidecar/fluentbit/out_gstdout/go.mod diff --git a/sidecar/out_gstdout/go.sum b/sidecar/fluentbit/out_gstdout/go.sum similarity index 100% rename from sidecar/out_gstdout/go.sum rename to sidecar/fluentbit/out_gstdout/go.sum diff --git a/sidecar/out_gstdout/out_gstdout.go b/sidecar/fluentbit/out_gstdout/out_gstdout.go similarity index 100% rename from sidecar/out_gstdout/out_gstdout.go rename to sidecar/fluentbit/out_gstdout/out_gstdout.go diff --git a/sidecar/tests/test.sh b/sidecar/fluentbit/tests/test.sh similarity index 100% rename from sidecar/tests/test.sh rename to sidecar/fluentbit/tests/test.sh