diff --git a/Makefile b/Makefile deleted file mode 100644 index f016fd2..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -build-%: %/ - make -C $* build - -deploy-%: %/ - make -C $* deploy - -teardown-%: %/ - make -C $* teardown diff --git a/collector/Makefile b/collector/Makefile index 82ef15f..3e109f8 100644 --- a/collector/Makefile +++ b/collector/Makefile @@ -9,20 +9,12 @@ build: push: build docker push $(BUILDER_IMAGE) -.PHONY: deploy -deploy: build - envsubst < $(CURDIR)/collector.yml | kubectl apply -f - - -.PHONY: teardown +.PHONY:teardown teardown: - envsubst < $(CURDIR)/collector.yml | kubectl delete -f - - -.PHONY: docker-teardown -docker-teardown: docker rm -f collector-builder -.PHONY: docker-deploy -docker-deploy: build docker-teardown +.PHONY: deploy +deploy: build teardown docker run -idP --privileged --name collector-builder \ --entrypoint /bin/bash \ -e CMAKE_EXPORT_COMPILE_COMMANDS="ON" \ diff --git a/collector/clangd.yaml b/collector/clangd.yaml index 56de99e..6788b02 100644 --- a/collector/clangd.yaml +++ b/collector/clangd.yaml @@ -8,6 +8,7 @@ Diagnostics: - readability* Remove: - readability-identifier-length + - modernize-use-nodiscard - modernize-use-trailing-return-type --- If: diff --git a/collector/collector.yml b/collector/collector.yml deleted file mode 100644 index 209ca2d..0000000 --- a/collector/collector.yml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: collector-builder - labels: - app: collector-builder -spec: - selector: - matchLabels: - app: collector-builder - replicas: 1 - template: - metadata: - name: collector-builder - labels: - app: collector-builder - spec: - containers: - - name: collector-builder - image: quay.io/mmoltras/devcontainers:collector - imagePullPolicy: Never - workingDir: ${HOME}/go/src/github.com/stackrox/collector - securityContext: - privileged: true - env: - - name: CMAKE_EXPORT_COMPILE_COMMANDS - value: "ON" - - name: DISABLE_PROFILING - value: "true" - - name: COLLECTOR_HOST_ROOT - value: /host - command: - - /bin/bash - stdin: true - volumeMounts: - - name: collector-repo - mountPath: ${HOME}/go/src/github.com/stackrox/collector - - name: dev - mountPath: /host/dev - readOnly: true - - name: proc - mountPath: /host/proc - readOnly: true - - name: sys - mountPath: /host/sys - readOnly: true - - name: etc - mountPath: /host/etc - readOnly: true - - name: usr-lib - mountPath: /host/usr/lib - readOnly: true - volumes: - - name: collector-repo - hostPath: - path: ${HOME}/go/src/github.com/stackrox/collector - - name: dev - hostPath: - path: /dev - - name: proc - hostPath: - path: /proc - - name: sys - hostPath: - path: /sys - - name: etc - hostPath: - path: /etc - - name: usr-lib - hostPath: - path: /usr/lib diff --git a/falco-libs/Makefile b/falco-libs/Makefile index 886057f..614b0aa 100644 --- a/falco-libs/Makefile +++ b/falco-libs/Makefile @@ -19,20 +19,12 @@ build: clang-config push: build docker push quay.io/mmoltras/devcontainers:falco-libs-$(FALCO_BUILDER_FLAVOR) -.PHONY: deploy -deploy: build - $(CURDIR)/format-spec.sh | kubectl apply -f - - .PHONY: teardown teardown: clean - $(CURDIR)/format-spec.sh | kubectl delete -f - - -.PHONY: docker-teardown -docker-teardown: clean docker rm -f libs-builder -.PHONY: docker-deploy -docker-deploy: build docker-teardown +.PHONY: deploy +deploy: build teardown docker run -id --privileged --name libs-builder \ -e CMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -e HOST_ROOT="/host" \ @@ -49,4 +41,5 @@ docker-deploy: build docker-teardown -v /usr/lib:/host/usr/lib \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /run/podman/podman.sock:/run/podman/podman.sock \ + -v /run/podman/podman.sock:/host/run/podman/podman.sock \ quay.io/mmoltras/devcontainers:falco-libs-$(FALCO_BUILDER_FLAVOR) diff --git a/falco-libs/falco.yml b/falco-libs/falco.yml deleted file mode 100644 index 8c86d35..0000000 --- a/falco-libs/falco.yml +++ /dev/null @@ -1,91 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: libs-builder - labels: - app: libs-builder -spec: - selector: - matchLabels: - app: libs-builder - replicas: 1 - template: - metadata: - name: libs-builder - labels: - app: libs-builder - spec: - containers: - - name: libs-builder - image: quay.io/mmoltras/devcontainers:falco-libs-${FALCO_BUILDER_FLAVOR} - imagePullPolicy: Never - workingDir: ${HOME}/go/src/github.com/falcosecurity/libs - securityContext: - privileged: true - env: - - name: CMAKE_EXPORT_COMPILE_COMMANDS - value: "ON" - - name: HOST_ROOT - value: /host - - name: FALCO_DIR - value: ${HOME}/go/src/github.com/falcosecurity/libs - command: - - /bin/bash - stdin: true - volumeMounts: - - name: libs-repo - mountPath: ${HOME}/go/src/github.com/falcosecurity/libs - - name: src - mountPath: /usr/src - - name: modules - mountPath: /lib/modules - - name: bpf - mountPath: /usr/include/bpf - - name: docker-sock - mountPath: /var/run/docker.sock - - name: dev - mountPath: /host/dev - readOnly: true - - name: proc - mountPath: /host/proc - readOnly: true - - name: sys - mountPath: /host/sys - readOnly: true - - name: etc - mountPath: /host/etc - readOnly: true - - name: usr-lib - mountPath: /host/usr/lib - readOnly: true - volumes: - - name: libs-repo - hostPath: - path: ${HOME}/go/src/github.com/falcosecurity/libs - - name: src - hostPath: - path: /usr/src - - name: modules - hostPath: - path: /lib/modules - - name: bpf - hostPath: - path: /usr/include/bpf - - name: docker-sock - hostPath: - path: /var/run/docker.sock - - name: dev - hostPath: - path: /dev - - name: proc - hostPath: - path: /proc - - name: sys - hostPath: - path: /sys - - name: etc - hostPath: - path: /etc - - name: usr-lib - hostPath: - path: /usr/lib diff --git a/kind/Makefile b/kind/Makefile deleted file mode 100644 index 14d3e1f..0000000 --- a/kind/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -.PHONY: deploy-kind -deploy-kind: - kind create cluster --config $(CURDIR)/config.yml - -.PHONY: teardown-kind -teardown-kind: - kind delete cluster --name devcontainers diff --git a/kind/config.yml b/kind/config.yml deleted file mode 100644 index 8fbc5e3..0000000 --- a/kind/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -name: devcontainers -networking: - apiServerAddress: "192.168.56.2" - apiServerPort: 6443 -nodes: -- role: control-plane