Skip to content

Commit

Permalink
chore: move sidecar to sidecar/fluentbit
Browse files Browse the repository at this point in the history
This will allow us to include alternative sidecar implementations. The
intent is to add otelcol in the near future.
  • Loading branch information
swiatekm committed Dec 11, 2023
1 parent 9eee3e5 commit e31cc41
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dev_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ 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:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TAILING_SIDECAR_DEV }}
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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ 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:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_TAILING_SIDECAR }}
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
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ spec:
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. More info:
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
otherwise to an implementation-defined value. Requests
cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
volumeMount:
Expand Down
2 changes: 1 addition & 1 deletion operator/config/default/manager_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ spec:
args:
- "--metrics-addr=127.0.0.1:8080"
- "--enable-leader-election"
- "--tailing-sidecar-image=sumologic/tailing-sidecar:latest"
- "--tailing-sidecar-image=registry.localhost:5000/sumologic/tailing-sidecar:test"
4 changes: 2 additions & 2 deletions operator/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: localhost:32000/sumologic/tailing-sidecar-operator
newTag: latest
newName: registry.localhost:5000/sumologic/tailing-sidecar-operator
newTag: test
File renamed without changes.
6 changes: 3 additions & 3 deletions sidecar/Makefile → sidecar/fluentbit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
4 changes: 2 additions & 2 deletions sidecar/README.md → sidecar/fluentbit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e31cc41

Please sign in to comment.