diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3db73def4..0675fca35 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -90,7 +90,7 @@ jobs:
- name: Build
run: cargo build --verbose
- ## If the push is a tag....build and upload the release bpfd and bpfctl binaries to an archive
+ ## If the push is a tag....build and upload the release bpfman and bpfctl binaries to an archive
- name: Build-Release
if: startsWith(github.ref, 'refs/tags/v')
run: |
@@ -101,19 +101,19 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
run: |
tar -czvf bpfctl-linux-x86_64.tar.gz ./target/x86_64-unknown-linux-musl/release/bpfctl
- tar -czvf bpfd-linux-x86_64.tar.gz ./target/x86_64-unknown-linux-musl/release/bpfd
+ tar -czvf bpfman-linux-x86_64.tar.gz ./target/x86_64-unknown-linux-musl/release/bpfman
- - name: Archive bpfd and bpfctl Release Binaries
+ - name: Archive bpfman and bpfctl Release Binaries
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
- name: bpfd-release
+ name: bpfman-release
path: |
./bpfctl-linux-x86_64.tar.gz
- ./bpfd-linux-x86_64.tar.gz
+ ./bpfman-linux-x86_64.tar.gz
- name: Run tests
- run: cargo llvm-cov test --all-features -p bpfd -p bpfd-api -p bpfctl --lcov --output-path lcov.info
+ run: cargo llvm-cov test --all-features -p bpfman -p bpfman-api -p bpfctl --lcov --output-path lcov.info
env:
RUST_BACKTRACE: full
@@ -133,14 +133,14 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
- path: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd
+ path: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Go mod check
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd
+ working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman
run: |
go mod tidy
git diff --exit-code go.mod go.sum
@@ -148,8 +148,8 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
- # Keep this version synced with /bpfd/scripts/verify-golint.sh
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd
+ # Keep this version synced with /bpfman/scripts/verify-golint.sh
+ working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman
version: v1.54.2
skip-cache: true
skip-pkg-cache: true
@@ -157,27 +157,28 @@ jobs:
args: -v --timeout 5m --enable=gofmt
- name: Build Examples
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd/examples
+ working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman/examples
run: |
go build ./...
- name: Build Operator
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd/bpfd-operator
+ working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman/bpfman-operator
run: make build
- - name: Verify Operator
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd/bpfd-operator
- run: make verify
+ # FIXME: This is currently failing due to a GOPATH weirdness
+ # - name: Verify Operator
+ # working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman/bpfman-operator
+ # run: make verify
- name: Run Tests
- working-directory: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd/bpfd-operator
+ working-directory: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman/bpfman-operator
run: make test
- name: Archive Go code coverage results
uses: actions/upload-artifact@v3
with:
name: coverage
- path: ${{ env.GOPATH }}/src/github.com/bpfd-dev/bpfd/bpfd-operator/cover.out
+ path: ${{ env.GOPATH }}/src/github.com/bpfman/bpfman/bpfman-operator/cover.out
if-no-files-found: error
basic-integration-tests:
@@ -217,23 +218,23 @@ jobs:
- name: Build eBPF
run: cargo xtask build-ebpf --libbpf-dir ./libbpf
- - name: Build bpfd
+ - name: Build bpfman
run: cargo build --verbose
- - name: Run the bpfd installer
+ - name: Run the bpfman installer
run: sudo ./scripts/setup.sh install
- name: Give certs time to be created
run: sleep 5
- - name: Verify the bpfd systemd service is active
- run: systemctl is-active bpfd
+ - name: Verify the bpfman systemd service is active
+ run: systemctl is-active bpfman
- - name: Verify the bpfctl can reach bpfd
+ - name: Verify the bpfctl can reach bpfman
run: sudo bpfctl list
- - name: Stop the bpfd systemd service
- run: sudo systemctl stop bpfd
+ - name: Stop the bpfman systemd service
+ run: sudo systemctl stop bpfman
- name: Run integration tests
run: cargo xtask integration-test
@@ -242,9 +243,9 @@ jobs:
needs: ["build", "build-go"]
runs-on: ubuntu-latest
env:
- BPFD_IMG: "quay.io/bpfd/bpfd:int-test"
- BPFD_AGENT_IMG: "quay.io/bpfd/bpfd-agent:int-test"
- BPFD_OPERATOR_IMG: "quay.io/bpfd/bpfd-operator:int-test"
+ BPFMAN_IMG: "quay.io/bpfman/bpfman:int-test"
+ BPFMAN_AGENT_IMG: "quay.io/bpfman/bpfman-agent:int-test"
+ BPFMAN_OPERATOR_IMG: "quay.io/bpfman/bpfman-operator:int-test"
steps:
- name: Install dependencies
run: |
@@ -286,10 +287,10 @@ jobs:
run: cd examples && make build-us-images
- name: build images
- run: cd bpfd-operator && make build-images
+ run: cd bpfman-operator && make build-images
- name: run integration tests
- run: cd bpfd-operator && make test-integration
+ run: cd bpfman-operator && make test-integration
## Upload diagnostics if integration test step failed.
- name: upload diagnostics
@@ -319,8 +320,8 @@ jobs:
verbose: true
# Creates Release
- # Copies built bpfctl + bpfd binaries to release artifacts
- # Publish's bpfd, bpfctl, and bpfd-api crates to crates.io
+ # Copies built bpfctl + bpfman binaries to release artifacts
+ # Publish's bpfman, bpfctl, and bpfman-api crates to crates.io
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: ["build"]
@@ -335,25 +336,25 @@ jobs:
- uses: actions/download-artifact@v3
with:
- name: bpfd-release
+ name: bpfman-release
- name: release
uses: softprops/action-gh-release@v1
with:
body_path: ./changelogs/CHANGELOG-${{ env.RELEASE_VERSION }}.md
files: |
- bpfd-linux-x86_64.tar.gz
+ bpfman-linux-x86_64.tar.gz
bpfctl-linux-x86_64.tar.gz
## TODO once we're using an aya mainline version
- # - name: publish bpfd crate
- # run: cargo publish -p bpfd --token ${{ secrets.BPFD_DEV_TOKEN }}
+ # - name: publish bpfman crate
+ # run: cargo publish -p bpfman --token ${{ secrets.BPFMAN_DEV_TOKEN }}
- - name: publish bpfd-api crate
- run: cargo publish -p bpfd-api --token ${{ secrets.BPFD_DEV_TOKEN }}
+ - name: publish bpfman-api crate
+ run: cargo publish -p bpfman-api --token ${{ secrets.BPFMAN_DEV_TOKEN }}
- name: publish bpfctl crate
- run: cargo publish -p bpfctl --token ${{ secrets.BPFD_DEV_TOKEN }}
+ run: cargo publish -p bpfctl --token ${{ secrets.BPFMAN_DEV_TOKEN }}
build-workflow-complete:
needs:
diff --git a/.github/workflows/image-build.yaml b/.github/workflows/image-build.yaml
index 3c9160c77..eea08b04e 100644
--- a/.github/workflows/image-build.yaml
+++ b/.github/workflows/image-build.yaml
@@ -1,4 +1,4 @@
-name: bpfd-image-build
+name: bpfman-image-build
on: # yamllint disable-line rule:truthy
push:
@@ -22,9 +22,9 @@ jobs:
matrix:
image:
- registry: quay.io
- repository: bpfd
- image: bpfd
- dockerfile: ./packaging/container-deployment/Containerfile.bpfd
+ repository: bpfman
+ image: bpfman
+ dockerfile: ./packaging/container-deployment/Containerfile.bpfman
context: .
tags: |
type=ref,event=branch
@@ -35,7 +35,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd
+ repository: bpfman
image: bpfctl
dockerfile: ./packaging/container-deployment/Containerfile.bpfctl
context: .
@@ -48,9 +48,9 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd
- image: bpfd-agent
- dockerfile: ./bpfd-operator/Containerfile.bpfd-agent
+ repository: bpfman
+ image: bpfman-agent
+ dockerfile: ./bpfman-operator/Containerfile.bpfman-agent
context: .
tags: |
type=ref,event=branch
@@ -61,9 +61,9 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd
- image: bpfd-operator
- dockerfile: ./bpfd-operator/Containerfile.bpfd-operator
+ repository: bpfman
+ image: bpfman-operator
+ dockerfile: ./bpfman-operator/Containerfile.bpfman-operator
context: .
tags: |
type=ref,event=branch
@@ -74,10 +74,10 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd
- image: bpfd-operator-bundle
- context: ./bpfd-operator
- dockerfile: ./bpfd-operator/Containerfile.bundle
+ repository: bpfman
+ image: bpfman-operator-bundle
+ context: ./bpfman-operator
+ dockerfile: ./bpfman-operator/Containerfile.bundle
tags: |
type=ref,event=branch
type=ref,event=tag
@@ -87,7 +87,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd-userspace
+ repository: bpfman-userspace
image: go-xdp-counter
context: .
dockerfile: ./examples/go-xdp-counter/container-deployment/Containerfile.go-xdp-counter
@@ -100,7 +100,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd-userspace
+ repository: bpfman-userspace
image: go-tc-counter
context: .
dockerfile: ./examples/go-tc-counter/container-deployment/Containerfile.go-tc-counter
@@ -113,7 +113,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
- registry: quay.io
- repository: bpfd-userspace
+ repository: bpfman-userspace
image: go-tracepoint-counter
context: .
dockerfile: ./examples/go-tracepoint-counter/container-deployment/Containerfile.go-tracepoint-counter
@@ -127,7 +127,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: go
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: go-xdp-counter
context: ./examples/go-xdp-counter
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -146,7 +146,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: go
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: go-tc-counter
context: ./examples/go-tc-counter
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -165,7 +165,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: go
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: go-tracepoint-counter
context: ./examples/go-tracepoint-counter
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -184,7 +184,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: xdp_pass
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -203,7 +203,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: xdp_pass_private
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -222,7 +222,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: tc_pass
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -241,7 +241,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: tracepoint
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -260,7 +260,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: uprobe
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -279,7 +279,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: uretprobe
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -298,7 +298,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: kprobe
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -317,7 +317,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd-bytecode
+ repository: bpfman-bytecode
image: kretprobe
context: ./tests/integration-test/bpf/.output
dockerfile: ./packaging/container-deployment/Containerfile.bytecode
@@ -336,7 +336,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd
+ repository: bpfman
image: xdp-dispatcher
context: .
dockerfile: ./Containerfile.xdp_dispatcher_v1
@@ -346,7 +346,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd
+ repository: bpfman
image: xdp-dispatcher
context: .
dockerfile: ./Containerfile.xdp_dispatcher_v2
@@ -356,7 +356,7 @@ jobs:
- registry: quay.io
bpf_build_wrapper: rust
- repository: bpfd
+ repository: bpfman
image: tc-dispatcher
context: .
dockerfile: ./Containerfile.tc_dispatcher
@@ -365,7 +365,6 @@ jobs:
type=raw,value=v1,enable=true
name: Build Image (${{ matrix.image.image }})
- environment: image-repositories
steps:
- uses: actions/checkout@v4
@@ -410,33 +409,33 @@ jobs:
cd examples && make generate
- name: Generate olm bundle on disk
- if: ${{ matrix.image.image == 'bpfd-operator-bundle' }}
+ if: ${{ matrix.image.image == 'bpfman-operator-bundle' }}
run: |
- cd bpfd-operator && make bundle
+ cd bpfman-operator && make bundle
- - name: Login to quay.io/bpfd
+ - name: Login to quay.io/bpfman
uses: redhat-actions/podman-login@v1
- if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfd'}}
+ if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfman'}}
with:
registry: ${{ matrix.image.registry }}
- username: ${{ secrets.BPFD_USERNAME }}
- password: ${{ secrets.BPFD_ROBOT_TOKEN }}
+ username: ${{ secrets.BPFMAN_USERNAME }}
+ password: ${{ secrets.BPFMAN_ROBOT_TOKEN }}
- - name: Login to quay.io/bpfd-userspace
+ - name: Login to quay.io/bpfman-userspace
uses: redhat-actions/podman-login@v1
- if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfd-userspace'}}
+ if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfman-userspace'}}
with:
registry: ${{ matrix.image.registry }}
- username: ${{ secrets.BPFD_USERSPACE_USERNAME }}
- password: ${{ secrets.BPFD_USERSPACE_ROBOT_TOKEN }}
+ username: ${{ secrets.BPFMAN_USERSPACE_USERNAME }}
+ password: ${{ secrets.BPFMAN_USERSPACE_ROBOT_TOKEN }}
- - name: Login to quay.io/bpfd-bytecode
+ - name: Login to quay.io/bpfman-bytecode
uses: redhat-actions/podman-login@v1
- if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfd-bytecode' }}
+ if: ${{ github.event_name == 'push' && matrix.image.repository == 'bpfman-bytecode' }}
with:
registry: ${{ matrix.image.registry }}
- username: ${{ secrets.BPFD_BYTECODE_USERNAME }}
- password: ${{ secrets.BPFD_BYTECODE_ROBOT_TOKEN }}
+ username: ${{ secrets.BPFMAN_BYTECODE_USERNAME }}
+ password: ${{ secrets.BPFMAN_BYTECODE_ROBOT_TOKEN }}
- name: Extract metadata (tags, labels) for image
id: meta
diff --git a/.github/workflows/put-issue-in-project.yaml b/.github/workflows/put-issue-in-project.yaml
index 003774d15..c2003f943 100644
--- a/.github/workflows/put-issue-in-project.yaml
+++ b/.github/workflows/put-issue-in-project.yaml
@@ -1,4 +1,4 @@
-name: Add all issues to bpfd project
+name: Add all issues to bpfman project
on: # yamllint disable-line rule:truthy
issues:
@@ -14,5 +14,5 @@ jobs:
with:
# You can target a project in a different organization
# to the issue
- project-url: https://github.com/orgs/bpfd-dev/projects/4
- github-token: ${{ secrets.BPFD_PROJECT_PAT }}
+ project-url: https://github.com/orgs/bpfman/projects/4
+ github-token: ${{ secrets.BPFMAN_PROJECT_PAT }}
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 1bcad7a19..18f9991c0 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -3,9 +3,9 @@ header:
- license:
content: |
SPDX-License-Identifier: Apache-2.0
- Copyright Authors of bpfd
+ Copyright Authors of bpfman
paths:
- - bpfd
+ - bpfman
- bpfctl
paths-ignore:
- "**/target/**"
@@ -18,7 +18,7 @@ header:
- license:
content: |
SPDX-License-Identifier: GPL-2.0-only
- Modifications Copyright Authors of bpfd
+ Modifications Copyright Authors of bpfman
paths:
- bpf/xdp_dispatcher_v1.bpf.c
- bpf/xdp_dispatcher_v2.bpf.c
@@ -27,7 +27,7 @@ header:
- license:
content: |
SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
- Copyright Authors of bpfd
+ Copyright Authors of bpfman
paths:
- bpf/tc_dispatcher.bpf.c
- examples/**/bpf/*.c
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 82f50b982..dbad99688 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,7 +1,7 @@
{
"rust-analyzer.check.allTargets": true,
"yaml.schemas": {
- "https://json.schemastore.org/github-workflow.json": "file:///home/dave/dev/bpfd/.github/workflows/build.yml"
+ "https://json.schemastore.org/github-workflow.json": "file:///home/dave/dev/bpfman/.github/workflows/build.yml"
},
"rust-analyzer.check.command": "clippy"
}
diff --git a/.yamllint.yaml b/.yamllint.yaml
index 1228147a6..7808dc35d 100644
--- a/.yamllint.yaml
+++ b/.yamllint.yaml
@@ -8,8 +8,8 @@ rules:
ignore:
- libbpf/*
- vendor/*
- - bpfd-operator/config/crd/*
- - bpfd-operator/config/rbac/*
+ - bpfman-operator/config/crd/*
+ - bpfman-operator/config/rbac/*
## Kustomize automatically formats these incorrectly
- - bpfd-operator/config/bpfd-deployment/kustomization.yaml
- - bpfd-operator/config/bpfd-operator-deployment/kustomization.yaml
+ - bpfman-operator/config/bpfman-deployment/kustomization.yaml
+ - bpfman-operator/config/bpfman-operator-deployment/kustomization.yaml
diff --git a/CODEOWNERS b/CODEOWNERS
index 03f11a22a..b5a06cbea 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,11 +1,11 @@
-* @bpfd-dev/bpfd-maintainers
+* @bpfman/bpfman-maintainers
-./bpfd @dave-tucker
-./bpfd/src/oci_utils @astoycos
-./bpfd/src/multiprog/tc.rs @anfredette
-./bpfd/src/certs.rs @Billy99
-./bpfd-api @dave-tucker
+./bpfman @dave-tucker
+./bpfman/src/oci_utils @astoycos
+./bpfman/src/multiprog/tc.rs @anfredette
+./bpfman/src/certs.rs @Billy99
+./bpfman-api @dave-tucker
./bpfctl @dave-tucker
-./bpfd-operator @astoycos
+./bpfman-operator @astoycos
./examples/go-tc-counter @anfredette
./examples/go-xdp-counter @Billy99
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b579aeab7..c067f4fc1 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -53,8 +53,8 @@ feedback on others’ ideas, and even sharing your own ideas, and experiences.
## Find an Issue
We have good first issues for new contributors and help wanted issues suitable
-for any contributor. [good first issue](https://github.com/bpfd-dev/bpfd/labels/good%20first%20issue) has extra information to
-help you make your first contribution. [help wanted](https://github.com/bpfd-dev/bpfd/labels/help%20wanted) are issues
+for any contributor. [good first issue](https://github.com/bpfman/bpfman/labels/good%20first%20issue) has extra information to
+help you make your first contribution. [help wanted](https://github.com/bpfman/bpfman/labels/help%20wanted) are issues
suitable for someone who isn't a core maintainer and is good to move onto after
your first pull request.
@@ -87,7 +87,7 @@ In some cases, other changes may conflict with your PR. If this happens, you wil
## Development Environment Setup
-[Instructions](https://bpfd.netlify.app/building-bpfd/#development-environment-setup)
+[Instructions](https://bpfman.netlify.app/building-bpfman/#development-environment-setup)
## Signoff Your Commits
@@ -138,7 +138,7 @@ A good commit message should describe what changed and why.
Examples:
- * bpfd: validate program section names
+ * bpfman: validate program section names
* bpf: add dispatcher program test slot
2. Keep the second line blank.
@@ -182,43 +182,43 @@ before you submit your code:
* Verify that Rust code has been formatted and that all clippy lints have been fixed:
```console
-cd src/bpfd/
+cd src/bpfman/
cargo +nightly fmt --all -- --check
cargo +nightly clippy --all -- --deny warnings
```
* Verify that Go code has been formatted and linted
* Verify that Yaml files have been formatted (see
- [Install Yaml Formatter](https://bpfd.dev/getting-started/building-bpfd/#install-yaml-formatter))
+ [Install Yaml Formatter](https://bpfman.io/getting-started/building-bpfman/#install-yaml-formatter))
* Verify that unit tests are passing locally (see
- [Unit Testing](https://bpfd.dev/developer-guide/testing/#unit-testing)):
+ [Unit Testing](https://bpfman.io/developer-guide/testing/#unit-testing)):
```console
-cd src/bpfd/
+cd src/bpfman/
cargo test
```
* Verify that integration tests are passing locally (see
- [Basic Integration Tests](https://bpfd.dev/developer-guide/testing/#basic-integration-tests)):
+ [Basic Integration Tests](https://bpfman.io/developer-guide/testing/#basic-integration-tests)):
```console
-cd src/bpfd/
+cd src/bpfman/
cargo xtask integration-test
```
-* If developing the bpfd-operator, verify that bpfd-operator unit tests
+* If developing the bpfman-operator, verify that bpfman-operator unit tests
are passing locally:
```console
-cd src/bpfd/bpfd-operator/
+cd src/bpfman/bpfman-operator/
make test
```
-* If developing the bpfd-operator, verify that bpfd-operator integration tests
+* If developing the bpfman-operator, verify that bpfman-operator integration tests
are passing locally (see
- [Kubernetes Integration Tests](https://bpfd.dev/developer-guide/testing/#kubernetes-integration-tests)):
+ [Kubernetes Integration Tests](https://bpfman.io/developer-guide/testing/#kubernetes-integration-tests)):
```console
-cd src/bpfd/bpfd-operator/
+cd src/bpfman/bpfman-operator/
make test-integration
```
diff --git a/Cargo.lock b/Cargo.lock
index 27047c7a4..760ba55b3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -242,7 +242,7 @@ dependencies = [
[[package]]
name = "aya"
version = "0.11.0"
-source = "git+https://github.com/aya-rs/aya?branch=main#958931efcbfd86cab2220b36b7ebb2b34c18a842"
+source = "git+https://github.com/aya-rs/aya?branch=main#33b2e45ad313f7468a7d11667f13d9c365e2a263"
dependencies = [
"assert_matches",
"aya-obj",
@@ -258,7 +258,7 @@ dependencies = [
[[package]]
name = "aya-obj"
version = "0.1.0"
-source = "git+https://github.com/aya-rs/aya?branch=main#958931efcbfd86cab2220b36b7ebb2b34c18a842"
+source = "git+https://github.com/aya-rs/aya?branch=main#33b2e45ad313f7468a7d11667f13d9c365e2a263"
dependencies = [
"bytes",
"core-error",
@@ -343,7 +343,7 @@ version = "0.3.1"
dependencies = [
"anyhow",
"base64 0.21.5",
- "bpfd-api",
+ "bpfman-api",
"clap",
"comfy-table",
"env_logger",
@@ -358,7 +358,7 @@ dependencies = [
]
[[package]]
-name = "bpfd"
+name = "bpfman"
version = "0.3.1"
dependencies = [
"anyhow",
@@ -366,8 +366,8 @@ dependencies = [
"async-trait",
"aya",
"base16ct",
- "bpfd-api",
- "bpfd-csi",
+ "bpfman-api",
+ "bpfman-csi",
"caps",
"chrono",
"clap",
@@ -396,7 +396,7 @@ dependencies = [
]
[[package]]
-name = "bpfd-api"
+name = "bpfman-api"
version = "0.3.1"
dependencies = [
"aya",
@@ -412,7 +412,7 @@ dependencies = [
]
[[package]]
-name = "bpfd-csi"
+name = "bpfman-csi"
version = "1.8.0"
dependencies = [
"prost",
@@ -853,9 +853,9 @@ checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d"
[[package]]
name = "ecdsa"
-version = "0.16.9"
+version = "0.16.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
+checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4"
dependencies = [
"der",
"digest",
@@ -981,9 +981,9 @@ dependencies = [
[[package]]
name = "fiat-crypto"
-version = "0.2.5"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "27573eac26f4dd11e2b1916c3fe1baa56407c83c71a773a8ba17ec0bca03b6b7"
+checksum = "53a56f0780318174bad1c127063fd0c5fdfb35398e3cd79ffaab931a6c79df80"
[[package]]
name = "filetime"
@@ -1450,7 +1450,7 @@ version = "0.1.0"
dependencies = [
"anyhow",
"assert_cmd",
- "bpfd-api",
+ "bpfman-api",
"env_logger",
"integration-test-macros",
"inventory",
@@ -2353,9 +2353,9 @@ dependencies = [
[[package]]
name = "prost-build"
-version = "0.12.2"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fa3d084c8704911bfefb2771be2f9b6c5c0da7343a71e0021ee3c665cada738"
+checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac"
dependencies = [
"bytes",
"heck",
@@ -2388,9 +2388,9 @@ dependencies = [
[[package]]
name = "prost-types"
-version = "0.12.2"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8339f32236f590281e2f6368276441394fcd1b2133b549cc895d0ae80f2f9a52"
+checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf"
dependencies = [
"prost",
]
@@ -2653,9 +2653,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.21.9"
+version = "0.21.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9"
+checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c"
dependencies = [
"log",
"ring 0.17.5",
@@ -2873,9 +2873,9 @@ dependencies = [
[[package]]
name = "signature"
-version = "2.2.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
+checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500"
dependencies = [
"digest",
"rand_core",
@@ -3981,9 +3981,9 @@ dependencies = [
[[package]]
name = "zeroize"
-version = "1.7.0"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+checksum = "12a3946ecfc929b583800f4629b6c25b88ac6e92a40ea5670f77112a85d40a8b"
dependencies = [
"zeroize_derive",
]
diff --git a/Cargo.toml b/Cargo.toml
index 83affaaac..f1cb19d21 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,8 +1,8 @@
[workspace]
members = [
"bpfctl",
- "bpfd",
- "bpfd-api",
+ "bpfman",
+ "bpfman-api",
"csi",
"tests/integration-test",
"tests/integration-test-macros",
@@ -21,8 +21,8 @@ async-trait = { version = "0.1", default-features = false }
aya = { version = "0.11", default-features = false }
base16ct = { version = "0.2.0", default-features = false }
base64 = { version = "0.21.5", default-features = false }
-bpfd-api = { version = "0.3.1", path = "./bpfd-api" }
-bpfd-csi = { version = "1.8.0", path = "./csi" }
+bpfman-api = { version = "0.3.1", path = "./bpfman-api" }
+bpfman-csi = { version = "1.8.0", path = "./csi" }
caps = { version = "0.5.4", default-features = false }
chrono = { version = "0.4.31", default-features = false }
clap = { version = "4", default-features = false }
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
index bf1c6b85e..8c4238735 100644
--- a/GOVERNANCE.md
+++ b/GOVERNANCE.md
@@ -1,6 +1,6 @@
-# bpfd Project Governance
+# bpfman Project Governance
-The bpfd project is dedicated to creating an easy way to run eBPF programs on a single host and in clusters. This governance explains how the project is run.
+The bpfman project is dedicated to creating an easy way to run eBPF programs on a single host and in clusters. This governance explains how the project is run.
- [Values](#values)
- [Maintainers](#maintainers)
@@ -13,7 +13,7 @@ The bpfd project is dedicated to creating an easy way to run eBPF programs on a
## Values
-The bpfd project and its leadership embrace the following values:
+The bpfman project and its leadership embrace the following values:
- Openness: Communication and decision-making happens in the open and is discoverable for future
reference. As much as possible, all discussions and work take place in public
@@ -35,13 +35,13 @@ The bpfd project and its leadership embrace the following values:
## Maintainers
-bpfd Maintainers have write access to the [project GitHub repository](https://github.com/bpfd-dev/bpfd).
+bpfman Maintainers have write access to the [project GitHub repository](https://github.com/bpfman/bpfman).
They can merge their patches or patches from others. The list of current maintainers
can be found at [MAINTAINERS.md](./MAINTAINERS.md). Maintainers collectively manage the project's
resources and contributors.
This privilege is granted with some expectation of responsibility: maintainers
-are people who care about the bpfd project and want to help it grow and
+are people who care about the bpfman project and want to help it grow and
improve. A maintainer is not just someone who can make changes, but someone who
has demonstrated their ability to collaborate with the team, get the most
knowledgeable people to review code and docs, contribute high-quality code, and
@@ -117,7 +117,7 @@ holes and breaches according to the [security policy](./SECURITY.md).
## Voting
-While most business in bpfd is conducted by "[lazy consensus](https://community.apache.org/committers/lazyConsensus.html)",
+While most business in bpfman is conducted by "[lazy consensus](https://community.apache.org/committers/lazyConsensus.html)",
periodically the Maintainers may need to vote on specific actions or changes.
A vote can be taken on the private developer slack channel for security or conduct matters.
Votes may also be taken at [the developer meeting](./MEETINGS.md). Any Maintainer may
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
index a0b627eba..bf9834cce 100644
--- a/LICENSE-APACHE
+++ b/LICENSE-APACHE
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
same "printed page" as the copyright notice for easier
identification within third-party archives.
-Copyright {yyyy} Authors of bpfd.
+Copyright {yyyy} Authors of bpfman.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/LICENSE-BSD2 b/LICENSE-BSD2
index 21ad897f5..04413510e 100644
--- a/LICENSE-BSD2
+++ b/LICENSE-BSD2
@@ -1,4 +1,4 @@
-Copyright Authors of bpfd. All rights reserved.
+Copyright Authors of bpfman. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index f7dcd15d8..775efc2d3 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -7,6 +7,6 @@ See [CODEOWNERS](./CODEOWNERS) for a detailed list of owners for the various sou
| Name | Employer | Responsibilities |
| ---- | -------- | ---------------- |
| [Dave Tucker](https://github.com/dave-tucker) | Red Hat | Catch all |
-| [Andrew Stoycos](https://github.com/astoycos) | Red Hat | bpfd-operator, bpfd-agent |
+| [Andrew Stoycos](https://github.com/astoycos) | Red Hat | bpfman-operator, bpfman-agent |
| [Andre Fredette](https://github.com/anfredette) | Red Hat | All things tc-bpf |
| [Billy McFall](https://github.com/Billy99) | Red Hat | All things systemd |
diff --git a/MEETINGS.md b/MEETINGS.md
index 08ff01d4a..9c2409386 100644
--- a/MEETINGS.md
+++ b/MEETINGS.md
@@ -1,4 +1,4 @@
-# bpfd Community Meetings
+# bpfman Community Meetings
## Meeting time
diff --git a/README.md b/README.md
index 1d48ec60c..06ebdbe58 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,39 @@
-# [![bpfd](./docs/img/bpfd.svg)](https://bpfd.dev/)
+# [![bpfman](./docs/img/bpfman.svg)](https://bpfman.io/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
[![License: GPL
v2](https://img.shields.io/badge/License-GPL_v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
![Build status][build-badge] [![Book][book-badge]][book-url]
-[![Netlify Status](https://api.netlify.com/api/v1/badges/557ca612-4b7f-480d-a1cc-43b453502992/deploy-status)](https://app.netlify.com/sites/bpfd/deploys)
+[![Netlify Status](https://api.netlify.com/api/v1/badges/557ca612-4b7f-480d-a1cc-43b453502992/deploy-status)](https://app.netlify.com/sites/bpfman/deploys)
[build-badge]:
- https://img.shields.io/github/actions/workflow/status/bpfd-dev/bpfd/build.yml?branch=main
+ https://img.shields.io/github/actions/workflow/status/bpfman/bpfman/build.yml?branch=main
[book-badge]: https://img.shields.io/badge/read%20the-book-9cf.svg
-[book-url]: https://bpfd.dev/
+[book-url]: https://bpfman.io/
-## Welcome to bpfd
+_Formerly know as `bpfd`_
-bpfd is a system daemon aimed at simplifying the deployment and management of eBPF programs.
+## Welcome to bpfman
+
+bpfman is a system daemon aimed at simplifying the deployment and management of eBPF programs.
It's goal is to enhance the developer-experience as well as provide features to improve security,
visibility and program-cooperation.
-bpfd includes a Kubernetes operator to bring those same features to Kubernetes, allowing users to
+bpfman includes a Kubernetes operator to bring those same features to Kubernetes, allowing users to
safely deploy eBPF via custom resources across nodes in a cluster.
-Here are some links to help in your bpfd journey (all links are from the bpfd website ):
+Here are some links to help in your bpfman journey (all links are from the bpfman website ):
-- [Welcome to bpfd](https://bpfd.dev/) for overview of bpfd.
-- [Setup and Building bpfd](https://bpfd.dev/getting-started/building-bpfd/) for
- instructions on setting up your development environment and building bpfd.
-- [Tutorial](https://bpfd.dev/getting-started/tutorial/) for some examples of starting
- `bpfd`, managing logs, and using `bpfctl`.
-- [Example eBPF Programs](https://bpfd.dev/getting-started/example-bpf/) for some
- examples of eBPF programs written in Go, interacting with `bpfd`.
-- [How to Deploy bpfd on Kubernetes](https://bpfd.dev/developer-guide/develop-operator/) for details on launching
- bpfd in a Kubernetes cluster.
-- [Meet the Community](https://bpfd.dev/governance/meetings/) for details on community meeting details.
+- [Welcome to bpfman](https://bpfman.io/) for overview of bpfman.
+- [Setup and Building bpfman](https://bpfman.io/getting-started/building-bpfman/) for
+ instructions on setting up your development environment and building bpfman.
+- [Tutorial](https://bpfman.io/getting-started/tutorial/) for some examples of starting
+ `bpfman`, managing logs, and using `bpfctl`.
+- [Example eBPF Programs](https://bpfman.io/getting-started/example-bpf/) for some
+ examples of eBPF programs written in Go, interacting with `bpfman`.
+- [How to Deploy bpfman on Kubernetes](https://bpfman.io/developer-guide/develop-operator/) for details on launching
+ bpfman in a Kubernetes cluster.
+- [Meet the Community](https://bpfman.io/governance/meetings/) for details on community meeting details.
## License
@@ -49,7 +51,7 @@ All eBPF code is distributed under either:
The exact license text varies by file. Please see the SPDX-License-Identifier
header in each file for details.
-Files that originate from the authors of bpfd use
+Files that originate from the authors of bpfman use
`(GPL-2.0-only OR BSD-2-Clause)` - for example the [TC dispatcher] or our
own example programs.
diff --git a/RELEASE.md b/RELEASE.md
index 68ee26a58..3c8682263 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -2,61 +2,61 @@
## Overview
-A release for the bpfd project is comprised of the following major components:
+A release for the bpfman project is comprised of the following major components:
-- bpfd + bpfctl binaries
+- bpfman + bpfctl binaries
- Core GRPC API protobuf definitions
- Kubernetes Custom Resource Definitions (CRDs)
-- Corresponding go pkg in the form of `github.com/bpfd-dev/bpfd` which includes the following:
- - `github.com/bpfd-dev/bpfd/clients/gobpfd/v1`: The go client for the bpfd GRPC API
- - `github.com/bpfd-dev/bpfd/bpfd-operator/apis`: The go bindings for the
- bpfd CRD API
- - `github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client`: The autogenerated
- clientset for the bpfd CRD API
- - `github.com/bpfd-dev/bpfd/bpfd-operator/pkg/helpers`: The provided bpfd CRD
+- Corresponding go pkg in the form of `github.com/bpfman/bpfman` which includes the following:
+ - `github.com/bpfman/bpfman/clients/gobpfman/v1`: The go client for the bpfman GRPC API
+ - `github.com/bpfman/bpfman/bpfman-operator/apis`: The go bindings for the
+ bpfman CRD API
+ - `github.com/bpfman/bpfman/bpfman-operator/pkg/client`: The autogenerated
+ clientset for the bpfman CRD API
+ - `github.com/bpfman/bpfman/bpfman-operator/pkg/helpers`: The provided bpfman CRD
API helpers.
-- Corresponding `bpfd-api`, `bpfd`, and `bpfctl` rust crates which house the rust client for the bpfd GRPC API
+- Corresponding `bpfman-api`, `bpfman`, and `bpfctl` rust crates which house the rust client for the bpfman GRPC API
- The following core component container images with tag :
- - `quay.io/bpfd/bpfd`
- - `quay.io/bpfd/bpfctl`
- - `quay.io/bpfd/bpfd-operator`
- - `quay.io/bpfd/bpfd-agent`
- - `quay.io/bpfd/bpfd-operator-bundle`
- - `quay.io/bpfd/xdp-dispatcher`
- - `quay.io/bpfd/tc-dispatcher`
+ - `quay.io/bpfman/bpfman`
+ - `quay.io/bpfman/bpfctl`
+ - `quay.io/bpfman/bpfman-operator`
+ - `quay.io/bpfman/bpfman-agent`
+ - `quay.io/bpfman/bpfman-operator-bundle`
+ - `quay.io/bpfman/xdp-dispatcher`
+ - `quay.io/bpfman/tc-dispatcher`
- The relevant example bytecode container images with tag from source
- code located in the bpfd project:
- - `quay.io/bpfd-bytecode/go_xdp_counter`
- - `quay.io/bpfd-bytecode/go_tc_counter`
- - `quay.io/bpfd-bytecode/go_tracepoint_counter`
- - `quay.io/bpfd-bytecode/xdp_pass`
- - `quay.io/bpfd-bytecode/tc_pass`
- - `quay.io/bpfd-bytecode/tracepoint`
- - `quay.io/bpfd-bytecode/xdp_pass_private`
- - `quay.io/bpfd-bytecode/uprobe`
- - `quay.io/bpfd-bytecode/kprobe`
- - `quay.io/bpfd-bytecode/uretprobe`
- - `quay.io/bpfd-bytecode/kretprobe`
+ code located in the bpfman project:
+ - `quay.io/bpfman-bytecode/go_xdp_counter`
+ - `quay.io/bpfman-bytecode/go_tc_counter`
+ - `quay.io/bpfman-bytecode/go_tracepoint_counter`
+ - `quay.io/bpfman-bytecode/xdp_pass`
+ - `quay.io/bpfman-bytecode/tc_pass`
+ - `quay.io/bpfman-bytecode/tracepoint`
+ - `quay.io/bpfman-bytecode/xdp_pass_private`
+ - `quay.io/bpfman-bytecode/uprobe`
+ - `quay.io/bpfman-bytecode/kprobe`
+ - `quay.io/bpfman-bytecode/uretprobe`
+ - `quay.io/bpfman-bytecode/kretprobe`
- The relevant example userspace container images with tag from source
- code located in the bpfd project:
- - `quay.io/bpfd-userspace/go_xdp_counter`
- - `quay.io/bpfd-userspace/go_tc_counter`
- - `quay.io/bpfd-userspace/go_tracepoint_counter`
+ code located in the bpfman project:
+ - `quay.io/bpfman-userspace/go_xdp_counter`
+ - `quay.io/bpfman-userspace/go_tc_counter`
+ - `quay.io/bpfman-userspace/go_tracepoint_counter`
- The OLM (Operator Lifecycle Manager) for the Kubernetes Operator.
- This includes a `bundle` directory on disk as well as the
- `quay.io/bpfd/bpfd-operator-bundle` with the tag .
+ `quay.io/bpfman/bpfman-operator-bundle` with the tag .
## Versioning strategy
### Overview
-Each new release of bpfd is defined with a "bundle version" that
+Each new release of bpfman is defined with a "bundle version" that
represents the Git tag of a release, such as `v0.4.0`. This contains the
components described above
#### Kubernetes API Versions (e.g. v1alpha2, v1beta1)
-Within the bpfd-operator, API versions are primarily used to indicate the stability of
+Within the bpfman-operator, API versions are primarily used to indicate the stability of
a resource. For example, if a resource has not yet graduated to beta, it is
still possible that it could either be removed from the API or changed in
backwards incompatible ways. For more information on API versions, refer to the
@@ -73,7 +73,7 @@ notes generator](https://github.com/kubernetes/release/blob/master/cmd/release-n
```bash
go install k8s.io/release/cmd/release-notes@latest
export GITHUB_TOKEN=your_token_here
-release-notes --start-sha EXAMPLE_COMMIT --end-sha EXAMPLE_COMMIT --branch main --repo bpfd --org bpfd-dev
+release-notes --start-sha EXAMPLE_COMMIT --end-sha EXAMPLE_COMMIT --branch main --repo bpfman --org bpfman
```
This output will likely need to be reorganized and cleaned up a bit, but it
@@ -84,7 +84,7 @@ release.
### Release Steps
-The following steps must be done by one of the [bpfd maintainers][bpfd-team]:
+The following steps must be done by one of the [bpfman maintainers][bpfman-team]:
For a **PATCH** release:
@@ -96,17 +96,17 @@ For a **PATCH** release:
- Create a pull request of the `/release-x.x.x` branch into the `release-x.x` branch upstream.
Add a hold on this PR waiting for at least one maintainer/codeowner to provide a `lgtm`. This PR should:
- Add a new changelog for the release
- - Update the cargo.toml versions for the bpfd-api, bpfd, and bpfctl crates
- - Update the bpfd-operator version in it's MAKEFILE and run `make bundle` to update the bundle version.
- This will generate a new `/bpfd-operator/bundle` directory which will ONLY be tracked in the
+ - Update the cargo.toml versions for the bpfman-api, bpfman, and bpfctl crates
+ - Update the bpfman-operator version in it's MAKEFILE and run `make bundle` to update the bundle version.
+ This will generate a new `/bpfman-operator/bundle` directory which will ONLY be tracked in the
`release-x.x` branch not `main`.
- Verify the CI tests pass and merge the PR into `release-x.x`.
- Create a tag using the `HEAD` of the `release-x.x.x` branch. This can be done using the `git` CLI or
Github's [release][release] page.
- The Release will be automatically created, after that is complete do the following:
- run `make build-release-yamls` and attach the yamls for the version to the release. These will include:
- - `bpfd-crds-install-vx.x.x.yaml`
- - `bpfd-operator-install-vx.x.x.yaml`
+ - `bpfman-crds-install-vx.x.x.yaml`
+ - `bpfman-operator-install-vx.x.x.yaml`
- `go-xdp-counter-install-vx.x.x.yaml`
- `go-tc-counter-install-vx.x.x.yaml`
- `go-tracepoint-counter-install-vx.x.x.yaml`
@@ -120,8 +120,8 @@ For a **MAJOR** or **MINOR** release:
- Open an update PR that:
- Adds a new changelog for the release
- - Updates the cargo.toml versions for the bpfd-api, bpfd, and bpfctl crates
- - Updates the bpfd-operator version in it's MAKEFILE and run `make bundle` to update the bundle version
+ - Updates the cargo.toml versions for the bpfman-api, bpfman, and bpfctl crates
+ - Updates the bpfman-operator version in it's MAKEFILE and run `make bundle` to update the bundle version
- Add's a new `examples` config directory for the release version
- Make sure CI is green and merge the update PR.
- Create a tag using the `HEAD` of the `main` branch. This can be done using the `git` CLI or
@@ -131,11 +131,11 @@ For a **MAJOR** or **MINOR** release:
page.
- The Release will be automatically created, after that is complete do the following:
- run `make build-release-yamls` and attach the yamls for the version to the release. These will include:
- - `bpfd-crds-install-vx.x.x.yaml`
- - `bpfd-operator-install-vx.x.x.yaml`
+ - `bpfman-crds-install-vx.x.x.yaml`
+ - `bpfman-operator-install-vx.x.x.yaml`
- `go-xdp-counter-install-vx.x.x.yaml`
- `go-tc-counter-install-vx.x.x.yaml`
- `go-tracepoint-counter-install-vx.x.x.yaml`
-[release]: https://github.com/bpfd-dev/bpfd/releases
-[bpfd-team]: https://github.com/bpfd-dev/bpfd/blob/main/CODEOWNERS
+[release]: https://github.com/bpfman/bpfman/releases
+[bpfman-team]: https://github.com/bpfman/bpfman/blob/main/CODEOWNERS
diff --git a/SECURITY.md b/SECURITY.md
index 7bfa7d8fb..705ebf068 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -2,7 +2,7 @@
## Supported Versions
-No released versions of bpfd, bpfctl, bpfd-agent or bpfd-operator will receive regular security updates until a mainline release has been performed.
+No released versions of bpfman, bpfctl, bpfman-agent or bpfman-operator will receive regular security updates until a mainline release has been performed.
A reported and fixed vulnerability will be included in the next minor release, which depending on the severity of the vulnerability may be immediate.
## Reporting a Vulnerability
diff --git a/bpf/tc_dispatcher.bpf.c b/bpf/tc_dispatcher.bpf.c
index 43580aa92..e32b80e28 100644
--- a/bpf/tc_dispatcher.bpf.c
+++ b/bpf/tc_dispatcher.bpf.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
#include
#include
#include
diff --git a/bpf/xdp_dispatcher_v1.bpf.c b/bpf/xdp_dispatcher_v1.bpf.c
index 4f7fa5685..bd6cdf423 100644
--- a/bpf/xdp_dispatcher_v1.bpf.c
+++ b/bpf/xdp_dispatcher_v1.bpf.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
-// Modifications Copyright Authors of bpfd
+// Modifications Copyright Authors of bpfman
// Derived from:
// https://github.com/xdp-project/xdp-tools/blob/master/lib/libxdp/xdp-dispatcher.c.in
diff --git a/bpf/xdp_dispatcher_v2.bpf.c b/bpf/xdp_dispatcher_v2.bpf.c
index eedb8717f..e0ff57cb7 100644
--- a/bpf/xdp_dispatcher_v2.bpf.c
+++ b/bpf/xdp_dispatcher_v2.bpf.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
-// Modifications Copyright Authors of bpfd
+// Modifications Copyright Authors of bpfman
// Derived from:
// https://github.com/xdp-project/xdp-tools/blob/master/lib/libxdp/xdp-dispatcher.c.in
diff --git a/bpfctl/Cargo.toml b/bpfctl/Cargo.toml
index cc5785ba9..a85578ca9 100644
--- a/bpfctl/Cargo.toml
+++ b/bpfctl/Cargo.toml
@@ -1,9 +1,9 @@
[package]
-description = "A client for working with bpfd"
+description = "A client for working with bpfman"
edition = "2021"
license = "Apache-2.0"
name = "bpfctl"
-repository = "https://github.com/bpfd-dev/bpfd"
+repository = "https://github.com/bpfman/bpfman"
version = "0.3.1"
[[bin]]
@@ -13,7 +13,7 @@ path = "src/main.rs"
[dependencies]
anyhow = { workspace = true, features = ["std"] }
base64 = { workspace = true }
-bpfd-api = { workspace = true }
+bpfman-api = { workspace = true }
clap = { workspace = true, features = [
"color",
"derive",
diff --git a/bpfctl/src/main.rs b/bpfctl/src/main.rs
index 7583de710..17d638979 100644
--- a/bpfctl/src/main.rs
+++ b/bpfctl/src/main.rs
@@ -1,15 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{collections::HashMap, fs, str};
use anyhow::bail;
use base64::{engine::general_purpose, Engine as _};
-use bpfd_api::{
+use bpfman_api::{
config::{self, Config},
util::directories::*,
v1::{
- attach_info::Info, bpfd_client::BpfdClient, bytecode_location::Location,
+ attach_info::Info, bpfman_client::BpfmanClient, bytecode_location::Location,
list_response::ListResult, AttachInfo, BytecodeImage, BytecodeLocation, GetRequest,
KernelProgramInfo, KprobeAttachInfo, ListRequest, LoadRequest, ProgramInfo,
PullBytecodeRequest, TcAttachInfo, TracepointAttachInfo, UnloadRequest, UprobeAttachInfo,
@@ -42,7 +42,7 @@ enum Commands {
LoadFromImage(LoadImageArgs),
/// Unload an eBPF program using the program id.
Unload(UnloadArgs),
- /// List all eBPF programs loaded via bpfd.
+ /// List all eBPF programs loaded via bpfman.
List(ListArgs),
/// Get an eBPF program using the program id.
Get {
@@ -85,7 +85,7 @@ struct ListArgs {
#[derive(Args)]
struct LoadFileArgs {
/// Required: Location of local bytecode file as fully qualified file path.
- /// Example: --path $HOME/src/bpfd/examples/go-xdp-counter/bpf_bpfel.o
+ /// Example: --path $HOME/src/bpfman/examples/go-xdp-counter/bpf_bpfel.o
#[clap(short, long, verbatim_doc_comment)]
path: String,
@@ -103,7 +103,7 @@ struct LoadFileArgs {
global: Option>,
/// Optional: Specify Key/Value metadata to be attached to a program when it
- /// is loaded by bpfd.
+ /// is loaded by bpfman.
/// Format: =
///
/// This can later be used to `list` a certain subset of programs which contain
@@ -143,7 +143,7 @@ struct LoadImageArgs {
global: Option>,
/// Optional: Specify Key/Value metadata to be attached to a program when it
- /// is loaded by bpfd.
+ /// is loaded by bpfman.
/// Format: =
///
/// This can later be used to list a certain subset of programs which contain
@@ -283,7 +283,7 @@ struct UnloadArgs {
#[derive(Args)]
struct PullBytecodeArgs {
/// Required: Container Image URL.
- /// Example: --image-url quay.io/bpfd-bytecode/xdp_pass:latest
+ /// Example: --image-url quay.io/bpfman-bytecode/xdp_pass:latest
#[clap(short, long, verbatim_doc_comment)]
image_url: String,
@@ -334,11 +334,11 @@ struct GlobalArg {
struct ProgTable(Table);
impl ProgTable {
- fn new_get_bpfd(r: &Option) -> Result {
+ fn new_get_bpfman(r: &Option) -> Result {
let mut table = Table::new();
table.load_preset(comfy_table::presets::NOTHING);
- table.set_header(vec![Cell::new("Bpfd State")
+ table.set_header(vec![Cell::new("Bpfman State")
.add_attribute(comfy_table::Attribute::Bold)
.add_attribute(comfy_table::Attribute::Underlined)
.fg(Color::Green)]);
@@ -370,7 +370,7 @@ impl ProgTable {
table.add_row(vec!["Path:", &p]);
}
},
- // not a bpfd program
+ // not a bpfman program
None => {
table.add_row(vec!["NONE"]);
return Ok(ProgTable(table));
@@ -780,7 +780,7 @@ fn parse_global_arg(global_arg: &str) -> Result {
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// For output to bpfctl commands, eprintln() should be used. This includes
- // errors returned from bpfd. Every command should print some success indication
+ // errors returned from bpfman. Every command should print some success indication
// or a meaningful error.
// logs (warn!(), info!(), debug!()) can be used by developers to help debug
// failure cases. Being a CLI, they will be limited in their use. To see logs
@@ -790,7 +790,7 @@ async fn main() -> anyhow::Result<()> {
let cli = Cli::parse();
- let mut config = if let Ok(c) = fs::read_to_string(CFGPATH_BPFD_CONFIG) {
+ let mut config = if let Ok(c) = fs::read_to_string(CFGPATH_BPFMAN_CONFIG) {
c.parse().unwrap_or_else(|_| {
warn!("Unable to parse config file, using defaults");
Config::default()
@@ -833,7 +833,7 @@ fn select_channel(config: &mut Config) -> Option {
}
async fn execute_request(command: &Commands, channel: Channel) -> anyhow::Result<()> {
- let mut client = BpfdClient::new(channel);
+ let mut client = BpfmanClient::new(channel);
match command {
Commands::LoadFromFile(l) => {
let bytecode = match command.get_bytecode_location() {
@@ -864,7 +864,7 @@ async fn execute_request(command: &Commands, channel: Channel) -> anyhow::Result
});
let response = client.load(request).await?.into_inner();
- ProgTable::new_get_bpfd(&response.info)?.print();
+ ProgTable::new_get_bpfman(&response.info)?.print();
ProgTable::new_get_unsupported(&response.kernel_info)?.print();
}
@@ -897,7 +897,7 @@ async fn execute_request(command: &Commands, channel: Channel) -> anyhow::Result
});
let response = client.load(request).await?.into_inner();
- ProgTable::new_get_bpfd(&response.info)?.print();
+ ProgTable::new_get_bpfman(&response.info)?.print();
ProgTable::new_get_unsupported(&response.kernel_info)?.print();
}
@@ -918,7 +918,7 @@ async fn execute_request(command: &Commands, channel: Channel) -> anyhow::Result
.iter()
.map(|(k, v)| (k.to_owned(), v.to_owned()))
.collect(),
- bpfd_programs_only: Some(!l.all),
+ bpfman_programs_only: Some(!l.all),
});
let response = client.list(request).await?.into_inner();
let mut table = ProgTable::new_list();
@@ -935,7 +935,7 @@ async fn execute_request(command: &Commands, channel: Channel) -> anyhow::Result
let request = tonic::Request::new(GetRequest { id: *id });
let response = client.get(request).await?.into_inner();
- ProgTable::new_get_bpfd(&response.info)?.print();
+ ProgTable::new_get_bpfman(&response.info)?.print();
ProgTable::new_get_unsupported(&response.kernel_info)?.print();
}
Commands::PullBytecode(l) => {
diff --git a/bpfd-api/src/util.rs b/bpfd-api/src/util.rs
deleted file mode 100644
index 5127f9f27..000000000
--- a/bpfd-api/src/util.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
-
-pub mod directories {
- // The following directories are used by bpfd. They should be created by bpfd service
- // via the bpfd.service settings. They will be manually created in the case where bpfd
- // is not being run as a service.
- //
- // ConfigurationDirectory: /etc/bpfd/
- pub const CFGDIR_MODE: u32 = 0o6750;
- pub const CFGDIR: &str = "/etc/bpfd";
- pub const CFGDIR_STATIC_PROGRAMS: &str = "/etc/bpfd/programs.d";
- pub const CFGPATH_BPFD_CONFIG: &str = "/etc/bpfd/bpfd.toml";
- pub const CFGPATH_CA_CERTS_PEM: &str = "/etc/bpfd/certs/ca/ca.pem";
- pub const CFGPATH_CA_CERTS_KEY: &str = "/etc/bpfd/certs/ca/ca.key";
- pub const CFGPATH_BPFD_CERTS_PEM: &str = "/etc/bpfd/certs/bpfd/bpfd.pem";
- pub const CFGPATH_BPFD_CERTS_KEY: &str = "/etc/bpfd/certs/bpfd/bpfd.key";
- pub const CFGPATH_BPFD_CLIENT_CERTS_PEM: &str = "/etc/bpfd/certs/bpfd-client/bpfd-client.pem";
- pub const CFGPATH_BPFD_CLIENT_CERTS_KEY: &str = "/etc/bpfd/certs/bpfd-client/bpfd-client.key";
-
- // RuntimeDirectory: /run/bpfd/
- pub const RTDIR_MODE: u32 = 0o6770;
- pub const RTDIR: &str = "/run/bpfd";
- pub const RTDIR_XDP_DISPATCHER: &str = "/run/bpfd/dispatchers/xdp";
- pub const RTDIR_TC_INGRESS_DISPATCHER: &str = "/run/bpfd/dispatchers/tc-ingress";
- pub const RTDIR_TC_EGRESS_DISPATCHER: &str = "/run/bpfd/dispatchers/tc-egress";
- pub const RTDIR_FS: &str = "/run/bpfd/fs";
- pub const RTDIR_FS_TC_INGRESS: &str = "/run/bpfd/fs/tc-ingress";
- pub const RTDIR_FS_TC_EGRESS: &str = "/run/bpfd/fs/tc-egress";
- pub const RTDIR_FS_XDP: &str = "/run/bpfd/fs/xdp";
- pub const RTDIR_FS_MAPS: &str = "/run/bpfd/fs/maps";
- pub const RTDIR_PROGRAMS: &str = "/run/bpfd/programs";
- pub const RTPATH_BPFD_SOCKET: &str = "/run/bpfd/bpfd.sock";
- // The CSI socket must be in it's own sub directory so we can easily create a dedicated
- // K8s volume mount for it.
- pub const RTDIR_BPFD_CSI: &str = "/run/bpfd/csi";
- pub const RTPATH_BPFD_CSI_SOCKET: &str = "/run/bpfd/csi/csi.sock";
- pub const RTDIR_BPFD_CSI_FS: &str = "/run/bpfd/csi/fs";
-
- // StateDirectory: /var/lib/bpfd/
- pub const STDIR_MODE: u32 = 0o6770;
- pub const STDIR: &str = "/var/lib/bpfd";
- pub const STDIR_BYTECODE_IMAGE_CONTENT_STORE: &str = "/var/lib/bpfd/io.bpfd.image.content";
-}
diff --git a/bpfd-operator/config/bpfd-deployment/kustomization.yaml b/bpfd-operator/config/bpfd-deployment/kustomization.yaml
deleted file mode 100644
index fca3ae712..000000000
--- a/bpfd-operator/config/bpfd-deployment/kustomization.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-resources:
-- config.yaml
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-images:
-- name: quay.io/bpfd/bpfd
- newName: quay.io/bpfd/bpfd
- newTag: latest
-- name: quay.io/bpfd/bpfd-agent
- newName: quay.io/bpfd/bpfd-agent
- newTag: latest
diff --git a/bpfd-operator/config/bpfd-operator-deployment/kustomization.yaml b/bpfd-operator/config/bpfd-operator-deployment/kustomization.yaml
deleted file mode 100644
index 26828dd2e..000000000
--- a/bpfd-operator/config/bpfd-operator-deployment/kustomization.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-resources:
-- deployment.yaml
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-images:
-- name: quay.io/bpfd/bpfd-operator
- newName: quay.io/bpfd/bpfd-operator
- newTag: v0.3.1
diff --git a/bpfd-operator/config/rbac/auth_proxy_role.yaml b/bpfd-operator/config/rbac/auth_proxy_role.yaml
deleted file mode 100644
index cdc5b2e98..000000000
--- a/bpfd-operator/config/rbac/auth_proxy_role.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- labels:
- app.kubernetes.io/name: clusterrole
- app.kubernetes.io/instance: proxy-role
- app.kubernetes.io/component: kube-rbac-proxy
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
- app.kubernetes.io/managed-by: kustomize
- name: proxy-role
-rules:
-- apiGroups:
- - authentication.k8s.io
- resources:
- - tokenreviews
- verbs:
- - create
-- apiGroups:
- - authorization.k8s.io
- resources:
- - subjectaccessreviews
- verbs:
- - create
diff --git a/bpfd-operator/config/rbac/bpfprogram_editor_role.yaml b/bpfd-operator/config/rbac/bpfprogram_editor_role.yaml
deleted file mode 100644
index 3795db571..000000000
--- a/bpfd-operator/config/rbac/bpfprogram_editor_role.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
-# permissions for end users to edit bpfprograms.
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
- labels:
- app.kubernetes.io/name: clusterrole
- app.kubernetes.io/instance: bpfprogram-editor-role
- app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
- app.kubernetes.io/managed-by: kustomize
- name: bpfprogram-editor-role
-rules:
-- apiGroups:
- - bpfd.dev
- resources:
- - bpfprograms
- verbs:
- - create
- - delete
- - get
- - list
- - patch
- - update
- - watch
-- apiGroups:
- - bpfd.dev
- resources:
- - bpfprograms/status
- verbs:
- - get
diff --git a/bpfd-operator/config/rbac/kustomization.yaml b/bpfd-operator/config/rbac/kustomization.yaml
deleted file mode 100644
index 42c74d5aa..000000000
--- a/bpfd-operator/config/rbac/kustomization.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-resources:
-# All RBAC will be applied under this service account in
-# the deployment namespace. You may comment out this resource
-# if your manager will use a service account that exists at
-# runtime. Be sure to update RoleBinding and ClusterRoleBinding
-# subjects if changing service account names.
-- service_account.yaml
-- bpfd-agent/role.yaml
-- bpfd-operator/role.yaml
-- role_binding.yaml
-- leader_election_role.yaml
-- leader_election_role_binding.yaml
-- bpfprogram_editor_role.yaml
-- bpfprogram_viewer_role.yaml
-# Comment the following 4 lines if you want to disable
-# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
-# which protects your /metrics endpoint.
-- auth_proxy_service.yaml
-- auth_proxy_role.yaml
-- auth_proxy_role_binding.yaml
-- auth_proxy_client_clusterrole.yaml
diff --git a/bpfd-operator/config/rbac/leader_election_role.yaml b/bpfd-operator/config/rbac/leader_election_role.yaml
deleted file mode 100644
index 40797687b..000000000
--- a/bpfd-operator/config/rbac/leader_election_role.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
-# permissions to do leader election.
-apiVersion: rbac.authorization.k8s.io/v1
-kind: Role
-metadata:
- labels:
- app.kubernetes.io/name: role
- app.kubernetes.io/instance: leader-election-role
- app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
- app.kubernetes.io/managed-by: kustomize
- name: leader-election-role
-rules:
-- apiGroups:
- - ""
- resources:
- - configmaps
- verbs:
- - get
- - list
- - watch
- - create
- - update
- - patch
- - delete
-- apiGroups:
- - coordination.k8s.io
- resources:
- - leases
- verbs:
- - get
- - list
- - watch
- - create
- - update
- - patch
- - delete
-- apiGroups:
- - ""
- resources:
- - events
- verbs:
- - create
- - patch
diff --git a/bpfd-operator/config/samples/kustomization.yaml b/bpfd-operator/config/samples/kustomization.yaml
deleted file mode 100644
index 2a5aaa471..000000000
--- a/bpfd-operator/config/samples/kustomization.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-## Append samples you want in your CSV to this file as resources ##
-resources:
- - bpfd.io_v1alpha1_xdp_pass_xdpprogram.yaml
- - bpfd.io_v1alpha1_tracepoint_tracepointprogram.yaml
- - bpfd.io_v1alpha1_tc_pass_tcprogram.yaml
- - bpfd.io_v1alpha1_kprobe_kprobeprogram.yaml
- - bpfd.io_v1alpha1_uprobe_uprobeprogram.yaml
-# +kubebuilder:scaffold:manifestskustomizesamples
diff --git a/bpfd-operator/config/test/patch.yaml b/bpfd-operator/config/test/patch.yaml
deleted file mode 100644
index e4b477cf4..000000000
--- a/bpfd-operator/config/test/patch.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: config
- namespace: kube-system
-data:
- bpfd.agent.image: quay.io/bpfd/bpfd-agent:int-test
- bpfd.image: quay.io/bpfd/bpfd:int-test
- bpfd.log.level: debug
diff --git a/bpfd-operator/controllers/bpfd-agent/internal/test-utils/fake_bpfd_client.go b/bpfd-operator/controllers/bpfd-agent/internal/test-utils/fake_bpfd_client.go
deleted file mode 100644
index 728dcffdd..000000000
--- a/bpfd-operator/controllers/bpfd-agent/internal/test-utils/fake_bpfd_client.go
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
-Copyright 2022.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package testutils
-
-import (
- "context"
- "fmt"
- "math/rand"
-
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
- grpc "google.golang.org/grpc"
-)
-
-type BpfdClientFake struct {
- LoadRequests map[int]*gobpfd.LoadRequest
- UnloadRequests map[int]*gobpfd.UnloadRequest
- ListRequests []*gobpfd.ListRequest
- GetRequests map[int]*gobpfd.GetRequest
- Programs map[int]*gobpfd.ListResponse_ListResult
- PullBytecodeRequests map[int]*gobpfd.PullBytecodeRequest
-}
-
-func NewBpfdClientFake() *BpfdClientFake {
- return &BpfdClientFake{
- LoadRequests: map[int]*gobpfd.LoadRequest{},
- UnloadRequests: map[int]*gobpfd.UnloadRequest{},
- ListRequests: []*gobpfd.ListRequest{},
- GetRequests: map[int]*gobpfd.GetRequest{},
- Programs: map[int]*gobpfd.ListResponse_ListResult{},
- PullBytecodeRequests: map[int]*gobpfd.PullBytecodeRequest{},
- }
-}
-
-func NewBpfdClientFakeWithPrograms(programs map[int]*gobpfd.ListResponse_ListResult) *BpfdClientFake {
- return &BpfdClientFake{
- LoadRequests: map[int]*gobpfd.LoadRequest{},
- UnloadRequests: map[int]*gobpfd.UnloadRequest{},
- ListRequests: []*gobpfd.ListRequest{},
- GetRequests: map[int]*gobpfd.GetRequest{},
- Programs: programs,
- }
-}
-
-func (b *BpfdClientFake) Load(ctx context.Context, in *gobpfd.LoadRequest, opts ...grpc.CallOption) (*gobpfd.LoadResponse, error) {
- id := rand.Intn(100)
- b.LoadRequests[id] = in
-
- b.Programs[id] = loadRequestToListResult(in, uint32(id))
-
- return &gobpfd.LoadResponse{
- Info: b.Programs[id].Info,
- KernelInfo: b.Programs[id].KernelInfo,
- }, nil
-}
-
-func (b *BpfdClientFake) Unload(ctx context.Context, in *gobpfd.UnloadRequest, opts ...grpc.CallOption) (*gobpfd.UnloadResponse, error) {
- b.UnloadRequests[int(in.Id)] = in
- delete(b.Programs, int(in.Id))
-
- return &gobpfd.UnloadResponse{}, nil
-}
-
-func (b *BpfdClientFake) List(ctx context.Context, in *gobpfd.ListRequest, opts ...grpc.CallOption) (*gobpfd.ListResponse, error) {
- b.ListRequests = append(b.ListRequests, in)
- results := &gobpfd.ListResponse{Results: []*gobpfd.ListResponse_ListResult{}}
- for _, v := range b.Programs {
- results.Results = append(results.Results, v)
- }
- return results, nil
-}
-
-func loadRequestToListResult(loadReq *gobpfd.LoadRequest, id uint32) *gobpfd.ListResponse_ListResult {
- mapOwnerId := loadReq.GetMapOwnerId()
- programInfo := gobpfd.ProgramInfo{
- Name: loadReq.GetName(),
- Bytecode: loadReq.GetBytecode(),
- Attach: loadReq.GetAttach(),
- GlobalData: loadReq.GetGlobalData(),
- MapOwnerId: &mapOwnerId,
- Metadata: loadReq.GetMetadata(),
- }
- kernelInfo := gobpfd.KernelProgramInfo{
- Id: id,
- ProgramType: loadReq.GetProgramType(),
- }
-
- return &gobpfd.ListResponse_ListResult{
- Info: &programInfo,
- KernelInfo: &kernelInfo,
- }
-}
-
-func (b *BpfdClientFake) Get(ctx context.Context, in *gobpfd.GetRequest, opts ...grpc.CallOption) (*gobpfd.GetResponse, error) {
- if b.Programs[int(in.Id)] != nil {
- return &gobpfd.GetResponse{
- Info: b.Programs[int(in.Id)].Info,
- KernelInfo: b.Programs[int(in.Id)].KernelInfo,
- }, nil
- } else {
- return nil, fmt.Errorf("Requested program does not exist")
- }
-}
-
-func (b *BpfdClientFake) PullBytecode(ctx context.Context, in *gobpfd.PullBytecodeRequest, opts ...grpc.CallOption) (*gobpfd.PullBytecodeResponse, error) {
- return &gobpfd.PullBytecodeResponse{}, nil
-}
diff --git a/bpfd-operator/controllers/bpfd-operator/configmap.go b/bpfd-operator/controllers/bpfd-operator/configmap.go
deleted file mode 100644
index 74369243f..000000000
--- a/bpfd-operator/controllers/bpfd-operator/configmap.go
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
-Copyright 2022.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-*/
-
-package bpfdoperator
-
-import (
- "context"
- "io"
- "os"
- "reflect"
-
- appsv1 "k8s.io/api/apps/v1"
- corev1 "k8s.io/api/core/v1"
- storagev1 "k8s.io/api/storage/v1"
- "k8s.io/apimachinery/pkg/api/errors"
- "k8s.io/apimachinery/pkg/types"
- "k8s.io/client-go/kubernetes/scheme"
- ctrl "sigs.k8s.io/controller-runtime"
- "sigs.k8s.io/controller-runtime/pkg/event"
- "sigs.k8s.io/controller-runtime/pkg/predicate"
-
- "sigs.k8s.io/controller-runtime/pkg/builder"
- "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
- "sigs.k8s.io/controller-runtime/pkg/log"
-
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
-)
-
-// +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete
-// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create
-// +kubebuilder:rbac:groups=storage.k8s.io,resources=csidrivers,verbs=get;list;watch;create;delete
-// +kubebuilder:rbac:groups=bpfd.dev,resources=configmaps/finalizers,verbs=update
-
-type BpfdConfigReconciler struct {
- ReconcilerCommon
- BpfdStandardDeployment string
- CsiDriverDeployment string
-}
-
-// SetupWithManager sets up the controller with the Manager.
-func (r *BpfdConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
- return ctrl.NewControllerManagedBy(mgr).
- // Watch the bpfd-daemon configmap to configure the bpfd deployment across the whole cluster
- For(&corev1.ConfigMap{},
- builder.WithPredicates(bpfdConfigPredicate())).
- // This only watches the bpfd daemonset which is stored on disk and will be created
- // by this operator. We're doing a manual watch since the operator (As a controller)
- // doesn't really want to have an owner-ref since we don't have a CRD for
- // configuring it, only a configmap.
- Owns(
- &appsv1.DaemonSet{},
- builder.WithPredicates(bpfdDaemonPredicate())).
- Complete(r)
-}
-
-func (r *BpfdConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
- r.Logger = log.FromContext(ctx)
-
- bpfdConfig := &corev1.ConfigMap{}
- if err := r.Get(ctx, req.NamespacedName, bpfdConfig); err != nil {
- if !errors.IsNotFound(err) {
- r.Logger.Error(err, "failed getting bpfd config", "ReconcileObject", req.NamespacedName)
- return ctrl.Result{}, nil
- }
- } else {
- if updated := controllerutil.AddFinalizer(bpfdConfig, internal.BpfdOperatorFinalizer); updated {
- if err := r.Update(ctx, bpfdConfig); err != nil {
- r.Logger.Error(err, "failed adding bpfd-operator finalizer to bpfd config")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
- } else {
- return r.ReconcileBpfdConfig(ctx, req, bpfdConfig)
- }
- }
-
- return ctrl.Result{}, nil
-}
-
-func (r *BpfdConfigReconciler) ReconcileBpfdConfig(ctx context.Context, req ctrl.Request, bpfdConfig *corev1.ConfigMap) (ctrl.Result, error) {
- bpfdDeployment := &appsv1.DaemonSet{}
-
- staticBpfdDeployment := LoadAndConfigureBpfdDs(bpfdConfig, r.BpfdStandardDeployment)
- r.Logger.V(1).Info("StaticBpfdDeployment with CSI", "DS", staticBpfdDeployment)
- bpfdCsiDriver := &storagev1.CSIDriver{}
- // one-shot try to create bpfd's CSIDriver object if it doesn't exist, does not re-trigger reconcile.
- if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: internal.BpfdCsiDriverName}, bpfdCsiDriver); err != nil {
- if errors.IsNotFound(err) {
- bpfdCsiDriver = LoadCsiDriver(r.CsiDriverDeployment)
-
- r.Logger.Info("Creating Bpfd csi driver object")
- if err := r.Create(ctx, bpfdCsiDriver); err != nil {
- r.Logger.Error(err, "Failed to create Bpfd csi driver")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
- }
- }
-
- if err := r.Get(ctx, types.NamespacedName{Namespace: bpfdConfig.Namespace, Name: internal.BpfdDsName}, bpfdDeployment); err != nil {
- if errors.IsNotFound(err) {
- r.Logger.Info("Creating Bpfd Daemon")
- // Causes Requeue
- if err := r.Create(ctx, staticBpfdDeployment); err != nil {
- r.Logger.Error(err, "Failed to create Bpfd Daemon")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
- return ctrl.Result{}, nil
- }
-
- r.Logger.Error(err, "Failed to get bpfd daemon")
- return ctrl.Result{}, nil
- }
-
- if !bpfdConfig.DeletionTimestamp.IsZero() {
- r.Logger.Info("Deleting bpfd daemon and config")
- controllerutil.RemoveFinalizer(bpfdDeployment, internal.BpfdOperatorFinalizer)
-
- err := r.Update(ctx, bpfdDeployment)
- if err != nil {
- r.Logger.Error(err, "failed removing bpfd-operator finalizer from bpfdDs")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
-
- bpfdCsiDriver := &storagev1.CSIDriver{}
-
- // one-shot try to delete bpfd's CSIDriver object only if it exists.
- if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: internal.BpfdCsiDriverName}, bpfdCsiDriver); err == nil {
- r.Logger.Info("Deleting Bpfd csi driver object")
- if err := r.Delete(ctx, bpfdCsiDriver); err != nil {
- r.Logger.Error(err, "Failed to delete Bpfd csi driver")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
- }
-
- if err = r.Delete(ctx, bpfdDeployment); err != nil {
- r.Logger.Error(err, "failed deleting bpfd DS")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
-
- controllerutil.RemoveFinalizer(bpfdConfig, internal.BpfdOperatorFinalizer)
- err = r.Update(ctx, bpfdConfig)
- if err != nil {
- r.Logger.Error(err, "failed removing bpfd-operator finalizer from bpfd config")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
-
- return ctrl.Result{}, nil
- }
-
- if !reflect.DeepEqual(staticBpfdDeployment.Spec, bpfdDeployment.Spec) {
- r.Logger.Info("Reconciling bpfd")
-
- // Causes Requeue
- if err := r.Update(ctx, staticBpfdDeployment); err != nil {
- r.Logger.Error(err, "failed reconciling bpfd deployment")
- return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
- }
- }
-
- return ctrl.Result{}, nil
-}
-
-// Only reconcile on bpfd-daemon Daemonset events.
-func bpfdDaemonPredicate() predicate.Funcs {
- return predicate.Funcs{
- GenericFunc: func(e event.GenericEvent) bool {
- return e.Object.GetName() == internal.BpfdDsName
- },
- CreateFunc: func(e event.CreateEvent) bool {
- return e.Object.GetName() == internal.BpfdDsName
- },
- UpdateFunc: func(e event.UpdateEvent) bool {
- return e.ObjectNew.GetName() == internal.BpfdDsName
- },
- DeleteFunc: func(e event.DeleteEvent) bool {
- return e.Object.GetName() == internal.BpfdDsName
- },
- }
-}
-
-// Only reconcile on bpfd-config configmap events.
-func bpfdConfigPredicate() predicate.Funcs {
- return predicate.Funcs{
- GenericFunc: func(e event.GenericEvent) bool {
- return e.Object.GetName() == internal.BpfdConfigName
- },
- CreateFunc: func(e event.CreateEvent) bool {
- return e.Object.GetName() == internal.BpfdConfigName
- },
- UpdateFunc: func(e event.UpdateEvent) bool {
- return e.ObjectNew.GetName() == internal.BpfdConfigName
- },
- DeleteFunc: func(e event.DeleteEvent) bool {
- return e.Object.GetName() == internal.BpfdConfigName
- },
- }
-}
-
-func LoadCsiDriver(path string) *storagev1.CSIDriver {
- // Load static bpfd deployment from disk
- file, err := os.Open(path)
- if err != nil {
- panic(err)
- }
-
- b, err := io.ReadAll(file)
- if err != nil {
- panic(err)
- }
-
- decode := scheme.Codecs.UniversalDeserializer().Decode
- obj, _, _ := decode(b, nil, nil)
-
- return obj.(*storagev1.CSIDriver)
-}
-
-func LoadAndConfigureBpfdDs(config *corev1.ConfigMap, path string) *appsv1.DaemonSet {
- // Load static bpfd deployment from disk
- file, err := os.Open(path)
- if err != nil {
- panic(err)
- }
-
- b, err := io.ReadAll(file)
- if err != nil {
- panic(err)
- }
-
- decode := scheme.Codecs.UniversalDeserializer().Decode
- obj, _, _ := decode(b, nil, nil)
-
- staticBpfdDeployment := obj.(*appsv1.DaemonSet)
-
- // Runtime Configurable fields
- bpfdImage := config.Data["bpfd.image"]
- bpfdAgentImage := config.Data["bpfd.agent.image"]
- bpfdLogLevel := config.Data["bpfd.log.level"]
- bpfdAgentLogLevel := config.Data["bpfd.agent.log.level"]
-
- // Annotate the log level on the ds so we get automatic restarts on changes.
- if staticBpfdDeployment.Spec.Template.ObjectMeta.Annotations == nil {
- staticBpfdDeployment.Spec.Template.ObjectMeta.Annotations = make(map[string]string)
- }
-
- staticBpfdDeployment.Spec.Template.ObjectMeta.Annotations["bpfd.dev.bpfd.loglevel"] = bpfdLogLevel
- staticBpfdDeployment.Spec.Template.ObjectMeta.Annotations["bpfd.dev.bpfd.agent.loglevel"] = bpfdAgentLogLevel
- staticBpfdDeployment.Name = "bpfd-daemon"
- staticBpfdDeployment.Namespace = config.Namespace
- staticBpfdDeployment.Spec.Template.Spec.Containers[0].Image = bpfdImage
- staticBpfdDeployment.Spec.Template.Spec.Containers[1].Image = bpfdAgentImage
- controllerutil.AddFinalizer(staticBpfdDeployment, internal.BpfdOperatorFinalizer)
-
- return staticBpfdDeployment
-}
diff --git a/bpfd-api/Cargo.toml b/bpfman-api/Cargo.toml
similarity index 82%
rename from bpfd-api/Cargo.toml
rename to bpfman-api/Cargo.toml
index 8f2c73f52..3502e9fe8 100644
--- a/bpfd-api/Cargo.toml
+++ b/bpfman-api/Cargo.toml
@@ -1,9 +1,9 @@
[package]
-description = "gRPC bindings to the bpfd API"
+description = "gRPC bindings to the bpfman API"
edition = "2021"
license = "Apache-2.0"
-name = "bpfd-api"
-repository = "https://github.com/bpfd-dev/bpfd"
+name = "bpfman-api"
+repository = "https://github.com/bpfman/bpfman"
version = "0.3.1"
[dependencies]
diff --git a/bpfd-api/src/bpfd.v1.rs b/bpfman-api/src/bpfman.v1.rs
similarity index 78%
rename from bpfd-api/src/bpfd.v1.rs
rename to bpfman-api/src/bpfman.v1.rs
index bb1a77752..835f8d3ff 100644
--- a/bpfd-api/src/bpfd.v1.rs
+++ b/bpfman-api/src/bpfman.v1.rs
@@ -73,10 +73,8 @@ pub struct ProgramInfo {
#[prost(message, optional, tag = "3")]
pub attach: ::core::option::Option,
#[prost(map = "string, bytes", tag = "4")]
- pub global_data: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::vec::Vec,
- >,
+ pub global_data:
+ ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>,
#[prost(uint32, optional, tag = "5")]
pub map_owner_id: ::core::option::Option,
#[prost(string, tag = "6")]
@@ -84,10 +82,8 @@ pub struct ProgramInfo {
#[prost(string, repeated, tag = "7")]
pub map_used_by: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "8")]
- pub metadata: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::string::String,
- >,
+ pub metadata:
+ ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -184,15 +180,11 @@ pub struct LoadRequest {
#[prost(message, optional, tag = "4")]
pub attach: ::core::option::Option,
#[prost(map = "string, string", tag = "5")]
- pub metadata: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::string::String,
- >,
+ pub metadata:
+ ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
#[prost(map = "string, bytes", tag = "6")]
- pub global_data: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::vec::Vec,
- >,
+ pub global_data:
+ ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::vec::Vec>,
#[prost(string, optional, tag = "7")]
pub uuid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(uint32, optional, tag = "8")]
@@ -221,12 +213,10 @@ pub struct ListRequest {
#[prost(uint32, optional, tag = "1")]
pub program_type: ::core::option::Option,
#[prost(bool, optional, tag = "2")]
- pub bpfd_programs_only: ::core::option::Option,
+ pub bpfman_programs_only: ::core::option::Option,
#[prost(map = "string, string", tag = "3")]
- pub match_metadata: ::std::collections::HashMap<
- ::prost::alloc::string::String,
- ::prost::alloc::string::String,
- >,
+ pub match_metadata:
+ ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
@@ -269,15 +259,15 @@ pub struct GetResponse {
pub kernel_info: ::core::option::Option,
}
/// Generated client implementations.
-pub mod bpfd_client {
+pub mod bpfman_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
- use tonic::codegen::*;
use tonic::codegen::http::Uri;
+ use tonic::codegen::*;
#[derive(Debug, Clone)]
- pub struct BpfdClient {
+ pub struct BpfmanClient {
inner: tonic::client::Grpc,
}
- impl BpfdClient
+ impl BpfmanClient
where
T: tonic::client::GrpcService,
T::Error: Into,
@@ -295,7 +285,7 @@ pub mod bpfd_client {
pub fn with_interceptor(
inner: T,
interceptor: F,
- ) -> BpfdClient>
+ ) -> BpfmanClient>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
@@ -305,11 +295,10 @@ pub mod bpfd_client {
>::ResponseBody,
>,
>,
- ,
- >>::Error: Into + Send + Sync,
+ >>::Error:
+ Into + Send + Sync,
{
- BpfdClient::new(InterceptedService::new(inner, interceptor))
+ BpfmanClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
@@ -346,111 +335,97 @@ pub mod bpfd_client {
&mut self,
request: impl tonic::IntoRequest,
) -> std::result::Result, tonic::Status> {
- self.inner
- .ready()
- .await
- .map_err(|e| {
- tonic::Status::new(
- tonic::Code::Unknown,
- format!("Service was not ready: {}", e.into()),
- )
- })?;
+ self.inner.ready().await.map_err(|e| {
+ tonic::Status::new(
+ tonic::Code::Unknown,
+ format!("Service was not ready: {}", e.into()),
+ )
+ })?;
let codec = tonic::codec::ProstCodec::default();
- let path = http::uri::PathAndQuery::from_static("/bpfd.v1.Bpfd/Load");
+ let path = http::uri::PathAndQuery::from_static("/bpfman.v1.Bpfman/Load");
let mut req = request.into_request();
- req.extensions_mut().insert(GrpcMethod::new("bpfd.v1.Bpfd", "Load"));
+ req.extensions_mut()
+ .insert(GrpcMethod::new("bpfman.v1.Bpfman", "Load"));
self.inner.unary(req, path, codec).await
}
pub async fn unload(
&mut self,
request: impl tonic::IntoRequest,
) -> std::result::Result, tonic::Status> {
- self.inner
- .ready()
- .await
- .map_err(|e| {
- tonic::Status::new(
- tonic::Code::Unknown,
- format!("Service was not ready: {}", e.into()),
- )
- })?;
+ self.inner.ready().await.map_err(|e| {
+ tonic::Status::new(
+ tonic::Code::Unknown,
+ format!("Service was not ready: {}", e.into()),
+ )
+ })?;
let codec = tonic::codec::ProstCodec::default();
- let path = http::uri::PathAndQuery::from_static("/bpfd.v1.Bpfd/Unload");
+ let path = http::uri::PathAndQuery::from_static("/bpfman.v1.Bpfman/Unload");
let mut req = request.into_request();
- req.extensions_mut().insert(GrpcMethod::new("bpfd.v1.Bpfd", "Unload"));
+ req.extensions_mut()
+ .insert(GrpcMethod::new("bpfman.v1.Bpfman", "Unload"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest,
) -> std::result::Result, tonic::Status> {
- self.inner
- .ready()
- .await
- .map_err(|e| {
- tonic::Status::new(
- tonic::Code::Unknown,
- format!("Service was not ready: {}", e.into()),
- )
- })?;
+ self.inner.ready().await.map_err(|e| {
+ tonic::Status::new(
+ tonic::Code::Unknown,
+ format!("Service was not ready: {}", e.into()),
+ )
+ })?;
let codec = tonic::codec::ProstCodec::default();
- let path = http::uri::PathAndQuery::from_static("/bpfd.v1.Bpfd/List");
+ let path = http::uri::PathAndQuery::from_static("/bpfman.v1.Bpfman/List");
let mut req = request.into_request();
- req.extensions_mut().insert(GrpcMethod::new("bpfd.v1.Bpfd", "List"));
+ req.extensions_mut()
+ .insert(GrpcMethod::new("bpfman.v1.Bpfman", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn pull_bytecode(
&mut self,
request: impl tonic::IntoRequest,
- ) -> std::result::Result<
- tonic::Response,
- tonic::Status,
- > {
- self.inner
- .ready()
- .await
- .map_err(|e| {
- tonic::Status::new(
- tonic::Code::Unknown,
- format!("Service was not ready: {}", e.into()),
- )
- })?;
+ ) -> std::result::Result, tonic::Status>
+ {
+ self.inner.ready().await.map_err(|e| {
+ tonic::Status::new(
+ tonic::Code::Unknown,
+ format!("Service was not ready: {}", e.into()),
+ )
+ })?;
let codec = tonic::codec::ProstCodec::default();
- let path = http::uri::PathAndQuery::from_static(
- "/bpfd.v1.Bpfd/PullBytecode",
- );
+ let path = http::uri::PathAndQuery::from_static("/bpfman.v1.Bpfman/PullBytecode");
let mut req = request.into_request();
- req.extensions_mut().insert(GrpcMethod::new("bpfd.v1.Bpfd", "PullBytecode"));
+ req.extensions_mut()
+ .insert(GrpcMethod::new("bpfman.v1.Bpfman", "PullBytecode"));
self.inner.unary(req, path, codec).await
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest,
) -> std::result::Result, tonic::Status> {
- self.inner
- .ready()
- .await
- .map_err(|e| {
- tonic::Status::new(
- tonic::Code::Unknown,
- format!("Service was not ready: {}", e.into()),
- )
- })?;
+ self.inner.ready().await.map_err(|e| {
+ tonic::Status::new(
+ tonic::Code::Unknown,
+ format!("Service was not ready: {}", e.into()),
+ )
+ })?;
let codec = tonic::codec::ProstCodec::default();
- let path = http::uri::PathAndQuery::from_static("/bpfd.v1.Bpfd/Get");
+ let path = http::uri::PathAndQuery::from_static("/bpfman.v1.Bpfman/Get");
let mut req = request.into_request();
- req.extensions_mut().insert(GrpcMethod::new("bpfd.v1.Bpfd", "Get"));
+ req.extensions_mut()
+ .insert(GrpcMethod::new("bpfman.v1.Bpfman", "Get"));
self.inner.unary(req, path, codec).await
}
}
}
/// Generated server implementations.
-pub mod bpfd_server {
+pub mod bpfman_server {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
- /// Generated trait containing gRPC methods that should be implemented for use with BpfdServer.
+ /// Generated trait containing gRPC methods that should be implemented for use with BpfmanServer.
#[async_trait]
- pub trait Bpfd: Send + Sync + 'static {
+ pub trait Bpfman: Send + Sync + 'static {
async fn load(
&self,
request: tonic::Request,
@@ -466,17 +441,14 @@ pub mod bpfd_server {
async fn pull_bytecode(
&self,
request: tonic::Request,
- ) -> std::result::Result<
- tonic::Response,
- tonic::Status,
- >;
+ ) -> std::result::Result, tonic::Status>;
async fn get(
&self,
request: tonic::Request,
) -> std::result::Result, tonic::Status>;
}
#[derive(Debug)]
- pub struct BpfdServer {
+ pub struct BpfmanServer {
inner: _Inner,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
@@ -484,7 +456,7 @@ pub mod bpfd_server {
max_encoding_message_size: Option,
}
struct _Inner(Arc);
- impl BpfdServer {
+ impl BpfmanServer {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
@@ -498,10 +470,7 @@ pub mod bpfd_server {
max_encoding_message_size: None,
}
}
- pub fn with_interceptor(
- inner: T,
- interceptor: F,
- ) -> InterceptedService
+ pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService
where
F: tonic::service::Interceptor,
{
@@ -536,9 +505,9 @@ pub mod bpfd_server {
self
}
}
- impl tonic::codegen::Service> for BpfdServer
+ impl tonic::codegen::Service> for BpfmanServer
where
- T: Bpfd,
+ T: Bpfman,
B: Body + Send + 'static,
B::Error: Into + Send + 'static,
{
@@ -554,24 +523,18 @@ pub mod bpfd_server {
fn call(&mut self, req: http::Request) -> Self::Future {
let inner = self.inner.clone();
match req.uri().path() {
- "/bpfd.v1.Bpfd/Load" => {
+ "/bpfman.v1.Bpfman/Load" => {
#[allow(non_camel_case_types)]
- struct LoadSvc(pub Arc);
- impl tonic::server::UnaryService
- for LoadSvc {
+ struct LoadSvc(pub Arc);
+ impl tonic::server::UnaryService for LoadSvc {
type Response = super::LoadResponse;
- type Future = BoxFuture<
- tonic::Response,
- tonic::Status,
- >;
+ type Future = BoxFuture, tonic::Status>;
fn call(
&mut self,
request: tonic::Request,
) -> Self::Future {
let inner = Arc::clone(&self.0);
- let fut = async move {
- ::load(&inner, request).await
- };
+ let fut = async move { ::load(&inner, request).await };
Box::pin(fut)
}
}
@@ -598,24 +561,18 @@ pub mod bpfd_server {
};
Box::pin(fut)
}
- "/bpfd.v1.Bpfd/Unload" => {
+ "/bpfman.v1.Bpfman/Unload" => {
#[allow(non_camel_case_types)]
- struct UnloadSvc(pub Arc);
- impl tonic::server::UnaryService
- for UnloadSvc {
+ struct UnloadSvc(pub Arc);
+ impl tonic::server::UnaryService for UnloadSvc {
type Response = super::UnloadResponse;
- type Future = BoxFuture<
- tonic::Response,
- tonic::Status,
- >;
+ type Future = BoxFuture, tonic::Status>;
fn call(
&mut self,
request: tonic::Request,
) -> Self::Future {
let inner = Arc::clone(&self.0);
- let fut = async move {
- ::unload(&inner, request).await
- };
+ let fut = async move { ::unload(&inner, request).await };
Box::pin(fut)
}
}
@@ -642,24 +599,18 @@ pub mod bpfd_server {
};
Box::pin(fut)
}
- "/bpfd.v1.Bpfd/List" => {
+ "/bpfman.v1.Bpfman/List" => {
#[allow(non_camel_case_types)]
- struct ListSvc(pub Arc);
- impl tonic::server::UnaryService
- for ListSvc {
+ struct ListSvc(pub Arc);
+ impl tonic::server::UnaryService for ListSvc {
type Response = super::ListResponse;
- type Future = BoxFuture<
- tonic::Response,
- tonic::Status,
- >;
+ type Future = BoxFuture, tonic::Status>;
fn call(
&mut self,
request: tonic::Request,
) -> Self::Future {
let inner = Arc::clone(&self.0);
- let fut = async move {
- ::list(&inner, request).await
- };
+ let fut = async move { ::list(&inner, request).await };
Box::pin(fut)
}
}
@@ -686,24 +637,19 @@ pub mod bpfd_server {
};
Box::pin(fut)
}
- "/bpfd.v1.Bpfd/PullBytecode" => {
+ "/bpfman.v1.Bpfman/PullBytecode" => {
#[allow(non_camel_case_types)]
- struct PullBytecodeSvc(pub Arc);
- impl tonic::server::UnaryService
- for PullBytecodeSvc {
+ struct PullBytecodeSvc(pub Arc);
+ impl tonic::server::UnaryService for PullBytecodeSvc {
type Response = super::PullBytecodeResponse;
- type Future = BoxFuture<
- tonic::Response,
- tonic::Status,
- >;
+ type Future = BoxFuture, tonic::Status>;
fn call(
&mut self,
request: tonic::Request,
) -> Self::Future {
let inner = Arc::clone(&self.0);
- let fut = async move {
- ::pull_bytecode(&inner, request).await
- };
+ let fut =
+ async move { ::pull_bytecode(&inner, request).await };
Box::pin(fut)
}
}
@@ -730,24 +676,18 @@ pub mod bpfd_server {
};
Box::pin(fut)
}
- "/bpfd.v1.Bpfd/Get" => {
+ "/bpfman.v1.Bpfman/Get" => {
#[allow(non_camel_case_types)]
- struct GetSvc(pub Arc);
- impl tonic::server::UnaryService
- for GetSvc {
+ struct GetSvc(pub Arc);
+ impl tonic::server::UnaryService for GetSvc {
type Response = super::GetResponse;
- type Future = BoxFuture<
- tonic::Response,
- tonic::Status,
- >;
+ type Future = BoxFuture, tonic::Status>;
fn call(
&mut self,
request: tonic::Request,
) -> Self::Future {
let inner = Arc::clone(&self.0);
- let fut = async move {
- ::get(&inner, request).await
- };
+ let fut = async move { ::get(&inner, request).await };
Box::pin(fut)
}
}
@@ -774,22 +714,18 @@ pub mod bpfd_server {
};
Box::pin(fut)
}
- _ => {
- Box::pin(async move {
- Ok(
- http::Response::builder()
- .status(200)
- .header("grpc-status", "12")
- .header("content-type", "application/grpc")
- .body(empty_body())
- .unwrap(),
- )
- })
- }
+ _ => Box::pin(async move {
+ Ok(http::Response::builder()
+ .status(200)
+ .header("grpc-status", "12")
+ .header("content-type", "application/grpc")
+ .body(empty_body())
+ .unwrap())
+ }),
}
}
}
- impl Clone for BpfdServer {
+ impl Clone for BpfmanServer {
fn clone(&self) -> Self {
let inner = self.inner.clone();
Self {
@@ -801,7 +737,7 @@ pub mod bpfd_server {
}
}
}
- impl Clone for _Inner {
+ impl Clone for _Inner {
fn clone(&self) -> Self {
Self(Arc::clone(&self.0))
}
@@ -811,7 +747,7 @@ pub mod bpfd_server {
write!(f, "{:?}", self.0)
}
}
- impl tonic::server::NamedService for BpfdServer {
- const NAME: &'static str = "bpfd.v1.Bpfd";
+ impl tonic::server::NamedService for BpfmanServer {
+ const NAME: &'static str = "bpfman.v1.Bpfman";
}
}
diff --git a/bpfd-api/src/config.rs b/bpfman-api/src/config.rs
similarity index 95%
rename from bpfd-api/src/config.rs
rename to bpfman-api/src/config.rs
index 8c9cc731e..eeb64aa7c 100644
--- a/bpfd-api/src/config.rs
+++ b/bpfman-api/src/config.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{collections::HashMap, str::FromStr};
@@ -113,7 +113,7 @@ impl Default for Endpoint {
}
fn default_unix() -> String {
- RTPATH_BPFD_SOCKET.to_string()
+ RTPATH_BPFMAN_SOCKET.to_string()
}
fn default_enabled() -> bool {
@@ -234,21 +234,21 @@ mod test {
[[grpc.endpoints]]
type = "unix"
enabled = true
- path = "/run/bpfd/bpfd.sock"
+ path = "/run/bpfman/bpfman.sock"
[[grpc.endpoints]]
type = "unix"
enabled = true
- path = "/run/bpfd/bpfd2.sock"
+ path = "/run/bpfman/bpfman2.sock"
"#;
let expected_endpoints: Vec = vec![
Endpoint::Unix {
- path: String::from("/run/bpfd/bpfd.sock"),
+ path: String::from("/run/bpfman/bpfman.sock"),
enabled: true,
},
Endpoint::Unix {
- path: String::from("/run/bpfd/bpfd2.sock"),
+ path: String::from("/run/bpfman/bpfman2.sock"),
enabled: true,
},
];
diff --git a/bpfd-api/src/lib.rs b/bpfman-api/src/lib.rs
similarity index 99%
rename from bpfd-api/src/lib.rs
rename to bpfman-api/src/lib.rs
index e01020f0c..c706bbd3a 100644
--- a/bpfd-api/src/lib.rs
+++ b/bpfman-api/src/lib.rs
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
pub mod config;
pub mod util;
-#[path = "bpfd.v1.rs"]
+#[path = "bpfman.v1.rs"]
#[rustfmt::skip]
#[allow(clippy::all)]
pub mod v1;
diff --git a/bpfman-api/src/util.rs b/bpfman-api/src/util.rs
new file mode 100644
index 000000000..cf6dcad3a
--- /dev/null
+++ b/bpfman-api/src/util.rs
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright Authors of bpfman
+
+pub mod directories {
+ // The following directories are used by bpfman. They should be created by bpfman service
+ // via the bpfman.service settings. They will be manually created in the case where bpfman
+ // is not being run as a service.
+ //
+ // ConfigurationDirectory: /etc/bpfman/
+ pub const CFGDIR_MODE: u32 = 0o6750;
+ pub const CFGDIR: &str = "/etc/bpfman";
+ pub const CFGDIR_STATIC_PROGRAMS: &str = "/etc/bpfman/programs.d";
+ pub const CFGPATH_BPFMAN_CONFIG: &str = "/etc/bpfman/bpfman.toml";
+ pub const CFGPATH_CA_CERTS_PEM: &str = "/etc/bpfman/certs/ca/ca.pem";
+ pub const CFGPATH_CA_CERTS_KEY: &str = "/etc/bpfman/certs/ca/ca.key";
+ pub const CFGPATH_BPFMAN_CERTS_PEM: &str = "/etc/bpfman/certs/bpfman/bpfman.pem";
+ pub const CFGPATH_BPFMAN_CERTS_KEY: &str = "/etc/bpfman/certs/bpfman/bpfman.key";
+ pub const CFGPATH_BPFMAN_CLIENT_CERTS_PEM: &str =
+ "/etc/bpfman/certs/bpfman-client/bpfman-client.pem";
+ pub const CFGPATH_BPFMAN_CLIENT_CERTS_KEY: &str =
+ "/etc/bpfman/certs/bpfman-client/bpfman-client.key";
+
+ // RuntimeDirectory: /run/bpfman/
+ pub const RTDIR_MODE: u32 = 0o6770;
+ pub const RTDIR: &str = "/run/bpfman";
+ pub const RTDIR_XDP_DISPATCHER: &str = "/run/bpfman/dispatchers/xdp";
+ pub const RTDIR_TC_INGRESS_DISPATCHER: &str = "/run/bpfman/dispatchers/tc-ingress";
+ pub const RTDIR_TC_EGRESS_DISPATCHER: &str = "/run/bpfman/dispatchers/tc-egress";
+ pub const RTDIR_FS: &str = "/run/bpfman/fs";
+ pub const RTDIR_FS_TC_INGRESS: &str = "/run/bpfman/fs/tc-ingress";
+ pub const RTDIR_FS_TC_EGRESS: &str = "/run/bpfman/fs/tc-egress";
+ pub const RTDIR_FS_XDP: &str = "/run/bpfman/fs/xdp";
+ pub const RTDIR_FS_MAPS: &str = "/run/bpfman/fs/maps";
+ pub const RTDIR_PROGRAMS: &str = "/run/bpfman/programs";
+ pub const RTPATH_BPFMAN_SOCKET: &str = "/run/bpfman/bpfman.sock";
+ // The CSI socket must be in it's own sub directory so we can easily create a dedicated
+ // K8s volume mount for it.
+ pub const RTDIR_BPFMAN_CSI: &str = "/run/bpfman/csi";
+ pub const RTPATH_BPFMAN_CSI_SOCKET: &str = "/run/bpfman/csi/csi.sock";
+ pub const RTDIR_BPFMAN_CSI_FS: &str = "/run/bpfman/csi/fs";
+
+ // StateDirectory: /var/lib/bpfman/
+ pub const STDIR_MODE: u32 = 0o6770;
+ pub const STDIR: &str = "/var/lib/bpfman";
+ pub const STDIR_BYTECODE_IMAGE_CONTENT_STORE: &str = "/var/lib/bpfman/io.bpfman.image.content";
+}
diff --git a/bpfd-operator/.dockerignore b/bpfman-operator/.dockerignore
similarity index 100%
rename from bpfd-operator/.dockerignore
rename to bpfman-operator/.dockerignore
diff --git a/bpfd-operator/.gitignore b/bpfman-operator/.gitignore
similarity index 100%
rename from bpfd-operator/.gitignore
rename to bpfman-operator/.gitignore
diff --git a/bpfd-operator/Containerfile.bpfd-agent b/bpfman-operator/Containerfile.bpfman-agent
similarity index 80%
rename from bpfd-operator/Containerfile.bpfd-agent
rename to bpfman-operator/Containerfile.bpfman-agent
index f10f04b14..00e26730c 100644
--- a/bpfd-operator/Containerfile.bpfd-agent
+++ b/bpfman-operator/Containerfile.bpfman-agent
@@ -1,9 +1,9 @@
# Build the manager binary
-FROM golang:1.19 as bpfd-agent-build
+FROM golang:1.19 as bpfman-agent-build
ARG TARGETOS
ARG TARGETARCH
-WORKDIR /usr/src/bpfd/
+WORKDIR /usr/src/bpfman/
# Copy the Go Modules manifests
COPY go.mod go.mod
@@ -21,8 +21,8 @@ COPY . .
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
-WORKDIR /usr/src/bpfd/bpfd-operator
-RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bpfd-agent ./cmd/bpfd-agent/main.go
+WORKDIR /usr/src/bpfman/bpfman-operator
+RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bpfman-agent ./cmd/bpfman-agent/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
@@ -31,7 +31,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bp
FROM gcr.io/distroless/static:nonroot
WORKDIR /
-COPY --from=bpfd-agent-build /usr/src/bpfd/bpfd-operator/bpfd-agent .
+COPY --from=bpfman-agent-build /usr/src/bpfman/bpfman-operator/bpfman-agent .
USER 65532:65532
-ENTRYPOINT ["/bpfd-agent"]
+ENTRYPOINT ["/bpfman-agent"]
diff --git a/bpfd-operator/Containerfile.bpfd-operator b/bpfman-operator/Containerfile.bpfman-operator
similarity index 65%
rename from bpfd-operator/Containerfile.bpfd-operator
rename to bpfman-operator/Containerfile.bpfman-operator
index b160329a4..275fbc2d5 100644
--- a/bpfd-operator/Containerfile.bpfd-operator
+++ b/bpfman-operator/Containerfile.bpfman-operator
@@ -1,9 +1,9 @@
# Build the manager binary
-FROM golang:1.19 as bpfd-operator-build
+FROM golang:1.19 as bpfman-operator-build
ARG TARGETOS
ARG TARGETARCH
-WORKDIR /usr/src/bpfd/
+WORKDIR /usr/src/bpfman/
# Copy the Go Modules manifests
COPY go.mod go.mod
@@ -21,8 +21,8 @@ COPY . .
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
-WORKDIR /usr/src/bpfd/bpfd-operator
-RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bpfd-operator ./cmd/bpfd-operator/main.go
+WORKDIR /usr/src/bpfman/bpfman-operator
+RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bpfman-operator ./cmd/bpfman-operator/main.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
@@ -31,9 +31,9 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bp
FROM gcr.io/distroless/static:nonroot
WORKDIR /
-COPY --from=bpfd-operator-build /usr/src/bpfd/bpfd-operator/config/bpfd-deployment/daemonset.yaml ./config/bpfd-deployment/daemonset.yaml
-COPY --from=bpfd-operator-build /usr/src/bpfd/bpfd-operator/config/bpfd-deployment/csidriverinfo.yaml ./config/bpfd-deployment/csidriverinfo.yaml
-COPY --from=bpfd-operator-build /usr/src/bpfd/bpfd-operator/bpfd-operator .
+COPY --from=bpfman-operator-build /usr/src/bpfman/bpfman-operator/config/bpfman-deployment/daemonset.yaml ./config/bpfman-deployment/daemonset.yaml
+COPY --from=bpfman-operator-build /usr/src/bpfman/bpfman-operator/config/bpfman-deployment/csidriverinfo.yaml ./config/bpfman-deployment/csidriverinfo.yaml
+COPY --from=bpfman-operator-build /usr/src/bpfman/bpfman-operator/bpfman-operator .
USER 65532:65532
-ENTRYPOINT ["/bpfd-operator"]
+ENTRYPOINT ["/bpfman-operator"]
diff --git a/bpfd-operator/Containerfile.bundle b/bpfman-operator/Containerfile.bundle
similarity index 92%
rename from bpfd-operator/Containerfile.bundle
rename to bpfman-operator/Containerfile.bundle
index 7042bcb29..8b60c6cb5 100644
--- a/bpfd-operator/Containerfile.bundle
+++ b/bpfman-operator/Containerfile.bundle
@@ -4,7 +4,7 @@ FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
-LABEL operators.operatorframework.io.bundle.package.v1=bpfd-operator
+LABEL operators.operatorframework.io.bundle.package.v1=bpfman-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.26.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
diff --git a/bpfd-operator/Makefile b/bpfman-operator/Makefile
similarity index 78%
rename from bpfd-operator/Makefile
rename to bpfman-operator/Makefile
index 5c5703bf8..a07f74d8e 100644
--- a/bpfd-operator/Makefile
+++ b/bpfman-operator/Makefile
@@ -28,8 +28,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
# This variable is used to construct full image tags for bundle and catalog images.
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
-# bpfd.dev/bpfd-operator-bundle:$VERSION and bpfd.dev/bpfd-operator-catalog:$VERSION.
-IMAGE_TAG_BASE ?= bpfd.dev/bpfd-operator
+# bpfman.io/bpfman-operator-bundle:$VERSION and bpfman.io/bpfman-operator-catalog:$VERSION.
+IMAGE_TAG_BASE ?= bpfman.io/bpfman-operator
# BUNDLE_IMG defines the image:tag used for the bundle.
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:)
@@ -47,11 +47,11 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
endif
# Image URL to use all building/pushing image targets
-BPFD_IMG ?= quay.io/bpfd/bpfd:latest
-BPFD_AGENT_IMG ?= quay.io/bpfd/bpfd-agent:latest
-BPFD_OPERATOR_IMG ?= quay.io/bpfd/bpfd-operator:latest
-BPFD_OPERATOR_BUNDLE_IMG ?= quay.io/bpfd/bpfd-operator-bundle:latest
-KIND_CLUSTER_NAME ?= bpfd-deployment
+BPFMAN_IMG ?= quay.io/bpfman/bpfman:latest
+BPFMAN_AGENT_IMG ?= quay.io/bpfman/bpfman-agent:latest
+BPFMAN_OPERATOR_IMG ?= quay.io/bpfman/bpfman-operator:latest
+BPFMAN_OPERATOR_BUNDLE_IMG ?= quay.io/bpfman/bpfman-operator-bundle:latest
+KIND_CLUSTER_NAME ?= bpfman-deployment
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.25.0
@@ -156,8 +156,8 @@ ifeq ($(VERIFY_CODEGEN), true)
VERIFY_FLAG=--verify-only
endif
-OUTPUT_PKG ?= github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client
-APIS_PKG ?= github.com/bpfd-dev/bpfd/bpfd-operator
+OUTPUT_PKG ?= github.com/bpfman/bpfman/bpfman-operator/pkg/client
+APIS_PKG ?= github.com/bpfman/bpfman/bpfman-operator
CLIENTSET_NAME ?= versioned
CLIENTSET_PKG_NAME ?= clientset
COMMON_FLAGS ?= ${VERIFY_FLAG} --go-header-file $(shell pwd)/hack/boilerplate.go.txt
@@ -165,8 +165,8 @@ COMMON_FLAGS ?= ${VERIFY_FLAG} --go-header-file $(shell pwd)/hack/boilerplate.go
.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
- $(CONTROLLER_GEN) rbac:roleName=agent-role paths="./controllers/bpfd-agent/..." output:rbac:artifacts:config=config/rbac/bpfd-agent
- $(CONTROLLER_GEN) rbac:roleName=operator-role paths="./controllers/bpfd-operator" output:rbac:artifacts:config=config/rbac/bpfd-operator
+ $(CONTROLLER_GEN) rbac:roleName=agent-role paths="./controllers/bpfman-agent/..." output:rbac:artifacts:config=config/rbac/bpfman-agent
+ $(CONTROLLER_GEN) rbac:roleName=operator-role paths="./controllers/bpfman-operator" output:rbac:artifacts:config=config/rbac/bpfman-operator
.PHONY: generate
generate: manifests generate-register generate-deepcopy generate-typed-clients generate-typed-listers generate-typed-informers ## Generate ALL auto-generated code.
@@ -217,7 +217,7 @@ fmt: ## Run go fmt against code.
verify: ## Verify all the autogenerated code
./hack/verify-codegen.sh
-# Use bpfd/scripts/verify-golint.sh for local linting verification
+# Use bpfman/scripts/verify-golint.sh for local linting verification
# .PHONY: lint
# lint: ## Run golang-ci linter
# ./hack/verify-golint.sh
@@ -238,8 +238,8 @@ test-integration: ## Run Integration tests.
## See https://github.com/operator-framework/operator-sdk/issues/6285.
.PHONY: bundle
bundle: operator-sdk generate kustomize manifests ## Generate bundle manifests and metadata, then validate generated files.
- cd config/bpfd-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-operator=${BPFD_OPERATOR_IMG}
- cd config/bpfd-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd=${BPFD_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-agent=${BPFD_AGENT_IMG}
+ cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
+ cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
$(OPERATOR_SDK) bundle validate ./bundle
@@ -250,36 +250,36 @@ build-release-yamls: generate kustomize ## Generate the crd install bundle for a
##@ Build
.PHONY: build
-build: fmt ## Build bpfd-operator and bpfd-agent binaries.
- go build -o bin/bpfd-operator cmd/bpfd-operator/main.go
- go build -o bin/bpfd-agent cmd/bpfd-agent/main.go
+build: fmt ## Build bpfman-operator and bpfman-agent binaries.
+ go build -o bin/bpfman-operator cmd/bpfman-operator/main.go
+ go build -o bin/bpfman-agent cmd/bpfman-agent/main.go
# If you wish built the manager image targeting other platforms you can use the --platform flag.
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: build-images
-build-images: ## Build bpfd, bpfd-agent, and bpfd-operator images.
- docker build -t ${BPFD_OPERATOR_IMG} -f Containerfile.bpfd-operator ../
- docker build -t ${BPFD_AGENT_IMG} -f Containerfile.bpfd-agent ../
- DOCKER_BUILDKIT=1 docker build -t ${BPFD_IMG} -f ../packaging/container-deployment/Containerfile.bpfd.local ../
+build-images: ## Build bpfman, bpfman-agent, and bpfman-operator images.
+ docker build -t ${BPFMAN_OPERATOR_IMG} -f Containerfile.bpfman-operator ../
+ docker build -t ${BPFMAN_AGENT_IMG} -f Containerfile.bpfman-agent ../
+ DOCKER_BUILDKIT=1 docker build -t ${BPFMAN_IMG} -f ../packaging/container-deployment/Containerfile.bpfman.local ../
.PHONY: push-images
-push-images: ## Push bpfd, bpfd-agent, bpfd-operator images.
- docker push ${BPFD_OPERATOR_IMG}
- docker push ${BPFD_AGENT_IMG}
- docker push ${BPFD_IMG}
+push-images: ## Push bpfman, bpfman-agent, bpfman-operator images.
+ docker push ${BPFMAN_OPERATOR_IMG}
+ docker push ${BPFMAN_AGENT_IMG}
+ docker push ${BPFMAN_IMG}
.PHONY: load-images-kind
-load-images-kind: ## Load bpfd, bpfd-agent, and bpfd-operator images into the running local kind devel cluster.
- kind load docker-image ${BPFD_IMG} ${BPFD_OPERATOR_IMG} ${BPFD_AGENT_IMG} --name ${KIND_CLUSTER_NAME}
+load-images-kind: ## Load bpfman, bpfman-agent, and bpfman-operator images into the running local kind devel cluster.
+ kind load docker-image ${BPFMAN_IMG} ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} --name ${KIND_CLUSTER_NAME}
.PHONY: bundle-build
bundle-build: ## Build the bundle image.
- docker build -f Containerfile.bundle -t $(BPFD_OPERATOR_BUNDLE_IMG) .
+ docker build -f Containerfile.bundle -t $(BPFMAN_OPERATOR_BUNDLE_IMG) .
.PHONY: bundle-push
bundle-push: ## Push the bundle image.
- docker push $(BPFD_OPERATOR_BUNDLE_IMG)
+ docker push $(BPFMAN_OPERATOR_BUNDLE_IMG)
# A comma-separated list of bundle images (e.g. make catalog-build BUNDLE_IMGS=example.com/operator-bundle:v0.1.0,example.com/operator-bundle:v0.2.0).
# These images MUST exist in a registry and be pull-able.
@@ -325,31 +325,31 @@ setup-kind: ## Setup Kind cluster
## Default deploy target is KIND based with its CSI driver initialized.
.PHONY: deploy
-deploy: manifests kustomize ## Deploy bpfd-operator to the K8s cluster specified in ~/.kube/config with the csi driver initialized.
- cd config/bpfd-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-operator=${BPFD_OPERATOR_IMG}
- cd config/bpfd-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd=${BPFD_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-agent=${BPFD_AGENT_IMG}
+deploy: manifests kustomize ## Deploy bpfman-operator to the K8s cluster specified in ~/.kube/config with the csi driver initialized.
+ cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
+ cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/default | kubectl apply -f -
.PHONY: undeploy
-undeploy: ## Undeploy bpfd-operator from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
+undeploy: ## Undeploy bpfman-operator from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
.PHONY: kind-reload-images
kind-reload-images: load-images-kind ## Reload locally build images into a kind cluster and restart the ds and deployment so they're picked up.
- kubectl rollout restart daemonset bpfd-daemon -n bpfd
- kubectl rollout restart deployment bpfd-operator -n bpfd
+ kubectl rollout restart daemonset bpfman-daemon -n bpfman
+ kubectl rollout restart deployment bpfman-operator -n bpfman
.PHONY: run-on-kind
-run-on-kind: kustomize setup-kind build-images load-images-kind deploy ## Kind Deploy runs the bpfd-operator on a local kind cluster using local builds of bpfd, bpfd-agent, and bpfd-operator
+run-on-kind: kustomize setup-kind build-images load-images-kind deploy ## Kind Deploy runs the bpfman-operator on a local kind cluster using local builds of bpfman, bpfman-agent, and bpfman-operator
##@ Openshift Deployment
.PHONY: deploy-openshift
-deploy-openshift: manifests kustomize ## Deploy bpfd-operator to the Openshift cluster specified in ~/.kube/config.
- cd config/bpfd-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-operator=${BPFD_OPERATOR_IMG}
- cd config/bpfd-deployment && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd=${BPFD_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfd/bpfd-agent=${BPFD_AGENT_IMG}
+deploy-openshift: manifests kustomize ## Deploy bpfman-operator to the Openshift cluster specified in ~/.kube/config.
+ cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
+ cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/openshift | kubectl apply -f -
.PHONY: undeploy-openshift
-undeploy-openshift: ## Undeploy bpfd-operator from the Openshift cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
+undeploy-openshift: ## Undeploy bpfman-operator from the Openshift cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/openshift | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
diff --git a/bpfd-operator/PROJECT b/bpfman-operator/PROJECT
similarity index 62%
rename from bpfd-operator/PROJECT
rename to bpfman-operator/PROJECT
index 616f84c73..566139902 100644
--- a/bpfd-operator/PROJECT
+++ b/bpfman-operator/PROJECT
@@ -1,58 +1,58 @@
-domain: bpfd.dev
+domain: bpfman.io
layout:
- go.kubebuilder.io/v3
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
-projectName: bpfd-operator
-repo: github.com/bpfd-dev/bpfd
+projectName: bpfman-operator
+repo: github.com/bpfman/bpfman
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: BpfProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: XdpProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: TcProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: TracePointProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: KprobeProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
- api:
crdVersion: v1
namespaced: false
controller: true
- domain: bpfd.dev
+ domain: bpfman.io
kind: UprobeProgram
- path: github.com/bpfd-dev/bpfd/api/v1alpha1
+ path: github.com/bpfman/bpfman/api/v1alpha1
version: v1alpha1
version: "3"
diff --git a/bpfd-operator/apis/doc.go b/bpfman-operator/apis/doc.go
similarity index 100%
rename from bpfd-operator/apis/doc.go
rename to bpfman-operator/apis/doc.go
diff --git a/bpfd-operator/apis/v1alpha1/bpfprogram_types.go b/bpfman-operator/apis/v1alpha1/bpfprogram_types.go
similarity index 100%
rename from bpfd-operator/apis/v1alpha1/bpfprogram_types.go
rename to bpfman-operator/apis/v1alpha1/bpfprogram_types.go
diff --git a/bpfd-operator/apis/v1alpha1/doc.go b/bpfman-operator/apis/v1alpha1/doc.go
similarity index 93%
rename from bpfd-operator/apis/v1alpha1/doc.go
rename to bpfman-operator/apis/v1alpha1/doc.go
index affe689b4..18313d2cf 100644
--- a/bpfd-operator/apis/v1alpha1/doc.go
+++ b/bpfman-operator/apis/v1alpha1/doc.go
@@ -15,7 +15,7 @@ limitations under the License.
*/
// Package v1alpha1 contains API Schema definitions for the
-// bpfd.dev API group.
+// bpfman.io API group.
// +kubebuilder:object:generate=true
-// +groupName=bpfd.dev
+// +groupName=bpfman.io
package v1alpha1
diff --git a/bpfd-operator/apis/v1alpha1/kprobeProgram_types.go b/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go
similarity index 99%
rename from bpfd-operator/apis/v1alpha1/kprobeProgram_types.go
rename to bpfman-operator/apis/v1alpha1/kprobeProgram_types.go
index cff577dff..500bb72ee 100644
--- a/bpfd-operator/apis/v1alpha1/kprobeProgram_types.go
+++ b/bpfman-operator/apis/v1alpha1/kprobeProgram_types.go
@@ -65,7 +65,7 @@ type KprobeProgramSpec struct {
// +kubebuilder:default:=false
RetProbe bool `json:"retprobe"`
- // // Namespace to attach the uprobe in. (Not supported yet by bpfd.)
+ // // Namespace to attach the uprobe in. (Not supported yet by bpfman.)
// // +optional
// Namespace string `json:"namespace"`
}
diff --git a/bpfd-operator/apis/v1alpha1/shared_types.go b/bpfman-operator/apis/v1alpha1/shared_types.go
similarity index 92%
rename from bpfd-operator/apis/v1alpha1/shared_types.go
rename to bpfman-operator/apis/v1alpha1/shared_types.go
index fe2876d36..ddefc597c 100644
--- a/bpfd-operator/apis/v1alpha1/shared_types.go
+++ b/bpfman-operator/apis/v1alpha1/shared_types.go
@@ -70,11 +70,11 @@ type BpfProgramCommon struct {
type PullPolicy string
const (
- // PullAlways means that bpfd always attempts to pull the latest bytecode image. Container will fail If the pull fails.
+ // PullAlways means that bpfman always attempts to pull the latest bytecode image. Container will fail If the pull fails.
PullAlways PullPolicy = "Always"
- // PullNever means that bpfd never pulls an image, but only uses a local image. Container will fail if the image isn't present
+ // PullNever means that bpfman never pulls an image, but only uses a local image. Container will fail if the image isn't present
PullNever PullPolicy = "Never"
- // PullIfNotPresent means that bpfd pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
+ // PullIfNotPresent means that bpfman pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails.
PullIfNotPresent PullPolicy = "IfNotPresent"
)
@@ -97,7 +97,7 @@ type BytecodeImage struct {
// +optional
ImagePullPolicy PullPolicy `json:"imagepullpolicy"`
- // ImagePullSecret is the name of the secret bpfd should use to get remote image
+ // ImagePullSecret is the name of the secret bpfman should use to get remote image
// repository secrets.
// +optional
ImagePullSecret *ImagePullSecretSelector `json:"imagepullsecret,omitempty"`
@@ -129,14 +129,14 @@ const (
// occurred in the controller logic, and the controller will retry.
ProgramReconcileError ProgramConditionType = "ReconcileError"
- // BpfdProgConfigReconcileSuccess indicates that the BPF program has been
+ // BpfmanProgConfigReconcileSuccess indicates that the BPF program has been
// successfully reconciled.
//
// TODO: we should consider removing "reconciled" type logic from the
// public API as it's an implementation detail of our use of controller
// runtime, but not necessarily relevant to human users or integrations.
//
- // See: https://github.com/bpfd-dev/bpfd/issues/430
+ // See: https://github.com/bpfman/bpfman/issues/430
ProgramReconcileSuccess ProgramConditionType = "ReconcileSuccess"
// ProgramDeleteError indicates that the BPF program was marked for
@@ -151,7 +151,7 @@ const (
// information to the user, but the hardcoded messages need to be replaced
// in the future with dynamic and situation-aware messages later.
//
-// See: https://github.com/bpfd-dev/bpfd/issues/430
+// See: https://github.com/bpfman/bpfman/issues/430
func (b ProgramConditionType) Condition(message string) metav1.Condition {
cond := metav1.Condition{}
@@ -257,21 +257,21 @@ func (b BpfProgramConditionType) Condition() metav1.Condition {
cond = metav1.Condition{
Type: string(BpfProgCondLoaded),
Status: metav1.ConditionTrue,
- Reason: "bpfdLoaded",
+ Reason: "bpfmanLoaded",
Message: "Successfully loaded bpfProgram",
}
case BpfProgCondNotLoaded:
cond = metav1.Condition{
Type: string(BpfProgCondNotLoaded),
Status: metav1.ConditionTrue,
- Reason: "bpfdNotLoaded",
+ Reason: "bpfmanNotLoaded",
Message: "Failed to load bpfProgram",
}
case BpfProgCondNotUnloaded:
cond = metav1.Condition{
Type: string(BpfProgCondNotUnloaded),
Status: metav1.ConditionTrue,
- Reason: "bpfdNotUnloaded",
+ Reason: "bpfmanNotUnloaded",
Message: "Failed to unload bpfProgram",
}
case BpfProgCondNotSelected:
@@ -285,8 +285,8 @@ func (b BpfProgramConditionType) Condition() metav1.Condition {
cond = metav1.Condition{
Type: string(BpfProgCondUnloaded),
Status: metav1.ConditionTrue,
- Reason: "bpfdUnloaded",
- Message: "This BpfProgram object and all it's bpfd programs have been unloaded",
+ Reason: "bpfmanUnloaded",
+ Message: "This BpfProgram object and all it's bpfman programs have been unloaded",
}
case BpfProgCondMapOwnerNotFound:
cond = metav1.Condition{
diff --git a/bpfd-operator/apis/v1alpha1/tcProgram_types.go b/bpfman-operator/apis/v1alpha1/tcProgram_types.go
similarity index 100%
rename from bpfd-operator/apis/v1alpha1/tcProgram_types.go
rename to bpfman-operator/apis/v1alpha1/tcProgram_types.go
diff --git a/bpfd-operator/apis/v1alpha1/tracepointProgram_types.go b/bpfman-operator/apis/v1alpha1/tracepointProgram_types.go
similarity index 100%
rename from bpfd-operator/apis/v1alpha1/tracepointProgram_types.go
rename to bpfman-operator/apis/v1alpha1/tracepointProgram_types.go
diff --git a/bpfd-operator/apis/v1alpha1/uprobeProgram_types.go b/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go
similarity index 99%
rename from bpfd-operator/apis/v1alpha1/uprobeProgram_types.go
rename to bpfman-operator/apis/v1alpha1/uprobeProgram_types.go
index 041e45923..6afddb6e2 100644
--- a/bpfd-operator/apis/v1alpha1/uprobeProgram_types.go
+++ b/bpfman-operator/apis/v1alpha1/uprobeProgram_types.go
@@ -76,7 +76,7 @@ type UprobeProgramSpec struct {
// +optional
Pid int32 `json:"pid"`
- // // Namespace to attach the uprobe in. (Not supported yet by bpfd.)
+ // // Namespace to attach the uprobe in. (Not supported yet by bpfman.)
// // +optional
// Namespace string `json:"namespace"`
}
diff --git a/bpfd-operator/apis/v1alpha1/xdpProgram_types.go b/bpfman-operator/apis/v1alpha1/xdpProgram_types.go
similarity index 100%
rename from bpfd-operator/apis/v1alpha1/xdpProgram_types.go
rename to bpfman-operator/apis/v1alpha1/xdpProgram_types.go
diff --git a/bpfd-operator/apis/v1alpha1/zz_generated.deepcopy.go b/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go
similarity index 99%
rename from bpfd-operator/apis/v1alpha1/zz_generated.deepcopy.go
rename to bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go
index 3f37199c2..8cab3d441 100644
--- a/bpfd-operator/apis/v1alpha1/zz_generated.deepcopy.go
+++ b/bpfman-operator/apis/v1alpha1/zz_generated.deepcopy.go
@@ -2,7 +2,7 @@
// +build !ignore_autogenerated
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/apis/v1alpha1/zz_generated.register.go b/bpfman-operator/apis/v1alpha1/zz_generated.register.go
similarity index 97%
rename from bpfd-operator/apis/v1alpha1/zz_generated.register.go
rename to bpfman-operator/apis/v1alpha1/zz_generated.register.go
index 058a62713..6589989de 100644
--- a/bpfd-operator/apis/v1alpha1/zz_generated.register.go
+++ b/bpfman-operator/apis/v1alpha1/zz_generated.register.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -24,7 +24,7 @@ import (
)
// GroupName specifies the group name used to register the objects.
-const GroupName = "bpfd.dev"
+const GroupName = "bpfman.io"
// GroupVersion specifies the group and the version used to register the objects.
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
diff --git a/bpfd-operator/bundle.Dockerfile b/bpfman-operator/bundle.Dockerfile
similarity index 92%
rename from bpfd-operator/bundle.Dockerfile
rename to bpfman-operator/bundle.Dockerfile
index 6f9cb2f75..f060e2fa8 100644
--- a/bpfd-operator/bundle.Dockerfile
+++ b/bpfman-operator/bundle.Dockerfile
@@ -4,7 +4,7 @@ FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
-LABEL operators.operatorframework.io.bundle.package.v1=bpfd-operator
+LABEL operators.operatorframework.io.bundle.package.v1=bpfman-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.27.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
diff --git a/bpfd-operator/cmd/bpfd-agent/main.go b/bpfman-operator/cmd/bpfman-agent/main.go
similarity index 77%
rename from bpfd-operator/cmd/bpfd-agent/main.go
rename to bpfman-operator/cmd/bpfman-agent/main.go
index 01efd01fa..da13b43d9 100644
--- a/bpfd-operator/cmd/bpfd-agent/main.go
+++ b/bpfman-operator/cmd/bpfman-agent/main.go
@@ -34,11 +34,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagent "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagent "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal/conn"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal/conn"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
//+kubebuilder:scaffold:imports
)
@@ -50,7 +50,7 @@ var (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
- utilruntime.Must(bpfdiov1alpha1.AddToScheme(scheme))
+ utilruntime.Must(bpfmaniov1alpha1.AddToScheme(scheme))
utilruntime.Must(v1.AddToScheme(scheme))
//+kubebuilder:scaffold:scheme
}
@@ -63,7 +63,7 @@ func main() {
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.Parse()
- // Get the Log level for bpfd deployment where this pod is running
+ // Get the Log level for bpfman deployment where this pod is running
logLevel := os.Getenv("GO_LOG")
switch logLevel {
case "info":
@@ -101,68 +101,68 @@ func main() {
os.Exit(1)
}
- // Setup bpfd Client
+ // Setup bpfman Client
configFileData := conn.LoadConfig()
- setupLog.Info("Connecting over UNIX socket to bpfd")
+ setupLog.Info("Connecting over UNIX socket to bpfman")
- // Set up a connection to bpfd, block until bpfd is up.
- setupLog.Info("Waiting for active connection to bpfd", "endpoints", configFileData.Grpc.Endpoints)
+ // Set up a connection to bpfman, block until bpfman is up.
+ setupLog.Info("Waiting for active connection to bpfman", "endpoints", configFileData.Grpc.Endpoints)
conn, err := conn.CreateConnection(configFileData.Grpc.Endpoints, context.Background(), insecure.NewCredentials())
if err != nil {
- setupLog.Error(err, "unable to connect to bpfd")
+ setupLog.Error(err, "unable to connect to bpfman")
os.Exit(1)
}
nodeName := os.Getenv("KUBE_NODE_NAME")
if nodeName == "" {
- setupLog.Error(fmt.Errorf("KUBE_NODE_NAME env var not set"), "Couldn't determine bpfd-agent's node")
+ setupLog.Error(fmt.Errorf("KUBE_NODE_NAME env var not set"), "Couldn't determine bpfman-agent's node")
os.Exit(1)
}
- common := bpfdagent.ReconcilerCommon{
- Client: mgr.GetClient(),
- Scheme: mgr.GetScheme(),
- GrpcConn: conn,
- BpfdClient: gobpfd.NewBpfdClient(conn),
- NodeName: nodeName,
+ common := bpfmanagent.ReconcilerCommon{
+ Client: mgr.GetClient(),
+ Scheme: mgr.GetScheme(),
+ GrpcConn: conn,
+ BpfmanClient: gobpfman.NewBpfmanClient(conn),
+ NodeName: nodeName,
}
- if err = (&bpfdagent.XdpProgramReconciler{
+ if err = (&bpfmanagent.XdpProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create xdpProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdagent.TcProgramReconciler{
+ if err = (&bpfmanagent.TcProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create tcProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdagent.TracepointProgramReconciler{
+ if err = (&bpfmanagent.TracepointProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create tracepointProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdagent.KprobeProgramReconciler{
+ if err = (&bpfmanagent.KprobeProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create kprobeProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdagent.UprobeProgramReconciler{
+ if err = (&bpfmanagent.UprobeProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create uprobeProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdagent.DiscoveredProgramReconciler{
+ if err = (&bpfmanagent.DiscoveredProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create discoveredProgram controller", "controller", "BpfProgram")
@@ -180,7 +180,7 @@ func main() {
os.Exit(1)
}
- setupLog.Info("starting Bpfd-Agent")
+ setupLog.Info("starting Bpfman-Agent")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
diff --git a/bpfd-operator/cmd/bpfd-operator/main.go b/bpfman-operator/cmd/bpfman-operator/main.go
similarity index 82%
rename from bpfd-operator/cmd/bpfd-operator/main.go
rename to bpfman-operator/cmd/bpfman-operator/main.go
index d1428ff3c..3527791d1 100644
--- a/bpfd-operator/cmd/bpfd-operator/main.go
+++ b/bpfman-operator/cmd/bpfman-operator/main.go
@@ -30,9 +30,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdoperator "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-operator"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanoperator "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-operator"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
//+kubebuilder:scaffold:imports
)
@@ -43,7 +43,7 @@ var (
func init() {
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
- utilruntime.Must(bpfdiov1alpha1.AddToScheme(scheme))
+ utilruntime.Must(bpfmaniov1alpha1.AddToScheme(scheme))
//+kubebuilder:scaffold:scheme
}
@@ -59,7 +59,7 @@ func main() {
"Enabling this will ensure there is only one active controller manager.")
flag.Parse()
- // Get the Log level for bpfd deployment where this pod is running
+ // Get the Log level for bpfman deployment where this pod is running
logLevel := os.Getenv("GO_LOG")
switch logLevel {
case "info":
@@ -89,7 +89,7 @@ func main() {
Port: 9443,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
- LeaderElectionID: "8730d955.bpfd.dev",
+ LeaderElectionID: "8730d955.bpfman.io",
// LeaderElectionReleaseOnCancel defines if the leader should step down voluntarily
// when the Manager ends. This requires the binary to immediately end when the
// Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
@@ -107,49 +107,49 @@ func main() {
os.Exit(1)
}
- common := bpfdoperator.ReconcilerCommon{
+ common := bpfmanoperator.ReconcilerCommon{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}
- if err = (&bpfdoperator.BpfdConfigReconciler{
- ReconcilerCommon: common,
- BpfdStandardDeployment: internal.BpfdDaemonManifestPath,
- CsiDriverDeployment: internal.BpfdCsiDriverPath,
+ if err = (&bpfmanoperator.BpfmanConfigReconciler{
+ ReconcilerCommon: common,
+ BpfmanStandardDeployment: internal.BpfmanDaemonManifestPath,
+ CsiDriverDeployment: internal.BpfmanCsiDriverPath,
}).SetupWithManager(mgr); err != nil {
- setupLog.Error(err, "unable to create bpfdCofig controller", "controller", "BpfProgram")
+ setupLog.Error(err, "unable to create bpfmanCofig controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdoperator.XdpProgramReconciler{
+ if err = (&bpfmanoperator.XdpProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create xdpProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdoperator.TcProgramReconciler{
+ if err = (&bpfmanoperator.TcProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create tcProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdoperator.TracepointProgramReconciler{
+ if err = (&bpfmanoperator.TracepointProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create tracepointProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdoperator.KprobeProgramReconciler{
+ if err = (&bpfmanoperator.KprobeProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create kprobeProgram controller", "controller", "BpfProgram")
os.Exit(1)
}
- if err = (&bpfdoperator.UprobeProgramReconciler{
+ if err = (&bpfmanoperator.UprobeProgramReconciler{
ReconcilerCommon: common,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create uprobeProgram controller", "controller", "BpfProgram")
diff --git a/bpfd-operator/config/bpfd-deployment/config.yaml b/bpfman-operator/config/bpfman-deployment/config.yaml
similarity index 61%
rename from bpfd-operator/config/bpfd-deployment/config.yaml
rename to bpfman-operator/config/bpfman-deployment/config.yaml
index c0e690187..407fec3c8 100644
--- a/bpfd-operator/config/bpfd-deployment/config.yaml
+++ b/bpfman-operator/config/bpfman-deployment/config.yaml
@@ -5,15 +5,15 @@ metadata:
namespace: kube-system
data:
## Can be configured at runtime
- bpfd.agent.image: quay.io/bpfd/bpfd-agent:latest
- bpfd.image: quay.io/bpfd/bpfd:latest
+ bpfman.agent.image: quay.io/bpfman/bpfman-agent:latest
+ bpfman.image: quay.io/bpfman/bpfman:latest
## Can be set to "info", "debug", or "trace"
- bpfd.agent.log.level: "info"
+ bpfman.agent.log.level: "info"
## See https://docs.rs/env_logger/latest/env_logger/ for configuration options
- bpfd.log.level: "info"
+ bpfman.log.level: "info"
## Must be configured at startup
- bpfd.toml: |
+ bpfman.toml: |
[[grpc.endpoints]]
type = "unix"
- path = "/bpfd-sock/bpfd.sock"
+ path = "/bpfman-sock/bpfman.sock"
enabled = true
diff --git a/bpfd-operator/config/bpfd-deployment/csidriverinfo.yaml b/bpfman-operator/config/bpfman-deployment/csidriverinfo.yaml
similarity index 59%
rename from bpfd-operator/config/bpfd-deployment/csidriverinfo.yaml
rename to bpfman-operator/config/bpfman-deployment/csidriverinfo.yaml
index a243ab4d7..7e6d9f25f 100644
--- a/bpfd-operator/config/bpfd-deployment/csidriverinfo.yaml
+++ b/bpfman-operator/config/bpfman-deployment/csidriverinfo.yaml
@@ -1,8 +1,8 @@
-## This is part of the payload deployed by the bpfd-operator NOT kustomize.
+## This is part of the payload deployed by the bpfman-operator NOT kustomize.
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
- name: csi.bpfd.dev
+ name: csi.bpfman.io
spec:
attachRequired: false
podInfoOnMount: true
diff --git a/bpfd-operator/config/bpfd-deployment/daemonset.yaml b/bpfman-operator/config/bpfman-deployment/daemonset.yaml
similarity index 76%
rename from bpfd-operator/config/bpfd-deployment/daemonset.yaml
rename to bpfman-operator/config/bpfman-deployment/daemonset.yaml
index 6afaa3b3f..0a2574b10 100644
--- a/bpfd-operator/config/bpfd-deployment/daemonset.yaml
+++ b/bpfman-operator/config/bpfman-deployment/daemonset.yaml
@@ -1,24 +1,24 @@
---
-## This is part of the payload deployed by the bpfd-operator NOT kustomize.
+## This is part of the payload deployed by the bpfman-operator NOT kustomize.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: daemon
namespace: kube-system
labels:
- k8s-app: bpfd
+ k8s-app: bpfman
spec:
selector:
matchLabels:
- name: bpfd-daemon
+ name: bpfman-daemon
template:
metadata:
labels:
- name: bpfd-daemon
+ name: bpfman-daemon
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
- serviceAccountName: bpfd-daemon
+ serviceAccountName: bpfman-daemon
tolerations:
# these tolerations are to have the daemonset runnable on control plane nodes
# remove them if your control plane nodes should not run pods
@@ -28,7 +28,7 @@ spec:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
- # Specify FS group so that the agent can use the bpfd socket
+ # Specify FS group so that the agent can use the bpfman socket
# without needing to be root.
securityContext:
fsGroup: 2000
@@ -57,8 +57,8 @@ spec:
mountPath: /sys/fs/bpf
mountPropagation: Bidirectional
containers:
- - name: bpfd
- image: quay.io/bpfd/bpfd:latest
+ - name: bpfman
+ image: quay.io/bpfman/bpfman:latest
args: [--csi-support]
securityContext:
privileged: true
@@ -67,43 +67,43 @@ spec:
- name: RUST_LOG
valueFrom:
configMapKeyRef:
- name: bpfd-config
- key: bpfd.log.level
+ name: bpfman-config
+ key: bpfman.log.level
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
- - name: bpfd-sock
- mountPath: /bpfd-sock
+ - name: bpfman-sock
+ mountPath: /bpfman-sock
- name: runtime
- mountPath: /run/bpfd
+ mountPath: /run/bpfman
mountPropagation: Bidirectional
- - name: bpfd-config
- mountPath: /etc/bpfd/bpfd.toml
- subPath: bpfd.toml
+ - name: bpfman-config
+ mountPath: /etc/bpfman/bpfman.toml
+ subPath: bpfman.toml
readOnly: true
# This mount is needed to attach tracepoint programs
- name: host-debug
mountPath: /sys/kernel/debug
# Needed to ensure images are persisted to disk across restarts
- - name: bpfd-content-store
- mountPath: /var/lib/bpfd
+ - name: bpfman-content-store
+ mountPath: /var/lib/bpfman
mountPropagation: Bidirectional
# Needed for the aya PIN_BY_NAME feature to function correctly
- name: default-bpf-fs
mountPath: /sys/fs/bpf
mountPropagation: Bidirectional
- - mountPath: /run/bpfd/csi
+ - mountPath: /run/bpfman/csi
name: socket-dir
- mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
- mountPath: /tmp
name: tmp-dir
- - name: bpfd-agent
- command: [/bpfd-agent]
- image: quay.io/bpfd/bpfd-agent:latest
+ - name: bpfman-agent
+ command: [/bpfman-agent]
+ image: quay.io/bpfman/bpfman-agent:latest
imagePullPolicy: IfNotPresent
env:
- name: KUBE_NODE_NAME
@@ -113,17 +113,17 @@ spec:
- name: GO_LOG
valueFrom:
configMapKeyRef:
- name: bpfd-config
- key: bpfd.agent.log.level
+ name: bpfman-config
+ key: bpfman.agent.log.level
volumeMounts:
- - name: bpfd-sock
- mountPath: /bpfd-sock
- - name: bpfd-config
- mountPath: /etc/bpfd/bpfd.toml
- subPath: bpfd.toml
+ - name: bpfman-sock
+ mountPath: /bpfman-sock
+ - name: bpfman-config
+ mountPath: /etc/bpfman/bpfman.toml
+ subPath: bpfman.toml
readOnly: true
- name: node-driver-registrar
- image: quay.io/bpfd/csi-node-driver-registrar:v2.9.0
+ image: quay.io/bpfman/csi-node-driver-registrar:v2.9.0
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
@@ -131,11 +131,11 @@ spec:
command:
- /bin/sh
- -c
- - rm -rf /registration/csi-bpfd /registration/csi-bpfd-reg.sock
+ - rm -rf /registration/csi-bpfman /registration/csi-bpfman-reg.sock
args:
- --v=5
- --csi-address=/csi/csi.sock
- - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-bpfd/csi.sock
+ - --kubelet-registration-path=/var/lib/kubelet/plugins/csi-bpfman/csi.sock
env:
- name: KUBE_NODE_NAME
valueFrom:
@@ -149,28 +149,28 @@ spec:
name: registration-dir
terminationGracePeriodSeconds: 15
volumes:
- - name: bpfd-sock
+ - name: bpfman-sock
emptyDir: {}
- name: runtime
hostPath:
- path: /run/bpfd
- - name: bpfd-config
+ path: /run/bpfman
+ - name: bpfman-config
configMap:
- name: bpfd-config
+ name: bpfman-config
optional: false
- name: host-debug
hostPath:
path: /sys/kernel/debug
- - name: bpfd-content-store
+ - name: bpfman-content-store
hostPath:
- path: /var/lib/bpfd
+ path: /var/lib/bpfman
- name: default-bpf-fs
hostPath:
path: /sys/fs/bpf
type: DirectoryOrCreate
# This volume is where the socket for kubelet->driver communication is held
- hostPath:
- path: /var/lib/kubelet/plugins/csi-bpfd
+ path: /var/lib/kubelet/plugins/csi-bpfman
type: DirectoryOrCreate
name: socket-dir
# This volume is where the driver mounts volumes
diff --git a/bpfman-operator/config/bpfman-deployment/kustomization.yaml b/bpfman-operator/config/bpfman-deployment/kustomization.yaml
new file mode 100644
index 000000000..7c92df273
--- /dev/null
+++ b/bpfman-operator/config/bpfman-deployment/kustomization.yaml
@@ -0,0 +1,11 @@
+resources:
+ - config.yaml
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+images:
+ - name: quay.io/bpfman/bpfman
+ newName: quay.io/bpfman/bpfman
+ newTag: latest
+ - name: quay.io/bpfman/bpfman-agent
+ newName: quay.io/bpfman/bpfman-agent
+ newTag: latest
diff --git a/bpfd-operator/config/bpfd-operator-deployment/deployment.yaml b/bpfman-operator/config/bpfman-operator-deployment/deployment.yaml
similarity index 90%
rename from bpfd-operator/config/bpfd-operator-deployment/deployment.yaml
rename to bpfman-operator/config/bpfman-operator-deployment/deployment.yaml
index d4bd046eb..a3e7e7ae0 100644
--- a/bpfd-operator/config/bpfd-operator-deployment/deployment.yaml
+++ b/bpfman-operator/config/bpfman-operator-deployment/deployment.yaml
@@ -6,8 +6,8 @@ metadata:
app.kubernetes.io/name: namespace
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: system
---
@@ -21,8 +21,8 @@ metadata:
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/component: manager
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
spec:
selector:
@@ -67,15 +67,15 @@ spec:
# type: RuntimeDefault
containers:
- command:
- - /bpfd-operator
+ - /bpfman-operator
args:
- --leader-elect
- image: quay.io/bpfd/bpfd-operator:latest
+ image: quay.io/bpfman/bpfman-operator:latest
imagePullPolicy: IfNotPresent
env:
- name: GO_LOG
value: "debug"
- name: bpfd-operator
+ name: bpfman-operator
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -102,5 +102,5 @@ spec:
requests:
cpu: 10m
memory: 64Mi
- serviceAccountName: bpfd-operator
+ serviceAccountName: bpfman-operator
terminationGracePeriodSeconds: 10
diff --git a/bpfman-operator/config/bpfman-operator-deployment/kustomization.yaml b/bpfman-operator/config/bpfman-operator-deployment/kustomization.yaml
new file mode 100644
index 000000000..4b7384134
--- /dev/null
+++ b/bpfman-operator/config/bpfman-operator-deployment/kustomization.yaml
@@ -0,0 +1,8 @@
+resources:
+ - deployment.yaml
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+images:
+ - name: quay.io/bpfman/bpfman-operator
+ newName: quay.io/bpfman/bpfman-operator
+ newTag: v0.3.1
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_bpfprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_bpfprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_bpfprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_bpfprograms.yaml
index 2218b39de..d93d3bb65 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_bpfprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_bpfprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: bpfprograms.bpfd.dev
+ name: bpfprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: BpfProgram
listKind: BpfProgramList
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_kprobeprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_kprobeprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_kprobeprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_kprobeprograms.yaml
index 6807a7534..5ac7ee8f8 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_kprobeprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_kprobeprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: kprobeprograms.bpfd.dev
+ name: kprobeprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: KprobeProgram
listKind: KprobeProgramList
@@ -75,7 +75,7 @@ spec:
- IfNotPresent
type: string
imagepullsecret:
- description: ImagePullSecret is the name of the secret bpfd
+ description: ImagePullSecret is the name of the secret bpfman
should use to get remote image repository secrets.
properties:
name:
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_tcprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_tcprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_tcprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_tcprograms.yaml
index 3d9e34079..a6803ea06 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_tcprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_tcprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: tcprograms.bpfd.dev
+ name: tcprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: TcProgram
listKind: TcProgramList
@@ -79,7 +79,7 @@ spec:
- IfNotPresent
type: string
imagepullsecret:
- description: ImagePullSecret is the name of the secret bpfd
+ description: ImagePullSecret is the name of the secret bpfman
should use to get remote image repository secrets.
properties:
name:
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_tracepointprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_tracepointprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_tracepointprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_tracepointprograms.yaml
index c71f64429..f1d159132 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_tracepointprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_tracepointprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: tracepointprograms.bpfd.dev
+ name: tracepointprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: TracepointProgram
listKind: TracepointProgramList
@@ -67,7 +67,7 @@ spec:
- IfNotPresent
type: string
imagepullsecret:
- description: ImagePullSecret is the name of the secret bpfd
+ description: ImagePullSecret is the name of the secret bpfman
should use to get remote image repository secrets.
properties:
name:
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_uprobeprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_uprobeprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_uprobeprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_uprobeprograms.yaml
index 5321ab236..2eea1d820 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_uprobeprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_uprobeprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: uprobeprograms.bpfd.dev
+ name: uprobeprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: UprobeProgram
listKind: UprobeProgramList
@@ -83,7 +83,7 @@ spec:
- IfNotPresent
type: string
imagepullsecret:
- description: ImagePullSecret is the name of the secret bpfd
+ description: ImagePullSecret is the name of the secret bpfman
should use to get remote image repository secrets.
properties:
name:
diff --git a/bpfd-operator/config/crd/bases/bpfd.dev_xdpprograms.yaml b/bpfman-operator/config/crd/bases/bpfman.io_xdpprograms.yaml
similarity index 99%
rename from bpfd-operator/config/crd/bases/bpfd.dev_xdpprograms.yaml
rename to bpfman-operator/config/crd/bases/bpfman.io_xdpprograms.yaml
index 1f89423c1..4e9baa431 100644
--- a/bpfd-operator/config/crd/bases/bpfd.dev_xdpprograms.yaml
+++ b/bpfman-operator/config/crd/bases/bpfman.io_xdpprograms.yaml
@@ -5,9 +5,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.3
creationTimestamp: null
- name: xdpprograms.bpfd.dev
+ name: xdpprograms.bpfman.io
spec:
- group: bpfd.dev
+ group: bpfman.io
names:
kind: XdpProgram
listKind: XdpProgramList
@@ -75,7 +75,7 @@ spec:
- IfNotPresent
type: string
imagepullsecret:
- description: ImagePullSecret is the name of the secret bpfd
+ description: ImagePullSecret is the name of the secret bpfman
should use to get remote image repository secrets.
properties:
name:
diff --git a/bpfd-operator/config/crd/kustomization.yaml b/bpfman-operator/config/crd/kustomization.yaml
similarity index 83%
rename from bpfd-operator/config/crd/kustomization.yaml
rename to bpfman-operator/config/crd/kustomization.yaml
index cb8acb20d..4d26488ac 100644
--- a/bpfd-operator/config/crd/kustomization.yaml
+++ b/bpfman-operator/config/crd/kustomization.yaml
@@ -2,12 +2,12 @@
# since it depends on service name and namespace that are out of this kustomize package.
# It should be run by config/default
resources:
-- bases/bpfd.dev_bpfprograms.yaml
-- bases/bpfd.dev_tcprograms.yaml
-- bases/bpfd.dev_tracepointprograms.yaml
-- bases/bpfd.dev_xdpprograms.yaml
-- bases/bpfd.dev_kprobeprograms.yaml
-- bases/bpfd.dev_uprobeprograms.yaml
+ - bases/bpfman.io_bpfprograms.yaml
+ - bases/bpfman.io_tcprograms.yaml
+ - bases/bpfman.io_tracepointprograms.yaml
+ - bases/bpfman.io_xdpprograms.yaml
+ - bases/bpfman.io_kprobeprograms.yaml
+ - bases/bpfman.io_uprobeprograms.yaml
#+kubebuilder:scaffold:crdkustomizeresource
@@ -34,4 +34,4 @@ patchesStrategicMerge:
# the following config is for teaching kustomize how to do kustomization for CRDs.
configurations:
-- kustomizeconfig.yaml
+ - kustomizeconfig.yaml
diff --git a/bpfd-operator/config/crd/kustomizeconfig.yaml b/bpfman-operator/config/crd/kustomizeconfig.yaml
similarity index 100%
rename from bpfd-operator/config/crd/kustomizeconfig.yaml
rename to bpfman-operator/config/crd/kustomizeconfig.yaml
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_bpfprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_bpfprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/cainjection_in_bpfprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_bpfprograms.yaml
index 6008371d2..f5a245d44 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_bpfprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_bpfprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: bpfprograms.bpfd.dev
+ name: bpfprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml
similarity index 88%
rename from bpfd-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml
index 939470d1a..0e5599719 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_kprobeprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: kprobeprograms.bpfd.dev
+ name: kprobeprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_tcprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_tcprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/cainjection_in_tcprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_tcprograms.yaml
index 927d3ccd2..5f0ab0f41 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_tcprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_tcprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: tcprograms.bpfd.dev
+ name: tcprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml
similarity index 87%
rename from bpfd-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml
index 393bbf669..f7c296ff7 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_tracepointprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: tracepointprograms.bpfd.dev
+ name: tracepointprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml
similarity index 88%
rename from bpfd-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml
index 362c617b6..88d4e231b 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_uprobeprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: uprobeprograms.bpfd.dev
+ name: uprobeprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/cainjection_in_xdpprograms.yaml b/bpfman-operator/config/crd/patches/cainjection_in_xdpprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/cainjection_in_xdpprograms.yaml
rename to bpfman-operator/config/crd/patches/cainjection_in_xdpprograms.yaml
index db825a374..76f9a7ca5 100644
--- a/bpfd-operator/config/crd/patches/cainjection_in_xdpprograms.yaml
+++ b/bpfman-operator/config/crd/patches/cainjection_in_xdpprograms.yaml
@@ -4,4 +4,4 @@ kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
- name: xdpprograms.bpfd.dev
+ name: xdpprograms.bpfman.io
diff --git a/bpfd-operator/config/crd/patches/webhook_in_bpfprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_bpfprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/webhook_in_bpfprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_bpfprograms.yaml
index 3c65a2afe..479948a0f 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_bpfprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_bpfprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: bpfprograms.bpfd.dev
+ name: bpfprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/crd/patches/webhook_in_kprobeprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_kprobeprograms.yaml
similarity index 88%
rename from bpfd-operator/config/crd/patches/webhook_in_kprobeprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_kprobeprograms.yaml
index 14961290a..060fd9213 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_kprobeprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_kprobeprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: kprobeprograms.bpfd.dev
+ name: kprobeprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/crd/patches/webhook_in_tcprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_tcprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/webhook_in_tcprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_tcprograms.yaml
index 3377967fa..5adeeab9a 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_tcprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_tcprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: tcprograms.bpfd.dev
+ name: tcprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/crd/patches/webhook_in_tracepointprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_tracepointprograms.yaml
similarity index 87%
rename from bpfd-operator/config/crd/patches/webhook_in_tracepointprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_tracepointprograms.yaml
index 2c25eb4de..25ff36d4c 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_tracepointprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_tracepointprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: tracepointprograms.bpfd.dev
+ name: tracepointprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/crd/patches/webhook_in_uprobeprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_uprobeprograms.yaml
similarity index 88%
rename from bpfd-operator/config/crd/patches/webhook_in_uprobeprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_uprobeprograms.yaml
index 2ab223a2e..90e8e2fba 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_uprobeprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_uprobeprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: uprobeprograms.bpfd.dev
+ name: uprobeprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/crd/patches/webhook_in_xdpprograms.yaml b/bpfman-operator/config/crd/patches/webhook_in_xdpprograms.yaml
similarity index 89%
rename from bpfd-operator/config/crd/patches/webhook_in_xdpprograms.yaml
rename to bpfman-operator/config/crd/patches/webhook_in_xdpprograms.yaml
index 2ae2bfa6a..321aaa4a8 100644
--- a/bpfd-operator/config/crd/patches/webhook_in_xdpprograms.yaml
+++ b/bpfman-operator/config/crd/patches/webhook_in_xdpprograms.yaml
@@ -2,7 +2,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
- name: xdpprograms.bpfd.dev
+ name: xdpprograms.bpfman.io
spec:
conversion:
strategy: Webhook
@@ -13,4 +13,4 @@ spec:
name: webhook-service
path: /convert
conversionReviewVersions:
- - v1
+ - v1
diff --git a/bpfd-operator/config/default/kustomization.yaml b/bpfman-operator/config/default/kustomization.yaml
similarity index 94%
rename from bpfd-operator/config/default/kustomization.yaml
rename to bpfman-operator/config/default/kustomization.yaml
index 4028890f5..2aa8034a6 100644
--- a/bpfd-operator/config/default/kustomization.yaml
+++ b/bpfman-operator/config/default/kustomization.yaml
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
-namespace: bpfd
+namespace: bpfman
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
-namePrefix: bpfd-
+namePrefix: bpfman-
# Labels to add to all resources and selectors.
# commonLabels:
@@ -40,5 +40,5 @@ kind: Kustomization
resources:
- ../crd
- ../rbac
- - ../bpfd-deployment
- - ../bpfd-operator-deployment
+ - ../bpfman-deployment
+ - ../bpfman-operator-deployment
diff --git a/bpfd-operator/config/default/manager_auth_proxy_patch.yaml b/bpfman-operator/config/default/manager_auth_proxy_patch.yaml
similarity index 98%
rename from bpfd-operator/config/default/manager_auth_proxy_patch.yaml
rename to bpfman-operator/config/default/manager_auth_proxy_patch.yaml
index 0b932de23..61acfd03f 100644
--- a/bpfd-operator/config/default/manager_auth_proxy_patch.yaml
+++ b/bpfman-operator/config/default/manager_auth_proxy_patch.yaml
@@ -48,7 +48,7 @@ spec:
requests:
cpu: 5m
memory: 64Mi
- - name: bpfd-operator
+ - name: bpfman-operator
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
diff --git a/bpfd-operator/config/default/manager_config_patch.yaml b/bpfman-operator/config/default/manager_config_patch.yaml
similarity index 80%
rename from bpfd-operator/config/default/manager_config_patch.yaml
rename to bpfman-operator/config/default/manager_config_patch.yaml
index 12d12f087..7d4b43391 100644
--- a/bpfd-operator/config/default/manager_config_patch.yaml
+++ b/bpfman-operator/config/default/manager_config_patch.yaml
@@ -7,4 +7,4 @@ spec:
template:
spec:
containers:
- - name: bpfd-operator
+ - name: bpfman-operator
diff --git a/bpfd-operator/config/manifests/bases/bpfd-operator.clusterserviceversion.yaml b/bpfman-operator/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml
similarity index 92%
rename from bpfd-operator/config/manifests/bases/bpfd-operator.clusterserviceversion.yaml
rename to bpfman-operator/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml
index ad21e5b36..76bc2de64 100644
--- a/bpfd-operator/config/manifests/bases/bpfd-operator.clusterserviceversion.yaml
+++ b/bpfman-operator/config/manifests/bases/bpfman-operator.clusterserviceversion.yaml
@@ -4,9 +4,9 @@ metadata:
annotations:
alm-examples: "[]"
capabilities: Basic Install
- containerImage: quay.io/bpfd/bpfd-operator:v0.0.0
- repository: https://github.com/bpfd-dev/bpfd
- name: bpfd-operator.v0.0.0
+ containerImage: quay.io/bpfman/bpfman-operator:v0.0.0
+ repository: https://github.com/bpfman/bpfman
+ name: bpfman-operator.v0.0.0
namespace: placeholder
spec:
apiservicedefinitions: {}
@@ -15,52 +15,52 @@ spec:
- description: BpfProgram is the Schema for the BpfProgram API
displayName: Bpf Program
kind: BpfProgram
- name: bpfprograms.bpfd.dev
+ name: bpfprograms.bpfman.io
version: v1alpha1
- description: XdpProgram is the Schema for the Xdpprograms API
displayName: Xdp Program
kind: XdpProgram
- name: xdpprograms.bpfd.dev
+ name: xdpprograms.bpfman.io
version: v1alpha1
- description: TcProgram is the Schema for the Tcprograms API
displayName: Tc Program
kind: TcProgram
- name: tcprograms.bpfd.dev
+ name: tcprograms.bpfman.io
version: v1alpha1
- description: TracepointProgram is the Schema for the Tracepointprograms API
displayName: Tracepoint Program
kind: TracepointProgram
- name: tracepointprograms.bpfd.dev
+ name: tracepointprograms.bpfman.io
version: v1alpha1
- description: KprobeProgram is the Schema for the Kprobeprograms API
displayName: Kprobe Program
kind: KprobeProgram
- name: kprobeprograms.bpfd.dev
+ name: kprobeprograms.bpfman.io
version: v1alpha1
- description: UprobeProgram is the Schema for the Uprobeprograms API
displayName: Uprobe Program
kind: UprobeProgram
- name: uprobeprograms.bpfd.dev
+ name: uprobeprograms.bpfman.io
version: v1alpha1
description:
- "The bpfd Operator is a Kubernetes Operator for deploying [bpfd](https://bpfd.netlify.app/),
- a system daemon\nfor managing eBPF programs. It deploys bpfd itself along with
+ "The bpfman Operator is a Kubernetes Operator for deploying [bpfman](https://bpfman.netlify.app/),
+ a system daemon\nfor managing eBPF programs. It deploys bpfman itself along with
CRDs to make deploying\neBPF programs in Kubernetes much easier.\n\n##
- Quick Start\n\nTo get bpfd up and running quickly with self signed certificates
- simply do \nthe following.\n\n```bash\nkubectl create namespace openshift-bpfd\n```\n After creating the namespace simply install
- the bpfd-operator in the desired namespace from operator-hub\n##
- Configuration\n\nThe `bpfd-config` configmap is automatically created in the `bpfd`
- namespace and used to configure the bpfd deployment.\n\nTo edit the config simply
- run\n\n```bash\nkubectl edit cm bpfd-config\n```\n\nThe following fields are adjustable\n\n-
- `bpfd.agent.image`: The image used for the bpfd-agent, defaults to `quay.io/bpfd/bpfd-agent:latest`\n-
- `bpfd.image`: The image used for bpfd, defaults to `quay.io/bpfd/bpfd:latest`\n-
- `bpfd.log.level`: the log level for bpfd, currently supports
- `debug`, `info`, `warn`, `error`, and `fatal`, defaults to `info`\n- `bpfd.agent.log.level`: the log level for the bpfd-agent currently supports `info`, `debug`, and `trace` \n-`bpfd.toml`:
- bpfd's custom configuration file.\n\n## Deploying eBPF Programs\n\nThe bpfd operator
+ Quick Start\n\nTo get bpfman up and running quickly with self signed certificates
+ simply do \nthe following.\n\n```bash\nkubectl create namespace openshift-bpfman\n```\n After creating the namespace simply install
+ the bpfman-operator in the desired namespace from operator-hub\n##
+ Configuration\n\nThe `bpfman-config` configmap is automatically created in the `bpfman`
+ namespace and used to configure the bpfman deployment.\n\nTo edit the config simply
+ run\n\n```bash\nkubectl edit cm bpfman-config\n```\n\nThe following fields are adjustable\n\n-
+ `bpfman.agent.image`: The image used for the bpfman-agent, defaults to `quay.io/bpfman/bpfman-agent:latest`\n-
+ `bpfman.image`: The image used for bpfman, defaults to `quay.io/bpfman/bpfman:latest`\n-
+ `bpfman.log.level`: the log level for bpfman, currently supports
+ `debug`, `info`, `warn`, `error`, and `fatal`, defaults to `info`\n- `bpfman.agent.log.level`: the log level for the bpfman-agent currently supports `info`, `debug`, and `trace` \n-`bpfman.toml`:
+ bpfman's custom configuration file.\n\n## Deploying eBPF Programs\n\nThe bpfman operator
deploys eBPF programs via CRDs. The following CRDs are currently avaliable, \n\n-
XdpProgram\n- TcProgram\n- TracepointProgram\n- KprobeProgram\n- UprobeProgram\n\n## More information\n\nPlease
- checkout the [bpfd community website](https://bpfd.dev/) for more information."
- displayName: Bpfd Operator
+ checkout the [bpfman community website](https://bpfman.io/) for more information."
+ displayName: Bpfman Operator
icon:
- base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iNTEyIgogICBoZWlnaHQ9IjEyOCIKICAgdmlld0JveD0iMCAwIDUxMiAxMjgiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzUiCiAgIGlua3NjYXBlOnZlcnNpb249IjEuMiAoZGMyYWVkYWYwMywgMjAyMi0wNS0xNSkiCiAgIHNvZGlwb2RpOmRvY25hbWU9ImJwZmQuc3ZnIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBpZD0ibmFtZWR2aWV3NyIKICAgICBwYWdlY29sb3I9IiM1MDUwNTAiCiAgICAgYm9yZGVyY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyb3BhY2l0eT0iMSIKICAgICBpbmtzY2FwZTpzaG93cGFnZXNoYWRvdz0iMCIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMCIKICAgICBpbmtzY2FwZTpwYWdlY2hlY2tlcmJvYXJkPSIxIgogICAgIGlua3NjYXBlOmRlc2tjb2xvcj0iIzUwNTA1MCIKICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiCiAgICAgc2hvd2dyaWQ9ImZhbHNlIgogICAgIGlua3NjYXBlOnpvb209IjEuNTM1IgogICAgIGlua3NjYXBlOmN4PSIxNjkuNzA2ODQiCiAgICAgaW5rc2NhcGU6Y3k9Ii01Mi40NDI5OTciCiAgICAgaW5rc2NhcGU6d2luZG93LXdpZHRoPSIxOTIwIgogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9IjEwMjYiCiAgICAgaW5rc2NhcGU6d2luZG93LXg9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LXk9IjAiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJsYXllcjEiIC8+CiAgPGRlZnMKICAgICBpZD0iZGVmczIiPgogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIgogICAgICAgaW5rc2NhcGU6dnBfeD0iMCA6IDY0IDogMSIKICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCIKICAgICAgIGlua3NjYXBlOnZwX3o9IjUxMiA6IDY0IDogMSIKICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIyNTYgOiA0Mi42NjY2NjcgOiAxIgogICAgICAgaWQ9InBlcnNwZWN0aXZlMTc5MjkiIC8+CiAgICA8Y2xpcFBhdGgKICAgICAgIGNsaXBQYXRoVW5pdHM9InVzZXJTcGFjZU9uVXNlIgogICAgICAgaWQ9ImNsaXBQYXRoMjcyNjAiPgogICAgICA8cmVjdAogICAgICAgICBzdHlsZT0iZmlsbDpub25lO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDo0LjM2MjgxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxO3N0cm9rZS1kYXNoYXJyYXk6bm9uZTtzdHJva2Utb3BhY2l0eToxIgogICAgICAgICBpZD0icmVjdDI3MjYyIgogICAgICAgICB3aWR0aD0iMTA3LjE1MTg0IgogICAgICAgICBoZWlnaHQ9IjEwNy4xNTE4NCIKICAgICAgICAgeD0iMjMuMTAzNDE2IgogICAgICAgICB5PSIzMS41MzM0MjgiCiAgICAgICAgIHJ5PSIyMC4xNzk3OSIgLz4KICAgIDwvY2xpcFBhdGg+CiAgPC9kZWZzPgogIDxnCiAgICAgaW5rc2NhcGU6bGFiZWw9IkxheWVyIDEiCiAgICAgaW5rc2NhcGU6Z3JvdXBtb2RlPSJsYXllciIKICAgICBpZD0ibGF5ZXIxIj4KICAgIDxnCiAgICAgICBpZD0iZzI3MzA0IgogICAgICAgdHJhbnNmb3JtPSJtYXRyaXgoMS4wNzAxMDM3LDAsMCwxLjA3MDEwMzcsMTkuMTA3MDU0LC04LjY5MjY1NzcpIj4KICAgICAgPGcKICAgICAgICAgaWQ9ImcyNzI1OCIKICAgICAgICAgY2xpcC1wYXRoPSJ1cmwoI2NsaXBQYXRoMjcyNjApIgogICAgICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtOCwtMTgpIj4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTU2ODAiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC4yOTk4NTI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgdHJhbnNmb3JtPSJzY2FsZSgtMSkiCiAgICAgICAgICAgZD0ibSAtNjYuMDgzNjQsMjQuMTYzNTc4IGEgMTIuMzcyNTI5LDMuOTcyMjMyOCAwIDAgMSAtMTIuMzcyNTI5LDMuOTcyMjMzIDEyLjM3MjUyOSwzLjk3MjIzMjggMCAwIDEgLTEyLjM3MjUyOSwtMy45NzIyMzMgMTIuMzcyNTI5LDMuOTcyMjMyOCAwIDAgMSAxMi4zNzI1MjksLTMuOTcyMjMzIDEyLjM3MjUyOSwzLjk3MjIzMjggMCAwIDEgMTIuMzcyNTI5LDMuOTcyMjMzIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0iZWxsaXBzZTE1Njc4IgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmM2I2MjY7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjAuNDg5NDA3O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIHRyYW5zZm9ybT0ic2NhbGUoLTEpIgogICAgICAgICAgIGQ9Im0gLTU4LjI2MjIyNCwzMC4xNjM1NzggYSAyMC4xOTM5NDUsNi40ODMzMTg4IDAgMCAxIC0yMC4xOTM5NDUsNi40ODMzMTkgMjAuMTkzOTQ1LDYuNDgzMzE4OCAwIDAgMSAtMjAuMTkzOTQ1LC02LjQ4MzMxOSAyMC4xOTM5NDUsNi40ODMzMTg4IDAgMCAxIDIwLjE5Mzk0NSwtNi40ODMzMTkgMjAuMTkzOTQ1LDYuNDgzMzE4OCAwIDAgMSAyMC4xOTM5NDUsNi40ODMzMTkgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTU2NzYiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC43O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIHRyYW5zZm9ybT0ic2NhbGUoLTEpIgogICAgICAgICAgIGQ9Im0gLTQ5LjU3MjczMywzOC4xNjM1NzggYSAyOC44ODM0MzYsOS4yNzMxMDI4IDAgMCAxIC0yOC44ODM0MzYsOS4yNzMxMDMgMjguODgzNDM2LDkuMjczMTAyOCAwIDAgMSAtMjguODgzNDQxLC05LjI3MzEwMyAyOC44ODM0MzYsOS4yNzMxMDI4IDAgMCAxIDI4Ljg4MzQ0MSwtOS4yNzMxMDMgMjguODgzNDM2LDkuMjczMTAyOCAwIDAgMSAyOC44ODM0MzYsOS4yNzMxMDMgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTU2NzQiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC43O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIHRyYW5zZm9ybT0ic2NhbGUoLTEpIgogICAgICAgICAgIGQ9Ik0gLTQwLjEyNjQ4LDQ4LjE2MzU4NiBBIDM4LjMyOTY4OSwxMi4zMDU4NDcgMCAwIDEgLTc4LjQ1NjE2OSw2MC40Njk0MzMgMzguMzI5Njg5LDEyLjMwNTg0NyAwIDAgMSAtMTE2Ljc4NTg2LDQ4LjE2MzU4NiAzOC4zMjk2ODksMTIuMzA1ODQ3IDAgMCAxIC03OC40NTYxNjksMzUuODU3NzM4IDM4LjMyOTY4OSwxMi4zMDU4NDcgMCAwIDEgLTQwLjEyNjQ4LDQ4LjE2MzU4NiBaIiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9ImVsbGlwc2UxNTY3MiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZjNiNjI2O3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDowLjc7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgdHJhbnNmb3JtPSJzY2FsZSgtMSkiCiAgICAgICAgICAgZD0iTSAtMzQuOTE0NzUzLDU4LjE2MzU4NiBBIDQzLjU0MTQxNiwxMy45NzkwODYgMCAwIDEgLTc4LjQ1NjE2OSw3Mi4xNDI2NzIgNDMuNTQxNDE2LDEzLjk3OTA4NiAwIDAgMSAtMTIxLjk5NzU5LDU4LjE2MzU4NiA0My41NDE0MTYsMTMuOTc5MDg2IDAgMCAxIC03OC40NTYxNjksNDQuMTg0NSA0My41NDE0MTYsMTMuOTc5MDg2IDAgMCAxIC0zNC45MTQ3NTMsNTguMTYzNTg2IFoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0icmVjdDE1NjcwIgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmM2I2MjY7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjAuNjI1MDE4O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gNDEuNTY4NTc0LC03MS43MDQ1MzEgaCA3My44NTU1MDYgYyAzLjY5ODc5LDAgNi42NzY1MSwyLjk3NzcyNyA2LjY3NjUxLDYuNjc2NTE5IHYgOS4xMTYwODIgYyAtMTAuMTY0MDQsMjEuMDE4ODc1IC04NC43OTIyMzksMTQuOTc1Nzk5IC04Ny4yMDg1MzQsMCB2IC05LjExNjA4MiBjIDAsLTMuNjk4NzkyIDIuOTc3NzI3LC02LjY3NjUxOSA2LjY3NjUxOCwtNi42NzY1MTkgeiIKICAgICAgICAgICBzb2RpcG9kaTpub2RldHlwZXM9InNzc2Njc3MiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0iZWxsaXBzZTE0ODIyIgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmM2I2MjY7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjAuNztzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJNIDEyMS45OTc1OSwtNzQuMzcwNTE0IEEgNDMuNTQxNDE2LDEzLjk3OTA4NiAwIDAgMSA3OC40NTYxNjksLTYwLjM5MTQyOCA0My41NDE0MTYsMTMuOTc5MDg2IDAgMCAxIDM0LjkxNDc1MywtNzQuMzcwNTE0IDQzLjU0MTQxNiwxMy45NzkwODYgMCAwIDEgNzguNDU2MTY5LC04OC4zNDk2IDQzLjU0MTQxNiwxMy45NzkwODYgMCAwIDEgMTIxLjk5NzU5LC03NC4zNzA1MTQgWiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTQ4MjAiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC43O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMTE2Ljc4NTg2LC04NC4zNzA1MTQgQSAzOC4zMjk2ODksMTIuMzA1ODQ3IDAgMCAxIDc4LjQ1NjE2OSwtNzIuMDY0NjY3IDM4LjMyOTY4OSwxMi4zMDU4NDcgMCAwIDEgNDAuMTI2NDgsLTg0LjM3MDUxNCAzOC4zMjk2ODksMTIuMzA1ODQ3IDAgMCAxIDc4LjQ1NjE2OSwtOTYuNjc2MzYxIDM4LjMyOTY4OSwxMi4zMDU4NDcgMCAwIDEgMTE2Ljc4NTg2LC04NC4zNzA1MTQgWiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJwYXRoMTQ4MTgiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC43O3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gMTA3LjMzOTYxLC05NC4zNzA1MTQgYSAyOC44ODM0MzYsOS4yNzMxMDI4IDAgMCAxIC0yOC44ODM0NDEsOS4yNzMxMDMgMjguODgzNDM2LDkuMjczMTAyOCAwIDAgMSAtMjguODgzNDM2LC05LjI3MzEwMyAyOC44ODM0MzYsOS4yNzMxMDI4IDAgMCAxIDI4Ljg4MzQzNiwtOS4yNzMxMDYgMjguODgzNDM2LDkuMjczMTAyOCAwIDAgMSAyOC44ODM0NDEsOS4yNzMxMDYgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTQ4ODgiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC40ODk0MDc7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0ibSA5OC42NTAxMTQsLTEwMi4zNzA1MSBhIDIwLjE5Mzk0NSw2LjQ4MzMxODggMCAwIDEgLTIwLjE5Mzk0NSw2LjQ4MzMyMyAyMC4xOTM5NDUsNi40ODMzMTg4IDAgMCAxIC0yMC4xOTM5NDUsLTYuNDgzMzIzIDIwLjE5Mzk0NSw2LjQ4MzMxODggMCAwIDEgMjAuMTkzOTQ1LC02LjQ4MzMyIDIwLjE5Mzk0NSw2LjQ4MzMxODggMCAwIDEgMjAuMTkzOTQ1LDYuNDgzMzIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJlbGxpcHNlMTQ4OTAiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2YzYjYyNjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC4yOTk4NTI7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0ibSA5MC44Mjg2OTgsLTEwOC4zNzA1MSBhIDEyLjM3MjUyOSwzLjk3MjIzMjggMCAwIDEgLTEyLjM3MjUyOSwzLjk3MjI0IDEyLjM3MjUyOSwzLjk3MjIzMjggMCAwIDEgLTEyLjM3MjUyOSwtMy45NzIyNCAxMi4zNzI1MjksMy45NzIyMzI4IDAgMCAxIDEyLjM3MjUyOSwtMy45NzIyMyAxMi4zNzI1MjksMy45NzIyMzI4IDAgMCAxIDEyLjM3MjUyOSwzLjk3MjIzIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0icGF0aDE1Njg3IgogICAgICAgICAgIHN0eWxlPSJzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MC40OTQ3MDc7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0ibSA4OS4wNDg0ODMsLTUxLjI1ODI0NCBhIDEwLjExODkzMyw3Ljg3OTUxOSAwIDAgMSAtMTAuMTE4OTMzLDcuODc5NTE5IDEwLjExODkzMyw3Ljg3OTUxOSAwIDAgMSAtMTAuMTE4OTMzLC03Ljg3OTUxOSAxMC4xMTg5MzMsNy44Nzk1MTkgMCAwIDEgMTAuMTE4OTMzLC03Ljg3OTUxOSAxMC4xMTg5MzMsNy44Nzk1MTkgMCAwIDEgMTAuMTE4OTMzLDcuODc5NTE5IHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0icGF0aDIxNjgxIgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNlM2I5MDA7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjEuMDAwMTk7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgdHJhbnNmb3JtPSJtYXRyaXgoMC45OTk2MTU3MiwwLDAsMS4wMDAwMTE1LDUuMDczMTUyNiwzLjQ1NDU3MTMpIgogICAgICAgICAgIGQ9Ik0gNDMuOTQ4MjAxLDM4LjI1OTA3OSAyOS45NDI2MzMsNDYuMzQ1MTk4IDE1LjkzNzA2NCwzOC4yNTkwNzkgViAyMi4wODY4NDIgbCAxNC4wMDU1NjksLTguMDg2MTE5IDE0LjAwNTU2OCw4LjA4NjExOSB6IiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9InVzZTI0MDg4IgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0ibSA2My41MDQ1NTMsMTY2Ljc1Nzk1IC0xNC4wMDAxODYsOC4wODYyMSAtMTQuMDAwMTg3LC04LjA4NjIxIHYgLTE2LjE3MjQyIGwgMTQuMDAwMTg3LC04LjA4NjIyIDE0LjAwMDE4Niw4LjA4NjIyIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQxMDAiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJtIDkyLjUwNDcyOCwxNjYuNzU3OTUgLTE0LjAwMDE4Niw4LjA4NjIxIC0xNC4wMDAxODcsLTguMDg2MjEgdiAtMTYuMTcyNDIgbCAxNC4wMDAxODcsLTguMDg2MjIgMTQuMDAwMTg2LDguMDg2MjIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA0MiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gNDkuMDA0NDY1LDQxLjcxNDA5IDM1LjAwNDI3OSw0OS44MDAzMDIgMjEuMDA0MDkyLDQxLjcxNDA5IFYgMjUuNTQxNjY3IGwgMTQuMDAwMTg3LC04LjA4NjIxMiAxNC4wMDAxODYsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA0NCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMzQuNTA0Mzc4LDY2LjcyMjg2MiAyMC41MDQxOTIsNzQuODA5MDc0IDYuNTA0MDA1Myw2Ni43MjI4NjIgViA1MC41NTA0MzkgbCAxNC4wMDAxODY3LC04LjA4NjIxMiAxNC4wMDAxODYsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA1NCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZjYzAwO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gNzguMDA0NjQxLDQxLjcxNDA5IDY0LjAwNDQ1NSw0OS44MDAzMDIgNTAuMDA0MjY4LDQxLjcxNDA5IFYgMjUuNTQxNjY3IGwgMTQuMDAwMTg3LC04LjA4NjIxMiAxNC4wMDAxODYsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA1NiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gNjMuNTA0NTUzLDY2LjcyMjg2MiA0OS41MDQzNjcsNzQuODA5MDc0IDM1LjUwNDE4LDY2LjcyMjg2MiBWIDUwLjU1MDQzOSBsIDE0LjAwMDE4NywtOC4wODYyMTIgMTQuMDAwMTg2LDguMDg2MjEyIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQwNTgiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJNIDQ5LjAwNDQ2NSw5MS43MzE2MzQgMzUuMDA0Mjc5LDk5LjgxNzg0NiAyMS4wMDQwOTIsOTEuNzMxNjM0IFYgNzUuNTU5MjExIGwgMTQuMDAwMTg3LC04LjA4NjIxMiAxNC4wMDAxODYsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA2MCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMzQuNTA0Mzc4LDExNi43NDA0MSAyMC41MDQxOTIsMTI0LjgyNjYyIDYuNTA0MDA1MywxMTYuNzQwNDEgViAxMDAuNTY3OTggTCAyMC41MDQxOTIsOTIuNDgxNzcxIDM0LjUwNDM3OCwxMDAuNTY3OTggWiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA2NiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMTA3LjAwNDgyLDQxLjcxNDA5IDkzLjAwNDYzLDQ5LjgwMDMwMiA3OS4wMDQ0NDMsNDEuNzE0MDkgViAyNS41NDE2NjcgbCAxNC4wMDAxODcsLTguMDg2MjEyIDE0LjAwMDE5LDguMDg2MjEyIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQwNjgiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmY2MwMDtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJNIDkyLjUwNDcyOCw2Ni43MjI4NjIgNzguNTA0NTQyLDc0LjgwOTA3NCA2NC41MDQzNTUsNjYuNzIyODYyIFYgNTAuNTUwNDM5IGwgMTQuMDAwMTg3LC04LjA4NjIxMiAxNC4wMDAxODYsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA3MCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZjYzAwO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gNzguMDA0NjQxLDkxLjczMTYzNCA2NC4wMDQ0NTUsOTkuODE3ODQ2IDUwLjAwNDI2OCw5MS43MzE2MzQgViA3NS41NTkyMTEgbCAxNC4wMDAxODcsLTguMDg2MjEyIDE0LjAwMDE4Niw4LjA4NjIxMiB6IiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9InVzZTI0MDcyIgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNjODM3Mzc7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0ibSA2My41MDQ1NTMsMTE2Ljc0MDQxIC0xNC4wMDAxODYsOC4wODYyMSAtMTQuMDAwMTg3LC04LjA4NjIxIHYgLTE2LjE3MjQzIGwgMTQuMDAwMTg3LC04LjA4NjIwOSAxNC4wMDAxODYsOC4wODYyMDkgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA3NCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gNDkuMDA0NDY1LDE0MS43NDkxOCAtMTQuMDAwMTg2LDguMDg2MjEgLTE0LjAwMDE4NywtOC4wODYyMSB2IC0xNi4xNzI0MiBsIDE0LjAwMDE4NywtOC4wODYyMiAxNC4wMDAxODYsOC4wODYyMiB6IiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9InVzZTI0MDc4IgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNjODM3Mzc7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0iTSAxMzYuMDA0OTksNDEuNzE0MDkgMTIyLjAwNDgsNDkuODAwMzAyIDEwOC4wMDQ2Miw0MS43MTQwOSBWIDI1LjU0MTY2NyBsIDE0LjAwMDE4LC04LjA4NjIxMiAxNC4wMDAxOSw4LjA4NjIxMiB6IiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9InVzZTI0MDgwIgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0iTSAxMjEuNTA0OSw2Ni43MjI4NjIgMTA3LjUwNDcyLDc0LjgwOTA3NCA5My41MDQ1Myw2Ni43MjI4NjIgViA1MC41NTA0MzkgbCAxNC4wMDAxOSwtOC4wODYyMTIgMTQuMDAwMTgsOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA4MiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojYzgzNzM3O3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMTA3LjAwNDgyLDkxLjczMTYzNCA5My4wMDQ2Myw5OS44MTc4NDYgNzkuMDA0NDQzLDkxLjczMTYzNCBWIDc1LjU1OTIxMSBsIDE0LjAwMDE4NywtOC4wODYyMTIgMTQuMDAwMTksOC4wODYyMTIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA4NCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gOTIuNTA0NzI4LDExNi43NDA0MSAtMTQuMDAwMTg2LDguMDg2MjEgLTE0LjAwMDE4NywtOC4wODYyMSB2IC0xNi4xNzI0MyBsIDE0LjAwMDE4NywtOC4wODYyMDkgMTQuMDAwMTg2LDguMDg2MjA5IHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQwODYiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmY2MwMDtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJtIDc4LjAwNDY0MSwxNDEuNzQ5MTggLTE0LjAwMDE4Niw4LjA4NjIxIC0xNC4wMDAxODcsLTguMDg2MjEgdiAtMTYuMTcyNDIgbCAxNC4wMDAxODcsLTguMDg2MjIgMTQuMDAwMTg2LDguMDg2MjIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA5MiIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZjYzAwO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Ik0gMTUwLjUwNTA3LDY2LjcyMjg2MiAxMzYuNTA0ODksNzQuODA5MDc0IDEyMi41MDQ3LDY2LjcyMjg2MiBWIDUwLjU1MDQzOSBsIDE0LjAwMDE5LC04LjA4NjIxMiAxNC4wMDAxOCw4LjA4NjIxMiB6IiAvPgogICAgICAgIDxwYXRoCiAgICAgICAgICAgaWQ9InVzZTI0MDk0IgogICAgICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjEiCiAgICAgICAgICAgZD0iTSAxMzYuMDA0OTksOTEuNzMxNjM0IDEyMi4wMDQ4LDk5LjgxNzg0NiAxMDguMDA0NjIsOTEuNzMxNjM0IFYgNzUuNTU5MjExIGwgMTQuMDAwMTgsLTguMDg2MjEyIDE0LjAwMDE5LDguMDg2MjEyIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQwOTYiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmY2MwMDtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJtIDEyMS41MDQ5LDExNi43NDA0MSAtMTQuMDAwMTgsOC4wODYyMSAtMTQuMDAwMTksLTguMDg2MjEgdiAtMTYuMTcyNDMgbCAxNC4wMDAxOSwtOC4wODYyMDkgMTQuMDAwMTgsOC4wODYyMDkgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDA5OCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojYzgzNzM3O3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gMTA3LjAwNDgyLDE0MS43NDkxOCAtMTQuMDAwMTksOC4wODYyMSAtMTQuMDAwMTg3LC04LjA4NjIxIHYgLTE2LjE3MjQyIGwgMTQuMDAwMTg3LC04LjA4NjIyIDE0LjAwMDE5LDguMDg2MjIgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDEwOCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gMTUwLjUwNTA3LDExNi43NDA0MSAtMTQuMDAwMTgsOC4wODYyMSAtMTQuMDAwMTksLTguMDg2MjEgdiAtMTYuMTcyNDMgbCAxNC4wMDAxOSwtOC4wODYyMDkgMTQuMDAwMTgsOC4wODYyMDkgeiIgLz4KICAgICAgICA8cGF0aAogICAgICAgICAgIGlkPSJ1c2UyNDExMCIKICAgICAgICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxLjQxNDIxIgogICAgICAgICAgIGQ9Im0gMTM2LjAwNDk5LDE0MS43NDkxOCAtMTQuMDAwMTksOC4wODYyMSAtMTQuMDAwMTgsLTguMDg2MjEgdiAtMTYuMTcyNDIgbCAxNC4wMDAxOCwtOC4wODYyMiAxNC4wMDAxOSw4LjA4NjIyIHoiIC8+CiAgICAgICAgPHBhdGgKICAgICAgICAgICBpZD0idXNlMjQxMTIiCiAgICAgICAgICAgc3R5bGU9ImZpbGw6I2ZmZmZmZjtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMSIKICAgICAgICAgICBkPSJtIDEyMS41MDQ5LDE2Ni43NTc5NSAtMTQuMDAwMTgsOC4wODYyMSAtMTQuMDAwMTksLTguMDg2MjEgdiAtMTYuMTcyNDIgbCAxNC4wMDAxOSwtOC4wODYyMiAxNC4wMDAxOCw4LjA4NjIyIHoiIC8+CiAgICAgIDwvZz4KICAgICAgPHJlY3QKICAgICAgICAgc3R5bGU9ImZpbGw6bm9uZTtmaWxsLW9wYWNpdHk6MTtzdHJva2U6IzAwMDAwMDtzdHJva2Utd2lkdGg6NC4zNjI4MTtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MS40MTQyMTtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgICAgaWQ9InJlY3QyNDU4MiIKICAgICAgICAgd2lkdGg9IjEwNy4xNTE4NCIKICAgICAgICAgaGVpZ2h0PSIxMDcuMTUxODQiCiAgICAgICAgIHg9IjE2LjIxOTkxIgogICAgICAgICB5PSIxMy4zNjI4ODMiCiAgICAgICAgIHJ5PSIyMC4xNzk3OSIgLz4KICAgIDwvZz4KICAgIDx0ZXh0CiAgICAgICB4bWw6c3BhY2U9InByZXNlcnZlIgogICAgICAgc3R5bGU9ImZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtd2VpZ2h0Om5vcm1hbDtmb250LXNpemU6MTEzLjM4M3B4O2xpbmUtaGVpZ2h0OjEuMjU7Zm9udC1mYW1pbHk6c2Fucy1zZXJpZjtmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWRhc2hhcnJheTpub25lIgogICAgICAgeD0iMTc3LjcxMDM5IgogICAgICAgeT0iOTUuODk5MTc4IgogICAgICAgaWQ9InRleHQ2MyI+PHRzcGFuCiAgICAgICAgIHNvZGlwb2RpOnJvbGU9ImxpbmUiCiAgICAgICAgIGlkPSJ0c3BhbjYxIgogICAgICAgICB4PSIxNzcuNzEwMzkiCiAgICAgICAgIHk9Ijk1Ljg5OTE3OCIKICAgICAgICAgc3R5bGU9ImZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6bm9ybWFsO2ZvbnQtc3RyZXRjaDpub3JtYWw7Zm9udC1zaXplOjExMy4zODNweDtmb250LWZhbWlseTonTm90byBTYW5zIE1vbm8nOy1pbmtzY2FwZS1mb250LXNwZWNpZmljYXRpb246J05vdG8gU2FucyBNb25vJztmaWxsOiMwMDAwMDA7c3Ryb2tlOiNmZmZmZmY7c3Ryb2tlLXdpZHRoOjE7c3Ryb2tlLWRhc2hhcnJheTpub25lIj5icGY8dHNwYW4KICAgc3R5bGU9ImZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6bm9ybWFsO2ZvbnQtc3RyZXRjaDpub3JtYWw7Zm9udC1mYW1pbHk6J05vdG8gU2FucyBNb25vJzstaW5rc2NhcGUtZm9udC1zcGVjaWZpY2F0aW9uOidOb3RvIFNhbnMgTW9ubyc7ZmlsbDojMDAwMDAwO3N0cm9rZTojZmZmZmZmO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgaWQ9InRzcGFuMTI5NzUiPmQ8dHNwYW4KICAgc3R5bGU9ImZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6bm9ybWFsO2ZvbnQtc3RyZXRjaDpub3JtYWw7Zm9udC1mYW1pbHk6J05vdG8gU2FucyBNb25vJzstaW5rc2NhcGUtZm9udC1zcGVjaWZpY2F0aW9uOidOb3RvIFNhbnMgTW9ubyc7ZmlsbDojMDAwMDAwO3N0cm9rZS13aWR0aDoxO3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgaWQ9InRzcGFuMTMwMzEiIC8+PC90c3Bhbj48L3RzcGFuPjwvdGV4dD4KICA8L2c+Cjwvc3ZnPgo=
mediatype: image/svg+xml
@@ -81,13 +81,13 @@ spec:
- ebpf
- kubernetes
links:
- - name: bpfd website
- url: https://bpfd.dev/
+ - name: bpfman website
+ url: https://bpfman.io/
maintainers:
- email: astoycos@redhat.com
name: Andrew Stoycos
maturity: alpha
provider:
- name: The bpfd Community
- url: https://bpfd.dev/
+ name: The bpfman Community
+ url: https://bpfman.io/
version: 0.0.0
diff --git a/bpfd-operator/config/manifests/kustomization.yaml b/bpfman-operator/config/manifests/kustomization.yaml
similarity index 95%
rename from bpfd-operator/config/manifests/kustomization.yaml
rename to bpfman-operator/config/manifests/kustomization.yaml
index 68b9bdf77..0d15302c6 100644
--- a/bpfd-operator/config/manifests/kustomization.yaml
+++ b/bpfman-operator/config/manifests/kustomization.yaml
@@ -1,7 +1,7 @@
# These resources constitute the fully configured set of manifests
# used to generate the 'manifests/' directory in a bundle.
resources:
- - bases/bpfd-operator.clusterserviceversion.yaml
+ - bases/bpfman-operator.clusterserviceversion.yaml
- ../openshift
- ../samples
- ../scorecard
diff --git a/bpfd-operator/config/openshift/kustomization.yaml b/bpfman-operator/config/openshift/kustomization.yaml
similarity index 91%
rename from bpfd-operator/config/openshift/kustomization.yaml
rename to bpfman-operator/config/openshift/kustomization.yaml
index 0ee02e5f3..f19671590 100644
--- a/bpfd-operator/config/openshift/kustomization.yaml
+++ b/bpfman-operator/config/openshift/kustomization.yaml
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
-namespace: openshift-bpfd
+namespace: openshift-bpfman
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
-namePrefix: bpfd-
+namePrefix: bpfman-
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
@@ -30,6 +30,6 @@ kind: Kustomization
resources:
- ../crd
- ../rbac
- - ../bpfd-operator-deployment
- - ../bpfd-deployment
+ - ../bpfman-operator-deployment
+ - ../bpfman-deployment
- rbac.yaml
diff --git a/bpfd-operator/config/openshift/manager_auth_proxy_patch.yaml b/bpfman-operator/config/openshift/manager_auth_proxy_patch.yaml
similarity index 98%
rename from bpfd-operator/config/openshift/manager_auth_proxy_patch.yaml
rename to bpfman-operator/config/openshift/manager_auth_proxy_patch.yaml
index 0b932de23..61acfd03f 100644
--- a/bpfd-operator/config/openshift/manager_auth_proxy_patch.yaml
+++ b/bpfman-operator/config/openshift/manager_auth_proxy_patch.yaml
@@ -48,7 +48,7 @@ spec:
requests:
cpu: 5m
memory: 64Mi
- - name: bpfd-operator
+ - name: bpfman-operator
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
diff --git a/bpfd-operator/config/openshift/manager_config_patch.yaml b/bpfman-operator/config/openshift/manager_config_patch.yaml
similarity index 80%
rename from bpfd-operator/config/openshift/manager_config_patch.yaml
rename to bpfman-operator/config/openshift/manager_config_patch.yaml
index 12d12f087..7d4b43391 100644
--- a/bpfd-operator/config/openshift/manager_config_patch.yaml
+++ b/bpfman-operator/config/openshift/manager_config_patch.yaml
@@ -7,4 +7,4 @@ spec:
template:
spec:
containers:
- - name: bpfd-operator
+ - name: bpfman-operator
diff --git a/bpfd-operator/config/openshift/patch.yaml b/bpfman-operator/config/openshift/patch.yaml
similarity index 80%
rename from bpfd-operator/config/openshift/patch.yaml
rename to bpfman-operator/config/openshift/patch.yaml
index 9b1c7c7e3..61b8be2ab 100644
--- a/bpfd-operator/config/openshift/patch.yaml
+++ b/bpfman-operator/config/openshift/patch.yaml
@@ -8,7 +8,7 @@ metadata:
pod-security.kubernetes.io/warn: privileged
annotations:
openshift.io/node-selector: ""
- openshift.io/description: "Openshift bpfd components"
+ openshift.io/description: "Openshift bpfman components"
workload.openshift.io/allowed: "management"
name: system
---
@@ -19,5 +19,5 @@ metadata:
namespace: kube-system
data:
## Can be configured at runtime
- bpfd.log.level: "info"
- bpfd.agent.log.level: "info"
+ bpfman.log.level: "info"
+ bpfman.agent.log.level: "info"
diff --git a/bpfd-operator/config/openshift/rbac.yaml b/bpfman-operator/config/openshift/rbac.yaml
similarity index 81%
rename from bpfd-operator/config/openshift/rbac.yaml
rename to bpfman-operator/config/openshift/rbac.yaml
index d41b21bc0..cbb231004 100644
--- a/bpfd-operator/config/openshift/rbac.yaml
+++ b/bpfman-operator/config/openshift/rbac.yaml
@@ -8,5 +8,5 @@ roleRef:
name: system:openshift:scc:privileged
subjects:
- kind: ServiceAccount
- name: bpfd-daemon
- namespace: openshift-bpfd
+ name: bpfman-daemon
+ namespace: openshift-bpfman
diff --git a/bpfd-operator/config/prometheus/kustomization.yaml b/bpfman-operator/config/prometheus/kustomization.yaml
similarity index 100%
rename from bpfd-operator/config/prometheus/kustomization.yaml
rename to bpfman-operator/config/prometheus/kustomization.yaml
diff --git a/bpfd-operator/config/prometheus/monitor.yaml b/bpfman-operator/config/prometheus/monitor.yaml
similarity index 87%
rename from bpfd-operator/config/prometheus/monitor.yaml
rename to bpfman-operator/config/prometheus/monitor.yaml
index b578cc34f..ec8e60022 100644
--- a/bpfd-operator/config/prometheus/monitor.yaml
+++ b/bpfman-operator/config/prometheus/monitor.yaml
@@ -7,8 +7,8 @@ metadata:
app.kubernetes.io/name: servicemonitor
app.kubernetes.io/instance: controller-manager-metrics-monitor
app.kubernetes.io/component: metrics
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-monitor
namespace: system
diff --git a/bpfd-operator/config/rbac/auth_proxy_client_clusterrole.yaml b/bpfman-operator/config/rbac/auth_proxy_client_clusterrole.yaml
similarity index 64%
rename from bpfd-operator/config/rbac/auth_proxy_client_clusterrole.yaml
rename to bpfman-operator/config/rbac/auth_proxy_client_clusterrole.yaml
index 62c15727f..1e7d25d67 100644
--- a/bpfd-operator/config/rbac/auth_proxy_client_clusterrole.yaml
+++ b/bpfman-operator/config/rbac/auth_proxy_client_clusterrole.yaml
@@ -5,12 +5,12 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: metrics-reader
app.kubernetes.io/component: kube-rbac-proxy
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: metrics-reader
rules:
-- nonResourceURLs:
- - "/metrics"
- verbs:
- - get
+ - nonResourceURLs:
+ - "/metrics"
+ verbs:
+ - get
diff --git a/bpfman-operator/config/rbac/auth_proxy_role.yaml b/bpfman-operator/config/rbac/auth_proxy_role.yaml
new file mode 100644
index 000000000..66d416f26
--- /dev/null
+++ b/bpfman-operator/config/rbac/auth_proxy_role.yaml
@@ -0,0 +1,24 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ labels:
+ app.kubernetes.io/name: clusterrole
+ app.kubernetes.io/instance: proxy-role
+ app.kubernetes.io/component: kube-rbac-proxy
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
+ app.kubernetes.io/managed-by: kustomize
+ name: proxy-role
+rules:
+ - apiGroups:
+ - authentication.k8s.io
+ resources:
+ - tokenreviews
+ verbs:
+ - create
+ - apiGroups:
+ - authorization.k8s.io
+ resources:
+ - subjectaccessreviews
+ verbs:
+ - create
diff --git a/bpfd-operator/config/rbac/auth_proxy_role_binding.yaml b/bpfman-operator/config/rbac/auth_proxy_role_binding.yaml
similarity index 70%
rename from bpfd-operator/config/rbac/auth_proxy_role_binding.yaml
rename to bpfman-operator/config/rbac/auth_proxy_role_binding.yaml
index 90e092382..8b3bce3b2 100644
--- a/bpfd-operator/config/rbac/auth_proxy_role_binding.yaml
+++ b/bpfman-operator/config/rbac/auth_proxy_role_binding.yaml
@@ -5,8 +5,8 @@ metadata:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/instance: proxy-rolebinding
app.kubernetes.io/component: kube-rbac-proxy
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: proxy-rolebinding
roleRef:
@@ -14,6 +14,6 @@ roleRef:
kind: ClusterRole
name: proxy-role
subjects:
-- kind: ServiceAccount
- name: operator
- namespace: system
+ - kind: ServiceAccount
+ name: operator
+ namespace: system
diff --git a/bpfd-operator/config/rbac/auth_proxy_service.yaml b/bpfman-operator/config/rbac/auth_proxy_service.yaml
similarity index 70%
rename from bpfd-operator/config/rbac/auth_proxy_service.yaml
rename to bpfman-operator/config/rbac/auth_proxy_service.yaml
index d003e31bf..9cdd5dac1 100644
--- a/bpfd-operator/config/rbac/auth_proxy_service.yaml
+++ b/bpfman-operator/config/rbac/auth_proxy_service.yaml
@@ -6,16 +6,16 @@ metadata:
app.kubernetes.io/name: service
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/component: kube-rbac-proxy
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: controller-manager-metrics-service
namespace: system
spec:
ports:
- - name: https
- port: 8443
- protocol: TCP
- targetPort: https
+ - name: https
+ port: 8443
+ protocol: TCP
+ targetPort: https
selector:
control-plane: controller-manager
diff --git a/bpfd-operator/config/rbac/bpfd-agent/role.yaml b/bpfman-operator/config/rbac/bpfman-agent/role.yaml
similarity index 87%
rename from bpfd-operator/config/rbac/bpfd-agent/role.yaml
rename to bpfman-operator/config/rbac/bpfman-agent/role.yaml
index 05a290dcb..db7f89e55 100644
--- a/bpfd-operator/config/rbac/bpfd-agent/role.yaml
+++ b/bpfman-operator/config/rbac/bpfman-agent/role.yaml
@@ -6,7 +6,7 @@ metadata:
name: agent-role
rules:
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- bpfprograms
verbs:
@@ -18,13 +18,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- bpfprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- bpfprograms/status
verbs:
@@ -32,7 +32,7 @@ rules:
- patch
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- kprobeprograms
verbs:
@@ -40,13 +40,13 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- kprobeprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tcprograms
verbs:
@@ -54,13 +54,13 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tcprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tracepointprograms
verbs:
@@ -68,13 +68,13 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tracepointprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- uprobeprograms
verbs:
@@ -82,13 +82,13 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- uprobeprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- xdpprograms
verbs:
@@ -96,7 +96,7 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- xdpprograms/finalizers
verbs:
diff --git a/bpfd-operator/config/rbac/bpfd-operator/role.yaml b/bpfman-operator/config/rbac/bpfman-operator/role.yaml
similarity index 89%
rename from bpfd-operator/config/rbac/bpfd-operator/role.yaml
rename to bpfman-operator/config/rbac/bpfman-operator/role.yaml
index 461c13e20..270feceeb 100644
--- a/bpfd-operator/config/rbac/bpfd-operator/role.yaml
+++ b/bpfman-operator/config/rbac/bpfman-operator/role.yaml
@@ -18,7 +18,7 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- bpfprograms
verbs:
@@ -26,13 +26,13 @@ rules:
- list
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- configmaps/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- kprobeprograms
verbs:
@@ -44,13 +44,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- kprobeprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- kprobeprograms/status
verbs:
@@ -58,7 +58,7 @@ rules:
- patch
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tcprograms
verbs:
@@ -70,13 +70,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tcprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tcprograms/status
verbs:
@@ -84,7 +84,7 @@ rules:
- patch
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tracepointprograms
verbs:
@@ -96,13 +96,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tracepointprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- tracepointprograms/status
verbs:
@@ -110,7 +110,7 @@ rules:
- patch
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- uprobeprograms
verbs:
@@ -122,13 +122,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- uprobeprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- uprobeprograms/status
verbs:
@@ -136,7 +136,7 @@ rules:
- patch
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- xdpprograms
verbs:
@@ -148,13 +148,13 @@ rules:
- update
- watch
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- xdpprograms/finalizers
verbs:
- update
- apiGroups:
- - bpfd.dev
+ - bpfman.io
resources:
- xdpprograms/status
verbs:
diff --git a/bpfman-operator/config/rbac/bpfprogram_editor_role.yaml b/bpfman-operator/config/rbac/bpfprogram_editor_role.yaml
new file mode 100644
index 000000000..787cb4e4d
--- /dev/null
+++ b/bpfman-operator/config/rbac/bpfprogram_editor_role.yaml
@@ -0,0 +1,31 @@
+# permissions for end users to edit bpfprograms.
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ labels:
+ app.kubernetes.io/name: clusterrole
+ app.kubernetes.io/instance: bpfprogram-editor-role
+ app.kubernetes.io/component: rbac
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
+ app.kubernetes.io/managed-by: kustomize
+ name: bpfprogram-editor-role
+rules:
+ - apiGroups:
+ - bpfman.io
+ resources:
+ - bpfprograms
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - bpfman.io
+ resources:
+ - bpfprograms/status
+ verbs:
+ - get
diff --git a/bpfd-operator/config/rbac/bpfprogram_viewer_role.yaml b/bpfman-operator/config/rbac/bpfprogram_viewer_role.yaml
similarity index 52%
rename from bpfd-operator/config/rbac/bpfprogram_viewer_role.yaml
rename to bpfman-operator/config/rbac/bpfprogram_viewer_role.yaml
index 2f648a306..ceb2ef4d2 100644
--- a/bpfd-operator/config/rbac/bpfprogram_viewer_role.yaml
+++ b/bpfman-operator/config/rbac/bpfprogram_viewer_role.yaml
@@ -6,22 +6,22 @@ metadata:
app.kubernetes.io/name: clusterrole
app.kubernetes.io/instance: bpfprogram-viewer-role
app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: bpfprogram-viewer-role
rules:
-- apiGroups:
- - bpfd.dev
- resources:
- - bpfprograms
- verbs:
- - get
- - list
- - watch
-- apiGroups:
- - bpfd.dev
- resources:
- - bpfprograms/status
- verbs:
- - get
+ - apiGroups:
+ - bpfman.io
+ resources:
+ - bpfprograms
+ verbs:
+ - get
+ - list
+ - watch
+ - apiGroups:
+ - bpfman.io
+ resources:
+ - bpfprograms/status
+ verbs:
+ - get
diff --git a/bpfman-operator/config/rbac/kustomization.yaml b/bpfman-operator/config/rbac/kustomization.yaml
new file mode 100644
index 000000000..ad78ce73a
--- /dev/null
+++ b/bpfman-operator/config/rbac/kustomization.yaml
@@ -0,0 +1,21 @@
+resources:
+ # All RBAC will be applied under this service account in
+ # the deployment namespace. You may comment out this resource
+ # if your manager will use a service account that exists at
+ # runtime. Be sure to update RoleBinding and ClusterRoleBinding
+ # subjects if changing service account names.
+ - service_account.yaml
+ - bpfman-agent/role.yaml
+ - bpfman-operator/role.yaml
+ - role_binding.yaml
+ - leader_election_role.yaml
+ - leader_election_role_binding.yaml
+ - bpfprogram_editor_role.yaml
+ - bpfprogram_viewer_role.yaml
+ # Comment the following 4 lines if you want to disable
+ # the auth proxy (https://github.com/brancz/kube-rbac-proxy)
+ # which protects your /metrics endpoint.
+ - auth_proxy_service.yaml
+ - auth_proxy_role.yaml
+ - auth_proxy_role_binding.yaml
+ - auth_proxy_client_clusterrole.yaml
diff --git a/bpfman-operator/config/rbac/leader_election_role.yaml b/bpfman-operator/config/rbac/leader_election_role.yaml
new file mode 100644
index 000000000..84ae6cf75
--- /dev/null
+++ b/bpfman-operator/config/rbac/leader_election_role.yaml
@@ -0,0 +1,44 @@
+# permissions to do leader election.
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ labels:
+ app.kubernetes.io/name: role
+ app.kubernetes.io/instance: leader-election-role
+ app.kubernetes.io/component: rbac
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
+ app.kubernetes.io/managed-by: kustomize
+ name: leader-election-role
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ verbs:
+ - get
+ - list
+ - watch
+ - create
+ - update
+ - patch
+ - delete
+ - apiGroups:
+ - coordination.k8s.io
+ resources:
+ - leases
+ verbs:
+ - get
+ - list
+ - watch
+ - create
+ - update
+ - patch
+ - delete
+ - apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+ - patch
diff --git a/bpfd-operator/config/rbac/leader_election_role_binding.yaml b/bpfman-operator/config/rbac/leader_election_role_binding.yaml
similarity index 70%
rename from bpfd-operator/config/rbac/leader_election_role_binding.yaml
rename to bpfman-operator/config/rbac/leader_election_role_binding.yaml
index ac886769b..5104530d6 100644
--- a/bpfd-operator/config/rbac/leader_election_role_binding.yaml
+++ b/bpfman-operator/config/rbac/leader_election_role_binding.yaml
@@ -5,8 +5,8 @@ metadata:
app.kubernetes.io/name: rolebinding
app.kubernetes.io/instance: leader-election-rolebinding
app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: leader-election-rolebinding
roleRef:
@@ -14,6 +14,6 @@ roleRef:
kind: Role
name: leader-election-role
subjects:
-- kind: ServiceAccount
- name: operator
- namespace: system
+ - kind: ServiceAccount
+ name: operator
+ namespace: system
diff --git a/bpfd-operator/config/rbac/role_binding.yaml b/bpfman-operator/config/rbac/role_binding.yaml
similarity index 60%
rename from bpfd-operator/config/rbac/role_binding.yaml
rename to bpfman-operator/config/rbac/role_binding.yaml
index e29f6844f..a1791f6f9 100644
--- a/bpfd-operator/config/rbac/role_binding.yaml
+++ b/bpfman-operator/config/rbac/role_binding.yaml
@@ -4,18 +4,18 @@ metadata:
labels:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
- name: bpfd-operator-rolebinding
+ name: bpfman-operator-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: operator-role
subjects:
-- kind: ServiceAccount
- name: operator
- namespace: system
+ - kind: ServiceAccount
+ name: operator
+ namespace: system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@@ -23,35 +23,35 @@ metadata:
labels:
app.kubernetes.io/name: clusterrolebinding
app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: agent-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
- name: bpfd-agent-role
+ name: bpfman-agent-role
subjects:
-- kind: ServiceAccount
- name: daemon
- namespace: system
----
+ - kind: ServiceAccount
+ name: daemon
+ namespace: system
+---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: rolebinding
app.kubernetes.io/component: rbac
- app.kubernetes.io/created-by: bpfd-operator
- app.kubernetes.io/part-of: bpfd-operator
+ app.kubernetes.io/created-by: bpfman-operator
+ app.kubernetes.io/part-of: bpfman-operator
app.kubernetes.io/managed-by: kustomize
name: agent-rolebinding
- namespace: bpfd
+ namespace: bpfman
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
- name: bpfd-agent-role
+ name: bpfman-agent-role
subjects:
-- kind: ServiceAccount
- name: daemon
- namespace: system
\ No newline at end of file
+ - kind: ServiceAccount
+ name: daemon
+ namespace: system
diff --git a/bpfd-operator/config/rbac/service_account.yaml b/bpfman-operator/config/rbac/service_account.yaml
similarity index 100%
rename from bpfd-operator/config/rbac/service_account.yaml
rename to bpfman-operator/config/rbac/service_account.yaml
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_go_counter_xdpprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_go_counter_xdpprogram.yaml
similarity index 74%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_go_counter_xdpprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_go_counter_xdpprogram.yaml
index 87b8e7c84..e6e756d4c 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_go_counter_xdpprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_go_counter_xdpprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: XdpProgram
metadata:
labels:
@@ -13,4 +13,4 @@ spec:
priority: 5
bytecode:
image:
- url: quay.io/bpfd-bytecode/go-xdp-counter:latest
+ url: quay.io/bpfman-bytecode/go-xdp-counter:latest
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_kprobe_kprobeprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_kprobe_kprobeprogram.yaml
similarity index 82%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_kprobe_kprobeprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_kprobe_kprobeprogram.yaml
index bc593094d..3c605b8b4 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_kprobe_kprobeprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_kprobe_kprobeprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: KprobeProgram
metadata:
labels:
@@ -14,7 +14,7 @@ spec:
retprobe: false
bytecode:
image:
- url: quay.io/bpfd-bytecode/kprobe:latest
+ url: quay.io/bpfman-bytecode/kprobe:latest
globaldata:
GLOBAL_u8:
- 0x01
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_tc_pass_tcprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_tc_pass_tcprogram.yaml
similarity index 82%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_tc_pass_tcprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_tc_pass_tcprogram.yaml
index 72a68e471..35476e5e9 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_tc_pass_tcprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_tc_pass_tcprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: TcProgram
metadata:
labels:
@@ -14,7 +14,7 @@ spec:
direction: ingress
bytecode:
image:
- url: quay.io/bpfd-bytecode/tc_pass:latest
+ url: quay.io/bpfman-bytecode/tc_pass:latest
globaldata:
GLOBAL_u8:
- 0x01
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_tracepoint_tracepointprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_tracepoint_tracepointprogram.yaml
similarity index 81%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_tracepoint_tracepointprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_tracepoint_tracepointprogram.yaml
index 707d69286..899bcfb85 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_tracepoint_tracepointprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_tracepoint_tracepointprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: TracepointProgram
metadata:
labels:
@@ -12,7 +12,7 @@ spec:
- syscalls/sys_enter_openat
bytecode:
image:
- url: quay.io/bpfd-bytecode/tracepoint:latest
+ url: quay.io/bpfman-bytecode/tracepoint:latest
globaldata:
GLOBAL_u8:
- 0x01
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_uprobe_uprobeprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_uprobe_uprobeprogram.yaml
similarity index 82%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_uprobe_uprobeprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_uprobe_uprobeprogram.yaml
index 6e87fc86b..7e1ad1b43 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_uprobe_uprobeprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_uprobe_uprobeprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: UprobeProgram
metadata:
labels:
@@ -11,12 +11,12 @@ spec:
func_name: syscall
# offset: 0 # optional offset w/in function
target:
- - /bpfd
+ - /bpfman
retprobe: false
# pid: 0 # optional pid to execute uprobe for
bytecode:
image:
- url: quay.io/bpfd-bytecode/uprobe:latest
+ url: quay.io/bpfman-bytecode/uprobe:latest
globaldata:
GLOBAL_u8:
- 0x01
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_private_xdpprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_private_xdpprogram.yaml
similarity index 52%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_private_xdpprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_private_xdpprogram.yaml
index 669d8cde2..8e15f940a 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_private_xdpprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_private_xdpprogram.yaml
@@ -1,6 +1,6 @@
# Try this out by first creating the secret:
-# kubectl create secret -n bpfd docker-registry regcred --docker-server=quay.io --docker-username=bpfd-bytecode+bpfdcreds --docker-password=JOGZ3FA6A9L2297JAT4FFN6CJU87LKTIY6X1ZGKWJ0W0XLKY0KPT5YKTBBEAGSF5
-apiVersion: bpfd.dev/v1alpha1
+# kubectl create secret -n bpfman docker-registry regcred --docker-server=quay.io --docker-username=bpfman-bytecode+bpfmancreds --docker-password=JOGZ3FA6A9L2297JAT4FFN6CJU87LKTIY6X1ZGKWJ0W0XLKY0KPT5YKTBBEAGSF5
+apiVersion: bpfman.io/v1alpha1
kind: XdpProgram
metadata:
labels:
@@ -17,5 +17,5 @@ spec:
image:
imagepullsecret:
name: regcred
- namespace: bpfd
- url: quay.io/bpfd-bytecode/xdp_pass_private:latest
+ namespace: bpfman
+ url: quay.io/bpfman-bytecode/xdp_pass_private:latest
diff --git a/bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_xdpprogram.yaml b/bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_xdpprogram.yaml
similarity index 81%
rename from bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_xdpprogram.yaml
rename to bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_xdpprogram.yaml
index 132adc67a..b81ad54bc 100644
--- a/bpfd-operator/config/samples/bpfd.io_v1alpha1_xdp_pass_xdpprogram.yaml
+++ b/bpfman-operator/config/samples/bpfman.io_v1alpha1_xdp_pass_xdpprogram.yaml
@@ -1,4 +1,4 @@
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: XdpProgram
metadata:
labels:
@@ -13,7 +13,7 @@ spec:
priority: 0
bytecode:
image:
- url: quay.io/bpfd-bytecode/xdp_pass:latest
+ url: quay.io/bpfman-bytecode/xdp_pass:latest
globaldata:
GLOBAL_u8:
- 0x01
diff --git a/bpfman-operator/config/samples/kustomization.yaml b/bpfman-operator/config/samples/kustomization.yaml
new file mode 100644
index 000000000..9748e1a05
--- /dev/null
+++ b/bpfman-operator/config/samples/kustomization.yaml
@@ -0,0 +1,8 @@
+## Append samples you want in your CSV to this file as resources ##
+resources:
+ - bpfman.io_v1alpha1_xdp_pass_xdpprogram.yaml
+ - bpfman.io_v1alpha1_tracepoint_tracepointprogram.yaml
+ - bpfman.io_v1alpha1_tc_pass_tcprogram.yaml
+ - bpfman.io_v1alpha1_kprobe_kprobeprogram.yaml
+ - bpfman.io_v1alpha1_uprobe_uprobeprogram.yaml
+# +kubebuilder:scaffold:manifestskustomizesamples
diff --git a/bpfd-operator/config/scorecard/bases/config.yaml b/bpfman-operator/config/scorecard/bases/config.yaml
similarity index 100%
rename from bpfd-operator/config/scorecard/bases/config.yaml
rename to bpfman-operator/config/scorecard/bases/config.yaml
diff --git a/bpfd-operator/config/scorecard/kustomization.yaml b/bpfman-operator/config/scorecard/kustomization.yaml
similarity index 100%
rename from bpfd-operator/config/scorecard/kustomization.yaml
rename to bpfman-operator/config/scorecard/kustomization.yaml
diff --git a/bpfd-operator/config/scorecard/patches/basic.config.yaml b/bpfman-operator/config/scorecard/patches/basic.config.yaml
similarity index 100%
rename from bpfd-operator/config/scorecard/patches/basic.config.yaml
rename to bpfman-operator/config/scorecard/patches/basic.config.yaml
diff --git a/bpfd-operator/config/scorecard/patches/olm.config.yaml b/bpfman-operator/config/scorecard/patches/olm.config.yaml
similarity index 100%
rename from bpfd-operator/config/scorecard/patches/olm.config.yaml
rename to bpfman-operator/config/scorecard/patches/olm.config.yaml
diff --git a/bpfd-operator/config/test/kustomization.yaml b/bpfman-operator/config/test/kustomization.yaml
similarity index 89%
rename from bpfd-operator/config/test/kustomization.yaml
rename to bpfman-operator/config/test/kustomization.yaml
index 1474b9b40..5f52dab86 100644
--- a/bpfd-operator/config/test/kustomization.yaml
+++ b/bpfman-operator/config/test/kustomization.yaml
@@ -1,12 +1,12 @@
# Adds namespace to all resources.
-namespace: bpfd
+namespace: bpfman
# Value of this field is prepended to the
# names of all resources, e.g. a deployment named
# "wordpress" becomes "alices-wordpress".
# Note that it should also match with the prefix (text before '-') of the namespace
# field above.
-namePrefix: bpfd-
+namePrefix: bpfman-
# Labels to add to all resources and selectors.
# commonLabels:
@@ -41,9 +41,9 @@ kind: Kustomization
resources:
- ../crd
- ../rbac
- - ../bpfd-deployment
- - ../bpfd-operator-deployment
+ - ../bpfman-deployment
+ - ../bpfman-operator-deployment
images:
- - name: quay.io/bpfd/bpfd-operator
- newName: quay.io/bpfd/bpfd-operator
+ - name: quay.io/bpfman/bpfman-operator
+ newName: quay.io/bpfman/bpfman-operator
newTag: int-test
diff --git a/bpfd-operator/config/test/manager_auth_proxy_patch.yaml b/bpfman-operator/config/test/manager_auth_proxy_patch.yaml
similarity index 98%
rename from bpfd-operator/config/test/manager_auth_proxy_patch.yaml
rename to bpfman-operator/config/test/manager_auth_proxy_patch.yaml
index 0b932de23..61acfd03f 100644
--- a/bpfd-operator/config/test/manager_auth_proxy_patch.yaml
+++ b/bpfman-operator/config/test/manager_auth_proxy_patch.yaml
@@ -48,7 +48,7 @@ spec:
requests:
cpu: 5m
memory: 64Mi
- - name: bpfd-operator
+ - name: bpfman-operator
args:
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=127.0.0.1:8080"
diff --git a/bpfd-operator/config/test/manager_config_patch.yaml b/bpfman-operator/config/test/manager_config_patch.yaml
similarity index 80%
rename from bpfd-operator/config/test/manager_config_patch.yaml
rename to bpfman-operator/config/test/manager_config_patch.yaml
index 12d12f087..7d4b43391 100644
--- a/bpfd-operator/config/test/manager_config_patch.yaml
+++ b/bpfman-operator/config/test/manager_config_patch.yaml
@@ -7,4 +7,4 @@ spec:
template:
spec:
containers:
- - name: bpfd-operator
+ - name: bpfman-operator
diff --git a/bpfman-operator/config/test/patch.yaml b/bpfman-operator/config/test/patch.yaml
new file mode 100644
index 000000000..a63067e24
--- /dev/null
+++ b/bpfman-operator/config/test/patch.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: config
+ namespace: kube-system
+data:
+ bpfman.agent.image: quay.io/bpfman/bpfman-agent:int-test
+ bpfman.image: quay.io/bpfman/bpfman:int-test
+ bpfman.log.level: debug
diff --git a/bpfd-operator/controllers/bpfd-agent/common.go b/bpfman-operator/controllers/bpfman-agent/common.go
similarity index 79%
rename from bpfd-operator/controllers/bpfd-agent/common.go
rename to bpfman-operator/controllers/bpfman-agent/common.go
index ad4f01f72..14636e3e3 100644
--- a/bpfd-operator/controllers/bpfd-agent/common.go
+++ b/bpfman-operator/controllers/bpfman-agent/common.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -34,22 +34,22 @@ import (
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/go-logr/logr"
"google.golang.org/grpc"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=bpfprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=bpfprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=bpfprograms/finalizers,verbs=update
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tcprograms/finalizers,verbs=update
-//+kubebuilder:rbac:groups=bpfd.dev,resources=xdpprograms/finalizers,verbs=update
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tracepointprograms/finalizers,verbs=update
-//+kubebuilder:rbac:groups=bpfd.dev,resources=kprobeprograms/finalizers,verbs=update
-//+kubebuilder:rbac:groups=bpfd.dev,resources=uprobeprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=bpfprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=bpfprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=bpfprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=tcprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=xdpprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=tracepointprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=kprobeprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=uprobeprograms/finalizers,verbs=update
//+kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch
//+kubebuilder:rbac:groups=core,resources=secrets,verbs=get
@@ -60,28 +60,28 @@ const (
// ReconcilerCommon provides a skeleton for all *Program Reconcilers.
type ReconcilerCommon struct {
client.Client
- Scheme *runtime.Scheme
- GrpcConn *grpc.ClientConn
- BpfdClient gobpfd.BpfdClient
- Logger logr.Logger
- NodeName string
- progId *uint32
+ Scheme *runtime.Scheme
+ GrpcConn *grpc.ClientConn
+ BpfmanClient gobpfman.BpfmanClient
+ Logger logr.Logger
+ NodeName string
+ progId *uint32
}
-// bpfdReconciler defines a generic bpfProgram K8s object reconciler which can
-// program bpfd from user intent in K8s CRDs.
-type bpfdReconciler interface {
+// bpfmanReconciler defines a generic bpfProgram K8s object reconciler which can
+// program bpfman from user intent in K8s CRDs.
+type bpfmanReconciler interface {
getRecCommon() *ReconcilerCommon
- reconcileBpfdProgram(context.Context,
- map[string]*gobpfd.ListResponse_ListResult,
- *bpfdiov1alpha1.BytecodeSelector,
- *bpfdiov1alpha1.BpfProgram,
+ reconcileBpfmanProgram(context.Context,
+ map[string]*gobpfman.ListResponse_ListResult,
+ *bpfmaniov1alpha1.BytecodeSelector,
+ *bpfmaniov1alpha1.BpfProgram,
bool,
bool,
- *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error)
+ *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error)
getFinalizer() string
getRecType() string
- expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error)
+ expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error)
}
// Only return node updates for our node (all events)
@@ -119,7 +119,7 @@ func isNodeSelected(selector *metav1.LabelSelector, nodeLabels map[string]string
return selectorTool.Matches(nodeLabelSet), nil
}
-func getInterfaces(interfaceSelector *bpfdiov1alpha1.InterfaceSelector, ourNode *v1.Node) ([]string, error) {
+func getInterfaces(interfaceSelector *bpfmaniov1alpha1.InterfaceSelector, ourNode *v1.Node) ([]string, error) {
var interfaces []string
if interfaceSelector.Interfaces != nil {
@@ -127,7 +127,7 @@ func getInterfaces(interfaceSelector *bpfdiov1alpha1.InterfaceSelector, ourNode
}
if interfaceSelector.PrimaryNodeInterface != nil {
- nodeIface, err := bpfdagentinternal.GetPrimaryNodeInterface(ourNode)
+ nodeIface, err := bpfmanagentinternal.GetPrimaryNodeInterface(ourNode)
if err != nil {
return nil, err
}
@@ -160,7 +160,7 @@ func (r *ReconcilerCommon) removeFinalizer(ctx context.Context, o client.Object,
// updateStatus updates the status of a BpfProgram object if needed, returning
// false if the status was already set for the given bpfProgram, meaning reconciliation
// may continue.
-func (r *ReconcilerCommon) updateStatus(ctx context.Context, prog *bpfdiov1alpha1.BpfProgram, cond bpfdiov1alpha1.BpfProgramConditionType) bool {
+func (r *ReconcilerCommon) updateStatus(ctx context.Context, prog *bpfmaniov1alpha1.BpfProgram, cond bpfmaniov1alpha1.BpfProgramConditionType) bool {
r.Logger.V(1).Info("updateStatus()", "existing conds", prog.Status.Conditions, "new cond", cond)
@@ -197,8 +197,8 @@ func (r *ReconcilerCommon) updateStatus(ctx context.Context, prog *bpfdiov1alpha
return true
}
-func (r *ReconcilerCommon) getExistingBpfProgs(ctx context.Context, owner metav1.Object) (map[string]bpfdiov1alpha1.BpfProgram, error) {
- bpfProgramList := &bpfdiov1alpha1.BpfProgramList{}
+func (r *ReconcilerCommon) getExistingBpfProgs(ctx context.Context, owner metav1.Object) (map[string]bpfmaniov1alpha1.BpfProgram, error) {
+ bpfProgramList := &bpfmaniov1alpha1.BpfProgramList{}
// Only list bpfPrograms for this *Program and the controller's node
opts := []client.ListOption{
@@ -210,7 +210,7 @@ func (r *ReconcilerCommon) getExistingBpfProgs(ctx context.Context, owner metav1
return nil, err
}
- existingProgs := map[string]bpfdiov1alpha1.BpfProgram{}
+ existingProgs := map[string]bpfmaniov1alpha1.BpfProgram{}
for _, bpfProg := range bpfProgramList.Items {
existingProgs[bpfProg.GetName()] = bpfProg
}
@@ -225,8 +225,8 @@ func (r *ReconcilerCommon) createBpfProgram(ctx context.Context,
finalizer string,
owner metav1.Object,
ownerType string,
- annotations map[string]string) (*bpfdiov1alpha1.BpfProgram, error) {
- bpfProg := &bpfdiov1alpha1.BpfProgram{
+ annotations map[string]string) (*bpfmaniov1alpha1.BpfProgram, error) {
+ bpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgramName,
Finalizers: []string{finalizer},
@@ -234,10 +234,10 @@ func (r *ReconcilerCommon) createBpfProgram(ctx context.Context,
internal.K8sHostLabel: r.NodeName},
Annotations: annotations,
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: ownerType,
},
- Status: bpfdiov1alpha1.BpfProgramStatus{Conditions: []metav1.Condition{}},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{Conditions: []metav1.Condition{}},
}
// Make the corresponding BpfProgramConfig the owner
@@ -251,17 +251,17 @@ func (r *ReconcilerCommon) createBpfProgram(ctx context.Context,
// reconcileProgram is called by ALL *Program controllers, and contains much of
// the core logic for taking *Program objects, turning them into bpfProgram
// object(s), and ultimately telling the custom controller types to load real
-// bpf programs on the node via bpfd. Additionally it acts as a central point for
+// bpf programs on the node via bpfman. Additionally it acts as a central point for
// interacting with the K8s API. This function will exit if any action is taken
// against the K8s API. If the function returns a retry boolean and error, the
// reconcile will be retried based on a default 5 second interval if the retry
// boolean is set to `true`.
func reconcileProgram(ctx context.Context,
- rec bpfdReconciler,
+ rec bpfmanReconciler,
program client.Object,
- common *bpfdiov1alpha1.BpfProgramCommon,
+ common *bpfmaniov1alpha1.BpfProgramCommon,
ourNode *v1.Node,
- programMap map[string]*gobpfd.ListResponse_ListResult) (internal.ReconcileResult, error) {
+ programMap map[string]*gobpfman.ListResponse_ListResult) (internal.ReconcileResult, error) {
// initialize reconciler state
r := rec.getRecCommon()
@@ -305,7 +305,7 @@ func reconcileProgram(ctx context.Context,
// multiplex signals into kubernetes API actions
switch isBeingDeleted {
// Deletion of a *Program takes a few steps if there's existing bpfPrograms:
- // 1. Reconcile the bpfProgram (take bpfd cleanup steps).
+ // 1. Reconcile the bpfProgram (take bpfman cleanup steps).
// 2. Remove any finalizers from the bpfProgram Object.
// 3. Update the condition on the bpfProgram to BpfProgCondUnloaded so the
// operator knows it's safe to remove the parent Program Object, which
@@ -314,7 +314,7 @@ func reconcileProgram(ctx context.Context,
for _, prog := range existingPrograms {
// Reconcile the bpfProgram if error write condition and exit with
// retry.
- cond, err := rec.reconcileBpfdProgram(ctx,
+ cond, err := rec.reconcileBpfmanProgram(ctx,
programMap,
&common.ByteCode,
&prog,
@@ -324,7 +324,7 @@ func reconcileProgram(ctx context.Context,
)
if err != nil {
r.updateStatus(ctx, &prog, cond)
- return internal.Requeue, fmt.Errorf("failed to delete bpfd program: %v", err)
+ return internal.Requeue, fmt.Errorf("failed to delete bpfman program: %v", err)
}
if r.removeFinalizer(ctx, &prog, rec.getFinalizer()) {
@@ -352,7 +352,7 @@ func reconcileProgram(ctx context.Context,
// bpfProgram Object exists go ahead and reconcile it, if there is
// an error write condition and exit with retry.
- cond, err := rec.reconcileBpfdProgram(ctx,
+ cond, err := rec.reconcileBpfmanProgram(ctx,
programMap,
&common.ByteCode,
&prog,
@@ -363,21 +363,21 @@ func reconcileProgram(ctx context.Context,
if err != nil {
if r.updateStatus(ctx, &prog, cond) {
// Return an error the first time.
- return internal.Updated, fmt.Errorf("failed to reconcile bpfd program: %v", err)
+ return internal.Updated, fmt.Errorf("failed to reconcile bpfman program: %v", err)
}
} else {
// Make sure if we're not selected exit and write correct condition
- if cond == bpfdiov1alpha1.BpfProgCondNotSelected ||
- cond == bpfdiov1alpha1.BpfProgCondMapOwnerNotFound ||
- cond == bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded {
+ if cond == bpfmaniov1alpha1.BpfProgCondNotSelected ||
+ cond == bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound ||
+ cond == bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded {
// Write NodeNodeSelected status
if r.updateStatus(ctx, &prog, cond) {
- r.Logger.V(1).Info("Update condition from bpfd reconcile", "condition", cond)
+ r.Logger.V(1).Info("Update condition from bpfman reconcile", "condition", cond)
return internal.Updated, nil
}
}
- existingId, err := bpfdagentinternal.GetID(&prog)
+ existingId, err := bpfmanagentinternal.GetID(&prog)
if err != nil {
return internal.Requeue, fmt.Errorf("failed to get kernel id from bpfProgram: %v", err)
}
@@ -445,7 +445,7 @@ func ProcessMapOwnerParam(ctx context.Context,
labelMap[key] = value
}
opts := []client.ListOption{labelMap}
- bpfProgramList := &bpfdiov1alpha1.BpfProgramList{}
+ bpfProgramList := &bpfmaniov1alpha1.BpfProgramList{}
r.Logger.V(1).Info("MapOwner Labels:", "opts", opts)
err := r.List(ctx, bpfProgramList, opts...)
if err != nil {
@@ -461,14 +461,14 @@ func ProcessMapOwnerParam(ctx context.Context,
mapOwnerStatus.isFound = true
// Get bpfProgram based on UID meta
- prog, err := bpfdagentinternal.GetBpfdProgram(ctx, r.BpfdClient, bpfProgramList.Items[0].GetUID())
+ prog, err := bpfmanagentinternal.GetBpfmanProgram(ctx, r.BpfmanClient, bpfProgramList.Items[0].GetUID())
if err != nil {
- return nil, fmt.Errorf("failed to get bpfd program for BpfProgram with UID %s: %v", bpfProgramList.Items[0].GetUID(), err)
+ return nil, fmt.Errorf("failed to get bpfman program for BpfProgram with UID %s: %v", bpfProgramList.Items[0].GetUID(), err)
}
kernelInfo := prog.GetKernelInfo()
if kernelInfo == nil {
- return nil, fmt.Errorf("failed to process bpfd program for BpfProgram with UID %s: %v", bpfProgramList.Items[0].GetUID(), err)
+ return nil, fmt.Errorf("failed to process bpfman program for BpfProgram with UID %s: %v", bpfProgramList.Items[0].GetUID(), err)
}
mapOwnerStatus.mapOwnerId = &kernelInfo.Id
@@ -477,7 +477,7 @@ func ProcessMapOwnerParam(ctx context.Context,
conLen := len(bpfProgramList.Items[0].Status.Conditions)
if conLen > 0 &&
bpfProgramList.Items[0].Status.Conditions[conLen-1].Type ==
- string(bpfdiov1alpha1.BpfProgCondLoaded) {
+ string(bpfmaniov1alpha1.BpfProgCondLoaded) {
mapOwnerStatus.isLoaded = true
}
diff --git a/bpfd-operator/controllers/bpfd-agent/discovered_program.go b/bpfman-operator/controllers/bpfman-agent/discovered_program.go
similarity index 86%
rename from bpfd-operator/controllers/bpfd-agent/discovered_program.go
rename to bpfman-operator/controllers/bpfman-agent/discovered_program.go
index a909045e8..8f4383cb9 100644
--- a/bpfd-operator/controllers/bpfd-agent/discovered_program.go
+++ b/bpfman-operator/controllers/bpfman-agent/discovered_program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -29,9 +29,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
v1 "k8s.io/api/core/v1"
)
@@ -56,7 +56,7 @@ func (r *DiscoveredProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
builder.WithPredicates(predicate.And(predicate.ResourceVersionChangedPredicate{}, nodePredicate(r.NodeName))),
).
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -75,8 +75,8 @@ func (r *DiscoveredProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
ctxLogger := log.FromContext(ctx)
ctxLogger.V(2).Info("Reconcile DiscoveredProgs: Enter", "ReconcileKey", req)
- // Get existing ebpf state from bpfd.
- programs, err := bpfdagentinternal.ListAllPrograms(ctx, r.BpfdClient)
+ // Get existing ebpf state from bpfman.
+ programs, err := bpfmanagentinternal.ListAllPrograms(ctx, r.BpfmanClient)
if err != nil {
r.Logger.Error(err, "failed to list loaded bpf programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
@@ -87,14 +87,14 @@ func (r *DiscoveredProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
client.MatchingLabels{internal.DiscoveredLabel: "", internal.K8sHostLabel: r.NodeName},
}
- existingPrograms := bpfdiov1alpha1.BpfProgramList{}
+ existingPrograms := bpfmaniov1alpha1.BpfProgramList{}
err = r.Client.List(ctx, &existingPrograms, opts...)
if err != nil {
r.Logger.Error(err, "failed to list existing discovered bpfProgram objects")
}
// build an indexable map of existing programs based on bpfProgram name
- existingProgramIndex := map[string]bpfdiov1alpha1.BpfProgram{}
+ existingProgramIndex := map[string]bpfmaniov1alpha1.BpfProgram{}
for _, p := range existingPrograms.Items {
existingProgramIndex[p.Name] = p
}
@@ -107,7 +107,7 @@ func (r *DiscoveredProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
programInfo := p.GetInfo()
if programInfo != nil {
- // skip bpf programs loaded by bpfd, their corresponding bpfProgram object
+ // skip bpf programs loaded by bpfman, their corresponding bpfProgram object
// will be managed by another controller.
metadata := programInfo.GetMetadata()
if _, ok := metadata[internal.UuidMetadataKey]; ok {
@@ -126,17 +126,17 @@ func (r *DiscoveredProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
bpfProgName = fmt.Sprintf("%s-%d-%s", strings.ReplaceAll(kernelInfo.Name, "_", "-"), kernelInfo.Id, r.NodeName)
}
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
Labels: map[string]string{internal.DiscoveredLabel: "",
internal.K8sHostLabel: r.NodeName},
- Annotations: bpfdagentinternal.Build_kernel_info_annotations(p),
+ Annotations: bpfmanagentinternal.Build_kernel_info_annotations(p),
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: internal.ProgramType(kernelInfo.ProgramType).String(),
},
- Status: bpfdiov1alpha1.BpfProgramStatus{Conditions: []metav1.Condition{}},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{Conditions: []metav1.Condition{}},
}
existingBpfProg, ok := existingProgramIndex[bpfProgName]
diff --git a/bpfd-operator/controllers/bpfd-agent/discovered_program_test.go b/bpfman-operator/controllers/bpfman-agent/discovered_program_test.go
similarity index 80%
rename from bpfd-operator/controllers/bpfd-agent/discovered_program_test.go
rename to bpfman-operator/controllers/bpfman-agent/discovered_program_test.go
index c5c8d335b..a0624fca0 100644
--- a/bpfd-operator/controllers/bpfd-agent/discovered_program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/discovered_program_test.go
@@ -14,20 +14,20 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -42,17 +42,17 @@ import (
func TestDiscoveredProgramControllerCreate(t *testing.T) {
var (
- namespace = "bpfd"
+ namespace = "bpfman"
fakeNode = testutils.NewNode("fake-control-plane")
ctx = context.TODO()
bpfProgName0 = fmt.Sprintf("%s-%d-%s", "dump-bpf-map", 693, fakeNode.Name)
bpfProgName1 = fmt.Sprintf("%s-%d-%s", "dump-bpf-prog", 694, fakeNode.Name)
bpfProgName2 = fmt.Sprintf("%d-%s", 695, fakeNode.Name)
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
- programs = map[int]*gobpfd.ListResponse_ListResult{
+ programs = map[int]*gobpfman.ListResponse_ListResult{
693: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
Name: "dump_bpf_map",
ProgramType: 26,
Id: 693,
@@ -69,7 +69,7 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
},
},
694: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
Name: "dump_bpf_prog",
ProgramType: 26,
Id: 694,
@@ -87,7 +87,7 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
},
// test program with no name
695: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
ProgramType: 8,
Id: 695,
LoadedAt: "2023-07-20T19:11:11+0000",
@@ -100,12 +100,12 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
VerifiedInsns: 8,
},
},
- // skip program loaded by bpfd
+ // skip program loaded by bpfman
696: {
- Info: &gobpfd.ProgramInfo{
+ Info: &gobpfman.ProgramInfo{
Metadata: map[string]string{internal.UuidMetadataKey: fakeUID},
},
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
ProgramType: 8,
Id: 696,
LoadedAt: "2023-07-20T19:11:11+0000",
@@ -126,19 +126,19 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFakeWithPrograms(programs)
+ cli := agenttestutils.NewBpfmanClientFakeWithPrograms(programs)
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -188,7 +188,7 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[693]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[693]))
// Check the second discovered BpfProgram Object was created successfully
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName1, Namespace: metav1.NamespaceAll}, bpfProg)
@@ -200,7 +200,7 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[694]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[694]))
// Check the third discovered BpfProgram Object was created successfully
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName2, Namespace: metav1.NamespaceAll}, bpfProg)
@@ -212,7 +212,7 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[695]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[695]))
// The fourth reconcile will end up exiting with a 30 second requeue
res, err = r.Reconcile(ctx, req)
@@ -226,17 +226,17 @@ func TestDiscoveredProgramControllerCreate(t *testing.T) {
func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
var (
- namespace = "bpfd"
+ namespace = "bpfman"
fakeNode = testutils.NewNode("fake-control-plane")
ctx = context.TODO()
bpfProgName0 = fmt.Sprintf("%s-%d-%s", "dump-bpf-map", 693, fakeNode.Name)
bpfProgName1 = fmt.Sprintf("%s-%d-%s", "dump-bpf-prog", 694, fakeNode.Name)
bpfProgName2 = fmt.Sprintf("%d-%s", 695, fakeNode.Name)
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
- programs = map[int]*gobpfd.ListResponse_ListResult{
+ programs = map[int]*gobpfman.ListResponse_ListResult{
693: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
Name: "dump_bpf_map",
ProgramType: 26,
Id: 693,
@@ -253,7 +253,7 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
},
},
694: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
Name: "dump_bpf_prog",
ProgramType: 26,
Id: 694,
@@ -271,7 +271,7 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
},
// test program with no name
695: {
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
ProgramType: 8,
Id: 695,
LoadedAt: "2023-07-20T19:11:11+0000",
@@ -284,12 +284,12 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
VerifiedInsns: 8,
},
},
- // skip program loaded by bpfd
+ // skip program loaded by bpfman
696: {
- Info: &gobpfd.ProgramInfo{
+ Info: &gobpfman.ProgramInfo{
Metadata: map[string]string{internal.UuidMetadataKey: fakeUID},
},
- KernelInfo: &gobpfd.KernelProgramInfo{
+ KernelInfo: &gobpfman.KernelProgramInfo{
ProgramType: 8,
Id: 696,
LoadedAt: "2023-07-20T19:11:11+0000",
@@ -310,19 +310,19 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFakeWithPrograms(programs)
+ cli := agenttestutils.NewBpfmanClientFakeWithPrograms(programs)
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -372,7 +372,7 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[693]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[693]))
// Check the second discovered BpfProgram Object was created successfully
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName1, Namespace: metav1.NamespaceAll}, bpfProg)
@@ -384,7 +384,7 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[694]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[694]))
// Check the third discovered BpfProgram Object was created successfully
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName2, Namespace: metav1.NamespaceAll}, bpfProg)
@@ -396,10 +396,10 @@ func TestDiscoveredProgramControllerCreateAndDeleteStale(t *testing.T) {
// node Label was correctly set
require.Equal(t, bpfProg.Labels[internal.K8sHostLabel], fakeNode.Name)
// ensure annotations were correct
- require.Equal(t, bpfProg.Annotations, bpfdagentinternal.Build_kernel_info_annotations(programs[695]))
+ require.Equal(t, bpfProg.Annotations, bpfmanagentinternal.Build_kernel_info_annotations(programs[695]))
// delete program
- _, err = rc.BpfdClient.Unload(ctx, &gobpfd.UnloadRequest{Id: 693})
+ _, err = rc.BpfmanClient.Unload(ctx, &gobpfman.UnloadRequest{Id: 693})
require.NoError(t, err)
// The fourth reconcile will end up deleting the extra bpfProgram
diff --git a/bpfd-operator/controllers/bpfd-agent/internal/auth.go b/bpfman-operator/controllers/bpfman-agent/internal/auth.go
similarity index 100%
rename from bpfd-operator/controllers/bpfd-agent/internal/auth.go
rename to bpfman-operator/controllers/bpfman-agent/internal/auth.go
diff --git a/bpfd-operator/controllers/bpfd-agent/internal/bpfd-core.go b/bpfman-operator/controllers/bpfman-agent/internal/bpfman-core.go
similarity index 66%
rename from bpfd-operator/controllers/bpfd-agent/internal/bpfd-core.go
rename to bpfman-operator/controllers/bpfman-agent/internal/bpfman-core.go
index d5394e8c7..01564bb09 100644
--- a/bpfd-operator/controllers/bpfd-agent/internal/bpfd-core.go
+++ b/bpfman-operator/controllers/bpfman-agent/internal/bpfman-core.go
@@ -21,9 +21,9 @@ import (
"fmt"
"strconv"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/containers/image/docker/reference"
"k8s.io/apimachinery/pkg/types"
@@ -33,20 +33,20 @@ import (
var log = ctrl.Log.WithName("agent-intern")
-func imagePullPolicyConversion(policy bpfdiov1alpha1.PullPolicy) int32 {
+func imagePullPolicyConversion(policy bpfmaniov1alpha1.PullPolicy) int32 {
switch policy {
- case bpfdiov1alpha1.PullAlways:
+ case bpfmaniov1alpha1.PullAlways:
return 0
- case bpfdiov1alpha1.PullIfNotPresent:
+ case bpfmaniov1alpha1.PullIfNotPresent:
return 1
- case bpfdiov1alpha1.PullNever:
+ case bpfmaniov1alpha1.PullNever:
return 2
default:
return 1
}
}
-func GetBytecode(c client.Client, b *bpfdiov1alpha1.BytecodeSelector) (*gobpfd.BytecodeLocation, error) {
+func GetBytecode(c client.Client, b *bpfmaniov1alpha1.BytecodeSelector) (*gobpfman.BytecodeLocation, error) {
if b.Image != nil {
bytecodeImage := b.Image
@@ -79,8 +79,8 @@ func GetBytecode(c client.Client, b *bpfdiov1alpha1.BytecodeSelector) (*gobpfd.B
password = cred.Password
}
- return &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_Image{Image: &gobpfd.BytecodeImage{
+ return &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_Image{Image: &gobpfman.BytecodeImage{
Url: bytecodeImage.Url,
ImagePullPolicy: imagePullPolicyConversion(bytecodeImage.ImagePullPolicy),
Username: &username,
@@ -88,25 +88,25 @@ func GetBytecode(c client.Client, b *bpfdiov1alpha1.BytecodeSelector) (*gobpfd.B
}},
}, nil
} else {
- return &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: *b.Path},
+ return &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: *b.Path},
}, nil
}
}
-func buildBpfdUnloadRequest(id uint32) *gobpfd.UnloadRequest {
- return &gobpfd.UnloadRequest{
+func buildBpfmanUnloadRequest(id uint32) *gobpfman.UnloadRequest {
+ return &gobpfman.UnloadRequest{
Id: id,
}
}
-func LoadBpfdProgram(ctx context.Context, bpfdClient gobpfd.BpfdClient,
- loadRequest *gobpfd.LoadRequest) (*uint32, error) {
- var res *gobpfd.LoadResponse
+func LoadBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient,
+ loadRequest *gobpfman.LoadRequest) (*uint32, error) {
+ var res *gobpfman.LoadResponse
- res, err := bpfdClient.Load(ctx, loadRequest)
+ res, err := bpfmanClient.Load(ctx, loadRequest)
if err != nil {
- return nil, fmt.Errorf("failed to load bpfProgram via bpfd: %w", err)
+ return nil, fmt.Errorf("failed to load bpfProgram via bpfman: %w", err)
}
kernelInfo := res.GetKernelInfo()
if kernelInfo == nil {
@@ -117,25 +117,25 @@ func LoadBpfdProgram(ctx context.Context, bpfdClient gobpfd.BpfdClient,
return &id, nil
}
-func UnloadBpfdProgram(ctx context.Context, bpfdClient gobpfd.BpfdClient, id uint32) error {
- _, err := bpfdClient.Unload(ctx, buildBpfdUnloadRequest(id))
+func UnloadBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, id uint32) error {
+ _, err := bpfmanClient.Unload(ctx, buildBpfmanUnloadRequest(id))
if err != nil {
- return fmt.Errorf("failed to unload bpfProgram via bpfd: %v",
+ return fmt.Errorf("failed to unload bpfProgram via bpfman: %v",
err)
}
return nil
}
-func ListBpfdPrograms(ctx context.Context, bpfdClient gobpfd.BpfdClient, programType internal.ProgramType) (map[string]*gobpfd.ListResponse_ListResult, error) {
- listOnlyBpfdPrograms := true
- listReq := gobpfd.ListRequest{
- ProgramType: programType.Uint32(),
- BpfdProgramsOnly: &listOnlyBpfdPrograms,
+func ListBpfmanPrograms(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, programType internal.ProgramType) (map[string]*gobpfman.ListResponse_ListResult, error) {
+ listOnlyBpfmanPrograms := true
+ listReq := gobpfman.ListRequest{
+ ProgramType: programType.Uint32(),
+ BpfmanProgramsOnly: &listOnlyBpfmanPrograms,
}
- out := map[string]*gobpfd.ListResponse_ListResult{}
+ out := map[string]*gobpfman.ListResponse_ListResult{}
- listResponse, err := bpfdClient.List(ctx, &listReq)
+ listResponse, err := bpfmanClient.List(ctx, &listReq)
if err != nil {
return nil, err
}
@@ -155,12 +155,12 @@ func ListBpfdPrograms(ctx context.Context, bpfdClient gobpfd.BpfdClient, program
return out, nil
}
-func GetBpfdProgram(ctx context.Context, bpfdClient gobpfd.BpfdClient, uuid types.UID) (*gobpfd.ListResponse_ListResult, error) {
- listReq := gobpfd.ListRequest{
+func GetBpfmanProgram(ctx context.Context, bpfmanClient gobpfman.BpfmanClient, uuid types.UID) (*gobpfman.ListResponse_ListResult, error) {
+ listReq := gobpfman.ListRequest{
MatchMetadata: map[string]string{internal.UuidMetadataKey: string(uuid)},
}
- listResponse, err := bpfdClient.List(ctx, &listReq)
+ listResponse, err := bpfmanClient.List(ctx, &listReq)
if err != nil {
return nil, err
}
@@ -172,8 +172,8 @@ func GetBpfdProgram(ctx context.Context, bpfdClient gobpfd.BpfdClient, uuid type
return listResponse.Results[0], nil
}
-func ListAllPrograms(ctx context.Context, bpfdClient gobpfd.BpfdClient) ([]*gobpfd.ListResponse_ListResult, error) {
- listResponse, err := bpfdClient.List(ctx, &gobpfd.ListRequest{})
+func ListAllPrograms(ctx context.Context, bpfmanClient gobpfman.BpfmanClient) ([]*gobpfman.ListResponse_ListResult, error) {
+ listResponse, err := bpfmanClient.List(ctx, &gobpfman.ListRequest{})
if err != nil {
return nil, err
}
@@ -182,7 +182,7 @@ func ListAllPrograms(ctx context.Context, bpfdClient gobpfd.BpfdClient) ([]*gobp
}
// Convert a list result into a set of kernel info annotations
-func Build_kernel_info_annotations(p *gobpfd.ListResponse_ListResult) map[string]string {
+func Build_kernel_info_annotations(p *gobpfman.ListResponse_ListResult) map[string]string {
kernelInfo := p.GetKernelInfo()
if kernelInfo != nil {
return map[string]string{
@@ -205,7 +205,7 @@ func Build_kernel_info_annotations(p *gobpfd.ListResponse_ListResult) map[string
}
// get the program ID from a bpfProgram
-func GetID(p *bpfdiov1alpha1.BpfProgram) (*uint32, error) {
+func GetID(p *bpfmaniov1alpha1.BpfProgram) (*uint32, error) {
idString, ok := p.Annotations[internal.IdAnnotation]
if !ok {
return nil, nil
diff --git a/bpfd-operator/controllers/bpfd-agent/internal/cmp.go b/bpfman-operator/controllers/bpfman-agent/internal/cmp.go
similarity index 97%
rename from bpfd-operator/controllers/bpfd-agent/internal/cmp.go
rename to bpfman-operator/controllers/bpfman-agent/internal/cmp.go
index 556bf7d32..7c6f1d66f 100644
--- a/bpfd-operator/controllers/bpfd-agent/internal/cmp.go
+++ b/bpfman-operator/controllers/bpfman-agent/internal/cmp.go
@@ -20,12 +20,12 @@ import (
"fmt"
"reflect"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
)
// Look at using https://pkg.go.dev/google.golang.org/protobuf/testing/protocmp to simplify.
// Is state equal, ignoring UUID and GRPC type fields.
-func DoesProgExist(actual *gobpfd.ListResponse_ListResult, expected *gobpfd.LoadRequest) (bool, []string) {
+func DoesProgExist(actual *gobpfman.ListResponse_ListResult, expected *gobpfman.LoadRequest) (bool, []string) {
var reasons []string
actualInfo := actual.GetInfo()
diff --git a/bpfd-operator/controllers/bpfd-agent/internal/iface.go b/bpfman-operator/controllers/bpfman-agent/internal/iface.go
similarity index 100%
rename from bpfd-operator/controllers/bpfd-agent/internal/iface.go
rename to bpfman-operator/controllers/bpfman-agent/internal/iface.go
diff --git a/bpfman-operator/controllers/bpfman-agent/internal/test-utils/fake_bpfman_client.go b/bpfman-operator/controllers/bpfman-agent/internal/test-utils/fake_bpfman_client.go
new file mode 100644
index 000000000..051e7e1ca
--- /dev/null
+++ b/bpfman-operator/controllers/bpfman-agent/internal/test-utils/fake_bpfman_client.go
@@ -0,0 +1,120 @@
+/*
+Copyright 2022.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package testutils
+
+import (
+ "context"
+ "fmt"
+ "math/rand"
+
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
+ grpc "google.golang.org/grpc"
+)
+
+type BpfmanClientFake struct {
+ LoadRequests map[int]*gobpfman.LoadRequest
+ UnloadRequests map[int]*gobpfman.UnloadRequest
+ ListRequests []*gobpfman.ListRequest
+ GetRequests map[int]*gobpfman.GetRequest
+ Programs map[int]*gobpfman.ListResponse_ListResult
+ PullBytecodeRequests map[int]*gobpfman.PullBytecodeRequest
+}
+
+func NewBpfmanClientFake() *BpfmanClientFake {
+ return &BpfmanClientFake{
+ LoadRequests: map[int]*gobpfman.LoadRequest{},
+ UnloadRequests: map[int]*gobpfman.UnloadRequest{},
+ ListRequests: []*gobpfman.ListRequest{},
+ GetRequests: map[int]*gobpfman.GetRequest{},
+ Programs: map[int]*gobpfman.ListResponse_ListResult{},
+ PullBytecodeRequests: map[int]*gobpfman.PullBytecodeRequest{},
+ }
+}
+
+func NewBpfmanClientFakeWithPrograms(programs map[int]*gobpfman.ListResponse_ListResult) *BpfmanClientFake {
+ return &BpfmanClientFake{
+ LoadRequests: map[int]*gobpfman.LoadRequest{},
+ UnloadRequests: map[int]*gobpfman.UnloadRequest{},
+ ListRequests: []*gobpfman.ListRequest{},
+ GetRequests: map[int]*gobpfman.GetRequest{},
+ Programs: programs,
+ }
+}
+
+func (b *BpfmanClientFake) Load(ctx context.Context, in *gobpfman.LoadRequest, opts ...grpc.CallOption) (*gobpfman.LoadResponse, error) {
+ id := rand.Intn(100)
+ b.LoadRequests[id] = in
+
+ b.Programs[id] = loadRequestToListResult(in, uint32(id))
+
+ return &gobpfman.LoadResponse{
+ Info: b.Programs[id].Info,
+ KernelInfo: b.Programs[id].KernelInfo,
+ }, nil
+}
+
+func (b *BpfmanClientFake) Unload(ctx context.Context, in *gobpfman.UnloadRequest, opts ...grpc.CallOption) (*gobpfman.UnloadResponse, error) {
+ b.UnloadRequests[int(in.Id)] = in
+ delete(b.Programs, int(in.Id))
+
+ return &gobpfman.UnloadResponse{}, nil
+}
+
+func (b *BpfmanClientFake) List(ctx context.Context, in *gobpfman.ListRequest, opts ...grpc.CallOption) (*gobpfman.ListResponse, error) {
+ b.ListRequests = append(b.ListRequests, in)
+ results := &gobpfman.ListResponse{Results: []*gobpfman.ListResponse_ListResult{}}
+ for _, v := range b.Programs {
+ results.Results = append(results.Results, v)
+ }
+ return results, nil
+}
+
+func loadRequestToListResult(loadReq *gobpfman.LoadRequest, id uint32) *gobpfman.ListResponse_ListResult {
+ mapOwnerId := loadReq.GetMapOwnerId()
+ programInfo := gobpfman.ProgramInfo{
+ Name: loadReq.GetName(),
+ Bytecode: loadReq.GetBytecode(),
+ Attach: loadReq.GetAttach(),
+ GlobalData: loadReq.GetGlobalData(),
+ MapOwnerId: &mapOwnerId,
+ Metadata: loadReq.GetMetadata(),
+ }
+ kernelInfo := gobpfman.KernelProgramInfo{
+ Id: id,
+ ProgramType: loadReq.GetProgramType(),
+ }
+
+ return &gobpfman.ListResponse_ListResult{
+ Info: &programInfo,
+ KernelInfo: &kernelInfo,
+ }
+}
+
+func (b *BpfmanClientFake) Get(ctx context.Context, in *gobpfman.GetRequest, opts ...grpc.CallOption) (*gobpfman.GetResponse, error) {
+ if b.Programs[int(in.Id)] != nil {
+ return &gobpfman.GetResponse{
+ Info: b.Programs[int(in.Id)].Info,
+ KernelInfo: b.Programs[int(in.Id)].KernelInfo,
+ }, nil
+ } else {
+ return nil, fmt.Errorf("Requested program does not exist")
+ }
+}
+
+func (b *BpfmanClientFake) PullBytecode(ctx context.Context, in *gobpfman.PullBytecodeRequest, opts ...grpc.CallOption) (*gobpfman.PullBytecodeResponse, error) {
+ return &gobpfman.PullBytecodeResponse{}, nil
+}
diff --git a/bpfd-operator/controllers/bpfd-agent/kprobe-program.go b/bpfman-operator/controllers/bpfman-agent/kprobe-program.go
similarity index 68%
rename from bpfd-operator/controllers/bpfd-agent/kprobe-program.go
rename to bpfman-operator/controllers/bpfman-agent/kprobe-program.go
index 36cc2f096..ed6ea8088 100644
--- a/bpfd-operator/controllers/bpfd-agent/kprobe-program.go
+++ b/bpfman-operator/controllers/bpfman-agent/kprobe-program.go
@@ -14,17 +14,17 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
"fmt"
"strings"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
@@ -37,12 +37,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=kprobeprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=kprobeprograms,verbs=get;list;watch
// BpfProgramReconciler reconciles a BpfProgram object
type KprobeProgramReconciler struct {
ReconcilerCommon
- currentKprobeProgram *bpfdiov1alpha1.KprobeProgram
+ currentKprobeProgram *bpfmaniov1alpha1.KprobeProgram
ourNode *v1.Node
}
@@ -59,13 +59,13 @@ func (r *KprobeProgramReconciler) getRecType() string {
}
// SetupWithManager sets up the controller with the Manager.
-// The Bpfd-Agent should reconcile whenever a KprobeProgram is updated,
-// load the program to the node via bpfd, and then create a bpfProgram object
+// The Bpfman-Agent should reconcile whenever a KprobeProgram is updated,
+// load the program to the node via bpfman, and then create a bpfProgram object
// to reflect per node state information.
func (r *KprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.KprobeProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
- Owns(&bpfdiov1alpha1.BpfProgram{},
+ For(&bpfmaniov1alpha1.KprobeProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
+ Owns(&bpfmaniov1alpha1.BpfProgram{},
builder.WithPredicates(predicate.And(
internal.BpfProgramTypePredicate(internal.Kprobe.String()),
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -82,8 +82,8 @@ func (r *KprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}
-func (r *KprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error) {
- progs := &bpfdiov1alpha1.BpfProgramList{}
+func (r *KprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error) {
+ progs := &bpfmaniov1alpha1.BpfProgramList{}
for _, function := range r.currentKprobeProgram.Spec.FunctionNames {
// sanitize kprobe name to work in a bpfProgram name
@@ -105,20 +105,20 @@ func (r *KprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpf
func (r *KprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// Initialize node and current program
- r.currentKprobeProgram = &bpfdiov1alpha1.KprobeProgram{}
+ r.currentKprobeProgram = &bpfmaniov1alpha1.KprobeProgram{}
r.ourNode = &v1.Node{}
r.Logger = ctrl.Log.WithName("kprobe")
ctxLogger := log.FromContext(ctx)
ctxLogger.Info("Reconcile Kprobe: Enter", "ReconcileKey", req)
- // Lookup K8s node object for this bpfd-agent This should always succeed
+ // Lookup K8s node object for this bpfman-agent This should always succeed
if err := r.Get(ctx, types.NamespacedName{Namespace: v1.NamespaceAll, Name: r.NodeName}, r.ourNode); err != nil {
- return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfd-agent node %s : %v",
+ return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfman-agent node %s : %v",
req.NamespacedName, err)
}
- kprobePrograms := &bpfdiov1alpha1.KprobeProgramList{}
+ kprobePrograms := &bpfmaniov1alpha1.KprobeProgramList{}
opts := []client.ListOption{}
@@ -132,16 +132,16 @@ func (r *KprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return ctrl.Result{Requeue: false}, nil
}
- // Get existing ebpf state from bpfd.
- programMap, err := bpfdagentinternal.ListBpfdPrograms(ctx, r.BpfdClient, internal.Kprobe)
+ // Get existing ebpf state from bpfman.
+ programMap, err := bpfmanagentinternal.ListBpfmanPrograms(ctx, r.BpfmanClient, internal.Kprobe)
if err != nil {
- r.Logger.Error(err, "failed to list loaded bpfd programs")
+ r.Logger.Error(err, "failed to list loaded bpfman programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
}
// Reconcile each KprobeProgram. Don't return error here because it will trigger an infinite reconcile loop, instead
// report the error to user and retry if specified. For some errors the controller may not decide to retry.
- // Note: This only results in grpc calls to bpfd if we need to change something
+ // Note: This only results in grpc calls to bpfman if we need to change something
requeue := false // initialize requeue to false
for _, kprobeProgram := range kprobePrograms.Items {
r.Logger.Info("KprobeProgramController is reconciling", "currentKprobeProgram", kprobeProgram.Name)
@@ -174,21 +174,21 @@ func (r *KprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
func (r *KprobeProgramReconciler) buildKprobeLoadRequest(
- bytecode *gobpfd.BytecodeLocation,
+ bytecode *gobpfman.BytecodeLocation,
uuid string,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
- mapOwnerId *uint32) *gobpfd.LoadRequest {
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
+ mapOwnerId *uint32) *gobpfman.LoadRequest {
- // Namespace isn't supported yet in bpfd, so set it to an empty string.
+ // Namespace isn't supported yet in bpfman, so set it to an empty string.
namespace := ""
- return &gobpfd.LoadRequest{
+ return &gobpfman.LoadRequest{
Bytecode: bytecode,
Name: r.currentKprobeProgram.Spec.BpfFunctionName,
ProgramType: uint32(internal.Kprobe),
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_KprobeAttachInfo{
- KprobeAttachInfo: &gobpfd.KprobeAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_KprobeAttachInfo{
+ KprobeAttachInfo: &gobpfman.KprobeAttachInfo{
FnName: bpfProgram.Annotations[internal.KprobeProgramFunction],
Offset: r.currentKprobeProgram.Spec.Offset,
Retprobe: r.currentKprobeProgram.Spec.RetProbe,
@@ -202,27 +202,27 @@ func (r *KprobeProgramReconciler) buildKprobeLoadRequest(
}
}
-// reconcileBpfdPrograms ONLY reconciles the bpfd state for a single BpfProgram.
+// reconcileBpfmanPrograms ONLY reconciles the bpfman state for a single BpfProgram.
// It does not interact with the k8s API in any way.
-func (r *KprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
- existingBpfPrograms map[string]*gobpfd.ListResponse_ListResult,
- bytecodeSelector *bpfdiov1alpha1.BytecodeSelector,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
+func (r *KprobeProgramReconciler) reconcileBpfmanProgram(ctx context.Context,
+ existingBpfPrograms map[string]*gobpfman.ListResponse_ListResult,
+ bytecodeSelector *bpfmaniov1alpha1.BytecodeSelector,
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
isNodeSelected bool,
isBeingDeleted bool,
- mapOwnerStatus *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error) {
+ mapOwnerStatus *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error) {
r.Logger.V(1).Info("Existing bpfProgram", "UUID", bpfProgram.UID, "Name", bpfProgram.Name, "CurrentKprobeProgram", r.currentKprobeProgram.Name)
uuid := bpfProgram.UID
- getLoadRequest := func() (*gobpfd.LoadRequest, bpfdiov1alpha1.BpfProgramConditionType, error) {
- bytecode, err := bpfdagentinternal.GetBytecode(r.Client, bytecodeSelector)
+ getLoadRequest := func() (*gobpfman.LoadRequest, bpfmaniov1alpha1.BpfProgramConditionType, error) {
+ bytecode, err := bpfmanagentinternal.GetBytecode(r.Client, bytecodeSelector)
if err != nil {
- return nil, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
+ return nil, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
}
loadRequest := r.buildKprobeLoadRequest(bytecode, string(uuid), bpfProgram, mapOwnerStatus.mapOwnerId)
- return loadRequest, bpfdiov1alpha1.BpfProgCondNone, nil
+ return loadRequest, bpfmaniov1alpha1.BpfProgCondNone, nil
}
existingProgram, doesProgramExist := existingBpfPrograms[string(uuid)]
@@ -231,22 +231,22 @@ func (r *KprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
// If KprobeProgram is being deleted just exit
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
// Make sure if we're not selected just exit
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
// Make sure if the Map Owner is set but not found then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
// Make sure if the Map Owner is set but not loaded then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
// otherwise load it
@@ -255,21 +255,21 @@ func (r *KprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load KprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to load KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ r.Logger.Info("bpfman called to load KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
// prog ID should already have been set if program exists
- id, err := bpfdagentinternal.GetID(bpfProgram)
+ id, err := bpfmanagentinternal.GetID(bpfProgram)
if err != nil {
r.Logger.Error(err, "Failed to get program ID")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
// BpfProgram exists but either KprobeProgram is being deleted, node is no
@@ -280,27 +280,27 @@ func (r *KprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
"isDeleted", isBeingDeleted, "isSelected", isNodeSelected, "mapIsSet", mapOwnerStatus.isSet,
"mapIsFound", mapOwnerStatus.isFound, "mapIsLoaded", mapOwnerStatus.isLoaded, "id", id)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload KprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.Logger.Info("bpfd called to unload KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ r.Logger.Info("bpfman called to unload KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
}
@@ -312,26 +312,26 @@ func (r *KprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
r.Logger.V(1).WithValues("expectedProgram", loadRequest).WithValues("existingProgram", existingProgram).Info("StateMatch")
- isSame, reasons := bpfdagentinternal.DoesProgExist(existingProgram, loadRequest)
+ isSame, reasons := bpfmanagentinternal.DoesProgExist(existingProgram, loadRequest)
if !isSame {
r.Logger.V(1).Info("KprobeProgram is in wrong state, unloading and reloading", "Reason", reasons)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload KprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load KprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, err
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, err
}
- r.Logger.Info("bpfd called to reload KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ r.Logger.Info("bpfman called to reload KprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
} else {
// Program exists and bpfProgram K8s Object is up to date
- r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfd")
+ r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfman")
r.progId = id
}
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
diff --git a/bpfd-operator/controllers/bpfd-agent/kprobe-program_test.go b/bpfman-operator/controllers/bpfman-agent/kprobe-program_test.go
similarity index 74%
rename from bpfd-operator/controllers/bpfd-agent/kprobe-program_test.go
rename to bpfman-operator/controllers/bpfman-agent/kprobe-program_test.go
index 33e14f52a..ac32a2d71 100644
--- a/bpfd-operator/controllers/bpfd-agent/kprobe-program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/kprobe-program_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -24,13 +24,13 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/testing/protocmp"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -46,7 +46,7 @@ import (
func TestKprobeProgramControllerCreate(t *testing.T) {
var (
name = "fakeKprobeProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
functionName = "try_to_wake_up"
@@ -56,19 +56,19 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
fakeNode = testutils.NewNode("fake-control-plane")
ctx = context.TODO()
bpfProgName = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, "try-to-wake-up")
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
// A KprobeProgram object with metadata and spec.
- Kprobe := &bpfdiov1alpha1.KprobeProgram{
+ Kprobe := &bpfmaniov1alpha1.KprobeProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.KprobeProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.KprobeProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -83,21 +83,21 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Kprobe)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.KprobeProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Kprobe)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.KprobeProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -144,7 +144,7 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
err = cl.Update(ctx, bpfProg)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Request and update the
+ // Second reconcile should create the bpfman Load Request and update the
// BpfProgram object's maps field and id annotation.
res, err = r.Reconcile(ctx, req)
if err != nil {
@@ -153,17 +153,17 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
// Require no requeue
require.False(t, res.Requeue)
- expectedLoadReq := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Kprobe.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(bpfProg.UID), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_KprobeAttachInfo{
- KprobeAttachInfo: &gobpfd.KprobeAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_KprobeAttachInfo{
+ KprobeAttachInfo: &gobpfman.KprobeAttachInfo{
FnName: functionName,
Offset: uint64(offset),
Retprobe: retprobe,
@@ -178,14 +178,14 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProg)
+ id, err := bpfmanagentinternal.GetID(bpfProg)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly Built
if !cmp.Equal(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()) {
cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform())
t.Logf("Diff %v", cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Third reconcile should set the status to loaded
@@ -201,5 +201,5 @@ func TestKprobeProgramControllerCreate(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName, Namespace: metav1.NamespaceAll}, bpfProg)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
}
diff --git a/bpfd-operator/controllers/bpfd-agent/tc-program.go b/bpfman-operator/controllers/bpfman-agent/tc-program.go
similarity index 69%
rename from bpfd-operator/controllers/bpfd-agent/tc-program.go
rename to bpfman-operator/controllers/bpfman-agent/tc-program.go
index 3a922b9b9..9324792e0 100644
--- a/bpfd-operator/controllers/bpfd-agent/tc-program.go
+++ b/bpfman-operator/controllers/bpfman-agent/tc-program.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -30,21 +30,21 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tcprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=tcprograms,verbs=get;list;watch
// TcProgramReconciler reconciles a tcProgram object by creating multiple
-// bpfProgram objects and managing bpfd for each one.
+// bpfProgram objects and managing bpfman for each one.
type TcProgramReconciler struct {
ReconcilerCommon
- currentTcProgram *bpfdiov1alpha1.TcProgram
+ currentTcProgram *bpfmaniov1alpha1.TcProgram
ourNode *v1.Node
interfaces []string
}
@@ -61,8 +61,8 @@ func (r *TcProgramReconciler) getRecType() string {
return internal.Tc.String()
}
-// Must match with bpfd internal types
-func tcProceedOnToInt(proceedOn []bpfdiov1alpha1.TcProceedOnValue) []int32 {
+// Must match with bpfman internal types
+func tcProceedOnToInt(proceedOn []bpfmaniov1alpha1.TcProceedOnValue) []int32 {
var out []int32
for _, p := range proceedOn {
@@ -96,17 +96,17 @@ func tcProceedOnToInt(proceedOn []bpfdiov1alpha1.TcProceedOnValue) []int32 {
}
// SetupWithManager sets up the controller with the Manager.
-// The Bpfd-Agent should reconcile whenever a TcProgram is updated,
-// load the program to the node via bpfd, and then create bpfProgram object(s)
+// The Bpfman-Agent should reconcile whenever a TcProgram is updated,
+// load the program to the node via bpfman, and then create bpfProgram object(s)
// to reflect per node state information.
func (r *TcProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.TcProgram{}, builder.WithPredicates(predicate.And(
+ For(&bpfmaniov1alpha1.TcProgram{}, builder.WithPredicates(predicate.And(
predicate.GenerationChangedPredicate{},
predicate.ResourceVersionChangedPredicate{}),
),
).
- Owns(&bpfdiov1alpha1.BpfProgram{},
+ Owns(&bpfmaniov1alpha1.BpfProgram{},
builder.WithPredicates(predicate.And(
internal.BpfProgramTypePredicate(internal.Tc.String()),
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -123,8 +123,8 @@ func (r *TcProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}
-func (r *TcProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error) {
- progs := &bpfdiov1alpha1.BpfProgramList{}
+func (r *TcProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error) {
+ progs := &bpfmaniov1alpha1.BpfProgramList{}
for _, iface := range r.interfaces {
bpfProgramName := fmt.Sprintf("%s-%s-%s", r.currentTcProgram.Name, r.NodeName, iface)
annotations := map[string]string{internal.TcProgramInterface: iface}
@@ -142,7 +142,7 @@ func (r *TcProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov
func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// Initialize node and current program
- r.currentTcProgram = &bpfdiov1alpha1.TcProgram{}
+ r.currentTcProgram = &bpfmaniov1alpha1.TcProgram{}
r.ourNode = &v1.Node{}
r.Logger = ctrl.Log.WithName("tc")
var err error
@@ -150,13 +150,13 @@ func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
ctxLogger := log.FromContext(ctx)
ctxLogger.Info("Reconcile TC: Enter", "ReconcileKey", req)
- // Lookup K8s node object for this bpfd-agent This should always succeed
+ // Lookup K8s node object for this bpfman-agent This should always succeed
if err := r.Get(ctx, types.NamespacedName{Namespace: v1.NamespaceAll, Name: r.NodeName}, r.ourNode); err != nil {
- return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfd-agent node %s : %v",
+ return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfman-agent node %s : %v",
req.NamespacedName, err)
}
- tcPrograms := &bpfdiov1alpha1.TcProgramList{}
+ tcPrograms := &bpfmaniov1alpha1.TcProgramList{}
opts := []client.ListOption{}
@@ -170,16 +170,16 @@ func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
return ctrl.Result{Requeue: false}, nil
}
- // Get existing ebpf state from bpfd.
- existingPrograms, err := bpfdagentinternal.ListBpfdPrograms(ctx, r.BpfdClient, internal.Tc)
+ // Get existing ebpf state from bpfman.
+ existingPrograms, err := bpfmanagentinternal.ListBpfmanPrograms(ctx, r.BpfmanClient, internal.Tc)
if err != nil {
- r.Logger.Error(err, "failed to list loaded bpfd programs")
+ r.Logger.Error(err, "failed to list loaded bpfman programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
}
// Reconcile each TcProgram. Don't return error here because it will trigger an infinite reconcile loop, instead
// report the error to user and retry if specified. For some errors the controller may not decide to retry.
- // Note: This only results in grpc calls to bpfd if we need to change something
+ // Note: This only results in grpc calls to bpfman if we need to change something
requeue := false // initialize requeue to false
for _, tcProgram := range tcPrograms.Items {
r.Logger.Info("TcProgramController is reconciling", "currentTcProgram", tcProgram.Name)
@@ -219,18 +219,18 @@ func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}
func (r *TcProgramReconciler) buildTcLoadRequest(
- bytecode *gobpfd.BytecodeLocation,
+ bytecode *gobpfman.BytecodeLocation,
uuid string,
iface string,
- mapOwnerId *uint32) *gobpfd.LoadRequest {
+ mapOwnerId *uint32) *gobpfman.LoadRequest {
- return &gobpfd.LoadRequest{
+ return &gobpfman.LoadRequest{
Bytecode: bytecode,
Name: r.currentTcProgram.Spec.BpfFunctionName,
ProgramType: uint32(internal.Tc),
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TcAttachInfo{
- TcAttachInfo: &gobpfd.TCAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TcAttachInfo{
+ TcAttachInfo: &gobpfman.TCAttachInfo{
Priority: r.currentTcProgram.Spec.Priority,
Iface: iface,
Direction: r.currentTcProgram.Spec.Direction,
@@ -244,15 +244,15 @@ func (r *TcProgramReconciler) buildTcLoadRequest(
}
}
-// reconcileBpfdPrograms ONLY reconciles the bpfd state for a single BpfProgram.
+// reconcileBpfmanPrograms ONLY reconciles the bpfman state for a single BpfProgram.
// It does not interact with the k8s API in any way.
-func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
- existingBpfPrograms map[string]*gobpfd.ListResponse_ListResult,
- bytecodeSelector *bpfdiov1alpha1.BytecodeSelector,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
+func (r *TcProgramReconciler) reconcileBpfmanProgram(ctx context.Context,
+ existingBpfPrograms map[string]*gobpfman.ListResponse_ListResult,
+ bytecodeSelector *bpfmaniov1alpha1.BytecodeSelector,
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
isNodeSelected bool,
isBeingDeleted bool,
- mapOwnerStatus *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error) {
+ mapOwnerStatus *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error) {
r.Logger.V(1).Info("Existing bpfProgram", "UUID", bpfProgram.UID, "Name", bpfProgram.Name)
iface := bpfProgram.Annotations[internal.TcProgramInterface]
@@ -260,13 +260,13 @@ func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
var err error
uuid := string(bpfProgram.UID)
- getLoadRequest := func() (*gobpfd.LoadRequest, bpfdiov1alpha1.BpfProgramConditionType, error) {
- bytecode, err := bpfdagentinternal.GetBytecode(r.Client, bytecodeSelector)
+ getLoadRequest := func() (*gobpfman.LoadRequest, bpfmaniov1alpha1.BpfProgramConditionType, error) {
+ bytecode, err := bpfmanagentinternal.GetBytecode(r.Client, bytecodeSelector)
if err != nil {
- return nil, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
+ return nil, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
}
loadRequest := r.buildTcLoadRequest(bytecode, string(uuid), iface, mapOwnerStatus.mapOwnerId)
- return loadRequest, bpfdiov1alpha1.BpfProgCondNone, nil
+ return loadRequest, bpfmaniov1alpha1.BpfProgCondNone, nil
}
existingProgram, doesProgramExist := existingBpfPrograms[string(uuid)]
@@ -275,22 +275,22 @@ func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
// If TcProgram is being deleted just break out and remove finalizer
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
// Make sure if we're not selected just exit
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
// Make sure if the Map Owner is set but not found then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
// Make sure if the Map Owner is set but not loaded then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
// otherwise load it
@@ -299,21 +299,21 @@ func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load TcProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to load TcProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ r.Logger.Info("bpfman called to load TcProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProgram)
+ id, err := bpfmanagentinternal.GetID(bpfProgram)
if err != nil {
r.Logger.Error(err, "Failed to get program ID")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
// BpfProgram exists but either BpfProgramConfig is being deleted or node is no
@@ -326,27 +326,27 @@ func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
"isDeleted", isBeingDeleted, "isSelected", isNodeSelected, "mapIsSet", mapOwnerStatus.isSet,
"mapIsFound", mapOwnerStatus.isFound, "mapIsLoaded", mapOwnerStatus.isLoaded)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload TcProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.Logger.Info("bpfd called to unload TcProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to unload TcProgram on Node", "Name", bpfProgram.Name, "UUID", id)
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
}
@@ -356,27 +356,27 @@ func (r *TcProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- isSame, reasons := bpfdagentinternal.DoesProgExist(existingProgram, loadRequest)
+ isSame, reasons := bpfmanagentinternal.DoesProgExist(existingProgram, loadRequest)
if !isSame {
r.Logger.V(1).Info("TcProgram is in wrong state, unloading and reloading", "Reason", reasons)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload TcProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load TcProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to reload TcProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to reload TcProgram on Node", "Name", bpfProgram.Name, "UUID", id)
} else {
// Program exists and bpfProgram K8s Object is up to date
- r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfd")
+ r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfman")
r.progId = id
}
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
diff --git a/bpfd-operator/controllers/bpfd-agent/tc-program_test.go b/bpfman-operator/controllers/bpfman-agent/tc-program_test.go
similarity index 74%
rename from bpfd-operator/controllers/bpfd-agent/tc-program_test.go
rename to bpfman-operator/controllers/bpfman-agent/tc-program_test.go
index fee1a87ae..d67ed9917 100644
--- a/bpfd-operator/controllers/bpfd-agent/tc-program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/tc-program_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -24,14 +24,14 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/testing/protocmp"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -47,7 +47,7 @@ import (
func TestTcProgramControllerCreate(t *testing.T) {
var (
name = "fakeTcProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
direction = "ingress"
@@ -55,30 +55,30 @@ func TestTcProgramControllerCreate(t *testing.T) {
fakeInt = "eth0"
ctx = context.TODO()
bpfProgName = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, fakeInt)
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
// A TcProgram object with metadata and spec.
- tc := &bpfdiov1alpha1.TcProgram{
+ tc := &bpfmaniov1alpha1.TcProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.TcProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.TcProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
- InterfaceSelector: bpfdiov1alpha1.InterfaceSelector{
+ InterfaceSelector: bpfmaniov1alpha1.InterfaceSelector{
Interfaces: &[]string{fakeInt},
},
Priority: 0,
Direction: direction,
- ProceedOn: []bpfdiov1alpha1.TcProceedOnValue{
- bpfdiov1alpha1.TcProceedOnValue("pipe"),
- bpfdiov1alpha1.TcProceedOnValue("dispatcher_return"),
+ ProceedOn: []bpfmaniov1alpha1.TcProceedOnValue{
+ bpfmaniov1alpha1.TcProceedOnValue("pipe"),
+ bpfmaniov1alpha1.TcProceedOnValue("dispatcher_return"),
},
},
}
@@ -88,21 +88,21 @@ func TestTcProgramControllerCreate(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, tc)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, tc)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -147,7 +147,7 @@ func TestTcProgramControllerCreate(t *testing.T) {
err = cl.Update(ctx, bpfProg)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Request and update the
+ // Second reconcile should create the bpfman Load Request and update the
// BpfProgram object's 'Programs' field.
res, err = r.Reconcile(ctx, req)
if err != nil {
@@ -158,17 +158,17 @@ func TestTcProgramControllerCreate(t *testing.T) {
require.False(t, res.Requeue)
uuid := string(bpfProg.UID)
- expectedLoadReq := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Tc.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(uuid), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TcAttachInfo{
- TcAttachInfo: &gobpfd.TCAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TcAttachInfo{
+ TcAttachInfo: &gobpfman.TCAttachInfo{
Iface: fakeInt,
Priority: 0,
Direction: direction,
@@ -183,13 +183,13 @@ func TestTcProgramControllerCreate(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProg)
+ id, err := bpfmanagentinternal.GetID(bpfProg)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly built
if !cmp.Equal(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()) {
t.Logf("Diff %v", cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Third reconcile should update the bpfPrograms status to loaded
@@ -205,13 +205,13 @@ func TestTcProgramControllerCreate(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName, Namespace: metav1.NamespaceAll}, bpfProg)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
}
func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
var (
name = "fakeTcProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
direction = "ingress"
@@ -220,32 +220,32 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
ctx = context.TODO()
bpfProgName0 = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, fakeInts[0])
bpfProgName1 = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, fakeInts[1])
- bpfProgEth0 = &bpfdiov1alpha1.BpfProgram{}
- bpfProgEth1 = &bpfdiov1alpha1.BpfProgram{}
+ bpfProgEth0 = &bpfmaniov1alpha1.BpfProgram{}
+ bpfProgEth1 = &bpfmaniov1alpha1.BpfProgram{}
fakeUID0 = "ef71d42c-aa21-48e8-a697-82391d801a80"
fakeUID1 = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
// A TcProgram object with metadata and spec.
- tc := &bpfdiov1alpha1.TcProgram{
+ tc := &bpfmaniov1alpha1.TcProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.TcProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.TcProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
- InterfaceSelector: bpfdiov1alpha1.InterfaceSelector{
+ InterfaceSelector: bpfmaniov1alpha1.InterfaceSelector{
Interfaces: &fakeInts,
},
Priority: 0,
Direction: direction,
- ProceedOn: []bpfdiov1alpha1.TcProceedOnValue{
- bpfdiov1alpha1.TcProceedOnValue("pipe"),
- bpfdiov1alpha1.TcProceedOnValue("dispatcher_return"),
+ ProceedOn: []bpfmaniov1alpha1.TcProceedOnValue{
+ bpfmaniov1alpha1.TcProceedOnValue("pipe"),
+ bpfmaniov1alpha1.TcProceedOnValue("dispatcher_return"),
},
},
}
@@ -255,21 +255,21 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, tc)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, tc)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -314,7 +314,7 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
err = cl.Update(ctx, bpfProgEth0)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Requests for the first bpfProgram and update the prog id.
+ // Second reconcile should create the bpfman Load Requests for the first bpfProgram and update the prog id.
res, err = r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -329,7 +329,7 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
t.Fatalf("reconcile: (%v)", err)
}
- // Fourth reconcile should create the bpfd Load Requests for the second bpfProgram.
+ // Fourth reconcile should create the bpfman Load Requests for the second bpfProgram.
res, err = r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -377,17 +377,17 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
uuid0 := string(bpfProgEth0.UID)
- expectedLoadReq0 := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq0 := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Tc.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(uuid0), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TcAttachInfo{
- TcAttachInfo: &gobpfd.TCAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TcAttachInfo{
+ TcAttachInfo: &gobpfman.TCAttachInfo{
Iface: fakeInts[0],
Priority: 0,
Direction: direction,
@@ -399,17 +399,17 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
uuid1 := string(bpfProgEth1.UID)
- expectedLoadReq1 := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq1 := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Tc.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(uuid1), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TcAttachInfo{
- TcAttachInfo: &gobpfd.TCAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TcAttachInfo{
+ TcAttachInfo: &gobpfman.TCAttachInfo{
Iface: fakeInts[1],
Priority: 0,
Direction: direction,
@@ -424,7 +424,7 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id0, err := bpfdagentinternal.GetID(bpfProgEth0)
+ id0, err := bpfmanagentinternal.GetID(bpfProgEth0)
require.NoError(t, err)
// Check that the bpfProgram's maps was correctly updated
@@ -432,19 +432,19 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id1, err := bpfdagentinternal.GetID(bpfProgEth1)
+ id1, err := bpfmanagentinternal.GetID(bpfProgEth1)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly built
if !cmp.Equal(expectedLoadReq0, cli.LoadRequests[int(*id0)], protocmp.Transform()) {
t.Logf("Diff %v", cmp.Diff(expectedLoadReq0, cli.LoadRequests[int(*id0)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Check the bpfLoadRequest was correctly built
if !cmp.Equal(expectedLoadReq1, cli.LoadRequests[int(*id1)], protocmp.Transform()) {
t.Logf("Diff %v", cmp.Diff(expectedLoadReq1, cli.LoadRequests[int(*id1)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Check that the bpfProgram's maps was correctly updated
@@ -468,11 +468,11 @@ func TestTcProgramControllerCreateMultiIntf(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName0, Namespace: metav1.NamespaceAll}, bpfProgEth0)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProgEth0.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProgEth0.Status.Conditions[0].Type)
// Check that the bpfProgram's status was correctly updated
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName1, Namespace: metav1.NamespaceAll}, bpfProgEth1)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProgEth1.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProgEth1.Status.Conditions[0].Type)
}
diff --git a/bpfd-operator/controllers/bpfd-agent/tracepoint-program.go b/bpfman-operator/controllers/bpfman-agent/tracepoint-program.go
similarity index 67%
rename from bpfd-operator/controllers/bpfd-agent/tracepoint-program.go
rename to bpfman-operator/controllers/bpfman-agent/tracepoint-program.go
index 8ff0a2c38..3ec99a6c9 100644
--- a/bpfd-operator/controllers/bpfd-agent/tracepoint-program.go
+++ b/bpfman-operator/controllers/bpfman-agent/tracepoint-program.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -31,20 +31,20 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tracepointprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=tracepointprograms,verbs=get;list;watch
// BpfProgramReconciler reconciles a BpfProgram object
type TracepointProgramReconciler struct {
ReconcilerCommon
- currentTracepointProgram *bpfdiov1alpha1.TracepointProgram
+ currentTracepointProgram *bpfmaniov1alpha1.TracepointProgram
ourNode *v1.Node
}
@@ -61,13 +61,13 @@ func (r *TracepointProgramReconciler) getRecType() string {
}
// SetupWithManager sets up the controller with the Manager.
-// The Bpfd-Agent should reconcile whenever a TracepointProgram is updated,
-// load the program to the node via bpfd, and then create a bpfProgram object
+// The Bpfman-Agent should reconcile whenever a TracepointProgram is updated,
+// load the program to the node via bpfman, and then create a bpfProgram object
// to reflect per node state information.
func (r *TracepointProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.TracepointProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
- Owns(&bpfdiov1alpha1.BpfProgram{},
+ For(&bpfmaniov1alpha1.TracepointProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
+ Owns(&bpfmaniov1alpha1.BpfProgram{},
builder.WithPredicates(predicate.And(
internal.BpfProgramTypePredicate(internal.Tracepoint.String()),
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -84,8 +84,8 @@ func (r *TracepointProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}
-func (r *TracepointProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error) {
- progs := &bpfdiov1alpha1.BpfProgramList{}
+func (r *TracepointProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error) {
+ progs := &bpfmaniov1alpha1.BpfProgramList{}
for _, tracepoint := range r.currentTracepointProgram.Spec.Names {
// sanitize tracepoint name to work in a bpfProgram name
@@ -107,20 +107,20 @@ func (r *TracepointProgramReconciler) expectedBpfPrograms(ctx context.Context) (
func (r *TracepointProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// Initialize node and current program
- r.currentTracepointProgram = &bpfdiov1alpha1.TracepointProgram{}
+ r.currentTracepointProgram = &bpfmaniov1alpha1.TracepointProgram{}
r.ourNode = &v1.Node{}
r.Logger = ctrl.Log.WithName("tracept")
ctxLogger := log.FromContext(ctx)
ctxLogger.Info("Reconcile Tracepoint: Enter", "ReconcileKey", req)
- // Lookup K8s node object for this bpfd-agent This should always succeed
+ // Lookup K8s node object for this bpfman-agent This should always succeed
if err := r.Get(ctx, types.NamespacedName{Namespace: v1.NamespaceAll, Name: r.NodeName}, r.ourNode); err != nil {
- return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfd-agent node %s : %v",
+ return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfman-agent node %s : %v",
req.NamespacedName, err)
}
- tracepointPrograms := &bpfdiov1alpha1.TracepointProgramList{}
+ tracepointPrograms := &bpfmaniov1alpha1.TracepointProgramList{}
opts := []client.ListOption{}
@@ -134,16 +134,16 @@ func (r *TracepointProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
return ctrl.Result{Requeue: false}, nil
}
- // Get existing ebpf state from bpfd.
- programMap, err := bpfdagentinternal.ListBpfdPrograms(ctx, r.BpfdClient, internal.Tracepoint)
+ // Get existing ebpf state from bpfman.
+ programMap, err := bpfmanagentinternal.ListBpfmanPrograms(ctx, r.BpfmanClient, internal.Tracepoint)
if err != nil {
- r.Logger.Error(err, "failed to list loaded bpfd programs")
+ r.Logger.Error(err, "failed to list loaded bpfman programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
}
// Reconcile each TracepointProgram. Don't return error here because it will trigger an infinite reconcile loop, instead
// report the error to user and retry if specified. For some errors the controller may not decide to retry.
- // Note: This only results in grpc calls to bpfd if we need to change something
+ // Note: This only results in grpc calls to bpfman if we need to change something
requeue := false // initialize requeue to false
for _, tracepointProgram := range tracepointPrograms.Items {
r.Logger.Info("TracepointProgramController is reconciling", "currentTracePtProgram", tracepointProgram.Name)
@@ -176,18 +176,18 @@ func (r *TracepointProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
}
func (r *TracepointProgramReconciler) buildTracepointLoadRequest(
- bytecode *gobpfd.BytecodeLocation,
+ bytecode *gobpfman.BytecodeLocation,
uuid string,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
- mapOwnerId *uint32) *gobpfd.LoadRequest {
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
+ mapOwnerId *uint32) *gobpfman.LoadRequest {
- return &gobpfd.LoadRequest{
+ return &gobpfman.LoadRequest{
Bytecode: bytecode,
Name: r.currentTracepointProgram.Spec.BpfFunctionName,
ProgramType: uint32(internal.Tracepoint),
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TracepointAttachInfo{
- TracepointAttachInfo: &gobpfd.TracepointAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TracepointAttachInfo{
+ TracepointAttachInfo: &gobpfman.TracepointAttachInfo{
Tracepoint: bpfProgram.Annotations[internal.TracepointProgramTracepoint],
},
},
@@ -198,26 +198,26 @@ func (r *TracepointProgramReconciler) buildTracepointLoadRequest(
}
}
-// reconcileBpfdPrograms ONLY reconciles the bpfd state for a single BpfProgram.
+// reconcileBpfmanPrograms ONLY reconciles the bpfman state for a single BpfProgram.
// It does not interact with the k8s API in any way.
-func (r *TracepointProgramReconciler) reconcileBpfdProgram(ctx context.Context,
- existingBpfPrograms map[string]*gobpfd.ListResponse_ListResult,
- bytecodeSelector *bpfdiov1alpha1.BytecodeSelector,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
+func (r *TracepointProgramReconciler) reconcileBpfmanProgram(ctx context.Context,
+ existingBpfPrograms map[string]*gobpfman.ListResponse_ListResult,
+ bytecodeSelector *bpfmaniov1alpha1.BytecodeSelector,
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
isNodeSelected bool,
isBeingDeleted bool,
- mapOwnerStatus *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error) {
+ mapOwnerStatus *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error) {
r.Logger.V(1).Info("Existing bpfProgram", "UUID", bpfProgram.UID, "Name", bpfProgram.Name, "CurrentTracepointProgram", r.currentTracepointProgram.Name)
uuid := string(bpfProgram.UID)
- getLoadRequest := func() (*gobpfd.LoadRequest, bpfdiov1alpha1.BpfProgramConditionType, error) {
- bytecode, err := bpfdagentinternal.GetBytecode(r.Client, bytecodeSelector)
+ getLoadRequest := func() (*gobpfman.LoadRequest, bpfmaniov1alpha1.BpfProgramConditionType, error) {
+ bytecode, err := bpfmanagentinternal.GetBytecode(r.Client, bytecodeSelector)
if err != nil {
- return nil, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
+ return nil, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
}
loadRequest := r.buildTracepointLoadRequest(bytecode, uuid, bpfProgram, mapOwnerStatus.mapOwnerId)
- return loadRequest, bpfdiov1alpha1.BpfProgCondNone, nil
+ return loadRequest, bpfmaniov1alpha1.BpfProgCondNone, nil
}
existingProgram, doesProgramExist := existingBpfPrograms[uuid]
@@ -226,22 +226,22 @@ func (r *TracepointProgramReconciler) reconcileBpfdProgram(ctx context.Context,
// If TracepointProgram is being deleted just exit
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
// Make sure if we're not selected just exit
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
// Make sure if the Map Owner is set but not found then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
// Make sure if the Map Owner is set but not loaded then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
// otherwise load it
@@ -250,21 +250,21 @@ func (r *TracepointProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load TracepointProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to load TracepointProgram on Node", "Name", bpfProgram.Name, "ID", uuid)
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ r.Logger.Info("bpfman called to load TracepointProgram on Node", "Name", bpfProgram.Name, "ID", uuid)
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
// prog ID should already have been set if program doesn't exist
- id, err := bpfdagentinternal.GetID(bpfProgram)
+ id, err := bpfmanagentinternal.GetID(bpfProgram)
if err != nil {
r.Logger.Error(err, "Failed to get program ID")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
// BpfProgram exists but either TracepointProgram is being deleted, node is no
@@ -275,27 +275,27 @@ func (r *TracepointProgramReconciler) reconcileBpfdProgram(ctx context.Context,
"isDeleted", isBeingDeleted, "isSelected", isNodeSelected, "mapIsSet", mapOwnerStatus.isSet,
"mapIsFound", mapOwnerStatus.isFound, "mapIsLoaded", mapOwnerStatus.isLoaded)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload TracepointProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.Logger.Info("bpfd called to unload TracepointProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to unload TracepointProgram on Node", "Name", bpfProgram.Name, "UUID", id)
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
}
@@ -307,27 +307,27 @@ func (r *TracepointProgramReconciler) reconcileBpfdProgram(ctx context.Context,
r.Logger.V(1).WithValues("expectedProgram", loadRequest).WithValues("existingProgram", existingProgram).Info("StateMatch")
- isSame, reasons := bpfdagentinternal.DoesProgExist(existingProgram, loadRequest)
+ isSame, reasons := bpfmanagentinternal.DoesProgExist(existingProgram, loadRequest)
if !isSame {
r.Logger.V(1).Info("TracepointProgram is in wrong state, unloading and reloading", "Reason", reasons)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload TracepointProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load TracepointProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, err
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, err
}
- r.Logger.Info("bpfd called to reload TracepointProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to reload TracepointProgram on Node", "Name", bpfProgram.Name, "UUID", id)
} else {
// Program exists and bpfProgram K8s Object is up to date
- r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfd")
+ r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfman")
r.progId = id
}
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
diff --git a/bpfd-operator/controllers/bpfd-agent/tracepoint-program_test.go b/bpfman-operator/controllers/bpfman-agent/tracepoint-program_test.go
similarity index 73%
rename from bpfd-operator/controllers/bpfd-agent/tracepoint-program_test.go
rename to bpfman-operator/controllers/bpfman-agent/tracepoint-program_test.go
index fd7f3a663..b2a4c64ed 100644
--- a/bpfd-operator/controllers/bpfd-agent/tracepoint-program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/tracepoint-program_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -24,13 +24,13 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/testing/protocmp"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -46,26 +46,26 @@ import (
func TestTracepointProgramControllerCreate(t *testing.T) {
var (
name = "fakeTracepointProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
tracepointName = "syscalls/sys_enter_setitimer"
fakeNode = testutils.NewNode("fake-control-plane")
ctx = context.TODO()
bpfProgName = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, "syscalls-sys-enter-setitimer")
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
// A TracepointProgram object with metadata and spec.
- Tracepoint := &bpfdiov1alpha1.TracepointProgram{
+ Tracepoint := &bpfmaniov1alpha1.TracepointProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.TracepointProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.TracepointProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -78,21 +78,21 @@ func TestTracepointProgramControllerCreate(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Tracepoint)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TracepointProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Tracepoint)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TracepointProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -137,7 +137,7 @@ func TestTracepointProgramControllerCreate(t *testing.T) {
err = cl.Update(ctx, bpfProg)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Request and update the
+ // Second reconcile should create the bpfman Load Request and update the
// BpfProgram object's 'Programs' field.
res, err = r.Reconcile(ctx, req)
if err != nil {
@@ -148,17 +148,17 @@ func TestTracepointProgramControllerCreate(t *testing.T) {
require.False(t, res.Requeue)
uuid := string(bpfProg.UID)
- expectedLoadReq := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Tracepoint.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(uuid), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_TracepointAttachInfo{
- TracepointAttachInfo: &gobpfd.TracepointAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_TracepointAttachInfo{
+ TracepointAttachInfo: &gobpfman.TracepointAttachInfo{
Tracepoint: tracepointName,
},
},
@@ -170,13 +170,13 @@ func TestTracepointProgramControllerCreate(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProg)
+ id, err := bpfmanagentinternal.GetID(bpfProg)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly Built
if !cmp.Equal(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()) {
cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform())
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Check that the bpfProgram's programs was correctly updated
@@ -196,5 +196,5 @@ func TestTracepointProgramControllerCreate(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName, Namespace: metav1.NamespaceAll}, bpfProg)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
}
diff --git a/bpfd-operator/controllers/bpfd-agent/uprobe-program.go b/bpfman-operator/controllers/bpfman-agent/uprobe-program.go
similarity index 67%
rename from bpfd-operator/controllers/bpfd-agent/uprobe-program.go
rename to bpfman-operator/controllers/bpfman-agent/uprobe-program.go
index 20465f8cd..8231a1815 100644
--- a/bpfd-operator/controllers/bpfd-agent/uprobe-program.go
+++ b/bpfman-operator/controllers/bpfman-agent/uprobe-program.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -31,20 +31,20 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=uprobeprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=uprobeprograms,verbs=get;list;watch
// BpfProgramReconciler reconciles a BpfProgram object
type UprobeProgramReconciler struct {
ReconcilerCommon
- currentUprobeProgram *bpfdiov1alpha1.UprobeProgram
+ currentUprobeProgram *bpfmaniov1alpha1.UprobeProgram
ourNode *v1.Node
}
@@ -61,13 +61,13 @@ func (r *UprobeProgramReconciler) getRecType() string {
}
// SetupWithManager sets up the controller with the Manager.
-// The Bpfd-Agent should reconcile whenever a UprobeProgram is updated,
-// load the program to the node via bpfd, and then create a bpfProgram object
+// The Bpfman-Agent should reconcile whenever a UprobeProgram is updated,
+// load the program to the node via bpfman, and then create a bpfProgram object
// to reflect per node state information.
func (r *UprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.UprobeProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
- Owns(&bpfdiov1alpha1.BpfProgram{},
+ For(&bpfmaniov1alpha1.UprobeProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
+ Owns(&bpfmaniov1alpha1.BpfProgram{},
builder.WithPredicates(predicate.And(
internal.BpfProgramTypePredicate(internal.UprobeString),
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -84,8 +84,8 @@ func (r *UprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}
-func (r *UprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error) {
- progs := &bpfdiov1alpha1.BpfProgramList{}
+func (r *UprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error) {
+ progs := &bpfmaniov1alpha1.BpfProgramList{}
for _, target := range r.currentUprobeProgram.Spec.Targets {
// sanitize uprobe name to work in a bpfProgram name
@@ -107,20 +107,20 @@ func (r *UprobeProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpf
func (r *UprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// Initialize node and current program
- r.currentUprobeProgram = &bpfdiov1alpha1.UprobeProgram{}
+ r.currentUprobeProgram = &bpfmaniov1alpha1.UprobeProgram{}
r.ourNode = &v1.Node{}
r.Logger = ctrl.Log.WithName("uprobe")
ctxLogger := log.FromContext(ctx)
ctxLogger.Info("Reconcile Uprobe: Enter", "ReconcileKey", req)
- // Lookup K8s node object for this bpfd-agent This should always succeed
+ // Lookup K8s node object for this bpfman-agent This should always succeed
if err := r.Get(ctx, types.NamespacedName{Namespace: v1.NamespaceAll, Name: r.NodeName}, r.ourNode); err != nil {
- return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfd-agent node %s : %v",
+ return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfman-agent node %s : %v",
req.NamespacedName, err)
}
- uprobePrograms := &bpfdiov1alpha1.UprobeProgramList{}
+ uprobePrograms := &bpfmaniov1alpha1.UprobeProgramList{}
opts := []client.ListOption{}
@@ -134,17 +134,17 @@ func (r *UprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return ctrl.Result{Requeue: false}, nil
}
- // Get existing ebpf state from bpfd. Since both uprobes and kprobes have
+ // Get existing ebpf state from bpfman. Since both uprobes and kprobes have
// the same kernel ProgramType, we use internal.Kprobe below.
- programMap, err := bpfdagentinternal.ListBpfdPrograms(ctx, r.BpfdClient, internal.Kprobe)
+ programMap, err := bpfmanagentinternal.ListBpfmanPrograms(ctx, r.BpfmanClient, internal.Kprobe)
if err != nil {
- r.Logger.Error(err, "failed to list loaded bpfd programs")
+ r.Logger.Error(err, "failed to list loaded bpfman programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
}
// Reconcile each UprobeProgram. Don't return error here because it will trigger an infinite reconcile loop, instead
// report the error to user and retry if specified. For some errors the controller may not decide to retry.
- // Note: This only results in grpc calls to bpfd if we need to change something
+ // Note: This only results in grpc calls to bpfman if we need to change something
requeue := false // initialize requeue to false
for _, uprobeProgram := range uprobePrograms.Items {
r.Logger.Info("UprobeProgramController is reconciling", "currentUprobeProgram", uprobeProgram.Name)
@@ -177,21 +177,21 @@ func (r *UprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
func (r *UprobeProgramReconciler) buildUprobeLoadRequest(
- bytecode *gobpfd.BytecodeLocation,
+ bytecode *gobpfman.BytecodeLocation,
uuid string,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
- mapOwnerId *uint32) *gobpfd.LoadRequest {
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
+ mapOwnerId *uint32) *gobpfman.LoadRequest {
- // Namespace isn't supported yet in bpfd, so set it to an empty string.
+ // Namespace isn't supported yet in bpfman, so set it to an empty string.
namespace := ""
- return &gobpfd.LoadRequest{
+ return &gobpfman.LoadRequest{
Bytecode: bytecode,
Name: r.currentUprobeProgram.Spec.BpfFunctionName,
ProgramType: uint32(internal.Kprobe),
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_UprobeAttachInfo{
- UprobeAttachInfo: &gobpfd.UprobeAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_UprobeAttachInfo{
+ UprobeAttachInfo: &gobpfman.UprobeAttachInfo{
FnName: &r.currentUprobeProgram.Spec.FunctionName,
Offset: r.currentUprobeProgram.Spec.Offset,
Target: bpfProgram.Annotations[internal.UprobeProgramTarget],
@@ -206,27 +206,27 @@ func (r *UprobeProgramReconciler) buildUprobeLoadRequest(
}
}
-// reconcileBpfdPrograms ONLY reconciles the bpfd state for a single BpfProgram.
+// reconcileBpfmanPrograms ONLY reconciles the bpfman state for a single BpfProgram.
// It does not interact with the k8s API in any way.
-func (r *UprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
- existingBpfPrograms map[string]*gobpfd.ListResponse_ListResult,
- bytecodeSelector *bpfdiov1alpha1.BytecodeSelector,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
+func (r *UprobeProgramReconciler) reconcileBpfmanProgram(ctx context.Context,
+ existingBpfPrograms map[string]*gobpfman.ListResponse_ListResult,
+ bytecodeSelector *bpfmaniov1alpha1.BytecodeSelector,
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
isNodeSelected bool,
isBeingDeleted bool,
- mapOwnerStatus *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error) {
+ mapOwnerStatus *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error) {
r.Logger.V(1).Info("Existing bpfProgram", "UUID", bpfProgram.UID, "Name", bpfProgram.Name, "CurrentUprobeProgram", r.currentUprobeProgram.Name)
uuid := bpfProgram.UID
- getLoadRequest := func() (*gobpfd.LoadRequest, bpfdiov1alpha1.BpfProgramConditionType, error) {
- bytecode, err := bpfdagentinternal.GetBytecode(r.Client, bytecodeSelector)
+ getLoadRequest := func() (*gobpfman.LoadRequest, bpfmaniov1alpha1.BpfProgramConditionType, error) {
+ bytecode, err := bpfmanagentinternal.GetBytecode(r.Client, bytecodeSelector)
if err != nil {
- return nil, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
+ return nil, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
}
loadRequest := r.buildUprobeLoadRequest(bytecode, string(uuid), bpfProgram, mapOwnerStatus.mapOwnerId)
- return loadRequest, bpfdiov1alpha1.BpfProgCondNone, nil
+ return loadRequest, bpfmaniov1alpha1.BpfProgCondNone, nil
}
existingProgram, doesProgramExist := existingBpfPrograms[string(uuid)]
@@ -235,22 +235,22 @@ func (r *UprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
// If UprobeProgram is being deleted just exit
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
// Make sure if we're not selected just exit
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
// Make sure if the Map Owner is set but not found then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
// Make sure if the Map Owner is set but not loaded then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
// otherwise load it
@@ -259,21 +259,21 @@ func (r *UprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load UprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to load UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ r.Logger.Info("bpfman called to load UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
// prog ID should already have been set if program exists
- id, err := bpfdagentinternal.GetID(bpfProgram)
+ id, err := bpfmanagentinternal.GetID(bpfProgram)
if err != nil {
r.Logger.Error(err, "Failed to get program ID")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
// BpfProgram exists but either UprobeProgram is being deleted, node is no
@@ -284,27 +284,27 @@ func (r *UprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
"isDeleted", isBeingDeleted, "isSelected", isNodeSelected, "mapIsSet", mapOwnerStatus.isSet,
"mapIsFound", mapOwnerStatus.isFound, "mapIsLoaded", mapOwnerStatus.isLoaded)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload UprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.Logger.Info("bpfd called to unload UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ r.Logger.Info("bpfman called to unload UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
}
@@ -316,25 +316,25 @@ func (r *UprobeProgramReconciler) reconcileBpfdProgram(ctx context.Context,
r.Logger.V(1).WithValues("expectedProgram", loadRequest).WithValues("existingProgram", existingProgram).Info("StateMatch")
- isSame, reasons := bpfdagentinternal.DoesProgExist(existingProgram, loadRequest)
+ isSame, reasons := bpfmanagentinternal.DoesProgExist(existingProgram, loadRequest)
if !isSame {
r.Logger.V(1).Info("UprobeProgram is in wrong state, unloading and reloading", "Reason", reasons)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload UprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load UprobeProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, err
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, err
}
- r.Logger.Info("bpfd called to reload UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ r.Logger.Info("bpfman called to reload UprobeProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
} else {
// Program exists and bpfProgram K8s Object is up to date
- r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfd")
+ r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfman")
}
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
diff --git a/bpfd-operator/controllers/bpfd-agent/uprobe-program_test.go b/bpfman-operator/controllers/bpfman-agent/uprobe-program_test.go
similarity index 74%
rename from bpfd-operator/controllers/bpfd-agent/uprobe-program_test.go
rename to bpfman-operator/controllers/bpfman-agent/uprobe-program_test.go
index 27e1a8df9..8b45b1988 100644
--- a/bpfd-operator/controllers/bpfd-agent/uprobe-program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/uprobe-program_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -24,13 +24,13 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/testing/protocmp"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -46,7 +46,7 @@ import (
func TestUprobeProgramControllerCreate(t *testing.T) {
var (
name = "fakeUprobeProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
functionName = "malloc"
@@ -57,19 +57,19 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
fakeNode = testutils.NewNode("fake-control-plane")
ctx = context.TODO()
bpfProgName = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, "libc")
- bpfProg = &bpfdiov1alpha1.BpfProgram{}
+ bpfProg = &bpfmaniov1alpha1.BpfProgram{}
fakeUID = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
// A UprobeProgram object with metadata and spec.
- Uprobe := &bpfdiov1alpha1.UprobeProgram{
+ Uprobe := &bpfmaniov1alpha1.UprobeProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.UprobeProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.UprobeProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -85,21 +85,21 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Uprobe)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.UprobeProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Uprobe)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.UprobeProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -146,7 +146,7 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
err = cl.Update(ctx, bpfProg)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Request and update the
+ // Second reconcile should create the bpfman Load Request and update the
// BpfProgram object's maps field and id annotation.
res, err = r.Reconcile(ctx, req)
if err != nil {
@@ -155,17 +155,17 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
// Require no requeue
require.False(t, res.Requeue)
- expectedLoadReq := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Kprobe.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: string(bpfProg.UID), internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_UprobeAttachInfo{
- UprobeAttachInfo: &gobpfd.UprobeAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_UprobeAttachInfo{
+ UprobeAttachInfo: &gobpfman.UprobeAttachInfo{
FnName: &functionName,
Target: target,
Offset: uint64(offset),
@@ -181,14 +181,14 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
require.NoError(t, err)
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProg)
+ id, err := bpfmanagentinternal.GetID(bpfProg)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly Built
if !cmp.Equal(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()) {
cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform())
t.Logf("Diff %v", cmp.Diff(expectedLoadReq, cli.LoadRequests[int(*id)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Third reconcile should set the status to loaded
@@ -204,5 +204,5 @@ func TestUprobeProgramControllerCreate(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: bpfProgName, Namespace: metav1.NamespaceAll}, bpfProg)
require.NoError(t, err)
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProg.Status.Conditions[0].Type)
}
diff --git a/bpfd-operator/controllers/bpfd-agent/xdp-program.go b/bpfman-operator/controllers/bpfman-agent/xdp-program.go
similarity index 69%
rename from bpfd-operator/controllers/bpfd-agent/xdp-program.go
rename to bpfman-operator/controllers/bpfman-agent/xdp-program.go
index d8685fadd..7742022e8 100644
--- a/bpfd-operator/controllers/bpfd-agent/xdp-program.go
+++ b/bpfman-operator/controllers/bpfman-agent/xdp-program.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -30,20 +30,20 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
v1 "k8s.io/api/core/v1"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=xdpprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=xdpprograms,verbs=get;list;watch
// BpfProgramReconciler reconciles a BpfProgram object
type XdpProgramReconciler struct {
ReconcilerCommon
- currentXdpProgram *bpfdiov1alpha1.XdpProgram
+ currentXdpProgram *bpfmaniov1alpha1.XdpProgram
ourNode *v1.Node
interfaces []string
}
@@ -60,8 +60,8 @@ func (r *XdpProgramReconciler) getRecType() string {
return internal.Xdp.String()
}
-// Must match with bpfd internal types
-func xdpProceedOnToInt(proceedOn []bpfdiov1alpha1.XdpProceedOnValue) []int32 {
+// Must match with bpfman internal types
+func xdpProceedOnToInt(proceedOn []bpfmaniov1alpha1.XdpProceedOnValue) []int32 {
var out []int32
for _, p := range proceedOn {
@@ -85,13 +85,13 @@ func xdpProceedOnToInt(proceedOn []bpfdiov1alpha1.XdpProceedOnValue) []int32 {
}
// SetupWithManager sets up the controller with the Manager.
-// The Bpfd-Agent should reconcile whenever a XdpProgram is updated,
-// load the program to the node via bpfd, and then create a bpfProgram object
+// The Bpfman-Agent should reconcile whenever a XdpProgram is updated,
+// load the program to the node via bpfman, and then create a bpfProgram object
// to reflect per node state information.
func (r *XdpProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.XdpProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
- Owns(&bpfdiov1alpha1.BpfProgram{},
+ For(&bpfmaniov1alpha1.XdpProgram{}, builder.WithPredicates(predicate.And(predicate.GenerationChangedPredicate{}, predicate.ResourceVersionChangedPredicate{}))).
+ Owns(&bpfmaniov1alpha1.BpfProgram{},
builder.WithPredicates(predicate.And(
internal.BpfProgramTypePredicate(internal.Xdp.String()),
internal.BpfProgramNodePredicate(r.NodeName)),
@@ -108,8 +108,8 @@ func (r *XdpProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
Complete(r)
}
-func (r *XdpProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdiov1alpha1.BpfProgramList, error) {
- progs := &bpfdiov1alpha1.BpfProgramList{}
+func (r *XdpProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfmaniov1alpha1.BpfProgramList, error) {
+ progs := &bpfmaniov1alpha1.BpfProgramList{}
for _, iface := range r.interfaces {
bpfProgramName := fmt.Sprintf("%s-%s-%s", r.currentXdpProgram.Name, r.NodeName, iface)
@@ -128,7 +128,7 @@ func (r *XdpProgramReconciler) expectedBpfPrograms(ctx context.Context) (*bpfdio
func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
// Initialize node and current program
- r.currentXdpProgram = &bpfdiov1alpha1.XdpProgram{}
+ r.currentXdpProgram = &bpfmaniov1alpha1.XdpProgram{}
r.ourNode = &v1.Node{}
r.Logger = ctrl.Log.WithName("xdp")
var err error
@@ -136,13 +136,13 @@ func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request)
ctxLogger := log.FromContext(ctx)
ctxLogger.Info("Reconcile XDP: Enter", "ReconcileKey", req)
- // Lookup K8s node object for this bpfd-agent This should always succeed
+ // Lookup K8s node object for this bpfman-agent This should always succeed
if err := r.Get(ctx, types.NamespacedName{Namespace: v1.NamespaceAll, Name: r.NodeName}, r.ourNode); err != nil {
- return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfd-agent node %s : %v",
+ return ctrl.Result{Requeue: false}, fmt.Errorf("failed getting bpfman-agent node %s : %v",
req.NamespacedName, err)
}
- xdpPrograms := &bpfdiov1alpha1.XdpProgramList{}
+ xdpPrograms := &bpfmaniov1alpha1.XdpProgramList{}
opts := []client.ListOption{}
if err := r.List(ctx, xdpPrograms, opts...); err != nil {
@@ -155,17 +155,17 @@ func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request)
return ctrl.Result{Requeue: false}, nil
}
- // Get existing ebpf state from bpfd.
- programMap, err := bpfdagentinternal.ListBpfdPrograms(ctx, r.BpfdClient, internal.Xdp)
+ // Get existing ebpf state from bpfman.
+ programMap, err := bpfmanagentinternal.ListBpfmanPrograms(ctx, r.BpfmanClient, internal.Xdp)
if err != nil {
- r.Logger.Error(err, "failed to list loaded bpfd programs")
+ r.Logger.Error(err, "failed to list loaded bpfman programs")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationAgent}, nil
}
r.Logger.V(1).Info("Existing XDP programs", "loaded-xdp-programs", programMap)
// Reconcile each XdpProgram. Don't return error here because it will trigger an infinite reconcile loop, instead
// report the error to user and retry if specified. For some errors the controller may not decide to retry.
- // Note: This only results in grpc calls to bpfd if we need to change something
+ // Note: This only results in grpc calls to bpfman if we need to change something
requeue := false // initialize requeue to false
for _, xdpProgram := range xdpPrograms.Items {
r.Logger.Info("XdpProgramController is reconciling", "currentXdpProgram", xdpProgram.Name)
@@ -207,18 +207,18 @@ func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request)
}
func (r *XdpProgramReconciler) buildXdpLoadRequest(
- bytecode *gobpfd.BytecodeLocation,
+ bytecode *gobpfman.BytecodeLocation,
uuid string,
iface string,
- mapOwnerId *uint32) *gobpfd.LoadRequest {
+ mapOwnerId *uint32) *gobpfman.LoadRequest {
- return &gobpfd.LoadRequest{
+ return &gobpfman.LoadRequest{
Bytecode: bytecode,
Name: r.currentXdpProgram.Spec.BpfFunctionName,
ProgramType: uint32(internal.Xdp),
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_XdpAttachInfo{
- XdpAttachInfo: &gobpfd.XDPAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_XdpAttachInfo{
+ XdpAttachInfo: &gobpfman.XDPAttachInfo{
Priority: r.currentXdpProgram.Spec.Priority,
Iface: iface,
ProceedOn: xdpProceedOnToInt(r.currentXdpProgram.Spec.ProceedOn),
@@ -231,15 +231,15 @@ func (r *XdpProgramReconciler) buildXdpLoadRequest(
}
}
-// reconcileBpfdPrograms ONLY reconciles the bpfd state for a single BpfProgram.
+// reconcileBpfmanPrograms ONLY reconciles the bpfman state for a single BpfProgram.
// It does not interact with the k8s API in any way.
-func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
- existingBpfPrograms map[string]*gobpfd.ListResponse_ListResult,
- bytecodeSelector *bpfdiov1alpha1.BytecodeSelector,
- bpfProgram *bpfdiov1alpha1.BpfProgram,
+func (r *XdpProgramReconciler) reconcileBpfmanProgram(ctx context.Context,
+ existingBpfPrograms map[string]*gobpfman.ListResponse_ListResult,
+ bytecodeSelector *bpfmaniov1alpha1.BytecodeSelector,
+ bpfProgram *bpfmaniov1alpha1.BpfProgram,
isNodeSelected bool,
isBeingDeleted bool,
- mapOwnerStatus *MapOwnerParamStatus) (bpfdiov1alpha1.BpfProgramConditionType, error) {
+ mapOwnerStatus *MapOwnerParamStatus) (bpfmaniov1alpha1.BpfProgramConditionType, error) {
r.Logger.V(1).Info("Existing bpfProgram", "UUID", bpfProgram.UID, "Name", bpfProgram.Name, "CurrentXdpProgram", r.currentXdpProgram.Name)
iface := bpfProgram.Annotations[internal.XdpProgramInterface]
@@ -247,13 +247,13 @@ func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
var err error
uuid := string(bpfProgram.UID)
- getLoadRequest := func() (*gobpfd.LoadRequest, bpfdiov1alpha1.BpfProgramConditionType, error) {
- bytecode, err := bpfdagentinternal.GetBytecode(r.Client, bytecodeSelector)
+ getLoadRequest := func() (*gobpfman.LoadRequest, bpfmaniov1alpha1.BpfProgramConditionType, error) {
+ bytecode, err := bpfmanagentinternal.GetBytecode(r.Client, bytecodeSelector)
if err != nil {
- return nil, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
+ return nil, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError, fmt.Errorf("failed to process bytecode selector: %v", err)
}
loadRequest := r.buildXdpLoadRequest(bytecode, uuid, iface, mapOwnerStatus.mapOwnerId)
- return loadRequest, bpfdiov1alpha1.BpfProgCondNone, nil
+ return loadRequest, bpfmaniov1alpha1.BpfProgCondNone, nil
}
existingProgram, doesProgramExist := existingBpfPrograms[uuid]
@@ -262,22 +262,22 @@ func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
// If XdpProgram is being deleted just break out and remove finalizer
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
// Make sure if we're not selected just exit
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
// Make sure if the Map Owner is set but not found then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
// Make sure if the Map Owner is set but not loaded then just exit
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
// otherwise load it
@@ -286,21 +286,21 @@ func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load XdpProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to load XdpProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ r.Logger.Info("bpfman called to load XdpProgram on Node", "Name", bpfProgram.Name, "UUID", uuid)
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
// prog ID should already have been set
- id, err := bpfdagentinternal.GetID(bpfProgram)
+ id, err := bpfmanagentinternal.GetID(bpfProgram)
if err != nil {
r.Logger.Error(err, "Failed to get program ID")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
// BpfProgram exists but either XdpProgram is being deleted, node is no
@@ -311,27 +311,27 @@ func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
"isDeleted", isBeingDeleted, "isSelected", isNodeSelected, "mapIsSet", mapOwnerStatus.isSet,
"mapIsFound", mapOwnerStatus.isFound, "mapIsLoaded", mapOwnerStatus.isLoaded)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload XdpProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.Logger.Info("bpfd called to unload XdpProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to unload XdpProgram on Node", "Name", bpfProgram.Name, "UUID", id)
if isBeingDeleted {
- return bpfdiov1alpha1.BpfProgCondUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondUnloaded, nil
}
if !isNodeSelected {
- return bpfdiov1alpha1.BpfProgCondNotSelected, nil
+ return bpfmaniov1alpha1.BpfProgCondNotSelected, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isFound {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotFound, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound, nil
}
if mapOwnerStatus.isSet && !mapOwnerStatus.isLoaded {
- return bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded, nil
}
}
@@ -341,27 +341,27 @@ func (r *XdpProgramReconciler) reconcileBpfdProgram(ctx context.Context,
return condition, err
}
- isSame, reasons := bpfdagentinternal.DoesProgExist(existingProgram, loadRequest)
+ isSame, reasons := bpfmanagentinternal.DoesProgExist(existingProgram, loadRequest)
if !isSame {
r.Logger.V(1).Info("XdpProgram is in wrong state, unloading and reloading", "Reason", reasons)
- if err := bpfdagentinternal.UnloadBpfdProgram(ctx, r.BpfdClient, *id); err != nil {
+ if err := bpfmanagentinternal.UnloadBpfmanProgram(ctx, r.BpfmanClient, *id); err != nil {
r.Logger.Error(err, "Failed to unload XdpProgram")
- return bpfdiov1alpha1.BpfProgCondNotUnloaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotUnloaded, nil
}
- r.progId, err = bpfdagentinternal.LoadBpfdProgram(ctx, r.BpfdClient, loadRequest)
+ r.progId, err = bpfmanagentinternal.LoadBpfmanProgram(ctx, r.BpfmanClient, loadRequest)
if err != nil {
r.Logger.Error(err, "Failed to load XdpProgram")
- return bpfdiov1alpha1.BpfProgCondNotLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondNotLoaded, nil
}
- r.Logger.Info("bpfd called to reload XdpProgram on Node", "Name", bpfProgram.Name, "UUID", id)
+ r.Logger.Info("bpfman called to reload XdpProgram on Node", "Name", bpfProgram.Name, "UUID", id)
} else {
// Program exists and bpfProgram K8s Object is up to date
- r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfd")
+ r.Logger.V(1).Info("Ignoring Object Change nothing to do in bpfman")
r.progId = id
}
- return bpfdiov1alpha1.BpfProgCondLoaded, nil
+ return bpfmaniov1alpha1.BpfProgCondLoaded, nil
}
diff --git a/bpfd-operator/controllers/bpfd-agent/xdp-program_test.go b/bpfman-operator/controllers/bpfman-agent/xdp-program_test.go
similarity index 76%
rename from bpfd-operator/controllers/bpfd-agent/xdp-program_test.go
rename to bpfman-operator/controllers/bpfman-agent/xdp-program_test.go
index a1cbd598b..7e79597da 100644
--- a/bpfd-operator/controllers/bpfd-agent/xdp-program_test.go
+++ b/bpfman-operator/controllers/bpfman-agent/xdp-program_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdagent
+package bpfmanagent
import (
"context"
@@ -24,13 +24,13 @@ import (
"github.com/google/go-cmp/cmp"
"google.golang.org/protobuf/testing/protocmp"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdagentinternal "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal"
- agenttestutils "github.com/bpfd-dev/bpfd/bpfd-operator/controllers/bpfd-agent/internal/test-utils"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanagentinternal "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal"
+ agenttestutils "github.com/bpfman/bpfman/bpfman-operator/controllers/bpfman-agent/internal/test-utils"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
- gobpfd "github.com/bpfd-dev/bpfd/clients/gobpfd/v1"
+ gobpfman "github.com/bpfman/bpfman/clients/gobpfman/v1"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -50,7 +50,7 @@ import (
func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiCondition bool) {
var (
name = "fakeXdpProgram"
- namespace = "bpfd"
+ namespace = "bpfman"
bytecodePath = "/tmp/hello.o"
bpfFunctionName = "test"
fakeNode = testutils.NewNode("fake-control-plane")
@@ -59,8 +59,8 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
ctx = context.TODO()
bpfProgName0 = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, fakeInt0)
bpfProgName1 = fmt.Sprintf("%s-%s-%s", name, fakeNode.Name, fakeInt1)
- bpfProgEth0 = &bpfdiov1alpha1.BpfProgram{}
- bpfProgEth1 = &bpfdiov1alpha1.BpfProgram{}
+ bpfProgEth0 = &bpfmaniov1alpha1.BpfProgram{}
+ bpfProgEth1 = &bpfmaniov1alpha1.BpfProgram{}
fakeUID0 = "ef71d42c-aa21-48e8-a697-82391d801a80"
fakeUID1 = "ef71d42c-aa21-48e8-a697-82391d801a81"
)
@@ -73,24 +73,24 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
}
// A XdpProgram object with metadata and spec.
- xdp := &bpfdiov1alpha1.XdpProgram{
+ xdp := &bpfmaniov1alpha1.XdpProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.XdpProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.XdpProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
- InterfaceSelector: bpfdiov1alpha1.InterfaceSelector{
+ InterfaceSelector: bpfmaniov1alpha1.InterfaceSelector{
Interfaces: &fakeInts,
},
Priority: 0,
- ProceedOn: []bpfdiov1alpha1.XdpProceedOnValue{bpfdiov1alpha1.XdpProceedOnValue("pass"),
- bpfdiov1alpha1.XdpProceedOnValue("dispatcher_return"),
+ ProceedOn: []bpfmaniov1alpha1.XdpProceedOnValue{bpfmaniov1alpha1.XdpProceedOnValue("pass"),
+ bpfmaniov1alpha1.XdpProceedOnValue("dispatcher_return"),
},
},
}
@@ -100,21 +100,21 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, xdp)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.XdpProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, xdp)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.XdpProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
- cli := agenttestutils.NewBpfdClientFake()
+ cli := agenttestutils.NewBpfmanClientFake()
rc := ReconcilerCommon{
- Client: cl,
- Scheme: s,
- BpfdClient: cli,
- NodeName: fakeNode.Name,
+ Client: cl,
+ Scheme: s,
+ BpfmanClient: cli,
+ NodeName: fakeNode.Name,
}
// Set development Logger so we can see all logs in tests.
@@ -159,7 +159,7 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
err = cl.Update(ctx, bpfProgEth0)
require.NoError(t, err)
- // Second reconcile should create the bpfd Load Requests for the first bpfProgram.
+ // Second reconcile should create the bpfman Load Requests for the first bpfProgram.
res, err = r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -170,17 +170,17 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
uuid0 := string(bpfProgEth0.UID)
- expectedLoadReq0 := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq0 := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Xdp.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: uuid0, internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_XdpAttachInfo{
- XdpAttachInfo: &gobpfd.XDPAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_XdpAttachInfo{
+ XdpAttachInfo: &gobpfman.XDPAttachInfo{
Priority: 0,
Iface: fakeInts[0],
ProceedOn: []int32{2, 31},
@@ -194,13 +194,13 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
require.NoError(t, err)
// prog ID should already have been set
- id0, err := bpfdagentinternal.GetID(bpfProgEth0)
+ id0, err := bpfmanagentinternal.GetID(bpfProgEth0)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly built
if !cmp.Equal(expectedLoadReq0, cli.LoadRequests[int(*id0)], protocmp.Transform()) {
t.Logf("Diff %v", cmp.Diff(expectedLoadReq0, cli.LoadRequests[int(*id0)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// NOTE: THIS IS A TEST FOR AN ERROR PATH. THERE SHOULD NEVER BE MORE THAN
@@ -208,11 +208,11 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
if multiCondition {
// Add some random conditions and verify that the condition still gets
// updated correctly.
- meta.SetStatusCondition(&bpfProgEth0.Status.Conditions, bpfdiov1alpha1.BpfProgCondBytecodeSelectorError.Condition())
+ meta.SetStatusCondition(&bpfProgEth0.Status.Conditions, bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError.Condition())
if err := r.Status().Update(ctx, bpfProgEth0); err != nil {
r.Logger.V(1).Info("failed to set KprobeProgram object status")
}
- meta.SetStatusCondition(&bpfProgEth0.Status.Conditions, bpfdiov1alpha1.BpfProgCondNotSelected.Condition())
+ meta.SetStatusCondition(&bpfProgEth0.Status.Conditions, bpfmaniov1alpha1.BpfProgCondNotSelected.Condition())
if err := r.Status().Update(ctx, bpfProgEth0); err != nil {
r.Logger.V(1).Info("failed to set KprobeProgram object status")
}
@@ -237,7 +237,7 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
// Make sure we only have 1 condition now
require.Equal(t, 1, len(bpfProgEth0.Status.Conditions))
// Make sure it's the right one.
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProgEth0.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProgEth0.Status.Conditions[0].Type)
if multiInterface {
// Fourth reconcile should create the second bpfProgram.
@@ -290,17 +290,17 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
uuid1 := string(bpfProgEth1.UID)
- expectedLoadReq1 := &gobpfd.LoadRequest{
- Bytecode: &gobpfd.BytecodeLocation{
- Location: &gobpfd.BytecodeLocation_File{File: bytecodePath},
+ expectedLoadReq1 := &gobpfman.LoadRequest{
+ Bytecode: &gobpfman.BytecodeLocation{
+ Location: &gobpfman.BytecodeLocation_File{File: bytecodePath},
},
Name: bpfFunctionName,
ProgramType: *internal.Xdp.Uint32(),
Metadata: map[string]string{internal.UuidMetadataKey: uuid1, internal.ProgramNameKey: name},
MapOwnerId: nil,
- Attach: &gobpfd.AttachInfo{
- Info: &gobpfd.AttachInfo_XdpAttachInfo{
- XdpAttachInfo: &gobpfd.XDPAttachInfo{
+ Attach: &gobpfman.AttachInfo{
+ Info: &gobpfman.AttachInfo_XdpAttachInfo{
+ XdpAttachInfo: &gobpfman.XDPAttachInfo{
Priority: 0,
Iface: fakeInts[1],
ProceedOn: []int32{2, 31},
@@ -314,13 +314,13 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
require.NoError(t, err)
// prog ID should already have been set
- id1, err := bpfdagentinternal.GetID(bpfProgEth1)
+ id1, err := bpfmanagentinternal.GetID(bpfProgEth1)
require.NoError(t, err)
// Check the bpfLoadRequest was correctly built
if !cmp.Equal(expectedLoadReq1, cli.LoadRequests[int(*id1)], protocmp.Transform()) {
t.Logf("Diff %v", cmp.Diff(expectedLoadReq1, cli.LoadRequests[int(*id1)], protocmp.Transform()))
- t.Fatal("Built bpfd LoadRequest does not match expected")
+ t.Fatal("Built bpfman LoadRequest does not match expected")
}
// Get program object
@@ -331,7 +331,7 @@ func xdpProgramControllerCreate(t *testing.T, multiInterface bool, multiConditio
// Make sure we only have 1 condition now
require.Equal(t, 1, len(bpfProgEth1.Status.Conditions))
// Make sure it's the right one.
- require.Equal(t, string(bpfdiov1alpha1.BpfProgCondLoaded), bpfProgEth1.Status.Conditions[0].Type)
+ require.Equal(t, string(bpfmaniov1alpha1.BpfProgCondLoaded), bpfProgEth1.Status.Conditions[0].Type)
}
}
diff --git a/bpfd-operator/controllers/bpfd-operator/common.go b/bpfman-operator/controllers/bpfman-operator/common.go
similarity index 76%
rename from bpfd-operator/controllers/bpfd-operator/common.go
rename to bpfman-operator/controllers/bpfman-operator/common.go
index 1f570332c..d3a30ad4f 100644
--- a/bpfd-operator/controllers/bpfd-operator/common.go
+++ b/bpfman-operator/controllers/bpfman-operator/common.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -32,13 +32,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- bpfdHelpers "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/helpers"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ bpfmanHelpers "github.com/bpfman/bpfman/bpfman-operator/pkg/helpers"
"github.com/go-logr/logr"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=bpfprograms,verbs=get;list;watch
+//+kubebuilder:rbac:groups=bpfman.io,resources=bpfprograms,verbs=get;list;watch
//+kubebuilder:rbac:groups=core,resources=nodes,verbs=get;list;watch
const (
@@ -52,12 +52,12 @@ type ReconcilerCommon struct {
Logger logr.Logger
}
-// bpfdReconciler defines a k8s reconciler which can program bpfd.
+// bpfmanReconciler defines a k8s reconciler which can program bpfman.
type ProgramReconciler interface {
getRecCommon() *ReconcilerCommon
updateStatus(ctx context.Context,
name string,
- cond bpfdiov1alpha1.ProgramConditionType,
+ cond bpfmaniov1alpha1.ProgramConditionType,
message string) (ctrl.Result, error)
getFinalizer() string
}
@@ -68,13 +68,13 @@ func reconcileBpfProgram(ctx context.Context, rec ProgramReconciler, prog client
r.Logger.V(1).Info("Reconciling Program", "ProgramName", progName)
- if !controllerutil.ContainsFinalizer(prog, internal.BpfdOperatorFinalizer) {
- return r.addFinalizer(ctx, prog, internal.BpfdOperatorFinalizer)
+ if !controllerutil.ContainsFinalizer(prog, internal.BpfmanOperatorFinalizer) {
+ return r.addFinalizer(ctx, prog, internal.BpfmanOperatorFinalizer)
}
// reconcile Program Object on all other events
// list all existing bpfProgram state for the given Program
- bpfPrograms := &bpfdiov1alpha1.BpfProgramList{}
+ bpfPrograms := &bpfmaniov1alpha1.BpfProgramList{}
// Only list bpfPrograms for this Program
opts := []client.ListOption{client.MatchingLabels{internal.BpfProgramOwnerLabel: progName}}
@@ -92,11 +92,11 @@ func reconcileBpfProgram(ctx context.Context, rec ProgramReconciler, prog client
}
// Return NotYetLoaded Status if
- // BpfPrograms for each node haven't been created by bpfd-agent and the config isn't
+ // BpfPrograms for each node haven't been created by bpfman-agent and the config isn't
// being deleted.
if len(nodes.Items) != len(bpfPrograms.Items) && prog.GetDeletionTimestamp().IsZero() {
// Causes Requeue
- return rec.updateStatus(ctx, progName, bpfdiov1alpha1.ProgramNotYetLoaded, "")
+ return rec.updateStatus(ctx, progName, bpfmaniov1alpha1.ProgramNotYetLoaded, "")
}
failedBpfPrograms := []string{}
@@ -108,32 +108,32 @@ func reconcileBpfProgram(ctx context.Context, rec ProgramReconciler, prog client
finalApplied = append(finalApplied, bpfProgram.Name)
}
- if bpfdHelpers.IsBpfProgramConditionFailure(&bpfProgram.Status.Conditions) {
+ if bpfmanHelpers.IsBpfProgramConditionFailure(&bpfProgram.Status.Conditions) {
failedBpfPrograms = append(failedBpfPrograms, bpfProgram.Name)
}
}
if !prog.GetDeletionTimestamp().IsZero() {
- // Only remove bpfd-operator finalizer if all bpfProgram Objects are ready to be pruned (i.e there are no
+ // Only remove bpfman-operator finalizer if all bpfProgram Objects are ready to be pruned (i.e there are no
// bpfPrograms with a finalizer)
if len(finalApplied) == 0 {
// Causes Requeue
- return r.removeFinalizer(ctx, prog, internal.BpfdOperatorFinalizer)
+ return r.removeFinalizer(ctx, prog, internal.BpfmanOperatorFinalizer)
}
// Causes Requeue
- return rec.updateStatus(ctx, progName, bpfdiov1alpha1.ProgramDeleteError, fmt.Sprintf("Program Deletion failed on the following bpfProgram Objects: %v",
+ return rec.updateStatus(ctx, progName, bpfmaniov1alpha1.ProgramDeleteError, fmt.Sprintf("Program Deletion failed on the following bpfProgram Objects: %v",
finalApplied))
}
if len(failedBpfPrograms) != 0 {
// Causes Requeue
- return rec.updateStatus(ctx, progName, bpfdiov1alpha1.ProgramReconcileError,
+ return rec.updateStatus(ctx, progName, bpfmaniov1alpha1.ProgramReconcileError,
fmt.Sprintf("bpfProgramReconciliation failed on the following bpfProgram Objects: %v", failedBpfPrograms))
}
// Causes Requeue
- return rec.updateStatus(ctx, progName, bpfdiov1alpha1.ProgramReconcileSuccess, "")
+ return rec.updateStatus(ctx, progName, bpfmaniov1alpha1.ProgramReconcileSuccess, "")
}
func (r *ReconcilerCommon) removeFinalizer(ctx context.Context, prog client.Object, finalizer string) (ctrl.Result, error) {
@@ -151,11 +151,11 @@ func (r *ReconcilerCommon) removeFinalizer(ctx context.Context, prog client.Obje
}
func (r *ReconcilerCommon) addFinalizer(ctx context.Context, prog client.Object, finalizer string) (ctrl.Result, error) {
- controllerutil.AddFinalizer(prog, internal.BpfdOperatorFinalizer)
+ controllerutil.AddFinalizer(prog, internal.BpfmanOperatorFinalizer)
err := r.Update(ctx, prog)
if err != nil {
- r.Logger.V(1).Info("failed adding bpfd-operator finalizer to Program...requeuing")
+ r.Logger.V(1).Info("failed adding bpfman-operator finalizer to Program...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
}
@@ -172,8 +172,8 @@ func statusChangedPredicate() predicate.Funcs {
return false
},
UpdateFunc: func(e event.UpdateEvent) bool {
- oldObject := e.ObjectOld.(*bpfdiov1alpha1.BpfProgram)
- newObject := e.ObjectNew.(*bpfdiov1alpha1.BpfProgram)
+ oldObject := e.ObjectOld.(*bpfmaniov1alpha1.BpfProgram)
+ newObject := e.ObjectNew.(*bpfmaniov1alpha1.BpfProgram)
return !reflect.DeepEqual(oldObject.Status, newObject.Status)
},
DeleteFunc: func(e event.DeleteEvent) bool {
@@ -182,7 +182,7 @@ func statusChangedPredicate() predicate.Funcs {
}
}
-func (r *ReconcilerCommon) updateCondition(ctx context.Context, obj client.Object, conditions *[]metav1.Condition, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *ReconcilerCommon) updateCondition(ctx context.Context, obj client.Object, conditions *[]metav1.Condition, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
r.Logger.V(1).Info("updateCondition()", "existing conds", conditions, "new cond", cond)
diff --git a/bpfman-operator/controllers/bpfman-operator/configmap.go b/bpfman-operator/controllers/bpfman-operator/configmap.go
new file mode 100644
index 000000000..96f7bd61f
--- /dev/null
+++ b/bpfman-operator/controllers/bpfman-operator/configmap.go
@@ -0,0 +1,266 @@
+/*
+Copyright 2022.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package bpfmanoperator
+
+import (
+ "context"
+ "io"
+ "os"
+ "reflect"
+
+ appsv1 "k8s.io/api/apps/v1"
+ corev1 "k8s.io/api/core/v1"
+ storagev1 "k8s.io/api/storage/v1"
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/types"
+ "k8s.io/client-go/kubernetes/scheme"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/event"
+ "sigs.k8s.io/controller-runtime/pkg/predicate"
+
+ "sigs.k8s.io/controller-runtime/pkg/builder"
+ "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
+ "sigs.k8s.io/controller-runtime/pkg/log"
+
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+)
+
+// +kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete
+// +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create
+// +kubebuilder:rbac:groups=storage.k8s.io,resources=csidrivers,verbs=get;list;watch;create;delete
+// +kubebuilder:rbac:groups=bpfman.io,resources=configmaps/finalizers,verbs=update
+
+type BpfmanConfigReconciler struct {
+ ReconcilerCommon
+ BpfmanStandardDeployment string
+ CsiDriverDeployment string
+}
+
+// SetupWithManager sets up the controller with the Manager.
+func (r *BpfmanConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
+ return ctrl.NewControllerManagedBy(mgr).
+ // Watch the bpfman-daemon configmap to configure the bpfman deployment across the whole cluster
+ For(&corev1.ConfigMap{},
+ builder.WithPredicates(bpfmanConfigPredicate())).
+ // This only watches the bpfman daemonset which is stored on disk and will be created
+ // by this operator. We're doing a manual watch since the operator (As a controller)
+ // doesn't really want to have an owner-ref since we don't have a CRD for
+ // configuring it, only a configmap.
+ Owns(
+ &appsv1.DaemonSet{},
+ builder.WithPredicates(bpfmanDaemonPredicate())).
+ Complete(r)
+}
+
+func (r *BpfmanConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
+ r.Logger = log.FromContext(ctx)
+
+ bpfmanConfig := &corev1.ConfigMap{}
+ if err := r.Get(ctx, req.NamespacedName, bpfmanConfig); err != nil {
+ if !errors.IsNotFound(err) {
+ r.Logger.Error(err, "failed getting bpfman config", "ReconcileObject", req.NamespacedName)
+ return ctrl.Result{}, nil
+ }
+ } else {
+ if updated := controllerutil.AddFinalizer(bpfmanConfig, internal.BpfmanOperatorFinalizer); updated {
+ if err := r.Update(ctx, bpfmanConfig); err != nil {
+ r.Logger.Error(err, "failed adding bpfman-operator finalizer to bpfman config")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+ } else {
+ return r.ReconcileBpfmanConfig(ctx, req, bpfmanConfig)
+ }
+ }
+
+ return ctrl.Result{}, nil
+}
+
+func (r *BpfmanConfigReconciler) ReconcileBpfmanConfig(ctx context.Context, req ctrl.Request, bpfmanConfig *corev1.ConfigMap) (ctrl.Result, error) {
+ bpfmanDeployment := &appsv1.DaemonSet{}
+
+ staticBpfmanDeployment := LoadAndConfigureBpfmanDs(bpfmanConfig, r.BpfmanStandardDeployment)
+ r.Logger.V(1).Info("StaticBpfmanDeployment with CSI", "DS", staticBpfmanDeployment)
+ bpfmanCsiDriver := &storagev1.CSIDriver{}
+ // one-shot try to create bpfman's CSIDriver object if it doesn't exist, does not re-trigger reconcile.
+ if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: internal.BpfmanCsiDriverName}, bpfmanCsiDriver); err != nil {
+ if errors.IsNotFound(err) {
+ bpfmanCsiDriver = LoadCsiDriver(r.CsiDriverDeployment)
+
+ r.Logger.Info("Creating Bpfman csi driver object")
+ if err := r.Create(ctx, bpfmanCsiDriver); err != nil {
+ r.Logger.Error(err, "Failed to create Bpfman csi driver")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+ }
+ }
+
+ if err := r.Get(ctx, types.NamespacedName{Namespace: bpfmanConfig.Namespace, Name: internal.BpfmanDsName}, bpfmanDeployment); err != nil {
+ if errors.IsNotFound(err) {
+ r.Logger.Info("Creating Bpfman Daemon")
+ // Causes Requeue
+ if err := r.Create(ctx, staticBpfmanDeployment); err != nil {
+ r.Logger.Error(err, "Failed to create Bpfman Daemon")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+ return ctrl.Result{}, nil
+ }
+
+ r.Logger.Error(err, "Failed to get bpfman daemon")
+ return ctrl.Result{}, nil
+ }
+
+ if !bpfmanConfig.DeletionTimestamp.IsZero() {
+ r.Logger.Info("Deleting bpfman daemon and config")
+ controllerutil.RemoveFinalizer(bpfmanDeployment, internal.BpfmanOperatorFinalizer)
+
+ err := r.Update(ctx, bpfmanDeployment)
+ if err != nil {
+ r.Logger.Error(err, "failed removing bpfman-operator finalizer from bpfmanDs")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+
+ bpfmanCsiDriver := &storagev1.CSIDriver{}
+
+ // one-shot try to delete bpfman's CSIDriver object only if it exists.
+ if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: internal.BpfmanCsiDriverName}, bpfmanCsiDriver); err == nil {
+ r.Logger.Info("Deleting Bpfman csi driver object")
+ if err := r.Delete(ctx, bpfmanCsiDriver); err != nil {
+ r.Logger.Error(err, "Failed to delete Bpfman csi driver")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+ }
+
+ if err = r.Delete(ctx, bpfmanDeployment); err != nil {
+ r.Logger.Error(err, "failed deleting bpfman DS")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+
+ controllerutil.RemoveFinalizer(bpfmanConfig, internal.BpfmanOperatorFinalizer)
+ err = r.Update(ctx, bpfmanConfig)
+ if err != nil {
+ r.Logger.Error(err, "failed removing bpfman-operator finalizer from bpfman config")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+
+ return ctrl.Result{}, nil
+ }
+
+ if !reflect.DeepEqual(staticBpfmanDeployment.Spec, bpfmanDeployment.Spec) {
+ r.Logger.Info("Reconciling bpfman")
+
+ // Causes Requeue
+ if err := r.Update(ctx, staticBpfmanDeployment); err != nil {
+ r.Logger.Error(err, "failed reconciling bpfman deployment")
+ return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
+ }
+ }
+
+ return ctrl.Result{}, nil
+}
+
+// Only reconcile on bpfman-daemon Daemonset events.
+func bpfmanDaemonPredicate() predicate.Funcs {
+ return predicate.Funcs{
+ GenericFunc: func(e event.GenericEvent) bool {
+ return e.Object.GetName() == internal.BpfmanDsName
+ },
+ CreateFunc: func(e event.CreateEvent) bool {
+ return e.Object.GetName() == internal.BpfmanDsName
+ },
+ UpdateFunc: func(e event.UpdateEvent) bool {
+ return e.ObjectNew.GetName() == internal.BpfmanDsName
+ },
+ DeleteFunc: func(e event.DeleteEvent) bool {
+ return e.Object.GetName() == internal.BpfmanDsName
+ },
+ }
+}
+
+// Only reconcile on bpfman-config configmap events.
+func bpfmanConfigPredicate() predicate.Funcs {
+ return predicate.Funcs{
+ GenericFunc: func(e event.GenericEvent) bool {
+ return e.Object.GetName() == internal.BpfmanConfigName
+ },
+ CreateFunc: func(e event.CreateEvent) bool {
+ return e.Object.GetName() == internal.BpfmanConfigName
+ },
+ UpdateFunc: func(e event.UpdateEvent) bool {
+ return e.ObjectNew.GetName() == internal.BpfmanConfigName
+ },
+ DeleteFunc: func(e event.DeleteEvent) bool {
+ return e.Object.GetName() == internal.BpfmanConfigName
+ },
+ }
+}
+
+func LoadCsiDriver(path string) *storagev1.CSIDriver {
+ // Load static bpfman deployment from disk
+ file, err := os.Open(path)
+ if err != nil {
+ panic(err)
+ }
+
+ b, err := io.ReadAll(file)
+ if err != nil {
+ panic(err)
+ }
+
+ decode := scheme.Codecs.UniversalDeserializer().Decode
+ obj, _, _ := decode(b, nil, nil)
+
+ return obj.(*storagev1.CSIDriver)
+}
+
+func LoadAndConfigureBpfmanDs(config *corev1.ConfigMap, path string) *appsv1.DaemonSet {
+ // Load static bpfman deployment from disk
+ file, err := os.Open(path)
+ if err != nil {
+ panic(err)
+ }
+
+ b, err := io.ReadAll(file)
+ if err != nil {
+ panic(err)
+ }
+
+ decode := scheme.Codecs.UniversalDeserializer().Decode
+ obj, _, _ := decode(b, nil, nil)
+
+ staticBpfmanDeployment := obj.(*appsv1.DaemonSet)
+
+ // Runtime Configurable fields
+ bpfmanImage := config.Data["bpfman.image"]
+ bpfmanAgentImage := config.Data["bpfman.agent.image"]
+ bpfmanLogLevel := config.Data["bpfman.log.level"]
+ bpfmanAgentLogLevel := config.Data["bpfman.agent.log.level"]
+
+ // Annotate the log level on the ds so we get automatic restarts on changes.
+ if staticBpfmanDeployment.Spec.Template.ObjectMeta.Annotations == nil {
+ staticBpfmanDeployment.Spec.Template.ObjectMeta.Annotations = make(map[string]string)
+ }
+
+ staticBpfmanDeployment.Spec.Template.ObjectMeta.Annotations["bpfman.io.bpfman.loglevel"] = bpfmanLogLevel
+ staticBpfmanDeployment.Spec.Template.ObjectMeta.Annotations["bpfman.io.bpfman.agent.loglevel"] = bpfmanAgentLogLevel
+ staticBpfmanDeployment.Name = "bpfman-daemon"
+ staticBpfmanDeployment.Namespace = config.Namespace
+ staticBpfmanDeployment.Spec.Template.Spec.Containers[0].Image = bpfmanImage
+ staticBpfmanDeployment.Spec.Template.Spec.Containers[1].Image = bpfmanAgentImage
+ controllerutil.AddFinalizer(staticBpfmanDeployment, internal.BpfmanOperatorFinalizer)
+
+ return staticBpfmanDeployment
+}
diff --git a/bpfd-operator/controllers/bpfd-operator/configmap_test.go b/bpfman-operator/controllers/bpfman-operator/configmap_test.go
similarity index 60%
rename from bpfd-operator/controllers/bpfd-operator/configmap_test.go
rename to bpfman-operator/controllers/bpfman-operator/configmap_test.go
index 1bc2b5d3c..f43fbd888 100644
--- a/bpfd-operator/controllers/bpfd-operator/configmap_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/configmap_test.go
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -33,35 +33,35 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
)
-func TestBpfdConfigReconcileAndDelete(t *testing.T) {
+func TestBpfmanConfigReconcileAndDelete(t *testing.T) {
var (
- name = "bpfd-config"
- namespace = "bpfd"
- staticDsPath = "../../config/bpfd-deployment/daemonset.yaml"
- staticCsiPath = "../../config/bpfd-deployment/csidriverinfo.yaml"
+ name = "bpfman-config"
+ namespace = "bpfman"
+ staticDsPath = "../../config/bpfman-deployment/daemonset.yaml"
+ staticCsiPath = "../../config/bpfman-deployment/csidriverinfo.yaml"
ctx = context.TODO()
)
- // A configMap for bpfd with metadata and spec.
- bpfdConfig := &corev1.ConfigMap{
+ // A configMap for bpfman with metadata and spec.
+ bpfmanConfig := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
},
Data: map[string]string{
- "bpfd.agent.image": "BPFD_AGENT_IS_SCARY",
- "bpfd.image": "FAKE-IMAGE",
- "bpfd.agent.log.level": "FAKE",
+ "bpfman.agent.image": "BPFMAN_AGENT_IS_SCARY",
+ "bpfman.image": "FAKE-IMAGE",
+ "bpfman.agent.log.level": "FAKE",
},
}
// Objects to track in the fake client.
- objs := []runtime.Object{bpfdConfig}
+ objs := []runtime.Object{bpfmanConfig}
// Register operator types with the runtime scheme.
s := scheme.Scheme
@@ -77,14 +77,14 @@ func TestBpfdConfigReconcileAndDelete(t *testing.T) {
Scheme: s,
}
- // The expected bpfd daemonset
- expectedBpfdDs := LoadAndConfigureBpfdDs(bpfdConfig, staticDsPath)
+ // The expected bpfman daemonset
+ expectedBpfmanDs := LoadAndConfigureBpfmanDs(bpfmanConfig, staticDsPath)
// Set development Logger so we can see all logs in tests.
logf.SetLogger(zap.New(zap.UseFlagOptions(&zap.Options{Development: true})))
// Create a ReconcileMemcached object with the scheme and fake client.
- r := &BpfdConfigReconciler{ReconcilerCommon: rc, BpfdStandardDeployment: staticDsPath, CsiDriverDeployment: staticCsiPath}
+ r := &BpfmanConfigReconciler{ReconcilerCommon: rc, BpfmanStandardDeployment: staticDsPath, CsiDriverDeployment: staticCsiPath}
// Mock request to simulate Reconcile() being called on an event for a
// watched resource .
@@ -95,7 +95,7 @@ func TestBpfdConfigReconcileAndDelete(t *testing.T) {
},
}
- // First reconcile will add bpfd-operator finalizer to bpfd configmap
+ // First reconcile will add bpfman-operator finalizer to bpfman configmap
res, err := r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -105,13 +105,13 @@ func TestBpfdConfigReconcileAndDelete(t *testing.T) {
require.False(t, res.Requeue)
// Check the BpfProgram Object was created successfully
- err = cl.Get(ctx, types.NamespacedName{Name: bpfdConfig.Name, Namespace: namespace}, bpfdConfig)
+ err = cl.Get(ctx, types.NamespacedName{Name: bpfmanConfig.Name, Namespace: namespace}, bpfmanConfig)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, bpfdConfig.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, bpfmanConfig.GetFinalizers(), internal.BpfmanOperatorFinalizer)
- // Second reconcile will create bpfd daemonset
+ // Second reconcile will create bpfman daemonset
res, err = r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -120,20 +120,20 @@ func TestBpfdConfigReconcileAndDelete(t *testing.T) {
// Require no requeue
require.False(t, res.Requeue)
- // Check the bpfd daemonset was created successfully
- actualBpfdDs := &appsv1.DaemonSet{}
+ // Check the bpfman daemonset was created successfully
+ actualBpfmanDs := &appsv1.DaemonSet{}
- err = cl.Get(ctx, types.NamespacedName{Name: expectedBpfdDs.Name, Namespace: namespace}, actualBpfdDs)
+ err = cl.Get(ctx, types.NamespacedName{Name: expectedBpfmanDs.Name, Namespace: namespace}, actualBpfmanDs)
require.NoError(t, err)
- // Check the bpfd daemonset was created with the correct configuration.
- require.True(t, reflect.DeepEqual(actualBpfdDs.Spec, expectedBpfdDs.Spec))
+ // Check the bpfman daemonset was created with the correct configuration.
+ require.True(t, reflect.DeepEqual(actualBpfmanDs.Spec, expectedBpfmanDs.Spec))
- // Delete the bpfd configmap
- err = cl.Delete(ctx, bpfdConfig)
+ // Delete the bpfman configmap
+ err = cl.Delete(ctx, bpfmanConfig)
require.NoError(t, err)
- // Third reconcile will delete bpfd daemonset
+ // Third reconcile will delete bpfman daemonset
res, err = r.Reconcile(ctx, req)
if err != nil {
t.Fatalf("reconcile: (%v)", err)
@@ -142,9 +142,9 @@ func TestBpfdConfigReconcileAndDelete(t *testing.T) {
// Require no requeue
require.False(t, res.Requeue)
- err = cl.Get(ctx, types.NamespacedName{Name: expectedBpfdDs.Name, Namespace: namespace}, actualBpfdDs)
+ err = cl.Get(ctx, types.NamespacedName{Name: expectedBpfmanDs.Name, Namespace: namespace}, actualBpfmanDs)
require.True(t, errors.IsNotFound(err))
- err = cl.Get(ctx, types.NamespacedName{Name: bpfdConfig.Name, Namespace: namespace}, bpfdConfig)
+ err = cl.Get(ctx, types.NamespacedName{Name: bpfmanConfig.Name, Namespace: namespace}, bpfmanConfig)
require.True(t, errors.IsNotFound(err))
}
diff --git a/bpfd-operator/controllers/bpfd-operator/kprobe-program.go b/bpfman-operator/controllers/bpfman-operator/kprobe-program.go
similarity index 82%
rename from bpfd-operator/controllers/bpfd-operator/kprobe-program.go
rename to bpfman-operator/controllers/bpfman-operator/kprobe-program.go
index 387eb86f1..6ca509308 100644
--- a/bpfd-operator/controllers/bpfd-operator/kprobe-program.go
+++ b/bpfman-operator/controllers/bpfman-operator/kprobe-program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -29,13 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=kprobeprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=kprobeprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=kprobeprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=kprobeprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=kprobeprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=kprobeprograms/finalizers,verbs=update
type KprobeProgramReconciler struct {
ReconcilerCommon
@@ -52,10 +52,10 @@ func (r *KprobeProgramReconciler) getFinalizer() string {
// SetupWithManager sets up the controller with the Manager.
func (r *KprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.KprobeProgram{}).
+ For(&bpfmaniov1alpha1.KprobeProgram{}).
// Watch bpfPrograms which are owned by KprobePrograms
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(statusChangedPredicate(), internal.BpfProgramTypePredicate(internal.Kprobe.String()))),
).
@@ -65,11 +65,11 @@ func (r *KprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *KprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
- kprobeProgram := &bpfdiov1alpha1.KprobeProgram{}
+ kprobeProgram := &bpfmaniov1alpha1.KprobeProgram{}
if err := r.Get(ctx, req.NamespacedName, kprobeProgram); err != nil {
// Reconcile was triggered by bpfProgram event, get parent KprobeProgram Object.
if errors.IsNotFound(err) {
- bpfProgram := &bpfdiov1alpha1.BpfProgram{}
+ bpfProgram := &bpfmaniov1alpha1.BpfProgram{}
if err := r.Get(ctx, req.NamespacedName, bpfProgram); err != nil {
if errors.IsNotFound(err) {
r.Logger.V(1).Info("bpfProgram not found stale reconcile, exiting", "Name", req.NamespacedName)
@@ -103,10 +103,10 @@ func (r *KprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return reconcileBpfProgram(ctx, r, kprobeProgram)
}
-func (r *KprobeProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *KprobeProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
// Sometimes we end up with a stale KprobeProgram due to races, do this
// get to ensure we're up to date before attempting a status update.
- prog := &bpfdiov1alpha1.KprobeProgram{}
+ prog := &bpfmaniov1alpha1.KprobeProgram{}
if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: name}, prog); err != nil {
r.Logger.V(1).Info("failed to get fresh KprobeProgram object...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
diff --git a/bpfd-operator/controllers/bpfd-operator/kprobe-program_test.go b/bpfman-operator/controllers/bpfman-operator/kprobe-program_test.go
similarity index 76%
rename from bpfd-operator/controllers/bpfd-operator/kprobe-program_test.go
rename to bpfman-operator/controllers/bpfman-operator/kprobe-program_test.go
index e40b68a40..fb8d148e0 100644
--- a/bpfd-operator/controllers/bpfd-operator/kprobe-program_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/kprobe-program_test.go
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
"github.com/stretchr/testify/require"
meta "k8s.io/apimachinery/pkg/api/meta"
@@ -53,15 +53,15 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
bpfProgName = fmt.Sprintf("%s-%s", name, fakeNode.Name)
)
// A KprobeProgram object with metadata and spec.
- Kprobe := &bpfdiov1alpha1.KprobeProgram{
+ Kprobe := &bpfmaniov1alpha1.KprobeProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.KprobeProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.KprobeProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -72,7 +72,7 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
}
// The expected accompanying BpfProgram object
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
OwnerReferences: []metav1.OwnerReference{
@@ -84,11 +84,11 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
Labels: map[string]string{internal.BpfProgramOwnerLabel: Kprobe.Name, internal.K8sHostLabel: fakeNode.Name},
Finalizers: []string{internal.KprobeProgramControllerFinalizer},
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: "kprobe",
},
- Status: bpfdiov1alpha1.BpfProgramStatus{
- Conditions: []metav1.Condition{bpfdiov1alpha1.BpfProgCondLoaded.Condition()},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{
+ Conditions: []metav1.Condition{bpfmaniov1alpha1.BpfProgCondLoaded.Condition()},
},
}
@@ -97,10 +97,10 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Kprobe)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Kprobe)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
@@ -137,19 +137,19 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
err = cl.Get(ctx, types.NamespacedName{Name: Kprobe.Name, Namespace: metav1.NamespaceAll}, Kprobe)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, Kprobe.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, Kprobe.GetFinalizers(), internal.BpfmanOperatorFinalizer)
// NOTE: THIS IS A TEST FOR AN ERROR PATH. THERE SHOULD NEVER BE MORE THAN
// ONE CONDITION.
if multiCondition {
// Add some random conditions and verify that the condition still gets
// updated correctly.
- meta.SetStatusCondition(&Kprobe.Status.Conditions, bpfdiov1alpha1.ProgramDeleteError.Condition("bogus condition #1"))
+ meta.SetStatusCondition(&Kprobe.Status.Conditions, bpfmaniov1alpha1.ProgramDeleteError.Condition("bogus condition #1"))
if err := r.Status().Update(ctx, Kprobe); err != nil {
r.Logger.V(1).Info("failed to set KprobeProgram object status")
}
- meta.SetStatusCondition(&Kprobe.Status.Conditions, bpfdiov1alpha1.ProgramReconcileError.Condition("bogus condition #2"))
+ meta.SetStatusCondition(&Kprobe.Status.Conditions, bpfmaniov1alpha1.ProgramReconcileError.Condition("bogus condition #2"))
if err := r.Status().Update(ctx, Kprobe); err != nil {
r.Logger.V(1).Info("failed to set KprobeProgram object status")
}
@@ -173,7 +173,7 @@ func kprobeProgramReconcile(t *testing.T, multiCondition bool) {
// Make sure we only have 1 condition now
require.Equal(t, 1, len(Kprobe.Status.Conditions))
// Make sure it's the right one.
- require.Equal(t, Kprobe.Status.Conditions[0].Type, string(bpfdiov1alpha1.ProgramReconcileSuccess))
+ require.Equal(t, Kprobe.Status.Conditions[0].Type, string(bpfmaniov1alpha1.ProgramReconcileSuccess))
}
func TestKprobeProgramReconcile(t *testing.T) {
diff --git a/bpfd-operator/controllers/bpfd-operator/tc-program.go b/bpfman-operator/controllers/bpfman-operator/tc-program.go
similarity index 83%
rename from bpfd-operator/controllers/bpfd-operator/tc-program.go
rename to bpfman-operator/controllers/bpfman-operator/tc-program.go
index d9f34c48b..596b73e3f 100644
--- a/bpfd-operator/controllers/bpfd-operator/tc-program.go
+++ b/bpfman-operator/controllers/bpfman-operator/tc-program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -29,8 +29,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
)
type TcProgramReconciler struct {
@@ -48,28 +48,28 @@ func (r *TcProgramReconciler) getFinalizer() string {
// SetupWithManager sets up the controller with the Manager.
func (r *TcProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.TcProgram{}).
+ For(&bpfmaniov1alpha1.TcProgram{}).
// Watch bpfPrograms which are owned by TcPrograms
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(statusChangedPredicate(), internal.BpfProgramTypePredicate(internal.Tc.String()))),
).
Complete(r)
}
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tcprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tcprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tcprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=tcprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=tcprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=tcprograms/finalizers,verbs=update
func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
- tcProgram := &bpfdiov1alpha1.TcProgram{}
+ tcProgram := &bpfmaniov1alpha1.TcProgram{}
if err := r.Get(ctx, req.NamespacedName, tcProgram); err != nil {
// list all TcProgram objects with
if errors.IsNotFound(err) {
- bpfProgram := &bpfdiov1alpha1.BpfProgram{}
+ bpfProgram := &bpfmaniov1alpha1.BpfProgram{}
if err := r.Get(ctx, req.NamespacedName, bpfProgram); err != nil {
if errors.IsNotFound(err) {
r.Logger.V(1).Info("bpfProgram not found stale reconcile, exiting", "Name", req.NamespacedName)
@@ -103,10 +103,10 @@ func (r *TcProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
return reconcileBpfProgram(ctx, r, tcProgram)
}
-func (r *TcProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *TcProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
// Sometimes we end up with a stale TcProgram due to races, do this
// get to ensure we're up to date before attempting a finalizer removal.
- prog := &bpfdiov1alpha1.TcProgram{}
+ prog := &bpfmaniov1alpha1.TcProgram{}
if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: name}, prog); err != nil {
r.Logger.V(1).Info("failed to get fresh TcProgram object...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
diff --git a/bpfd-operator/controllers/bpfd-operator/tc-program_test.go b/bpfman-operator/controllers/bpfman-operator/tc-program_test.go
similarity index 72%
rename from bpfd-operator/controllers/bpfd-operator/tc-program_test.go
rename to bpfman-operator/controllers/bpfman-operator/tc-program_test.go
index 02b3626bf..40db88162 100644
--- a/bpfd-operator/controllers/bpfd-operator/tc-program_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/tc-program_test.go
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -50,32 +50,32 @@ func TestTcProgramReconcile(t *testing.T) {
)
// A TcProgram object with metadata and spec.
- tc := &bpfdiov1alpha1.TcProgram{
+ tc := &bpfmaniov1alpha1.TcProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.TcProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.TcProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
- InterfaceSelector: bpfdiov1alpha1.InterfaceSelector{
+ InterfaceSelector: bpfmaniov1alpha1.InterfaceSelector{
Interfaces: &[]string{fakeInt},
},
Priority: 0,
Direction: direction,
- ProceedOn: []bpfdiov1alpha1.TcProceedOnValue{
- bpfdiov1alpha1.TcProceedOnValue("pipe"),
- bpfdiov1alpha1.TcProceedOnValue("dispatcher_return"),
+ ProceedOn: []bpfmaniov1alpha1.TcProceedOnValue{
+ bpfmaniov1alpha1.TcProceedOnValue("pipe"),
+ bpfmaniov1alpha1.TcProceedOnValue("dispatcher_return"),
},
},
}
// The expected accompanying BpfProgram object
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
OwnerReferences: []metav1.OwnerReference{
@@ -87,11 +87,11 @@ func TestTcProgramReconcile(t *testing.T) {
Labels: map[string]string{internal.BpfProgramOwnerLabel: tc.Name, internal.K8sHostLabel: fakeNode.Name},
Finalizers: []string{internal.TcProgramControllerFinalizer},
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: "tc",
},
- Status: bpfdiov1alpha1.BpfProgramStatus{
- Conditions: []metav1.Condition{bpfdiov1alpha1.BpfProgCondLoaded.Condition()},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{
+ Conditions: []metav1.Condition{bpfmaniov1alpha1.BpfProgCondLoaded.Condition()},
},
}
@@ -100,10 +100,10 @@ func TestTcProgramReconcile(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, tc)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, tc)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
@@ -140,8 +140,8 @@ func TestTcProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: tc.Name, Namespace: metav1.NamespaceAll}, tc)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, tc.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, tc.GetFinalizers(), internal.BpfmanOperatorFinalizer)
// Second reconcile should check bpfProgram Status and write Success condition to tcProgram Status
res, err = r.Reconcile(ctx, req)
@@ -156,6 +156,6 @@ func TestTcProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: tc.Name, Namespace: metav1.NamespaceAll}, tc)
require.NoError(t, err)
- require.Equal(t, tc.Status.Conditions[0].Type, string(bpfdiov1alpha1.ProgramReconcileSuccess))
+ require.Equal(t, tc.Status.Conditions[0].Type, string(bpfmaniov1alpha1.ProgramReconcileSuccess))
}
diff --git a/bpfd-operator/controllers/bpfd-operator/tracepoint-program.go b/bpfman-operator/controllers/bpfman-operator/tracepoint-program.go
similarity index 82%
rename from bpfd-operator/controllers/bpfd-operator/tracepoint-program.go
rename to bpfman-operator/controllers/bpfman-operator/tracepoint-program.go
index 99ad9dbd8..eaaf175b0 100644
--- a/bpfd-operator/controllers/bpfd-operator/tracepoint-program.go
+++ b/bpfman-operator/controllers/bpfman-operator/tracepoint-program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -29,13 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tracepointprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tracepointprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=tracepointprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=tracepointprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=tracepointprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=tracepointprograms/finalizers,verbs=update
type TracepointProgramReconciler struct {
ReconcilerCommon
@@ -52,10 +52,10 @@ func (r *TracepointProgramReconciler) getFinalizer() string {
// SetupWithManager sets up the controller with the Manager.
func (r *TracepointProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.TracepointProgram{}).
+ For(&bpfmaniov1alpha1.TracepointProgram{}).
// Watch bpfPrograms which are owned by TracepointPrograms
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(statusChangedPredicate(), internal.BpfProgramTypePredicate(internal.Tracepoint.String()))),
).
@@ -65,11 +65,11 @@ func (r *TracepointProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *TracepointProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
- tracepointProgram := &bpfdiov1alpha1.TracepointProgram{}
+ tracepointProgram := &bpfmaniov1alpha1.TracepointProgram{}
if err := r.Get(ctx, req.NamespacedName, tracepointProgram); err != nil {
// list all TracepointProgram objects with
if errors.IsNotFound(err) {
- bpfProgram := &bpfdiov1alpha1.BpfProgram{}
+ bpfProgram := &bpfmaniov1alpha1.BpfProgram{}
if err := r.Get(ctx, req.NamespacedName, bpfProgram); err != nil {
if errors.IsNotFound(err) {
r.Logger.V(1).Info("bpfProgram not found stale reconcile, exiting", "Name", req.NamespacedName)
@@ -103,10 +103,10 @@ func (r *TracepointProgramReconciler) Reconcile(ctx context.Context, req ctrl.Re
return reconcileBpfProgram(ctx, r, tracepointProgram)
}
-func (r *TracepointProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *TracepointProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
// Sometimes we end up with a stale TracepointProgram due to races, do this
// get to ensure we're up to date before attempting a finalizer removal.
- prog := &bpfdiov1alpha1.TracepointProgram{}
+ prog := &bpfmaniov1alpha1.TracepointProgram{}
if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: name}, prog); err != nil {
r.Logger.V(1).Info("failed to get fresh Tracepoint object...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
diff --git a/bpfd-operator/controllers/bpfd-operator/tracepoint-program_test.go b/bpfman-operator/controllers/bpfman-operator/tracepoint-program_test.go
similarity index 76%
rename from bpfd-operator/controllers/bpfd-operator/tracepoint-program_test.go
rename to bpfman-operator/controllers/bpfman-operator/tracepoint-program_test.go
index 211dd8188..103a8e369 100644
--- a/bpfd-operator/controllers/bpfd-operator/tracepoint-program_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/tracepoint-program_test.go
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -48,15 +48,15 @@ func TestTracepointProgramReconcile(t *testing.T) {
bpfProgName = fmt.Sprintf("%s-%s", name, fakeNode.Name)
)
// A TracepointProgram object with metadata and spec.
- Tracepoint := &bpfdiov1alpha1.TracepointProgram{
+ Tracepoint := &bpfmaniov1alpha1.TracepointProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.TracepointProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.TracepointProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -65,7 +65,7 @@ func TestTracepointProgramReconcile(t *testing.T) {
}
// The expected accompanying BpfProgram object
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
OwnerReferences: []metav1.OwnerReference{
@@ -77,11 +77,11 @@ func TestTracepointProgramReconcile(t *testing.T) {
Labels: map[string]string{internal.BpfProgramOwnerLabel: Tracepoint.Name, internal.K8sHostLabel: fakeNode.Name},
Finalizers: []string{internal.TracepointProgramControllerFinalizer},
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: "tracepoint",
},
- Status: bpfdiov1alpha1.BpfProgramStatus{
- Conditions: []metav1.Condition{bpfdiov1alpha1.BpfProgCondLoaded.Condition()},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{
+ Conditions: []metav1.Condition{bpfmaniov1alpha1.BpfProgCondLoaded.Condition()},
},
}
@@ -90,10 +90,10 @@ func TestTracepointProgramReconcile(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Tracepoint)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Tracepoint)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
@@ -130,8 +130,8 @@ func TestTracepointProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Tracepoint.Name, Namespace: metav1.NamespaceAll}, Tracepoint)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, Tracepoint.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, Tracepoint.GetFinalizers(), internal.BpfmanOperatorFinalizer)
// Second reconcile should check bpfProgram Status and write Success condition to tcProgram Status
res, err = r.Reconcile(ctx, req)
@@ -146,6 +146,6 @@ func TestTracepointProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Tracepoint.Name, Namespace: metav1.NamespaceAll}, Tracepoint)
require.NoError(t, err)
- require.Equal(t, Tracepoint.Status.Conditions[0].Type, string(bpfdiov1alpha1.ProgramReconcileSuccess))
+ require.Equal(t, Tracepoint.Status.Conditions[0].Type, string(bpfmaniov1alpha1.ProgramReconcileSuccess))
}
diff --git a/bpfd-operator/controllers/bpfd-operator/uprobe-program.go b/bpfman-operator/controllers/bpfman-operator/uprobe-program.go
similarity index 82%
rename from bpfd-operator/controllers/bpfd-operator/uprobe-program.go
rename to bpfman-operator/controllers/bpfman-operator/uprobe-program.go
index 46bfda040..57d708c88 100644
--- a/bpfd-operator/controllers/bpfd-operator/uprobe-program.go
+++ b/bpfman-operator/controllers/bpfman-operator/uprobe-program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -29,13 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=uprobeprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=uprobeprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=uprobeprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=uprobeprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=uprobeprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=uprobeprograms/finalizers,verbs=update
type UprobeProgramReconciler struct {
ReconcilerCommon
@@ -52,10 +52,10 @@ func (r *UprobeProgramReconciler) getFinalizer() string {
// SetupWithManager sets up the controller with the Manager.
func (r *UprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.UprobeProgram{}).
+ For(&bpfmaniov1alpha1.UprobeProgram{}).
// Watch bpfPrograms which are owned by UprobePrograms
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(statusChangedPredicate(), internal.BpfProgramTypePredicate(internal.UprobeString))),
).
@@ -65,11 +65,11 @@ func (r *UprobeProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *UprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
- uprobeProgram := &bpfdiov1alpha1.UprobeProgram{}
+ uprobeProgram := &bpfmaniov1alpha1.UprobeProgram{}
if err := r.Get(ctx, req.NamespacedName, uprobeProgram); err != nil {
// Reconcile was triggered by bpfProgram event, get parent UprobeProgram Object.
if errors.IsNotFound(err) {
- bpfProgram := &bpfdiov1alpha1.BpfProgram{}
+ bpfProgram := &bpfmaniov1alpha1.BpfProgram{}
if err := r.Get(ctx, req.NamespacedName, bpfProgram); err != nil {
if errors.IsNotFound(err) {
r.Logger.V(1).Info("bpfProgram not found stale reconcile, exiting", "Name", req.NamespacedName)
@@ -103,10 +103,10 @@ func (r *UprobeProgramReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return reconcileBpfProgram(ctx, r, uprobeProgram)
}
-func (r *UprobeProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *UprobeProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
// Sometimes we end up with a stale UprobeProgram due to races, do this
// get to ensure we're up to date before attempting a status update.
- prog := &bpfdiov1alpha1.UprobeProgram{}
+ prog := &bpfmaniov1alpha1.UprobeProgram{}
if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: name}, prog); err != nil {
r.Logger.V(1).Info("failed to get fresh UprobeProgram object...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
diff --git a/bpfd-operator/controllers/bpfd-operator/uprobe-program_test.go b/bpfman-operator/controllers/bpfman-operator/uprobe-program_test.go
similarity index 75%
rename from bpfd-operator/controllers/bpfd-operator/uprobe-program_test.go
rename to bpfman-operator/controllers/bpfman-operator/uprobe-program_test.go
index 3f9fd157d..2161c80e3 100644
--- a/bpfd-operator/controllers/bpfd-operator/uprobe-program_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/uprobe-program_test.go
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -51,15 +51,15 @@ func TestUprobeProgramReconcile(t *testing.T) {
bpfProgName = fmt.Sprintf("%s-%s", name, fakeNode.Name)
)
// A UprobeProgram object with metadata and spec.
- Uprobe := &bpfdiov1alpha1.UprobeProgram{
+ Uprobe := &bpfmaniov1alpha1.UprobeProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.UprobeProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.UprobeProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
@@ -71,7 +71,7 @@ func TestUprobeProgramReconcile(t *testing.T) {
}
// The expected accompanying BpfProgram object
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
OwnerReferences: []metav1.OwnerReference{
@@ -83,11 +83,11 @@ func TestUprobeProgramReconcile(t *testing.T) {
Labels: map[string]string{internal.BpfProgramOwnerLabel: Uprobe.Name, internal.K8sHostLabel: fakeNode.Name},
Finalizers: []string{internal.UprobeProgramControllerFinalizer},
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: "uprobe",
},
- Status: bpfdiov1alpha1.BpfProgramStatus{
- Conditions: []metav1.Condition{bpfdiov1alpha1.BpfProgCondLoaded.Condition()},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{
+ Conditions: []metav1.Condition{bpfmaniov1alpha1.BpfProgCondLoaded.Condition()},
},
}
@@ -96,10 +96,10 @@ func TestUprobeProgramReconcile(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Uprobe)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Uprobe)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
@@ -136,8 +136,8 @@ func TestUprobeProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Uprobe.Name, Namespace: metav1.NamespaceAll}, Uprobe)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, Uprobe.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, Uprobe.GetFinalizers(), internal.BpfmanOperatorFinalizer)
// Second reconcile should check bpfProgram Status and write Success condition to tcProgram Status
res, err = r.Reconcile(ctx, req)
@@ -152,6 +152,6 @@ func TestUprobeProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Uprobe.Name, Namespace: metav1.NamespaceAll}, Uprobe)
require.NoError(t, err)
- require.Equal(t, Uprobe.Status.Conditions[0].Type, string(bpfdiov1alpha1.ProgramReconcileSuccess))
+ require.Equal(t, Uprobe.Status.Conditions[0].Type, string(bpfmaniov1alpha1.ProgramReconcileSuccess))
}
diff --git a/bpfd-operator/controllers/bpfd-operator/xdp-program.go b/bpfman-operator/controllers/bpfman-operator/xdp-program.go
similarity index 83%
rename from bpfd-operator/controllers/bpfd-operator/xdp-program.go
rename to bpfman-operator/controllers/bpfman-operator/xdp-program.go
index b599c301b..57433b3cb 100644
--- a/bpfd-operator/controllers/bpfd-operator/xdp-program.go
+++ b/bpfman-operator/controllers/bpfman-operator/xdp-program.go
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
@@ -29,13 +29,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/predicate"
"sigs.k8s.io/controller-runtime/pkg/source"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
)
-//+kubebuilder:rbac:groups=bpfd.dev,resources=xdpprograms,verbs=get;list;watch;create;update;patch;delete
-//+kubebuilder:rbac:groups=bpfd.dev,resources=xdpprograms/status,verbs=get;update;patch
-//+kubebuilder:rbac:groups=bpfd.dev,resources=xdpprograms/finalizers,verbs=update
+//+kubebuilder:rbac:groups=bpfman.io,resources=xdpprograms,verbs=get;list;watch;create;update;patch;delete
+//+kubebuilder:rbac:groups=bpfman.io,resources=xdpprograms/status,verbs=get;update;patch
+//+kubebuilder:rbac:groups=bpfman.io,resources=xdpprograms/finalizers,verbs=update
type XdpProgramReconciler struct {
ReconcilerCommon
@@ -52,10 +52,10 @@ func (r *XdpProgramReconciler) getFinalizer() string {
// SetupWithManager sets up the controller with the Manager.
func (r *XdpProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
- For(&bpfdiov1alpha1.XdpProgram{}).
+ For(&bpfmaniov1alpha1.XdpProgram{}).
// Watch bpfPrograms which are owned by XdpPrograms
Watches(
- &source.Kind{Type: &bpfdiov1alpha1.BpfProgram{}},
+ &source.Kind{Type: &bpfmaniov1alpha1.BpfProgram{}},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(statusChangedPredicate(), internal.BpfProgramTypePredicate(internal.Xdp.String()))),
).
@@ -65,13 +65,13 @@ func (r *XdpProgramReconciler) SetupWithManager(mgr ctrl.Manager) error {
func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
- xdpProgram := &bpfdiov1alpha1.XdpProgram{}
+ xdpProgram := &bpfmaniov1alpha1.XdpProgram{}
if err := r.Get(ctx, req.NamespacedName, xdpProgram); err != nil {
// list all XdpProgram objects with
if errors.IsNotFound(err) {
// TODO(astoycos) we could simplify this logic by making the name of the
// generated bpfProgram object a bit more deterministic
- bpfProgram := &bpfdiov1alpha1.BpfProgram{}
+ bpfProgram := &bpfmaniov1alpha1.BpfProgram{}
if err := r.Get(ctx, req.NamespacedName, bpfProgram); err != nil {
if errors.IsNotFound(err) {
r.Logger.V(1).Info("bpfProgram not found stale reconcile, exiting", "Name", req.NamespacedName)
@@ -105,10 +105,10 @@ func (r *XdpProgramReconciler) Reconcile(ctx context.Context, req ctrl.Request)
return reconcileBpfProgram(ctx, r, xdpProgram)
}
-func (r *XdpProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfdiov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
+func (r *XdpProgramReconciler) updateStatus(ctx context.Context, name string, cond bpfmaniov1alpha1.ProgramConditionType, message string) (ctrl.Result, error) {
// Sometimes we end up with a stale XdpProgram due to races, do this
// get to ensure we're up to date before attempting a finalizer removal.
- prog := &bpfdiov1alpha1.XdpProgram{}
+ prog := &bpfmaniov1alpha1.XdpProgram{}
if err := r.Get(ctx, types.NamespacedName{Namespace: corev1.NamespaceAll, Name: name}, prog); err != nil {
r.Logger.V(1).Error(err, "failed to get fresh XdpProgram object...requeuing")
return ctrl.Result{Requeue: true, RequeueAfter: retryDurationOperator}, nil
diff --git a/bpfd-operator/controllers/bpfd-operator/xdp-program_test.go b/bpfman-operator/controllers/bpfman-operator/xdp-program_test.go
similarity index 72%
rename from bpfd-operator/controllers/bpfd-operator/xdp-program_test.go
rename to bpfman-operator/controllers/bpfman-operator/xdp-program_test.go
index dde54d340..9d1c6671f 100644
--- a/bpfd-operator/controllers/bpfd-operator/xdp-program_test.go
+++ b/bpfman-operator/controllers/bpfman-operator/xdp-program_test.go
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-package bpfdoperator
+package bpfmanoperator
import (
"context"
"fmt"
"testing"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- internal "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- testutils "github.com/bpfd-dev/bpfd/bpfd-operator/internal/test-utils"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ internal "github.com/bpfman/bpfman/bpfman-operator/internal"
+ testutils "github.com/bpfman/bpfman/bpfman-operator/internal/test-utils"
"github.com/stretchr/testify/require"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -48,30 +48,30 @@ func TestXdpProgramReconcile(t *testing.T) {
bpfProgName = fmt.Sprintf("%s-%s", name, fakeNode.Name)
)
// A XdpProgram object with metadata and spec.
- Xdp := &bpfdiov1alpha1.XdpProgram{
+ Xdp := &bpfmaniov1alpha1.XdpProgram{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
- Spec: bpfdiov1alpha1.XdpProgramSpec{
- BpfProgramCommon: bpfdiov1alpha1.BpfProgramCommon{
+ Spec: bpfmaniov1alpha1.XdpProgramSpec{
+ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{
BpfFunctionName: bpfFunctionName,
NodeSelector: metav1.LabelSelector{},
- ByteCode: bpfdiov1alpha1.BytecodeSelector{
+ ByteCode: bpfmaniov1alpha1.BytecodeSelector{
Path: &bytecodePath,
},
},
- InterfaceSelector: bpfdiov1alpha1.InterfaceSelector{
+ InterfaceSelector: bpfmaniov1alpha1.InterfaceSelector{
Interfaces: &[]string{fakeInt},
},
Priority: 0,
- ProceedOn: []bpfdiov1alpha1.XdpProceedOnValue{bpfdiov1alpha1.XdpProceedOnValue("pass"),
- bpfdiov1alpha1.XdpProceedOnValue("dispatcher_return"),
+ ProceedOn: []bpfmaniov1alpha1.XdpProceedOnValue{bpfmaniov1alpha1.XdpProceedOnValue("pass"),
+ bpfmaniov1alpha1.XdpProceedOnValue("dispatcher_return"),
},
},
}
// The expected accompanying BpfProgram object
- expectedBpfProg := &bpfdiov1alpha1.BpfProgram{
+ expectedBpfProg := &bpfmaniov1alpha1.BpfProgram{
ObjectMeta: metav1.ObjectMeta{
Name: bpfProgName,
OwnerReferences: []metav1.OwnerReference{
@@ -83,11 +83,11 @@ func TestXdpProgramReconcile(t *testing.T) {
Labels: map[string]string{internal.BpfProgramOwnerLabel: Xdp.Name, internal.K8sHostLabel: fakeNode.Name},
Finalizers: []string{internal.TcProgramControllerFinalizer},
},
- Spec: bpfdiov1alpha1.BpfProgramSpec{
+ Spec: bpfmaniov1alpha1.BpfProgramSpec{
Type: "tc",
},
- Status: bpfdiov1alpha1.BpfProgramStatus{
- Conditions: []metav1.Condition{bpfdiov1alpha1.BpfProgCondLoaded.Condition()},
+ Status: bpfmaniov1alpha1.BpfProgramStatus{
+ Conditions: []metav1.Condition{bpfmaniov1alpha1.BpfProgCondLoaded.Condition()},
},
}
@@ -96,10 +96,10 @@ func TestXdpProgramReconcile(t *testing.T) {
// Register operator types with the runtime scheme.
s := scheme.Scheme
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, Xdp)
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.TcProgramList{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgram{})
- s.AddKnownTypes(bpfdiov1alpha1.SchemeGroupVersion, &bpfdiov1alpha1.BpfProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, Xdp)
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.TcProgramList{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgram{})
+ s.AddKnownTypes(bpfmaniov1alpha1.SchemeGroupVersion, &bpfmaniov1alpha1.BpfProgramList{})
// Create a fake client to mock API calls.
cl := fake.NewClientBuilder().WithRuntimeObjects(objs...).Build()
@@ -136,8 +136,8 @@ func TestXdpProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Xdp.Name, Namespace: metav1.NamespaceAll}, Xdp)
require.NoError(t, err)
- // Check the bpfd-operator finalizer was successfully added
- require.Contains(t, Xdp.GetFinalizers(), internal.BpfdOperatorFinalizer)
+ // Check the bpfman-operator finalizer was successfully added
+ require.Contains(t, Xdp.GetFinalizers(), internal.BpfmanOperatorFinalizer)
// Second reconcile should check bpfProgram Status and write Success condition to tcProgram Status
res, err = r.Reconcile(ctx, req)
@@ -152,6 +152,6 @@ func TestXdpProgramReconcile(t *testing.T) {
err = cl.Get(ctx, types.NamespacedName{Name: Xdp.Name, Namespace: metav1.NamespaceAll}, Xdp)
require.NoError(t, err)
- require.Equal(t, Xdp.Status.Conditions[0].Type, string(bpfdiov1alpha1.ProgramReconcileSuccess))
+ require.Equal(t, Xdp.Status.Conditions[0].Type, string(bpfmaniov1alpha1.ProgramReconcileSuccess))
}
diff --git a/bpfd-operator/hack/api-docs/config.json b/bpfman-operator/hack/api-docs/config.json
similarity index 100%
rename from bpfd-operator/hack/api-docs/config.json
rename to bpfman-operator/hack/api-docs/config.json
diff --git a/bpfd-operator/hack/api-docs/generate.sh b/bpfman-operator/hack/api-docs/generate.sh
similarity index 95%
rename from bpfd-operator/hack/api-docs/generate.sh
rename to bpfman-operator/hack/api-docs/generate.sh
index bce20cee5..946bb1ba7 100755
--- a/bpfd-operator/hack/api-docs/generate.sh
+++ b/bpfman-operator/hack/api-docs/generate.sh
@@ -49,5 +49,5 @@ fi
gendoc::build
gendoc::exec \
- -api-dir "github.com/bpfd-dev/bpfd/bpfd-operator/apis/" \
+ -api-dir "github.com/bpfman/bpfman/bpfman-operator/apis/" \
-out-file "${1}"
diff --git a/bpfd-operator/hack/api-docs/members.tpl b/bpfman-operator/hack/api-docs/members.tpl
similarity index 100%
rename from bpfd-operator/hack/api-docs/members.tpl
rename to bpfman-operator/hack/api-docs/members.tpl
diff --git a/bpfd-operator/hack/api-docs/pkg.tpl b/bpfman-operator/hack/api-docs/pkg.tpl
similarity index 100%
rename from bpfd-operator/hack/api-docs/pkg.tpl
rename to bpfman-operator/hack/api-docs/pkg.tpl
diff --git a/bpfd-operator/hack/api-docs/type.tpl b/bpfman-operator/hack/api-docs/type.tpl
similarity index 100%
rename from bpfd-operator/hack/api-docs/type.tpl
rename to bpfman-operator/hack/api-docs/type.tpl
diff --git a/bpfd-operator/hack/boilerplate.go.txt b/bpfman-operator/hack/boilerplate.go.txt
similarity index 93%
rename from bpfd-operator/hack/boilerplate.go.txt
rename to bpfman-operator/hack/boilerplate.go.txt
index a36e2d5ec..81fbe23bb 100644
--- a/bpfd-operator/hack/boilerplate.go.txt
+++ b/bpfman-operator/hack/boilerplate.go.txt
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -12,4 +12,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-*/
\ No newline at end of file
+*/
diff --git a/bpfd-operator/hack/boilerplate.sh.txt b/bpfman-operator/hack/boilerplate.sh.txt
similarity index 100%
rename from bpfd-operator/hack/boilerplate.sh.txt
rename to bpfman-operator/hack/boilerplate.sh.txt
diff --git a/bpfd-operator/hack/build-release-yamls.sh b/bpfman-operator/hack/build-release-yamls.sh
similarity index 63%
rename from bpfd-operator/hack/build-release-yamls.sh
rename to bpfman-operator/hack/build-release-yamls.sh
index 2c8978802..35d9fb5b5 100755
--- a/bpfd-operator/hack/build-release-yamls.sh
+++ b/bpfman-operator/hack/build-release-yamls.sh
@@ -30,37 +30,37 @@ KUSTOMIZE=${LOCALBIN}/kustomize
# Generate all install yaml's
-## 1. bpfd CRD install
+## 1. bpfman CRD install
# Make clean files with boilerplate
-cat hack/boilerplate.sh.txt > release/bpfd-crds-install-v${VERSION}.yaml
-sed -i "s/YEAR/$thisyear/g" release/bpfd-crds-install-v${VERSION}.yaml
-cat << EOF >> release/bpfd-crds-install-v${VERSION}.yaml
+cat hack/boilerplate.sh.txt > release/bpfman-crds-install-v${VERSION}.yaml
+sed -i "s/YEAR/$thisyear/g" release/bpfman-crds-install-v${VERSION}.yaml
+cat << EOF >> release/bpfman-crds-install-v${VERSION}.yaml
#
-# bpfd Kubernetes API install
+# bpfman Kubernetes API install
#
EOF
-for file in `ls config/crd/bases/bpfd*.yaml`
+for file in `ls config/crd/bases/bpfman*.yaml`
do
- echo "---" >> release/bpfd-crds-install-v${VERSION}.yaml
- echo "#" >> release/bpfd-crds-install-v${VERSION}.yaml
- echo "# $file" >> release/bpfd-crds-install-v${VERSION}.yaml
- echo "#" >> release/bpfd-crds-install-v${VERSION}.yaml
- cat $file >> release/bpfd-crds-install-v${VERSION}.yaml
+ echo "---" >> release/bpfman-crds-install-v${VERSION}.yaml
+ echo "#" >> release/bpfman-crds-install-v${VERSION}.yaml
+ echo "# $file" >> release/bpfman-crds-install-v${VERSION}.yaml
+ echo "#" >> release/bpfman-crds-install-v${VERSION}.yaml
+ cat $file >> release/bpfman-crds-install-v${VERSION}.yaml
done
-echo "Generated:" release/bpfd-crds-install-v${VERSION}.yaml
+echo "Generated:" release/bpfman-crds-install-v${VERSION}.yaml
-## 2. bpfd-operator install yaml
+## 2. bpfman-operator install yaml
-$(cd ./config/bpfd-operator-deployment && ${KUSTOMIZE} edit set image quay.io/bpfd/bpfd-operator=quay.io/bpfd/bpfd-operator:v${VERSION})
-${KUSTOMIZE} build ./config/default > release/bpfd-operator-install-v${VERSION}.yaml
+$(cd ./config/bpfman-operator-deployment && ${KUSTOMIZE} edit set image quay.io/bpfman/bpfman-operator=quay.io/bpfman/bpfman-operator:v${VERSION})
+${KUSTOMIZE} build ./config/default > release/bpfman-operator-install-v${VERSION}.yaml
### replace configmap :latest images with :v${VERSION}
-sed -i "s/quay.io\/bpfd\/bpfd-agent:latest/quay.io\/bpfd\/bpfd-agent:v${VERSION}/g" release/bpfd-operator-install-v${VERSION}.yaml
-sed -i "s/quay.io\/bpfd\/bpfd:latest/quay.io\/bpfd\/bpfd:v${VERSION}/g" release/bpfd-operator-install-v${VERSION}.yaml
+sed -i "s/quay.io\/bpfman\/bpfman-agent:latest/quay.io\/bpfman\/bpfman-agent:v${VERSION}/g" release/bpfman-operator-install-v${VERSION}.yaml
+sed -i "s/quay.io\/bpfman\/bpfman:latest/quay.io\/bpfman\/bpfman:v${VERSION}/g" release/bpfman-operator-install-v${VERSION}.yaml
-echo "Generated:" release/bpfd-operator-install-v${VERSION}.yaml
+echo "Generated:" release/bpfman-operator-install-v${VERSION}.yaml
## 3. examples install yamls
diff --git a/bpfd-operator/hack/kind-config.yaml b/bpfman-operator/hack/kind-config.yaml
similarity index 100%
rename from bpfd-operator/hack/kind-config.yaml
rename to bpfman-operator/hack/kind-config.yaml
diff --git a/bpfd-operator/hack/kubectl-bpfprogramconfigs b/bpfman-operator/hack/kubectl-bpfprogramconfigs
similarity index 100%
rename from bpfd-operator/hack/kubectl-bpfprogramconfigs
rename to bpfman-operator/hack/kubectl-bpfprogramconfigs
diff --git a/bpfd-operator/hack/kubectl-bpfprograms b/bpfman-operator/hack/kubectl-bpfprograms
similarity index 100%
rename from bpfd-operator/hack/kubectl-bpfprograms
rename to bpfman-operator/hack/kubectl-bpfprograms
diff --git a/bpfd-operator/hack/ocp-scc-hacks.yaml b/bpfman-operator/hack/ocp-scc-hacks.yaml
similarity index 68%
rename from bpfd-operator/hack/ocp-scc-hacks.yaml
rename to bpfman-operator/hack/ocp-scc-hacks.yaml
index 8dfbcc4fb..85fc8e95c 100644
--- a/bpfd-operator/hack/ocp-scc-hacks.yaml
+++ b/bpfman-operator/hack/ocp-scc-hacks.yaml
@@ -10,9 +10,9 @@
# pod-security.kubernetes.io/warn: privileged
# annotations:
# openshift.io/node-selector: ""
-# openshift.io/description: "Openshift bpfd components"
+# openshift.io/description: "Openshift bpfman components"
# workload.openshift.io/allowed: "management"
-# name: openshift-bpfd
+# name: openshift-bpfman
# ---
# apiVersion: rbac.authorization.k8s.io/v1
# kind: ClusterRoleBinding
@@ -24,16 +24,16 @@
# name: system:openshift:scc:privileged
# subjects:
# - kind: ServiceAccount
-# name: bpfd-daemon
-# namespace: openshift-bpfd
+# name: bpfman-daemon
+# namespace: openshift-bpfman
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
- name: bpfd-agent-cert
- namespace: openshift-bpfd
+ name: bpfman-agent-cert
+ namespace: openshift-bpfman
spec:
- commonName: bpfd-agent
+ commonName: bpfman-agent
dnsNames:
- localhost
ipAddresses:
@@ -41,34 +41,34 @@ spec:
issuerRef:
group: cert-manager.io
kind: Issuer
- name: bpfd-cert-issuer
+ name: bpfman-cert-issuer
privateKey:
algorithm: RSA
- secretName: bpfd-agent-cert-secret
+ secretName: bpfman-agent-cert-secret
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
- name: bpfd-ca
- namespace: openshift-bpfd
+ name: bpfman-ca
+ namespace: openshift-bpfman
spec:
- commonName: bpfd-ca
+ commonName: bpfman-ca
isCA: true
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
- name: bpfd-cert-cluster-issuer
+ name: bpfman-cert-cluster-issuer
privateKey:
algorithm: RSA
- secretName: bpfd-ca
+ secretName: bpfman-ca
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
- name: bpfd-cert
- namespace: openshift-bpfd
+ name: bpfman-cert
+ namespace: openshift-bpfman
spec:
- commonName: bpfd
+ commonName: bpfman
dnsNames:
- localhost
ipAddresses:
@@ -76,24 +76,24 @@ spec:
issuerRef:
group: cert-manager.io
kind: Issuer
- name: bpfd-cert-issuer
+ name: bpfman-cert-issuer
privateKey:
algorithm: RSA
- secretName: bpfd-cert-secret
+ secretName: bpfman-cert-secret
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
- name: bpfd-cert-cluster-issuer
- namespace: openshift-bpfd
+ name: bpfman-cert-cluster-issuer
+ namespace: openshift-bpfman
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
- name: bpfd-cert-issuer
- namespace: openshift-bpfd
+ name: bpfman-cert-issuer
+ namespace: openshift-bpfman
spec:
ca:
- secretName: bpfd-ca
+ secretName: bpfman-ca
diff --git a/bpfd-operator/hack/tools.go b/bpfman-operator/hack/tools.go
similarity index 100%
rename from bpfd-operator/hack/tools.go
rename to bpfman-operator/hack/tools.go
diff --git a/bpfd-operator/hack/verify-codegen.sh b/bpfman-operator/hack/verify-codegen.sh
similarity index 94%
rename from bpfd-operator/hack/verify-codegen.sh
rename to bpfman-operator/hack/verify-codegen.sh
index a4e259359..d6034245a 100755
--- a/bpfd-operator/hack/verify-codegen.sh
+++ b/bpfman-operator/hack/verify-codegen.sh
@@ -16,7 +16,7 @@
# This script is used to determine if all of the generated code has been updated
# correctly before merging into the main branch. It can be run locally for testing
-# and is run automatically in bpfd's github actions.
+# and is run automatically in bpfman's github actions.
set -o errexit
set -o nounset
set -o pipefail
diff --git a/bpfd-operator/internal/conn/conn.go b/bpfman-operator/internal/conn/conn.go
similarity index 96%
rename from bpfd-operator/internal/conn/conn.go
rename to bpfman-operator/internal/conn/conn.go
index 3cb6a34dc..2737e815e 100644
--- a/bpfd-operator/internal/conn/conn.go
+++ b/bpfman-operator/internal/conn/conn.go
@@ -22,14 +22,14 @@ import (
"io"
"os"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
toml "github.com/pelletier/go-toml"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
ctrl "sigs.k8s.io/controller-runtime"
)
-var log = ctrl.Log.WithName("bpfd-conn")
+var log = ctrl.Log.WithName("bpfman-conn")
type Endpoint struct {
Type string `toml:"type"`
diff --git a/bpfd-operator/internal/constants.go b/bpfman-operator/internal/constants.go
similarity index 75%
rename from bpfd-operator/internal/constants.go
rename to bpfman-operator/internal/constants.go
index 0a7b6dd5e..90953b824 100644
--- a/bpfd-operator/internal/constants.go
+++ b/bpfman-operator/internal/constants.go
@@ -19,28 +19,28 @@ package internal
import "fmt"
const (
- XdpProgramInterface = "bpfd.dev.xdpprogramcontroller/interface"
- TcProgramInterface = "bpfd.dev.tcprogramcontroller/interface"
- TracepointProgramTracepoint = "bpfd.dev.tracepointprogramcontroller/tracepoint"
- KprobeProgramFunction = "bpfd.dev.kprobeprogramcontroller/function"
- UprobeProgramTarget = "bpfd.dev.uprobeprogramcontroller/target"
- BpfProgramOwnerLabel = "bpfd.dev/ownedByProgram"
+ XdpProgramInterface = "bpfman.io.xdpprogramcontroller/interface"
+ TcProgramInterface = "bpfman.io.tcprogramcontroller/interface"
+ TracepointProgramTracepoint = "bpfman.io.tracepointprogramcontroller/tracepoint"
+ KprobeProgramFunction = "bpfman.io.kprobeprogramcontroller/function"
+ UprobeProgramTarget = "bpfman.io.uprobeprogramcontroller/target"
+ BpfProgramOwnerLabel = "bpfman.io/ownedByProgram"
K8sHostLabel = "kubernetes.io/hostname"
- DiscoveredLabel = "bpfd.dev/discoveredProgram"
- IdAnnotation = "bpfd.dev/ProgramId"
- UuidMetadataKey = "bpfd.dev/uuid"
- ProgramNameKey = "bpfd.dev/ProgramName"
- BpfdNs = "bpfd"
- BpfdOperatorName = "bpfd-operator"
- BpfdDsName = "bpfd-daemon"
- BpfdConfigName = "bpfd-config"
- BpfdCsiDriverName = "csi.bpfd.dev"
- BpfdDaemonManifestPath = "./config/bpfd-deployment/daemonset.yaml"
- BpfdCsiDriverPath = "./config/bpfd-deployment/csidriverinfo.yaml"
- BpfdMapFs = "/run/bpfd/fs/maps"
- DefaultConfigPath = "/etc/bpfd/bpfd.toml"
+ DiscoveredLabel = "bpfman.io/discoveredProgram"
+ IdAnnotation = "bpfman.io/ProgramId"
+ UuidMetadataKey = "bpfman.io/uuid"
+ ProgramNameKey = "bpfman.io/ProgramName"
+ BpfmanNs = "bpfman"
+ BpfmanOperatorName = "bpfman-operator"
+ BpfmanDsName = "bpfman-daemon"
+ BpfmanConfigName = "bpfman-config"
+ BpfmanCsiDriverName = "csi.bpfman.io"
+ BpfmanDaemonManifestPath = "./config/bpfman-deployment/daemonset.yaml"
+ BpfmanCsiDriverPath = "./config/bpfman-deployment/csidriverinfo.yaml"
+ BpfmanMapFs = "/run/bpfman/fs/maps"
+ DefaultConfigPath = "/etc/bpfman/bpfman.toml"
DefaultType = "tcp"
- DefaultPath = "/run/bpfd/bpfd.sock"
+ DefaultPath = "/run/bpfman/bpfman.sock"
DefaultPort = 50051
DefaultEnabled = true
)
@@ -50,24 +50,24 @@ const (
// -----------------------------------------------------------------------------
const (
- // BpfdOperatorFinalizer is the finalizer that holds a *Program from
+ // BpfmanOperatorFinalizer is the finalizer that holds a *Program from
// deletion until cleanup can be performed.
- BpfdOperatorFinalizer = "bpfd.dev.operator/finalizer"
+ BpfmanOperatorFinalizer = "bpfman.io.operator/finalizer"
// XdpProgramControllerFinalizer is the finalizer that holds an Xdp BpfProgram
// object from deletion until cleanup can be performed.
- XdpProgramControllerFinalizer = "bpfd.dev.xdpprogramcontroller/finalizer"
+ XdpProgramControllerFinalizer = "bpfman.io.xdpprogramcontroller/finalizer"
// TcProgramControllerFinalizer is the finalizer that holds an Tc BpfProgram
// object from deletion until cleanup can be performed.
- TcProgramControllerFinalizer = "bpfd.dev.tcprogramcontroller/finalizer"
+ TcProgramControllerFinalizer = "bpfman.io.tcprogramcontroller/finalizer"
// TracepointProgramControllerFinalizer is the finalizer that holds an Tracepoint
// BpfProgram object from deletion until cleanup can be performed.
- TracepointProgramControllerFinalizer = "bpfd.dev.tracepointprogramcontroller/finalizer"
+ TracepointProgramControllerFinalizer = "bpfman.io.tracepointprogramcontroller/finalizer"
// KprobeProgramControllerFinalizer is the finalizer that holds a Kprobe
// BpfProgram object from deletion until cleanup can be performed.
- KprobeProgramControllerFinalizer = "bpfd.dev.kprobeprogramcontroller/finalizer"
+ KprobeProgramControllerFinalizer = "bpfman.io.kprobeprogramcontroller/finalizer"
// KprobeProgramControllerFinalizer is the finalizer that holds a Uprobe
// BpfProgram object from deletion until cleanup can be performed.
- UprobeProgramControllerFinalizer = "bpfd.dev.uprobeprogramcontroller/finalizer"
+ UprobeProgramControllerFinalizer = "bpfman.io.uprobeprogramcontroller/finalizer"
)
// Must match the kernel's `bpf_prog_type` enum.
diff --git a/bpfd-operator/internal/k8s.go b/bpfman-operator/internal/k8s.go
similarity index 85%
rename from bpfd-operator/internal/k8s.go
rename to bpfman-operator/internal/k8s.go
index c59c6a22c..db46b6fd7 100644
--- a/bpfd-operator/internal/k8s.go
+++ b/bpfman-operator/internal/k8s.go
@@ -22,23 +22,23 @@ import (
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
)
// Only reconcile if a bpfprogram has been created for the controller's program type.
func BpfProgramTypePredicate(kind string) predicate.Funcs {
return predicate.Funcs{
GenericFunc: func(e event.GenericEvent) bool {
- return e.Object.(*bpfdiov1alpha1.BpfProgram).Spec.Type == kind
+ return e.Object.(*bpfmaniov1alpha1.BpfProgram).Spec.Type == kind
},
CreateFunc: func(e event.CreateEvent) bool {
- return e.Object.(*bpfdiov1alpha1.BpfProgram).Spec.Type == kind
+ return e.Object.(*bpfmaniov1alpha1.BpfProgram).Spec.Type == kind
},
UpdateFunc: func(e event.UpdateEvent) bool {
- return e.ObjectNew.(*bpfdiov1alpha1.BpfProgram).Spec.Type == kind
+ return e.ObjectNew.(*bpfmaniov1alpha1.BpfProgram).Spec.Type == kind
},
DeleteFunc: func(e event.DeleteEvent) bool {
- return e.Object.(*bpfdiov1alpha1.BpfProgram).Spec.Type == kind
+ return e.Object.(*bpfmaniov1alpha1.BpfProgram).Spec.Type == kind
},
}
}
@@ -92,8 +92,8 @@ func StatusChangedPredicate() predicate.Funcs {
return false
},
UpdateFunc: func(e event.UpdateEvent) bool {
- oldObject := e.ObjectOld.(*bpfdiov1alpha1.BpfProgram)
- newObject := e.ObjectNew.(*bpfdiov1alpha1.BpfProgram)
+ oldObject := e.ObjectOld.(*bpfmaniov1alpha1.BpfProgram)
+ newObject := e.ObjectNew.(*bpfmaniov1alpha1.BpfProgram)
return !reflect.DeepEqual(oldObject.Status, newObject.Status)
},
DeleteFunc: func(e event.DeleteEvent) bool {
diff --git a/bpfd-operator/internal/test-utils/helpers.go b/bpfman-operator/internal/test-utils/helpers.go
similarity index 100%
rename from bpfd-operator/internal/test-utils/helpers.go
rename to bpfman-operator/internal/test-utils/helpers.go
diff --git a/bpfd-operator/pkg/client/clientset/versioned/clientset.go b/bpfman-operator/pkg/client/clientset/versioned/clientset.go
similarity index 85%
rename from bpfd-operator/pkg/client/clientset/versioned/clientset.go
rename to bpfman-operator/pkg/client/clientset/versioned/clientset.go
index aa8045139..e20c15d71 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/clientset.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/clientset.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ import (
"fmt"
"net/http"
- bpfdv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
+ bpfmanv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
discovery "k8s.io/client-go/discovery"
rest "k8s.io/client-go/rest"
flowcontrol "k8s.io/client-go/util/flowcontrol"
@@ -29,18 +29,18 @@ import (
type Interface interface {
Discovery() discovery.DiscoveryInterface
- BpfdV1alpha1() bpfdv1alpha1.BpfdV1alpha1Interface
+ BpfmanV1alpha1() bpfmanv1alpha1.BpfmanV1alpha1Interface
}
// Clientset contains the clients for groups.
type Clientset struct {
*discovery.DiscoveryClient
- bpfdV1alpha1 *bpfdv1alpha1.BpfdV1alpha1Client
+ bpfmanV1alpha1 *bpfmanv1alpha1.BpfmanV1alpha1Client
}
-// BpfdV1alpha1 retrieves the BpfdV1alpha1Client
-func (c *Clientset) BpfdV1alpha1() bpfdv1alpha1.BpfdV1alpha1Interface {
- return c.bpfdV1alpha1
+// BpfmanV1alpha1 retrieves the BpfmanV1alpha1Client
+func (c *Clientset) BpfmanV1alpha1() bpfmanv1alpha1.BpfmanV1alpha1Interface {
+ return c.bpfmanV1alpha1
}
// Discovery retrieves the DiscoveryClient
@@ -87,7 +87,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
var cs Clientset
var err error
- cs.bpfdV1alpha1, err = bpfdv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
+ cs.bpfmanV1alpha1, err = bpfmanv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil {
return nil, err
}
@@ -112,7 +112,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset {
// New creates a new Clientset for the given RESTClient.
func New(c rest.Interface) *Clientset {
var cs Clientset
- cs.bpfdV1alpha1 = bpfdv1alpha1.New(c)
+ cs.bpfmanV1alpha1 = bpfmanv1alpha1.New(c)
cs.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &cs
diff --git a/bpfd-operator/pkg/client/clientset/versioned/doc.go b/bpfman-operator/pkg/client/clientset/versioned/doc.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/doc.go
rename to bpfman-operator/pkg/client/clientset/versioned/doc.go
index bb2ba7a59..b7179e900 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/doc.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/fake/clientset_generated.go b/bpfman-operator/pkg/client/clientset/versioned/fake/clientset_generated.go
similarity index 81%
rename from bpfd-operator/pkg/client/clientset/versioned/fake/clientset_generated.go
rename to bpfman-operator/pkg/client/clientset/versioned/fake/clientset_generated.go
index 612d1bf0a..bd7a1c584 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/fake/clientset_generated.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/fake/clientset_generated.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,9 +18,9 @@ limitations under the License.
package fake
import (
- clientset "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- bpfdv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
- fakebpfdv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake"
+ clientset "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ bpfmanv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
+ fakebpfmanv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/discovery"
@@ -78,7 +78,7 @@ var (
_ testing.FakeClient = &Clientset{}
)
-// BpfdV1alpha1 retrieves the BpfdV1alpha1Client
-func (c *Clientset) BpfdV1alpha1() bpfdv1alpha1.BpfdV1alpha1Interface {
- return &fakebpfdv1alpha1.FakeBpfdV1alpha1{Fake: &c.Fake}
+// BpfmanV1alpha1 retrieves the BpfmanV1alpha1Client
+func (c *Clientset) BpfmanV1alpha1() bpfmanv1alpha1.BpfmanV1alpha1Interface {
+ return &fakebpfmanv1alpha1.FakeBpfmanV1alpha1{Fake: &c.Fake}
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/fake/doc.go b/bpfman-operator/pkg/client/clientset/versioned/fake/doc.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/fake/doc.go
rename to bpfman-operator/pkg/client/clientset/versioned/fake/doc.go
index eb1bc6b5b..1d2134ad6 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/fake/doc.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/fake/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/fake/register.go b/bpfman-operator/pkg/client/clientset/versioned/fake/register.go
similarity index 92%
rename from bpfd-operator/pkg/client/clientset/versioned/fake/register.go
rename to bpfman-operator/pkg/client/clientset/versioned/fake/register.go
index d05f95e73..320e47d99 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/fake/register.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/fake/register.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package fake
import (
- bpfdv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ bpfmanv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -30,7 +30,7 @@ var scheme = runtime.NewScheme()
var codecs = serializer.NewCodecFactory(scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
- bpfdv1alpha1.AddToScheme,
+ bpfmanv1alpha1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
diff --git a/bpfd-operator/pkg/client/clientset/versioned/scheme/doc.go b/bpfman-operator/pkg/client/clientset/versioned/scheme/doc.go
similarity index 95%
rename from bpfd-operator/pkg/client/clientset/versioned/scheme/doc.go
rename to bpfman-operator/pkg/client/clientset/versioned/scheme/doc.go
index c76f8baf1..19c6633f8 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/scheme/doc.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/scheme/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/scheme/register.go b/bpfman-operator/pkg/client/clientset/versioned/scheme/register.go
similarity index 92%
rename from bpfd-operator/pkg/client/clientset/versioned/scheme/register.go
rename to bpfman-operator/pkg/client/clientset/versioned/scheme/register.go
index 0e5c1e1cf..de8bf4d87 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/scheme/register.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/scheme/register.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package scheme
import (
- bpfdv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ bpfmanv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -30,7 +30,7 @@ var Scheme = runtime.NewScheme()
var Codecs = serializer.NewCodecFactory(Scheme)
var ParameterCodec = runtime.NewParameterCodec(Scheme)
var localSchemeBuilder = runtime.SchemeBuilder{
- bpfdv1alpha1.AddToScheme,
+ bpfmanv1alpha1.AddToScheme,
}
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go
similarity index 61%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go
index 6f2f3f4ed..7df4ac867 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/apis_client.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,12 +20,12 @@ package v1alpha1
import (
"net/http"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
rest "k8s.io/client-go/rest"
)
-type BpfdV1alpha1Interface interface {
+type BpfmanV1alpha1Interface interface {
RESTClient() rest.Interface
BpfProgramsGetter
KprobeProgramsGetter
@@ -35,39 +35,39 @@ type BpfdV1alpha1Interface interface {
XdpProgramsGetter
}
-// BpfdV1alpha1Client is used to interact with features provided by the bpfd.dev group.
-type BpfdV1alpha1Client struct {
+// BpfmanV1alpha1Client is used to interact with features provided by the bpfman.io group.
+type BpfmanV1alpha1Client struct {
restClient rest.Interface
}
-func (c *BpfdV1alpha1Client) BpfPrograms() BpfProgramInterface {
+func (c *BpfmanV1alpha1Client) BpfPrograms() BpfProgramInterface {
return newBpfPrograms(c)
}
-func (c *BpfdV1alpha1Client) KprobePrograms() KprobeProgramInterface {
+func (c *BpfmanV1alpha1Client) KprobePrograms() KprobeProgramInterface {
return newKprobePrograms(c)
}
-func (c *BpfdV1alpha1Client) TcPrograms() TcProgramInterface {
+func (c *BpfmanV1alpha1Client) TcPrograms() TcProgramInterface {
return newTcPrograms(c)
}
-func (c *BpfdV1alpha1Client) TracepointPrograms() TracepointProgramInterface {
+func (c *BpfmanV1alpha1Client) TracepointPrograms() TracepointProgramInterface {
return newTracepointPrograms(c)
}
-func (c *BpfdV1alpha1Client) UprobePrograms() UprobeProgramInterface {
+func (c *BpfmanV1alpha1Client) UprobePrograms() UprobeProgramInterface {
return newUprobePrograms(c)
}
-func (c *BpfdV1alpha1Client) XdpPrograms() XdpProgramInterface {
+func (c *BpfmanV1alpha1Client) XdpPrograms() XdpProgramInterface {
return newXdpPrograms(c)
}
-// NewForConfig creates a new BpfdV1alpha1Client for the given config.
+// NewForConfig creates a new BpfmanV1alpha1Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
-func NewForConfig(c *rest.Config) (*BpfdV1alpha1Client, error) {
+func NewForConfig(c *rest.Config) (*BpfmanV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -79,9 +79,9 @@ func NewForConfig(c *rest.Config) (*BpfdV1alpha1Client, error) {
return NewForConfigAndClient(&config, httpClient)
}
-// NewForConfigAndClient creates a new BpfdV1alpha1Client for the given config and http client.
+// NewForConfigAndClient creates a new BpfmanV1alpha1Client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
-func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BpfdV1alpha1Client, error) {
+func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BpfmanV1alpha1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
@@ -90,12 +90,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*BpfdV1alpha1Client,
if err != nil {
return nil, err
}
- return &BpfdV1alpha1Client{client}, nil
+ return &BpfmanV1alpha1Client{client}, nil
}
-// NewForConfigOrDie creates a new BpfdV1alpha1Client for the given config and
+// NewForConfigOrDie creates a new BpfmanV1alpha1Client for the given config and
// panics if there is an error in the config.
-func NewForConfigOrDie(c *rest.Config) *BpfdV1alpha1Client {
+func NewForConfigOrDie(c *rest.Config) *BpfmanV1alpha1Client {
client, err := NewForConfig(c)
if err != nil {
panic(err)
@@ -103,9 +103,9 @@ func NewForConfigOrDie(c *rest.Config) *BpfdV1alpha1Client {
return client
}
-// New creates a new BpfdV1alpha1Client for the given RESTClient.
-func New(c rest.Interface) *BpfdV1alpha1Client {
- return &BpfdV1alpha1Client{c}
+// New creates a new BpfmanV1alpha1Client for the given RESTClient.
+func New(c rest.Interface) *BpfmanV1alpha1Client {
+ return &BpfmanV1alpha1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
@@ -123,7 +123,7 @@ func setConfigDefaults(config *rest.Config) error {
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
-func (c *BpfdV1alpha1Client) RESTClient() rest.Interface {
+func (c *BpfmanV1alpha1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go
index 683dc2a06..b3a94a48d 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/bpfprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type bpfPrograms struct {
}
// newBpfPrograms returns a BpfPrograms
-func newBpfPrograms(c *BpfdV1alpha1Client) *bpfPrograms {
+func newBpfPrograms(c *BpfmanV1alpha1Client) *bpfPrograms {
return &bpfPrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go
index 8a903e5a3..a47d86894 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go
index 1a9995c4d..fe81f65a2 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/doc.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go
similarity index 60%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go
index 4af312189..065a2c6f4 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_apis_client.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,42 +18,42 @@ limitations under the License.
package fake
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1"
rest "k8s.io/client-go/rest"
testing "k8s.io/client-go/testing"
)
-type FakeBpfdV1alpha1 struct {
+type FakeBpfmanV1alpha1 struct {
*testing.Fake
}
-func (c *FakeBpfdV1alpha1) BpfPrograms() v1alpha1.BpfProgramInterface {
+func (c *FakeBpfmanV1alpha1) BpfPrograms() v1alpha1.BpfProgramInterface {
return &FakeBpfPrograms{c}
}
-func (c *FakeBpfdV1alpha1) KprobePrograms() v1alpha1.KprobeProgramInterface {
+func (c *FakeBpfmanV1alpha1) KprobePrograms() v1alpha1.KprobeProgramInterface {
return &FakeKprobePrograms{c}
}
-func (c *FakeBpfdV1alpha1) TcPrograms() v1alpha1.TcProgramInterface {
+func (c *FakeBpfmanV1alpha1) TcPrograms() v1alpha1.TcProgramInterface {
return &FakeTcPrograms{c}
}
-func (c *FakeBpfdV1alpha1) TracepointPrograms() v1alpha1.TracepointProgramInterface {
+func (c *FakeBpfmanV1alpha1) TracepointPrograms() v1alpha1.TracepointProgramInterface {
return &FakeTracepointPrograms{c}
}
-func (c *FakeBpfdV1alpha1) UprobePrograms() v1alpha1.UprobeProgramInterface {
+func (c *FakeBpfmanV1alpha1) UprobePrograms() v1alpha1.UprobeProgramInterface {
return &FakeUprobePrograms{c}
}
-func (c *FakeBpfdV1alpha1) XdpPrograms() v1alpha1.XdpProgramInterface {
+func (c *FakeBpfmanV1alpha1) XdpPrograms() v1alpha1.XdpProgramInterface {
return &FakeXdpPrograms{c}
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
-func (c *FakeBpfdV1alpha1) RESTClient() rest.Interface {
+func (c *FakeBpfmanV1alpha1) RESTClient() rest.Interface {
var ret *rest.RESTClient
return ret
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go
index d411105d7..10e840857 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_bpfprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeBpfPrograms implements BpfProgramInterface
type FakeBpfPrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var bpfprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "bpfprograms"}
+var bpfprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "bpfprograms"}
-var bpfprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "BpfProgram"}
+var bpfprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "BpfProgram"}
// Get takes name of the bpfProgram, and returns the corresponding bpfProgram object, and an error if there is any.
func (c *FakeBpfPrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.BpfProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go
index ad84b4d84..f68c42b47 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_kprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeKprobePrograms implements KprobeProgramInterface
type FakeKprobePrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var kprobeprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "kprobeprograms"}
+var kprobeprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "kprobeprograms"}
-var kprobeprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "KprobeProgram"}
+var kprobeprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "KprobeProgram"}
// Get takes name of the kprobeProgram, and returns the corresponding kprobeProgram object, and an error if there is any.
func (c *FakeKprobePrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.KprobeProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go
index 18316e308..fab3b1caa 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tcprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeTcPrograms implements TcProgramInterface
type FakeTcPrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var tcprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "tcprograms"}
+var tcprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "tcprograms"}
-var tcprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "TcProgram"}
+var tcprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "TcProgram"}
// Get takes name of the tcProgram, and returns the corresponding tcProgram object, and an error if there is any.
func (c *FakeTcPrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TcProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go
index 32b4533c8..24361afed 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_tracepointprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeTracepointPrograms implements TracepointProgramInterface
type FakeTracepointPrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var tracepointprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "tracepointprograms"}
+var tracepointprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "tracepointprograms"}
-var tracepointprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "TracepointProgram"}
+var tracepointprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "TracepointProgram"}
// Get takes name of the tracepointProgram, and returns the corresponding tracepointProgram object, and an error if there is any.
func (c *FakeTracepointPrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TracepointProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go
index 8354dd874..2d21bfe19 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_uprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeUprobePrograms implements UprobeProgramInterface
type FakeUprobePrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var uprobeprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "uprobeprograms"}
+var uprobeprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "uprobeprograms"}
-var uprobeprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "UprobeProgram"}
+var uprobeprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "UprobeProgram"}
// Get takes name of the uprobeProgram, and returns the corresponding uprobeProgram object, and an error if there is any.
func (c *FakeUprobePrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.UprobeProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go
similarity index 94%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go
index 3ee2ce50a..37ff9a11b 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/fake/fake_xdpprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package fake
import (
"context"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
labels "k8s.io/apimachinery/pkg/labels"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -31,12 +31,12 @@ import (
// FakeXdpPrograms implements XdpProgramInterface
type FakeXdpPrograms struct {
- Fake *FakeBpfdV1alpha1
+ Fake *FakeBpfmanV1alpha1
}
-var xdpprogramsResource = schema.GroupVersionResource{Group: "bpfd.dev", Version: "v1alpha1", Resource: "xdpprograms"}
+var xdpprogramsResource = schema.GroupVersionResource{Group: "bpfman.io", Version: "v1alpha1", Resource: "xdpprograms"}
-var xdpprogramsKind = schema.GroupVersionKind{Group: "bpfd.dev", Version: "v1alpha1", Kind: "XdpProgram"}
+var xdpprogramsKind = schema.GroupVersionKind{Group: "bpfman.io", Version: "v1alpha1", Kind: "XdpProgram"}
// Get takes name of the xdpProgram, and returns the corresponding xdpProgram object, and an error if there is any.
func (c *FakeXdpPrograms) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.XdpProgram, err error) {
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go
similarity index 95%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go
index 70b3d43eb..95f0e6483 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/generated_expansion.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go
index dadeda1d2..5fbdcfe59 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/kprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type kprobePrograms struct {
}
// newKprobePrograms returns a KprobePrograms
-func newKprobePrograms(c *BpfdV1alpha1Client) *kprobePrograms {
+func newKprobePrograms(c *BpfmanV1alpha1Client) *kprobePrograms {
return &kprobePrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go
index 1f21e611b..5baa971a4 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tcprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type tcPrograms struct {
}
// newTcPrograms returns a TcPrograms
-func newTcPrograms(c *BpfdV1alpha1Client) *tcPrograms {
+func newTcPrograms(c *BpfmanV1alpha1Client) *tcPrograms {
return &tcPrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go
index 0ac8c67dc..e65fe8997 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/tracepointprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type tracepointPrograms struct {
}
// newTracepointPrograms returns a TracepointPrograms
-func newTracepointPrograms(c *BpfdV1alpha1Client) *tracepointPrograms {
+func newTracepointPrograms(c *BpfmanV1alpha1Client) *tracepointPrograms {
return &tracepointPrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go
index 0f39119d1..4752bc6fe 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/uprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type uprobePrograms struct {
}
// newUprobePrograms returns a UprobePrograms
-func newUprobePrograms(c *BpfdV1alpha1Client) *uprobePrograms {
+func newUprobePrograms(c *BpfmanV1alpha1Client) *uprobePrograms {
return &uprobePrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go
similarity index 96%
rename from bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go
rename to bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go
index e71e2a70f..7032681cd 100644
--- a/bpfd-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go
+++ b/bpfman-operator/pkg/client/clientset/versioned/typed/apis/v1alpha1/xdpprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,8 +21,8 @@ import (
"context"
"time"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- scheme "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned/scheme"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ scheme "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
@@ -55,7 +55,7 @@ type xdpPrograms struct {
}
// newXdpPrograms returns a XdpPrograms
-func newXdpPrograms(c *BpfdV1alpha1Client) *xdpPrograms {
+func newXdpPrograms(c *BpfmanV1alpha1Client) *xdpPrograms {
return &xdpPrograms{
client: c.RESTClient(),
}
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/interface.go b/bpfman-operator/pkg/client/informers/externalversions/apis/interface.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/interface.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/interface.go
index df0007bc2..60f381797 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/interface.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/interface.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@ limitations under the License.
package apis
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to each of this group's versions.
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go
index 6adbdc7ec..ef19de4d2 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/bpfprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredBpfProgramInformer(client versioned.Interface, resyncPeriod time
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().BpfPrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().BpfPrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().BpfPrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().BpfPrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.BpfProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go
similarity index 94%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go
index 8241a203a..2a020b4aa 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/interface.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
)
// Interface provides access to all the informers in this group version.
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go
index 871d6f0ba..f371908b9 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/kprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredKprobeProgramInformer(client versioned.Interface, resyncPeriod t
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().KprobePrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().KprobePrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().KprobePrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().KprobePrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.KprobeProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go
index c4a132efd..9dd1907ed 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tcprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredTcProgramInformer(client versioned.Interface, resyncPeriod time.
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().TcPrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().TcPrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().TcPrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().TcPrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.TcProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go
index a9a7747c7..6c3e4cb95 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/tracepointprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredTracepointProgramInformer(client versioned.Interface, resyncPeri
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().TracepointPrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().TracepointPrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().TracepointPrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().TracepointPrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.TracepointProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go
index b287f1437..430f2a6fa 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/uprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredUprobeProgramInformer(client versioned.Interface, resyncPeriod t
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().UprobePrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().UprobePrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().UprobePrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().UprobePrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.UprobeProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go
similarity index 84%
rename from bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go
rename to bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go
index 33cd5137e..f3bc9e8a2 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/apis/v1alpha1/xdpprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,10 +21,10 @@ import (
"context"
time "time"
- apisv1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/listers/apis/v1alpha1"
+ apisv1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/pkg/client/listers/apis/v1alpha1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch"
@@ -60,13 +60,13 @@ func NewFilteredXdpProgramInformer(client versioned.Interface, resyncPeriod time
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().XdpPrograms().List(context.TODO(), options)
+ return client.BpfmanV1alpha1().XdpPrograms().List(context.TODO(), options)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil {
tweakListOptions(&options)
}
- return client.BpfdV1alpha1().XdpPrograms().Watch(context.TODO(), options)
+ return client.BpfmanV1alpha1().XdpPrograms().Watch(context.TODO(), options)
},
},
&apisv1alpha1.XdpProgram{},
diff --git a/bpfd-operator/pkg/client/informers/externalversions/factory.go b/bpfman-operator/pkg/client/informers/externalversions/factory.go
similarity index 95%
rename from bpfd-operator/pkg/client/informers/externalversions/factory.go
rename to bpfman-operator/pkg/client/informers/externalversions/factory.go
index 5e00caba0..04965035d 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/factory.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/factory.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,9 +22,9 @@ import (
sync "sync"
time "time"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- apis "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/apis"
- internalinterfaces "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ apis "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/apis"
+ internalinterfaces "github.com/bpfman/bpfman/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
@@ -242,9 +242,9 @@ type SharedInformerFactory interface {
// client.
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
- Bpfd() apis.Interface
+ Bpfman() apis.Interface
}
-func (f *sharedInformerFactory) Bpfd() apis.Interface {
+func (f *sharedInformerFactory) Bpfman() apis.Interface {
return apis.New(f, f.namespace, f.tweakListOptions)
}
diff --git a/bpfd-operator/pkg/client/informers/externalversions/generic.go b/bpfman-operator/pkg/client/informers/externalversions/generic.go
similarity index 82%
rename from bpfd-operator/pkg/client/informers/externalversions/generic.go
rename to bpfman-operator/pkg/client/informers/externalversions/generic.go
index 1633ae1a2..4bcf6d181 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/generic.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/generic.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package externalversions
import (
"fmt"
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
schema "k8s.io/apimachinery/pkg/runtime/schema"
cache "k8s.io/client-go/tools/cache"
)
@@ -51,19 +51,19 @@ func (f *genericInformer) Lister() cache.GenericLister {
// TODO extend this to unknown resources with a client pool
func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) {
switch resource {
- // Group=bpfd.dev, Version=v1alpha1
+ // Group=bpfman.io, Version=v1alpha1
case v1alpha1.SchemeGroupVersion.WithResource("bpfprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().BpfPrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().BpfPrograms().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("kprobeprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().KprobePrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().KprobePrograms().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("tcprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().TcPrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().TcPrograms().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("tracepointprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().TracepointPrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().TracepointPrograms().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("uprobeprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().UprobePrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().UprobePrograms().Informer()}, nil
case v1alpha1.SchemeGroupVersion.WithResource("xdpprograms"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfd().V1alpha1().XdpPrograms().Informer()}, nil
+ return &genericInformer{resource: resource.GroupResource(), informer: f.Bpfman().V1alpha1().XdpPrograms().Informer()}, nil
}
diff --git a/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go b/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
similarity index 91%
rename from bpfd-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
rename to bpfman-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
index 1eca410be..a5db4b06c 100644
--- a/bpfd-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
+++ b/bpfman-operator/pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@ package internalinterfaces
import (
time "time"
- versioned "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
+ versioned "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
cache "k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go
index de4317946..0a613e747 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/bpfprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go
similarity index 97%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go
index 69762f8ef..68073a95d 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/expansion_generated.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go
index 6e7dd30a3..65efa0070 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/kprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go
index b61856818..905c3c279 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/tcprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go
index 81f451f90..dc7ec6107 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/tracepointprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go
index 7ae468d5a..78af46298 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/uprobeprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go b/bpfman-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go
similarity index 95%
rename from bpfd-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go
rename to bpfman-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go
index d570f51d0..d485a39aa 100644
--- a/bpfd-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go
+++ b/bpfman-operator/pkg/client/listers/apis/v1alpha1/xdpprogram.go
@@ -1,5 +1,5 @@
/*
-Copyright 2023 The bpfd Authors.
+Copyright 2023 The bpfman Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
package v1alpha1
import (
- v1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ v1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/tools/cache"
diff --git a/bpfd-operator/pkg/helpers/helpers.go b/bpfman-operator/pkg/helpers/helpers.go
similarity index 70%
rename from bpfd-operator/pkg/helpers/helpers.go
rename to bpfman-operator/pkg/helpers/helpers.go
index aec35ed70..c58be99f5 100644
--- a/bpfd-operator/pkg/helpers/helpers.go
+++ b/bpfman-operator/pkg/helpers/helpers.go
@@ -21,8 +21,8 @@ import (
"fmt"
"time"
- //bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
- bpfdclientset "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
+ //bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
+ bpfmanclientset "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
//"k8s.io/apimachinery/pkg/api/errors"
//"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
@@ -35,10 +35,10 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
- bpfdiov1alpha1 "github.com/bpfd-dev/bpfd/bpfd-operator/apis/v1alpha1"
+ bpfmaniov1alpha1 "github.com/bpfman/bpfman/bpfman-operator/apis/v1alpha1"
)
-// Must match the internal bpfd-api mappings
+// Must match the internal bpfman-api mappings
type ProgramType int32
const (
@@ -104,7 +104,7 @@ func (t TcProgramDirection) String() string {
}
}
-var log = ctrl.Log.WithName("bpfd-helpers")
+var log = ctrl.Log.WithName("bpfman-helpers")
// getk8sConfig gets a kubernetes config automatically detecting if it should
// be the in or out of cluster config. If this step fails panic.
@@ -126,10 +126,10 @@ func getk8sConfigOrDie() *rest.Config {
return config
}
-// GetClientOrDie gets the bpfd Kubernetes Client dynamically switching between in cluster and out of
+// GetClientOrDie gets the bpfman Kubernetes Client dynamically switching between in cluster and out of
// cluster config setup.
-func GetClientOrDie() *bpfdclientset.Clientset {
- return bpfdclientset.NewForConfigOrDie(getk8sConfigOrDie())
+func GetClientOrDie() *bpfmanclientset.Clientset {
+ return bpfmanclientset.NewForConfigOrDie(getk8sConfigOrDie())
}
// Returns true if loaded. False if not. Also returns the condition type.
@@ -143,19 +143,19 @@ func isProgLoaded(conditions *[]metav1.Condition) (bool, string) {
condition := (*conditions)[0]
- if condition.Type != string(bpfdiov1alpha1.ProgramReconcileSuccess) {
+ if condition.Type != string(bpfmaniov1alpha1.ProgramReconcileSuccess) {
return false, condition.Type
}
return true, condition.Type
}
-func isKprobebpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.ConditionFunc {
+func isKprobebpfmanProgLoaded(c *bpfmanclientset.Clientset, progConfName string) wait.ConditionFunc {
ctx := context.Background()
return func() (bool, error) {
log.Info(".") // progress bar!
- bpfProgConfig, err := c.BpfdV1alpha1().KprobePrograms().Get(ctx, progConfName, metav1.GetOptions{})
+ bpfProgConfig, err := c.BpfmanV1alpha1().KprobePrograms().Get(ctx, progConfName, metav1.GetOptions{})
if err != nil {
return false, err
}
@@ -171,12 +171,12 @@ func isKprobebpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wai
}
}
-func isTcbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.ConditionFunc {
+func isTcbpfmanProgLoaded(c *bpfmanclientset.Clientset, progConfName string) wait.ConditionFunc {
ctx := context.Background()
return func() (bool, error) {
log.Info(".") // progress bar!
- bpfProgConfig, err := c.BpfdV1alpha1().TcPrograms().Get(ctx, progConfName, metav1.GetOptions{})
+ bpfProgConfig, err := c.BpfmanV1alpha1().TcPrograms().Get(ctx, progConfName, metav1.GetOptions{})
if err != nil {
return false, err
}
@@ -192,12 +192,12 @@ func isTcbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.Co
}
}
-func isTracepointbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.ConditionFunc {
+func isTracepointbpfmanProgLoaded(c *bpfmanclientset.Clientset, progConfName string) wait.ConditionFunc {
ctx := context.Background()
return func() (bool, error) {
log.Info(".") // progress bar!
- bpfProgConfig, err := c.BpfdV1alpha1().TracepointPrograms().Get(ctx, progConfName, metav1.GetOptions{})
+ bpfProgConfig, err := c.BpfmanV1alpha1().TracepointPrograms().Get(ctx, progConfName, metav1.GetOptions{})
if err != nil {
return false, err
}
@@ -213,12 +213,12 @@ func isTracepointbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string)
}
}
-func isXdpbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.ConditionFunc {
+func isXdpbpfmanProgLoaded(c *bpfmanclientset.Clientset, progConfName string) wait.ConditionFunc {
ctx := context.Background()
return func() (bool, error) {
log.Info(".") // progress bar!
- bpfProgConfig, err := c.BpfdV1alpha1().XdpPrograms().Get(ctx, progConfName, metav1.GetOptions{})
+ bpfProgConfig, err := c.BpfmanV1alpha1().XdpPrograms().Get(ctx, progConfName, metav1.GetOptions{})
if err != nil {
return false, err
}
@@ -236,16 +236,16 @@ func isXdpbpfdProgLoaded(c *bpfdclientset.Clientset, progConfName string) wait.C
// WaitForBpfProgConfLoad ensures the Program object is loaded and deployed successfully, specifically
// it checks the config objects' conditions to look for the `Loaded` state.
-func WaitForBpfProgConfLoad(c *bpfdclientset.Clientset, progName string, timeout time.Duration, progType ProgramType) error {
+func WaitForBpfProgConfLoad(c *bpfmanclientset.Clientset, progName string, timeout time.Duration, progType ProgramType) error {
switch progType {
case Kprobe:
- return wait.PollImmediate(time.Second, timeout, isKprobebpfdProgLoaded(c, progName))
+ return wait.PollImmediate(time.Second, timeout, isKprobebpfmanProgLoaded(c, progName))
case Tc:
- return wait.PollImmediate(time.Second, timeout, isTcbpfdProgLoaded(c, progName))
+ return wait.PollImmediate(time.Second, timeout, isTcbpfmanProgLoaded(c, progName))
case Xdp:
- return wait.PollImmediate(time.Second, timeout, isXdpbpfdProgLoaded(c, progName))
+ return wait.PollImmediate(time.Second, timeout, isXdpbpfmanProgLoaded(c, progName))
case Tracepoint:
- return wait.PollImmediate(time.Second, timeout, isTracepointbpfdProgLoaded(c, progName))
+ return wait.PollImmediate(time.Second, timeout, isTracepointbpfmanProgLoaded(c, progName))
// TODO: case Uprobe: not covered. Since Uprobe has the same ProgramType as
// Kprobe, we need a different way to distinguish them. Options include
// creating an internal ProgramType for Uprobe or using a different
@@ -255,9 +255,9 @@ func WaitForBpfProgConfLoad(c *bpfdclientset.Clientset, progName string, timeout
}
}
-// IsBpfdDeployed is used to check for the existence of bpfd in a Kubernetes cluster. Specifically it checks for
-// the existence of the bpfd.dev CRD api group within the apiserver. If getting the k8s config fails this will panic.
-func IsBpfdDeployed() bool {
+// IsBpfmanDeployed is used to check for the existence of bpfman in a Kubernetes cluster. Specifically it checks for
+// the existence of the bpfman.io CRD api group within the apiserver. If getting the k8s config fails this will panic.
+func IsBpfmanDeployed() bool {
config := getk8sConfigOrDie()
client, err := discovery.NewDiscoveryClientForConfig(config)
@@ -272,9 +272,9 @@ func IsBpfdDeployed() bool {
}
for _, v := range apiList.Groups {
- if v.Name == "bpfd.dev" {
+ if v.Name == "bpfman.io" {
- log.Info("bpfd.dev found in apis, bpfd is deployed")
+ log.Info("bpfman.io found in apis, bpfman is deployed")
return true
}
}
@@ -294,11 +294,11 @@ func IsBpfProgramConditionFailure(conditions *[]metav1.Condition) bool {
log.Info("more than one BpfProgramCondition", "numConditions", numConditions)
}
- if (*conditions)[0].Type == string(bpfdiov1alpha1.BpfProgCondNotLoaded) ||
- (*conditions)[0].Type == string(bpfdiov1alpha1.BpfProgCondNotUnloaded) ||
- (*conditions)[0].Type == string(bpfdiov1alpha1.BpfProgCondMapOwnerNotFound) ||
- (*conditions)[0].Type == string(bpfdiov1alpha1.BpfProgCondMapOwnerNotLoaded) ||
- (*conditions)[0].Type == string(bpfdiov1alpha1.BpfProgCondBytecodeSelectorError) {
+ if (*conditions)[0].Type == string(bpfmaniov1alpha1.BpfProgCondNotLoaded) ||
+ (*conditions)[0].Type == string(bpfmaniov1alpha1.BpfProgCondNotUnloaded) ||
+ (*conditions)[0].Type == string(bpfmaniov1alpha1.BpfProgCondMapOwnerNotFound) ||
+ (*conditions)[0].Type == string(bpfmaniov1alpha1.BpfProgCondMapOwnerNotLoaded) ||
+ (*conditions)[0].Type == string(bpfmaniov1alpha1.BpfProgCondBytecodeSelectorError) {
return true
}
diff --git a/bpfd-operator/test/integration/suite_test.go b/bpfman-operator/test/integration/suite_test.go
similarity index 63%
rename from bpfd-operator/test/integration/suite_test.go
rename to bpfman-operator/test/integration/suite_test.go
index ee81e9192..f11e354cb 100644
--- a/bpfd-operator/test/integration/suite_test.go
+++ b/bpfman-operator/test/integration/suite_test.go
@@ -17,25 +17,25 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "github.com/bpfd-dev/bpfd/bpfd-operator/internal"
- "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/client/clientset/versioned"
- bpfdHelpers "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/helpers"
+ "github.com/bpfman/bpfman/bpfman-operator/internal"
+ "github.com/bpfman/bpfman/bpfman-operator/pkg/client/clientset/versioned"
+ bpfmanHelpers "github.com/bpfman/bpfman/bpfman-operator/pkg/helpers"
)
var (
- ctx context.Context
- cancel context.CancelFunc
- env environments.Environment
- bpfdClient *versioned.Clientset
+ ctx context.Context
+ cancel context.CancelFunc
+ env environments.Environment
+ bpfmanClient *versioned.Clientset
// These images should already be built on the node so they can
// be loaded into kind.
- bpfdImage = os.Getenv("BPFD_IMG")
- bpfdAgentImage = os.Getenv("BPFD_AGENT_IMG")
- bpfdOperatorImage = os.Getenv("BPFD_OPERATOR_IMG")
- tcExampleUsImage = "quay.io/bpfd-userspace/go-tc-counter:latest"
- xdpExampleUsImage = "quay.io/bpfd-userspace/go-xdp-counter:latest"
- tpExampleUsImage = "quay.io/bpfd-userspace/go-tracepoint-counter:latest"
+ bpfmanImage = os.Getenv("BPFMAN_IMG")
+ bpfmanAgentImage = os.Getenv("BPFMAN_AGENT_IMG")
+ bpfmanOperatorImage = os.Getenv("BPFMAN_OPERATOR_IMG")
+ tcExampleUsImage = "quay.io/bpfman-userspace/go-tc-counter:latest"
+ xdpExampleUsImage = "quay.io/bpfman-userspace/go-xdp-counter:latest"
+ tpExampleUsImage = "quay.io/bpfman-userspace/go-tracepoint-counter:latest"
existingCluster = os.Getenv("USE_EXISTING_KIND_CLUSTER")
keepTestCluster = func() bool { return os.Getenv("TEST_KEEP_CLUSTER") == "true" || existingCluster != "" }()
@@ -45,28 +45,28 @@ var (
)
const (
- bpfdKustomize = "../../config/test"
- bpfdConfigMap = "../../config/bpfd-deployment/config.yaml"
+ bpfmanKustomize = "../../config/test"
+ bpfmanConfigMap = "../../config/bpfman-deployment/config.yaml"
)
func TestMain(m *testing.M) {
- // check that we have the bpfd, bpfd-agent, and bpfd-operator images to use for the tests.
+ // check that we have the bpfman, bpfman-agent, and bpfman-operator images to use for the tests.
// generally the runner of the tests should have built these from the latest
// changes prior to the tests and fed them to the test suite.
- if bpfdImage == "" || bpfdAgentImage == "" || bpfdOperatorImage == "" {
- exitOnErr(fmt.Errorf("BPFD_IMG, BPFD_AGENT_IMG, and BPFD_OPERATOR_IMG must be provided"))
+ if bpfmanImage == "" || bpfmanAgentImage == "" || bpfmanOperatorImage == "" {
+ exitOnErr(fmt.Errorf("BPFMAN_IMG, BPFMAN_AGENT_IMG, and BPFMAN_OPERATOR_IMG must be provided"))
}
ctx, cancel = context.WithCancel(context.Background())
defer cancel()
- // to use the provided bpfd, bpfd-agent, and bpfd-operator images we will need to add
+ // to use the provided bpfman, bpfman-agent, and bpfman-operator images we will need to add
// them as images to load in the test cluster via an addon.
- loadImages, err := loadimage.NewBuilder().WithImage(bpfdImage)
+ loadImages, err := loadimage.NewBuilder().WithImage(bpfmanImage)
exitOnErr(err)
- loadImages, err = loadImages.WithImage(bpfdAgentImage)
+ loadImages, err = loadImages.WithImage(bpfmanAgentImage)
exitOnErr(err)
- loadImages, err = loadImages.WithImage(bpfdOperatorImage)
+ loadImages, err = loadImages.WithImage(bpfmanOperatorImage)
exitOnErr(err)
loadImages, err = loadImages.WithImage(tcExampleUsImage)
exitOnErr(err)
@@ -99,27 +99,27 @@ func TestMain(m *testing.M) {
})
}
- // deploy the BPFD Operator and revelevant CRDs
- fmt.Println("INFO: deploying bpfd operator to test cluster")
- exitOnErr(clusters.KustomizeDeployForCluster(ctx, env.Cluster(), bpfdKustomize))
+ // deploy the BPFMAN Operator and revelevant CRDs
+ fmt.Println("INFO: deploying bpfman operator to test cluster")
+ exitOnErr(clusters.KustomizeDeployForCluster(ctx, env.Cluster(), bpfmanKustomize))
if !keepKustomizeDeploys {
addCleanup(func(context.Context) error {
- cleanupLog("delete bpfd configmap to cleanup bpfd daemon")
- env.Cluster().Client().CoreV1().ConfigMaps(internal.BpfdNs).Delete(ctx, internal.BpfdConfigName, metav1.DeleteOptions{})
- clusters.DeleteManifestByYAML(ctx, env.Cluster(), bpfdConfigMap)
- waitForBpfdConfigDelete(ctx, env)
- cleanupLog("deleting bpfd namespace")
- return env.Cluster().Client().CoreV1().Namespaces().Delete(ctx, internal.BpfdNs, metav1.DeleteOptions{})
+ cleanupLog("delete bpfman configmap to cleanup bpfman daemon")
+ env.Cluster().Client().CoreV1().ConfigMaps(internal.BpfmanNs).Delete(ctx, internal.BpfmanConfigName, metav1.DeleteOptions{})
+ clusters.DeleteManifestByYAML(ctx, env.Cluster(), bpfmanConfigMap)
+ waitForBpfmanConfigDelete(ctx, env)
+ cleanupLog("deleting bpfman namespace")
+ return env.Cluster().Client().CoreV1().Namespaces().Delete(ctx, internal.BpfmanNs, metav1.DeleteOptions{})
})
}
- bpfdClient = bpfdHelpers.GetClientOrDie()
- exitOnErr(waitForBpfdReadiness(ctx, env))
+ bpfmanClient = bpfmanHelpers.GetClientOrDie()
+ exitOnErr(waitForBpfmanReadiness(ctx, env))
exit := m.Run()
// If there's any errors in e2e tests dump diagnostics
if exit != 0 {
- _, err := env.Cluster().DumpDiagnostics(ctx, "bpfd-e2e-test")
+ _, err := env.Cluster().DumpDiagnostics(ctx, "bpfman-e2e-test")
exitOnErr(err)
}
@@ -167,7 +167,7 @@ func runCleanup() (cleanupErr error) {
return
}
-func waitForBpfdReadiness(ctx context.Context, env environments.Environment) error {
+func waitForBpfmanReadiness(ctx context.Context, env environments.Environment) error {
for {
time.Sleep(2 * time.Second)
select {
@@ -177,13 +177,13 @@ func waitForBpfdReadiness(ctx context.Context, env environments.Environment) err
}
return fmt.Errorf("context completed while waiting for components")
default:
- fmt.Println("INFO: waiting for bpfd")
+ fmt.Println("INFO: waiting for bpfman")
var controlplaneReady, dataplaneReady bool
- controlplane, err := env.Cluster().Client().AppsV1().Deployments(internal.BpfdNs).Get(ctx, internal.BpfdOperatorName, metav1.GetOptions{})
+ controlplane, err := env.Cluster().Client().AppsV1().Deployments(internal.BpfmanNs).Get(ctx, internal.BpfmanOperatorName, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
- fmt.Println("INFO: bpfd-operator dep not found yet")
+ fmt.Println("INFO: bpfman-operator dep not found yet")
continue
}
return err
@@ -192,10 +192,10 @@ func waitForBpfdReadiness(ctx context.Context, env environments.Environment) err
controlplaneReady = true
}
- dataplane, err := env.Cluster().Client().AppsV1().DaemonSets(internal.BpfdNs).Get(ctx, internal.BpfdDsName, metav1.GetOptions{})
+ dataplane, err := env.Cluster().Client().AppsV1().DaemonSets(internal.BpfmanNs).Get(ctx, internal.BpfmanDsName, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
- fmt.Println("INFO: bpfd daemon not found yet")
+ fmt.Println("INFO: bpfman daemon not found yet")
continue
}
return err
@@ -205,14 +205,14 @@ func waitForBpfdReadiness(ctx context.Context, env environments.Environment) err
}
if controlplaneReady && dataplaneReady {
- fmt.Println("INFO: bpfd-operator is ready")
+ fmt.Println("INFO: bpfman-operator is ready")
return nil
}
}
}
}
-func waitForBpfdConfigDelete(ctx context.Context, env environments.Environment) error {
+func waitForBpfmanConfigDelete(ctx context.Context, env environments.Environment) error {
for {
time.Sleep(2 * time.Second)
select {
@@ -222,12 +222,12 @@ func waitForBpfdConfigDelete(ctx context.Context, env environments.Environment)
}
return fmt.Errorf("context completed while waiting for components")
default:
- fmt.Println("INFO: waiting for bpfd config deletion")
+ fmt.Println("INFO: waiting for bpfman config deletion")
- _, err := env.Cluster().Client().CoreV1().ConfigMaps(internal.BpfdNs).Get(ctx, internal.BpfdConfigName, metav1.GetOptions{})
+ _, err := env.Cluster().Client().CoreV1().ConfigMaps(internal.BpfmanNs).Get(ctx, internal.BpfmanConfigName, metav1.GetOptions{})
if err != nil {
if errors.IsNotFound(err) {
- fmt.Println("INFO: bpfd configmap deleted successfully")
+ fmt.Println("INFO: bpfman configmap deleted successfully")
return nil
}
return err
diff --git a/bpfd-operator/test/integration/tc_test.go b/bpfman-operator/test/integration/tc_test.go
similarity index 100%
rename from bpfd-operator/test/integration/tc_test.go
rename to bpfman-operator/test/integration/tc_test.go
diff --git a/bpfd-operator/test/integration/tracepoint_test.go b/bpfman-operator/test/integration/tracepoint_test.go
similarity index 100%
rename from bpfd-operator/test/integration/tracepoint_test.go
rename to bpfman-operator/test/integration/tracepoint_test.go
diff --git a/bpfd-operator/test/integration/xdp_test.go b/bpfman-operator/test/integration/xdp_test.go
similarity index 78%
rename from bpfd-operator/test/integration/xdp_test.go
rename to bpfman-operator/test/integration/xdp_test.go
index f8903b0dd..ccb1ff6da 100644
--- a/bpfd-operator/test/integration/xdp_test.go
+++ b/bpfman-operator/test/integration/xdp_test.go
@@ -11,7 +11,7 @@ import (
"testing"
"time"
- bpfdHelpers "github.com/bpfd-dev/bpfd/bpfd-operator/pkg/helpers"
+ bpfmanHelpers "github.com/bpfman/bpfman/bpfman-operator/pkg/helpers"
"github.com/kong/kubernetes-testing-framework/pkg/clusters"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
@@ -25,10 +25,10 @@ const (
)
func TestXdpPassPrivate(t *testing.T) {
- t.Log("deploying secret for privated xdp bytecode image in the bpfd namespace")
+ t.Log("deploying secret for privated xdp bytecode image in the bpfman namespace")
// Generated from
/*
- kubectl create secret -n bpfd docker-registry regcred --docker-server=quay.io --docker-username=bpfd-bytecode+bpfdcreds --docker-password=JOGZ3FA6A9L2297JAT4FFN6CJU87LKTIY6X1ZGKWJ0W0XLKY0KPT5YKTBBEAGSF5
+ kubectl create secret -n bpfman docker-registry regcred --docker-server=quay.io --docker-username=bpfman-bytecode+bpfmancreds --docker-password=D49CKWI1MMOFGRCAT8SHW5A56FSVP30TGYX54BBWKY2J129XRI6Q5TVH2ZZGTJ1M
*/
xdpPassPrivateSecretYAML := `---
---
@@ -39,7 +39,7 @@ metadata:
namespace: default
type: kubernetes.io/dockerconfigjson
data:
- .dockerconfigjson: eyJhdXRocyI6eyJxdWF5LmlvIjp7InVzZXJuYW1lIjoiYnBmZC1ieXRlY29kZSticGZkY3JlZHMiLCJwYXNzd29yZCI6IkpPR1ozRkE2QTlMMjI5N0pBVDRGRk42Q0pVODdMS1RJWTZYMVpHS1dKMFcwWExLWTBLUFQ1WUtUQkJFQUdTRjUiLCJhdXRoIjoiWW5CbVpDMWllWFJsWTI5a1pTdGljR1prWTNKbFpITTZTazlIV2pOR1FUWkJPVXd5TWprM1NrRlVORVpHVGpaRFNsVTROMHhMVkVsWk5sZ3hXa2RMVjBvd1Z6QllURXRaTUV0UVZEVlpTMVJDUWtWQlIxTkdOUT09In19fQ==
+ .dockerconfigjson: eyJhdXRocyI6eyJxdWF5LmlvIjp7InVzZXJuYW1lIjoiYnBmbWFuLWJ5dGVjb2RlK2JwZm1hbmNyZWRzIiwicGFzc3dvcmQiOiJENDlDS1dJMU1NT0ZHUkNBVDhTSFc1QTU2RlNWUDMwVEdZWDU0QkJXS1kySjEyOVhSSTZRNVRWSDJaWkdUSjFNIiwiYXV0aCI6IlluQm1iV0Z1TFdKNWRHVmpiMlJsSzJKd1ptMWhibU55WldSek9rUTBPVU5MVjBreFRVMVBSa2RTUTBGVU9GTklWelZCTlRaR1UxWlFNekJVUjFsWU5UUkNRbGRMV1RKS01USTVXRkpKTmxFMVZGWklNbHBhUjFSS01VMD0ifX19
`
require.NoError(t, clusters.ApplyManifestByYAML(ctx, env.Cluster(), xdpPassPrivateSecretYAML))
@@ -50,7 +50,7 @@ data:
xdpPassPrivateXdpProgramYAML := `---
---
-apiVersion: bpfd.dev/v1alpha1
+apiVersion: bpfman.io/v1alpha1
kind: XdpProgram
metadata:
labels:
@@ -69,18 +69,18 @@ spec:
imagepullsecret:
name: regcred
namespace: default
- url: quay.io/bpfd-bytecode/xdp_pass_private:latest
+ url: quay.io/bpfman-bytecode/xdp_pass_private:latest
`
t.Log("deploying private xdp pass bpf program")
require.NoError(t, clusters.ApplyManifestByYAML(ctx, env.Cluster(), xdpPassPrivateXdpProgramYAML))
addCleanup(func(ctx context.Context) error {
- cleanupLog("cleaning up xdp pass private bpfd program")
+ cleanupLog("cleaning up xdp pass private bpfman program")
return clusters.DeleteManifestByYAML(ctx, env.Cluster(), xdpPassPrivateXdpProgramYAML)
})
// Make sure the bpfProgram was successfully deployed
- require.NoError(t, bpfdHelpers.WaitForBpfProgConfLoad(bpfdClient, "xdp-pass-private-all-nodes", time.Duration(time.Second*10), bpfdHelpers.Xdp))
+ require.NoError(t, bpfmanHelpers.WaitForBpfProgConfLoad(bpfmanClient, "xdp-pass-private-all-nodes", time.Duration(time.Second*10), bpfmanHelpers.Xdp))
t.Log("private xdp pass bpf program successfully deployed")
}
diff --git a/bpfd/Cargo.toml b/bpfman/Cargo.toml
similarity index 91%
rename from bpfd/Cargo.toml
rename to bpfman/Cargo.toml
index 0f83a6215..e961f44b3 100644
--- a/bpfd/Cargo.toml
+++ b/bpfman/Cargo.toml
@@ -2,12 +2,12 @@
description = "A system daemon for loading BPF programs"
edition = "2021"
license = "Apache-2.0"
-name = "bpfd"
-repository = "https://github.com/bpfd-dev/bpfd"
+name = "bpfman"
+repository = "https://github.com/bpfman/bpfman"
version = "0.3.1"
[[bin]]
-name = "bpfd"
+name = "bpfman"
path = "src/main.rs"
[dependencies]
@@ -15,8 +15,8 @@ anyhow = { workspace = true, features = ["std"] }
async-trait = { workspace = true }
aya = { workspace = true }
base16ct = { workspace = true, features = ["alloc"] }
-bpfd-api = { workspace = true }
-bpfd-csi = { workspace = true }
+bpfman-api = { workspace = true }
+bpfman-csi = { workspace = true }
caps = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true, features = ["derive", "std"] }
diff --git a/bpfd/src/bpf.rs b/bpfman/src/bpf.rs
similarity index 89%
rename from bpfd/src/bpf.rs
rename to bpfman/src/bpf.rs
index cbf47198e..6fd4105b6 100644
--- a/bpfd/src/bpf.rs
+++ b/bpfman/src/bpf.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{
collections::HashMap,
@@ -15,7 +15,7 @@ use aya::{
},
BpfLoader,
};
-use bpfd_api::{
+use bpfman_api::{
config::Config,
util::directories::*,
ProbeType::{self, *},
@@ -36,7 +36,7 @@ use crate::{
Direction::{Egress, Ingress},
Program, ProgramData, PullBytecodeArgs, TcProgram, UnloadArgs,
},
- errors::BpfdError,
+ errors::BpfmanError,
multiprog::{Dispatcher, DispatcherId, DispatcherInfo, TcDispatcher, XdpDispatcher},
oci_utils::image_manager::Command as ImageManagerCommand,
serve::shutdown_handler,
@@ -119,7 +119,7 @@ impl ProgramMap {
b.priority(),
b.attached().unwrap(),
b.data()
- .expect("All Bpfd programs should have ProgramData")
+ .expect("All Bpfman programs should have ProgramData")
.name()
.to_owned(),
)
@@ -133,9 +133,9 @@ impl ProgramMap {
self.programs.values().map(|p| {
let kernel_info = p
.data()
- .expect("All Bpfd programs should have ProgramData")
+ .expect("All Bpfman programs should have ProgramData")
.kernel_info()
- .expect("Loaded Bpfd programs should have kernel information");
+ .expect("Loaded Bpfman programs should have kernel information");
(kernel_info.id, p)
})
@@ -194,7 +194,7 @@ impl BpfManager {
while let Some(entry) = programs_dir.next_entry().await? {
let id = entry.file_name().to_string_lossy().parse().unwrap();
let mut program = Program::load(id)
- .map_err(|e| BpfdError::Error(format!("cant read program state {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("cant read program state {e}")))?;
// TODO: Should probably check for pinned prog on bpffs rather than assuming they are attached
program.set_attached();
debug!("rebuilding state for program {}", id);
@@ -270,7 +270,10 @@ impl BpfManager {
Ok(())
}
- pub(crate) async fn add_program(&mut self, mut program: Program) -> Result {
+ pub(crate) async fn add_program(
+ &mut self,
+ mut program: Program,
+ ) -> Result {
let map_owner_id = program.data()?.map_owner_id();
// Set map_pin_path if we're using another program's maps
if let Some(map_owner_id) = map_owner_id {
@@ -309,7 +312,7 @@ impl BpfManager {
);
// Now that program is successfully loaded, update the id, maps hash table,
- // and allow access to all maps by bpfd group members.
+ // and allow access to all maps by bpfman group members.
self.save_map(&mut program, id, map_owner_id).await?;
// Only add program to bpfManager if we've completed all mutations and it's successfully loaded.
@@ -334,7 +337,7 @@ impl BpfManager {
pub(crate) async fn add_multi_attach_program(
&mut self,
program: &mut Program,
- ) -> Result {
+ ) -> Result {
debug!("BpfManager::add_multi_attach_program()");
let name = program.data()?.name();
@@ -348,16 +351,16 @@ impl BpfManager {
match ext_loader.program_mut(name) {
Some(_) => Ok(()),
- None => Err(BpfdError::BpfFunctionNameNotValid(name.to_owned())),
+ None => Err(BpfmanError::BpfFunctionNameNotValid(name.to_owned())),
}?;
let did = program
.dispatcher_id()
- .ok_or(BpfdError::DispatcherNotRequired)?;
+ .ok_or(BpfmanError::DispatcherNotRequired)?;
let next_available_id = self.dispatchers.attached_programs(&did);
if next_available_id >= 10 {
- return Err(BpfdError::TooManyPrograms);
+ return Err(BpfmanError::TooManyPrograms);
}
debug!("next_available_id={next_available_id}");
@@ -402,7 +405,7 @@ impl BpfManager {
if let Some(info) = program.kernel_info() {
program
.delete(info.id)
- .map_err(BpfdError::BpfdProgramDeleteError)?;
+ .map_err(BpfmanError::BpfmanProgramDeleteError)?;
}
Err(e)
})?;
@@ -416,7 +419,7 @@ impl BpfManager {
program.set_attached();
program
.save(id)
- .map_err(|e| BpfdError::Error(format!("unable to save program state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to save program state: {e}")))?;
Ok(id)
}
@@ -424,7 +427,7 @@ impl BpfManager {
pub(crate) async fn add_single_attach_program(
&mut self,
p: &mut Program,
- ) -> Result {
+ ) -> Result {
debug!("BpfManager::add_single_attach_program()");
let name = p.data()?.name();
let mut bpf = BpfLoader::new();
@@ -449,13 +452,13 @@ impl BpfManager {
let raw_program = loader
.program_mut(name)
- .ok_or(BpfdError::BpfFunctionNameNotValid(name.to_owned()))?;
+ .ok_or(BpfmanError::BpfFunctionNameNotValid(name.to_owned()))?;
let res = match p {
Program::Tracepoint(ref mut program) => {
let parts: Vec<&str> = program.tracepoint.split('/').collect();
if parts.len() != 2 {
- return Err(BpfdError::InvalidAttach(program.tracepoint.to_string()));
+ return Err(BpfmanError::InvalidAttach(program.tracepoint.to_string()));
}
let category = parts[0].to_owned();
let name = parts[1].to_owned();
@@ -478,11 +481,11 @@ impl BpfManager {
fd_link
.pin(format!("{RTDIR_FS}/prog_{}_link", id))
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
tracepoint
.pin(format!("{RTDIR_FS}/prog_{id}"))
- .map_err(BpfdError::UnableToPinProgram)?;
+ .map_err(BpfmanError::UnableToPinProgram)?;
Ok(id)
}
@@ -493,7 +496,7 @@ impl BpfManager {
};
if requested_probe_type == Kretprobe && program.offset != 0 {
- return Err(BpfdError::Error(format!(
+ return Err(BpfmanError::Error(format!(
"offset not allowed for {Kretprobe}"
)));
}
@@ -505,7 +508,7 @@ impl BpfManager {
// user requested
let loaded_probe_type = ProbeType::from(kprobe.kind());
if requested_probe_type != loaded_probe_type {
- return Err(BpfdError::Error(format!(
+ return Err(BpfmanError::Error(format!(
"expected {requested_probe_type}, loaded program is {loaded_probe_type}"
)));
}
@@ -525,11 +528,11 @@ impl BpfManager {
fd_link
.pin(format!("{RTDIR_FS}/prog_{}_link", id))
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
kprobe
.pin(format!("{RTDIR_FS}/prog_{id}"))
- .map_err(BpfdError::UnableToPinProgram)?;
+ .map_err(BpfmanError::UnableToPinProgram)?;
Ok(id)
}
@@ -546,7 +549,7 @@ impl BpfManager {
// user requested
let loaded_probe_type = ProbeType::from(uprobe.kind());
if requested_probe_type != loaded_probe_type {
- return Err(BpfdError::Error(format!(
+ return Err(BpfmanError::Error(format!(
"expected {requested_probe_type}, loaded program is {loaded_probe_type}"
)));
}
@@ -571,11 +574,11 @@ impl BpfManager {
fd_link
.pin(format!("{RTDIR_FS}/prog_{}_link", id))
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
uprobe
.pin(format!("{RTDIR_FS}/prog_{id}"))
- .map_err(BpfdError::UnableToPinProgram)?;
+ .map_err(BpfmanError::UnableToPinProgram)?;
Ok(id)
}
@@ -599,20 +602,22 @@ impl BpfManager {
map_pin_path.join(name).display()
);
map.pin(map_pin_path.join(name))
- .map_err(BpfdError::UnableToPinMap)?;
+ .map_err(BpfmanError::UnableToPinMap)?;
}
}
p.save(id)
// we might want to log or ignore this error instead of returning here...
// because otherwise it will hide the original error (from res above)
- .map_err(|_| BpfdError::Error("unable to persist program data".to_string()))?;
+ .map_err(|_| {
+ BpfmanError::Error("unable to persist program data".to_string())
+ })?;
}
Err(_) => {
// If kernel ID was never set there's no pins to cleanup here so just continue
if let Some(info) = p.kernel_info() {
p.delete(info.id)
- .map_err(BpfdError::BpfdProgramDeleteError)?;
+ .map_err(BpfmanError::BpfmanProgramDeleteError)?;
};
}
};
@@ -620,13 +625,13 @@ impl BpfManager {
res
}
- pub(crate) async fn remove_program(&mut self, id: u32) -> Result<(), BpfdError> {
+ pub(crate) async fn remove_program(&mut self, id: u32) -> Result<(), BpfmanError> {
info!("Removing program with id: {id}");
let mut prog = match self.programs.remove(&id) {
Some(p) => p,
None => {
- return Err(BpfdError::Error(format!(
- "Program {0} does not exist or was not created by bpfd",
+ return Err(BpfmanError::Error(format!(
+ "Program {0} does not exist or was not created by bpfman",
id,
)));
}
@@ -634,7 +639,8 @@ impl BpfManager {
let map_owner_id = prog.data()?.map_owner_id();
- prog.delete(id).map_err(BpfdError::BpfdProgramDeleteError)?;
+ prog.delete(id)
+ .map_err(BpfmanError::BpfmanProgramDeleteError)?;
match prog {
Program::Xdp(_) | Program::Tc(_) => self.remove_multi_attach_program(&mut prog).await?,
@@ -651,12 +657,12 @@ impl BpfManager {
pub(crate) async fn remove_multi_attach_program(
&mut self,
program: &mut Program,
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
debug!("BpfManager::remove_multi_attach_program()");
let did = program
.dispatcher_id()
- .ok_or(BpfdError::DispatcherNotRequired)?;
+ .ok_or(BpfmanError::DispatcherNotRequired)?;
let next_available_id = self.dispatchers.attached_programs(&did) - 1;
debug!("next_available_id = {next_available_id}");
@@ -710,7 +716,7 @@ impl BpfManager {
&mut self,
mut filter_prog: Program,
did: DispatcherId,
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
let program_type = filter_prog.kind();
let if_index = filter_prog.if_index();
let direction = filter_prog.direction();
@@ -733,7 +739,7 @@ impl BpfManager {
if programs.is_empty() {
return old.delete(true);
} else if programs.len() > 10 {
- return Err(BpfdError::TooManyPrograms);
+ return Err(BpfmanError::TooManyPrograms);
}
let if_name = old.if_name();
@@ -764,21 +770,21 @@ impl BpfManager {
Ok(())
}
- pub(crate) fn list_programs(&mut self) -> Result, BpfdError> {
+ pub(crate) fn list_programs(&mut self) -> Result, BpfmanError> {
debug!("BpfManager::list_programs()");
- // Get an iterator for the bpfd load programs, a hash map indexed by program id.
- let mut bpfd_progs: HashMap = self.programs.get_programs_iter().collect();
+ // Get an iterator for the bpfman load programs, a hash map indexed by program id.
+ let mut bpfman_progs: HashMap = self.programs.get_programs_iter().collect();
// Call Aya to get ALL the loaded eBPF programs, and loop through each one.
loaded_programs()
.map(|p| {
- let prog = p.map_err(BpfdError::BpfProgramError)?;
+ let prog = p.map_err(BpfmanError::BpfProgramError)?;
let prog_id = prog.id();
- // If the program was loaded by bpfd (check the hash map), then us it.
+ // If the program was loaded by bpfman (check the hash map), then us it.
// Otherwise, convert the data returned from Aya into an Unsupported Program Object.
- match bpfd_progs.remove(&prog_id) {
+ match bpfman_progs.remove(&prog_id) {
Some(p) => Ok(p.to_owned()),
None => Ok(Program::Unsupported(prog.try_into()?)),
}
@@ -786,9 +792,9 @@ impl BpfManager {
.collect()
}
- pub(crate) fn get_program(&mut self, id: u32) -> Result {
+ pub(crate) fn get_program(&mut self, id: u32) -> Result {
debug!("Getting program with id: {id}");
- // If the program was loaded by bpfd, then use it.
+ // If the program was loaded by bpfman, then use it.
// Otherwise, call Aya to get ALL the loaded eBPF programs, and convert the data
// returned from Aya into an Unsupported Program Object.
match self.programs.get(&id) {
@@ -802,7 +808,10 @@ impl BpfManager {
None
}
})
- .ok_or(BpfdError::Error(format!("Program {0} does not exist", id))),
+ .ok_or(BpfmanError::Error(format!(
+ "Program {0} does not exist",
+ id
+ ))),
}
}
@@ -822,7 +831,7 @@ impl BpfManager {
info!("Successfully pulled bytecode");
Ok(())
}
- Err(e) => Err(e).map_err(|e| BpfdError::BpfBytecodeError(e.into())),
+ Err(e) => Err(e).map_err(|e| BpfmanError::BpfBytecodeError(e.into())),
};
let _ = args.responder.send(res);
Ok(())
@@ -871,14 +880,16 @@ impl BpfManager {
}
// This function checks to see if the user provided map_owner_id is valid.
- fn is_map_owner_id_valid(&mut self, map_owner_id: u32) -> Result {
+ fn is_map_owner_id_valid(&mut self, map_owner_id: u32) -> Result {
let map_pin_path = calc_map_pin_path(map_owner_id);
if self.maps.contains_key(&map_owner_id) {
// Return the map_pin_path
return Ok(map_pin_path);
}
- Err(BpfdError::Error("map_owner_id does not exists".to_string()))
+ Err(BpfmanError::Error(
+ "map_owner_id does not exists".to_string(),
+ ))
}
// This function is called if the program's map directory was created,
@@ -892,11 +903,11 @@ impl BpfManager {
&mut self,
map_pin_path: &Path,
map_owner_id: Option,
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
if map_owner_id.is_none() {
let _ = fs::remove_dir_all(map_pin_path)
.await
- .map_err(|e| BpfdError::Error(format!("can't delete map dir: {e}")));
+ .map_err(|e| BpfmanError::Error(format!("can't delete map dir: {e}")));
Ok(())
} else {
Ok(())
@@ -905,7 +916,7 @@ impl BpfManager {
// This function writes the map to the map hash table. If this eBPF
// program is the map owner, then a new entry is add to the map hash
- // table and permissions on the directory are updated to grant bpfd
+ // table and permissions on the directory are updated to grant bpfman
// user group access to all the maps in the directory. If this eBPF
// program is not the owner, then the eBPF program ID is added to
// the Used-By array.
@@ -916,7 +927,7 @@ impl BpfManager {
program: &mut Program,
id: u32,
map_owner_id: Option,
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
let data = program.data_mut()?;
match map_owner_id {
@@ -934,14 +945,16 @@ impl BpfManager {
if let Ok(data) = program.data_mut() {
data.set_maps_used_by(Some(map.used_by.clone()));
} else {
- return Err(BpfdError::Error(
+ return Err(BpfmanError::Error(
"unable to retrieve data for {id}".to_string(),
));
}
}
}
} else {
- return Err(BpfdError::Error("map_owner_id does not exists".to_string()));
+ return Err(BpfmanError::Error(
+ "map_owner_id does not exists".to_string(),
+ ));
}
}
None => {
@@ -957,14 +970,14 @@ impl BpfManager {
if let Some(path) = map_pin_path.to_str() {
set_dir_permissions(path, MAPS_MODE).await;
} else {
- return Err(BpfdError::Error(format!(
+ return Err(BpfmanError::Error(format!(
"invalid map_pin_path {} for {}",
map_pin_path.display(),
id
)));
}
} else {
- return Err(BpfdError::Error(format!(
+ return Err(BpfmanError::Error(format!(
"map_pin_path should be set for {}",
id
)));
@@ -981,7 +994,7 @@ impl BpfManager {
// directory is removed. If this eBPF program is referencing a
// map from another eBPF program, then this eBPF programs ID
// is removed from the UsedBy array.
- async fn delete_map(&mut self, id: u32, map_owner_id: Option) -> Result<(), BpfdError> {
+ async fn delete_map(&mut self, id: u32, map_owner_id: Option) -> Result<(), BpfmanError> {
let index = match map_owner_id {
Some(i) => i,
None => id,
@@ -998,7 +1011,7 @@ impl BpfManager {
self.maps.remove(&index.clone());
fs::remove_dir_all(path)
.await
- .map_err(|e| BpfdError::Error(format!("can't delete map dir: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("can't delete map dir: {e}")))?;
} else {
// Update all the programs still using the same map with the updated map_used_by.
for id in map.used_by.iter() {
@@ -1010,7 +1023,9 @@ impl BpfManager {
}
}
} else {
- return Err(BpfdError::Error("map_pin_path does not exists".to_string()));
+ return Err(BpfmanError::Error(
+ "map_pin_path does not exists".to_string(),
+ ));
}
Ok(())
@@ -1065,7 +1080,7 @@ impl BpfManager {
}
// map_pin_path is a the directory the maps are located. Currently, it
-// is a fixed bpfd location containing the map_index, which is a ID.
+// is a fixed bpfman location containing the map_index, which is a ID.
// The ID is either the programs ID, or the ID of another program
// that map_owner_id references.
pub fn calc_map_pin_path(id: u32) -> PathBuf {
@@ -1073,8 +1088,8 @@ pub fn calc_map_pin_path(id: u32) -> PathBuf {
}
// Create the map_pin_path for a given program.
-pub async fn create_map_pin_path(p: &Path) -> Result<(), BpfdError> {
+pub async fn create_map_pin_path(p: &Path) -> Result<(), BpfmanError> {
fs::create_dir_all(p)
.await
- .map_err(|e| BpfdError::Error(format!("can't create map dir: {e}")))
+ .map_err(|e| BpfmanError::Error(format!("can't create map dir: {e}")))
}
diff --git a/bpfd/src/command.rs b/bpfman/src/command.rs
similarity index 93%
rename from bpfd/src/command.rs
rename to bpfman/src/command.rs
index faccb43cd..b9f0c284d 100644
--- a/bpfd/src/command.rs
+++ b/bpfman/src/command.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
//! Commands between the RPC thread and the BPF thread
use std::{
@@ -10,7 +10,7 @@ use std::{
};
use aya::programs::ProgramInfo as AyaProgInfo;
-use bpfd_api::{
+use bpfman_api::{
util::directories::{RTDIR_FS, RTDIR_PROGRAMS},
v1::{
attach_info::Info, bytecode_location::Location as V1Location, AttachInfo, BytecodeLocation,
@@ -25,7 +25,7 @@ use serde::{Deserialize, Serialize};
use tokio::sync::{mpsc::Sender, oneshot};
use crate::{
- errors::BpfdError,
+ errors::BpfmanError,
multiprog::{DispatcherId, DispatcherInfo},
oci_utils::image_manager::{BytecodeImage, Command as ImageManagerCommand},
};
@@ -41,7 +41,7 @@ pub(crate) enum Command {
Load(LoadArgs),
Unload(UnloadArgs),
List {
- responder: Responder, BpfdError>>,
+ responder: Responder, BpfmanError>>,
},
Get(GetArgs),
PullBytecode(PullBytecodeArgs),
@@ -50,7 +50,7 @@ pub(crate) enum Command {
#[derive(Debug)]
pub(crate) struct LoadArgs {
pub(crate) program: Program,
- pub(crate) responder: Responder>,
+ pub(crate) responder: Responder>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
@@ -66,19 +66,19 @@ pub(crate) enum Program {
#[derive(Debug)]
pub(crate) struct UnloadArgs {
pub(crate) id: u32,
- pub(crate) responder: Responder>,
+ pub(crate) responder: Responder>,
}
#[derive(Debug)]
pub(crate) struct GetArgs {
pub(crate) id: u32,
- pub(crate) responder: Responder>,
+ pub(crate) responder: Responder>,
}
#[derive(Debug)]
pub(crate) struct PullBytecodeArgs {
pub(crate) image: BytecodeImage,
- pub(crate) responder: Responder>,
+ pub(crate) responder: Responder>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
@@ -99,7 +99,7 @@ impl Location {
async fn get_program_bytes(
&self,
image_manager: Sender,
- ) -> Result<(Vec, String), BpfdError> {
+ ) -> Result<(Vec, String), BpfmanError> {
match self {
Location::File(l) => Ok((crate::utils::read(l).await?, "".to_owned())),
Location::Image(l) => {
@@ -113,21 +113,21 @@ impl Location {
resp: tx,
})
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (path, bpf_function_name) = rx
.await
- .map_err(BpfdError::RpcError)?
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(BpfmanError::RpcError)?
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (tx, rx) = oneshot::channel();
image_manager
.send(ImageManagerCommand::GetBytecode { path, resp: tx })
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let bytecode = rx
.await
- .map_err(BpfdError::RpcError)?
- .map_err(|e| BpfdError::Error(format!("Bytecode loading error: {e}")))?;
+ .map_err(BpfmanError::RpcError)?
+ .map_err(|e| BpfmanError::Error(format!("Bytecode loading error: {e}")))?;
Ok((bytecode, bpf_function_name))
}
@@ -184,7 +184,7 @@ pub(crate) struct KernelProgramInfo {
}
impl TryFrom for KernelProgramInfo {
- type Error = BpfdError;
+ type Error = BpfmanError;
fn try_from(prog: AyaProgInfo) -> Result {
Ok(KernelProgramInfo {
@@ -199,19 +199,19 @@ impl TryFrom for KernelProgramInfo {
.to_string(),
tag: format!("{:x}", prog.tag()),
gpl_compatible: prog.gpl_compatible(),
- map_ids: prog.map_ids().map_err(BpfdError::BpfProgramError)?,
+ map_ids: prog.map_ids().map_err(BpfmanError::BpfProgramError)?,
btf_id: prog.btf_id().map_or(0, |n| n.into()),
bytes_xlated: prog.size_translated(),
jited: prog.size_jitted() != 0,
bytes_jited: prog.size_jitted(),
- bytes_memlock: prog.memory_locked().map_err(BpfdError::BpfProgramError)?,
+ bytes_memlock: prog.memory_locked().map_err(BpfmanError::BpfProgramError)?,
verified_insns: prog.verified_instruction_count(),
})
}
}
impl TryFrom<&Program> for V1ProgramInfo {
- type Error = BpfdError;
+ type Error = BpfmanError;
fn try_from(program: &Program) -> Result {
let data = program.data()?;
@@ -220,7 +220,7 @@ impl TryFrom<&Program> for V1ProgramInfo {
Some(l) => match l {
crate::command::Location::Image(m) => {
Some(BytecodeLocation {
- location: Some(V1Location::Image(bpfd_api::v1::BytecodeImage {
+ location: Some(V1Location::Image(bpfman_api::v1::BytecodeImage {
url: m.get_url().to_string(),
image_pull_policy: m.get_pull_policy().to_owned() as i32,
// Never dump Plaintext Credentials
@@ -272,7 +272,7 @@ impl TryFrom<&Program> for V1ProgramInfo {
},
};
- // Populate the Program Info with bpfd data
+ // Populate the Program Info with bpfman data
Ok(V1ProgramInfo {
name: data.name().to_owned(),
bytecode,
@@ -291,11 +291,11 @@ impl TryFrom<&Program> for V1ProgramInfo {
}
impl TryFrom<&Program> for V1KernelProgramInfo {
- type Error = BpfdError;
+ type Error = BpfmanError;
fn try_from(program: &Program) -> Result {
// Get the Kernel Info.
- let kernel_info = program.kernel_info().ok_or(BpfdError::Error(
+ let kernel_info = program.kernel_info().ok_or(BpfmanError::Error(
"program kernel info not available".to_string(),
))?;
@@ -319,7 +319,7 @@ impl TryFrom<&Program> for V1KernelProgramInfo {
}
/// ProgramInfo stores information about bpf programs that are loaded and managed
-/// by bpfd.
+/// by bpfman.
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub(crate) struct ProgramData {
// known at load time, set by user
@@ -421,7 +421,7 @@ impl ProgramData {
pub(crate) async fn set_program_bytes(
&mut self,
image_manager: Sender,
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
match self.location.get_program_bytes(image_manager).await {
Err(e) => Err(e),
Ok((v, s)) => {
@@ -439,7 +439,7 @@ impl ProgramData {
if provided_name.is_empty() {
self.name = s;
} else if s != provided_name {
- return Err(BpfdError::BytecodeMetaDataMismatch {
+ return Err(BpfmanError::BytecodeMetaDataMismatch {
image_prog_name: s,
provided_prog_name: provided_name,
});
@@ -626,27 +626,27 @@ impl Program {
}
}
- pub(crate) fn data_mut(&mut self) -> Result<&mut ProgramData, BpfdError> {
+ pub(crate) fn data_mut(&mut self) -> Result<&mut ProgramData, BpfmanError> {
match self {
Program::Xdp(p) => Ok(&mut p.data),
Program::Tracepoint(p) => Ok(&mut p.data),
Program::Tc(p) => Ok(&mut p.data),
Program::Kprobe(p) => Ok(&mut p.data),
Program::Uprobe(p) => Ok(&mut p.data),
- Program::Unsupported(_) => Err(BpfdError::Error(
+ Program::Unsupported(_) => Err(BpfmanError::Error(
"Unsupported program type has no ProgramData".to_string(),
)),
}
}
- pub(crate) fn data(&self) -> Result<&ProgramData, BpfdError> {
+ pub(crate) fn data(&self) -> Result<&ProgramData, BpfmanError> {
match self {
Program::Xdp(p) => Ok(&p.data),
Program::Tracepoint(p) => Ok(&p.data),
Program::Tc(p) => Ok(&p.data),
Program::Kprobe(p) => Ok(&p.data),
Program::Uprobe(p) => Ok(&p.data),
- Program::Unsupported(_) => Err(BpfdError::Error(
+ Program::Unsupported(_) => Err(BpfmanError::Error(
"Unsupported program type has no ProgramData".to_string(),
)),
}
diff --git a/bpfd/src/dispatcher_config.rs b/bpfman/src/dispatcher_config.rs
similarity index 98%
rename from bpfd/src/dispatcher_config.rs
rename to bpfman/src/dispatcher_config.rs
index 6c6751824..4e75889f4 100644
--- a/bpfd/src/dispatcher_config.rs
+++ b/bpfman/src/dispatcher_config.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
// XDP Defines
// pub (crate) const XDP_METADATA_SECTION: &str = "xdp_metadata";
diff --git a/bpfd/src/errors.rs b/bpfman/src/errors.rs
similarity index 93%
rename from bpfd/src/errors.rs
rename to bpfman/src/errors.rs
index ac07dbaa8..be5bbe854 100644
--- a/bpfd/src/errors.rs
+++ b/bpfman/src/errors.rs
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use thiserror::Error;
use tokio::sync::oneshot;
#[derive(Debug, Error)]
-pub enum BpfdError {
+pub enum BpfmanError {
#[error("An error occurred. {0}")]
Error(String),
#[error(transparent)]
@@ -38,7 +38,7 @@ pub enum BpfdError {
provided_prog_name: String,
},
#[error("Unable to delete program {0}")]
- BpfdProgramDeleteError(#[source] anyhow::Error),
+ BpfmanProgramDeleteError(#[source] anyhow::Error),
#[error(transparent)]
RpcError(#[from] oneshot::error::RecvError),
#[error("Failed to pin map {0}")]
diff --git a/bpfd/src/main.rs b/bpfman/src/main.rs
similarity index 89%
rename from bpfd/src/main.rs
rename to bpfman/src/main.rs
index 746c78780..924ed5297 100644
--- a/bpfd/src/main.rs
+++ b/bpfman/src/main.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{
env,
@@ -21,7 +21,7 @@ mod storage;
mod utils;
use anyhow::{bail, Context};
-use bpfd_api::{config::Config, util::directories::*};
+use bpfman_api::{config::Config, util::directories::*};
use clap::Parser;
use log::{debug, error, info, warn};
use nix::{
@@ -33,7 +33,7 @@ use systemd_journal_logger::{connected_to_journal, JournalLog};
use utils::{create_bpffs, set_dir_permissions};
use crate::{serve::serve, utils::read_to_string};
-const BPFD_ENV_LOG_LEVEL: &str = "RUST_LOG";
+const BPFMAN_ENV_LOG_LEVEL: &str = "RUST_LOG";
#[derive(Parser)]
#[clap(author, version, about, long_about = None)]
@@ -53,7 +53,7 @@ fn main() -> anyhow::Result<()> {
.block_on(async {
let args = Args::parse();
if connected_to_journal() {
- // If bpfd is running as a service, log to journald.
+ // If bpfman is running as a service, log to journald.
JournalLog::default()
.with_extra_fields(vec![("VERSION", env!("CARGO_PKG_VERSION"))])
.install()
@@ -71,7 +71,7 @@ fn main() -> anyhow::Result<()> {
setrlimit(Resource::RLIMIT_MEMLOCK, RLIM_INFINITY, RLIM_INFINITY).unwrap();
- // Create directories associated with bpfd
+ // Create directories associated with bpfman
create_dir_all(RTDIR).context("unable to create runtime directory")?;
create_dir_all(RTDIR_FS).context("unable to create mountpoint")?;
create_dir_all(RTDIR_TC_INGRESS_DISPATCHER)
@@ -91,8 +91,8 @@ fn main() -> anyhow::Result<()> {
create_dir_all(RTDIR_FS_TC_EGRESS)
.context("unable to create tc egress dispatcher dir")?;
create_dir_all(RTDIR_FS_MAPS).context("unable to create maps directory")?;
- create_dir_all(RTDIR_BPFD_CSI).context("unable to create CSI directory")?;
- create_dir_all(RTDIR_BPFD_CSI_FS).context("unable to create socket directory")?;
+ create_dir_all(RTDIR_BPFMAN_CSI).context("unable to create CSI directory")?;
+ create_dir_all(RTDIR_BPFMAN_CSI_FS).context("unable to create socket directory")?;
create_dir_all(CFGDIR_STATIC_PROGRAMS)
.context("unable to create static programs directory")?;
@@ -104,7 +104,7 @@ fn main() -> anyhow::Result<()> {
set_dir_permissions(RTDIR, RTDIR_MODE).await;
set_dir_permissions(STDIR, STDIR_MODE).await;
- let config = if let Ok(c) = read_to_string(CFGPATH_BPFD_CONFIG).await {
+ let config = if let Ok(c) = read_to_string(CFGPATH_BPFMAN_CONFIG).await {
c.parse().unwrap_or_else(|_| {
warn!("Unable to parse config file, using defaults");
Config::default()
@@ -123,8 +123,8 @@ fn manage_journal_log_level() {
// env_logger uses the environment variable RUST_LOG to set the log
// level. Parse RUST_LOG to set the log level for journald.
log::set_max_level(log::LevelFilter::Error);
- if env::var(BPFD_ENV_LOG_LEVEL).is_ok() {
- let rust_log = log::LevelFilter::from_str(&env::var(BPFD_ENV_LOG_LEVEL).unwrap());
+ if env::var(BPFMAN_ENV_LOG_LEVEL).is_ok() {
+ let rust_log = log::LevelFilter::from_str(&env::var(BPFMAN_ENV_LOG_LEVEL).unwrap());
match rust_log {
Ok(value) => log::set_max_level(value),
Err(e) => log::error!("Invalid Log Level: {}", e),
@@ -157,7 +157,7 @@ fn drop_linux_capabilities() {
}
};
- if res.name == "bpfd" {
+ if res.name == "bpfman" {
debug!(
"Running as user {}, dropping all capabilities for spawned threads",
res.name
@@ -185,7 +185,7 @@ fn is_bpffs_mounted() -> Result {
if parts.len() != 6 {
bail!("expected 6 parts in proc mount")
}
- if parts[0] == "none" && parts[1].contains("bpfd") && parts[2] == "bpf" {
+ if parts[0] == "none" && parts[1].contains("bpfman") && parts[2] == "bpf" {
return Ok(true);
}
}
diff --git a/bpfd/src/multiprog/mod.rs b/bpfman/src/multiprog/mod.rs
similarity index 83%
rename from bpfd/src/multiprog/mod.rs
rename to bpfman/src/multiprog/mod.rs
index f9199e3d7..fc1dad522 100644
--- a/bpfd/src/multiprog/mod.rs
+++ b/bpfman/src/multiprog/mod.rs
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
mod tc;
mod xdp;
-use bpfd_api::{
+use bpfman_api::{
config::{InterfaceConfig, XdpMode},
ProgramType,
};
@@ -15,7 +15,7 @@ pub use xdp::XdpDispatcher;
use crate::{
command::{Direction, Program},
- errors::BpfdError,
+ errors::BpfmanError,
oci_utils::image_manager::Command as ImageManagerCommand,
};
@@ -31,17 +31,17 @@ impl Dispatcher {
revision: u32,
old_dispatcher: Option,
image_manager: Sender,
- ) -> Result {
+ ) -> Result {
debug!("Dispatcher::new()");
let p = programs
.first()
- .ok_or_else(|| BpfdError::Error("No programs to load".to_string()))?;
+ .ok_or_else(|| BpfmanError::Error("No programs to load".to_string()))?;
let if_index = p
.if_index()
- .ok_or_else(|| BpfdError::Error("missing ifindex".to_string()))?;
+ .ok_or_else(|| BpfmanError::Error("missing ifindex".to_string()))?;
let if_name = p
.if_name()
- .ok_or_else(|| BpfdError::Error("missing ifname".to_string()))?;
+ .ok_or_else(|| BpfmanError::Error("missing ifname".to_string()))?;
let direction = p.direction();
let xdp_mode = if let Some(c) = config {
c.xdp_mode
@@ -63,8 +63,8 @@ impl Dispatcher {
Dispatcher::Xdp(x)
}
ProgramType::Tc => {
- let direction =
- direction.ok_or_else(|| BpfdError::Error("direction required".to_string()))?;
+ let direction = direction
+ .ok_or_else(|| BpfmanError::Error("direction required".to_string()))?;
let t = TcDispatcher::new(
direction,
&if_index,
@@ -77,12 +77,12 @@ impl Dispatcher {
.await?;
Dispatcher::Tc(t)
}
- _ => return Err(BpfdError::DispatcherNotRequired),
+ _ => return Err(BpfmanError::DispatcherNotRequired),
};
Ok(d)
}
- pub(crate) fn delete(&mut self, full: bool) -> Result<(), BpfdError> {
+ pub(crate) fn delete(&mut self, full: bool) -> Result<(), BpfmanError> {
debug!("Dispatcher::delete()");
match self {
Dispatcher::Xdp(d) => d.delete(full),
diff --git a/bpfd/src/multiprog/tc.rs b/bpfman/src/multiprog/tc.rs
similarity index 90%
rename from bpfd/src/multiprog/tc.rs
rename to bpfman/src/multiprog/tc.rs
index 37b06f7d3..b4a61f11f 100644
--- a/bpfd/src/multiprog/tc.rs
+++ b/bpfman/src/multiprog/tc.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{fs, io::BufReader, mem};
@@ -11,7 +11,7 @@ use aya::{
},
Bpf, BpfLoader,
};
-use bpfd_api::{util::directories::*, ImagePullPolicy};
+use bpfman_api::{util::directories::*, ImagePullPolicy};
use futures::stream::TryStreamExt;
use log::debug;
use netlink_packet_route::tc::Nla;
@@ -27,7 +27,7 @@ use crate::{
Program, TcProgram,
},
dispatcher_config::TcDispatcherConfig,
- errors::BpfdError,
+ errors::BpfmanError,
oci_utils::image_manager::{BytecodeImage, Command as ImageManagerCommand},
utils::should_map_be_pinned,
};
@@ -58,7 +58,7 @@ impl TcDispatcher {
revision: u32,
old_dispatcher: Option,
image_manager: Sender,
- ) -> Result {
+ ) -> Result {
debug!("TcDispatcher::new() for if_index {if_index}, revision {revision}");
let mut extensions: Vec<&mut TcProgram> = programs
.iter_mut()
@@ -80,7 +80,7 @@ impl TcDispatcher {
debug!("tc dispatcher config: {:?}", config);
let image = BytecodeImage::new(
- "quay.io/bpfd/tc-dispatcher:v1".to_string(),
+ "quay.io/bpfman/tc-dispatcher:v1".to_string(),
ImagePullPolicy::IfNotPresent as i32,
None,
None,
@@ -95,22 +95,22 @@ impl TcDispatcher {
resp: tx,
})
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (path, bpf_function_name) = rx
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (tx, rx) = oneshot::channel();
image_manager
.send(ImageManagerCommand::GetBytecode { path, resp: tx })
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let program_bytes = rx
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?
- .map_err(BpfdError::BpfBytecodeError)?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?
+ .map_err(BpfmanError::BpfBytecodeError)?;
let mut loader = BpfLoader::new()
.set_global("CONFIG", &config, true)
@@ -161,7 +161,7 @@ impl TcDispatcher {
Ok(false)
}
- async fn attach(&mut self, old_dispatcher: Option) -> Result<(), BpfdError> {
+ async fn attach(&mut self, old_dispatcher: Option) -> Result<(), BpfmanError> {
debug!(
"TcDispatcher::attach() for if_index {}, revision {}",
self.if_index, self.revision
@@ -182,7 +182,7 @@ impl TcDispatcher {
// if ingress qdisc exists, return error.
} else if TcDispatcher::has_qdisc("ingress".to_string(), self.if_index as i32).await? {
debug!("ingress qdisc found for if_index {}", self.if_index);
- return Err(BpfdError::InvalidAttach(format!(
+ return Err(BpfmanError::InvalidAttach(format!(
"Ingress qdisc found for if_index {}",
self.if_index
)));
@@ -199,7 +199,7 @@ impl TcDispatcher {
let new_dispatcher: &mut SchedClassifier = self
.loader
.as_mut()
- .ok_or(BpfdError::NotLoaded)?
+ .ok_or(BpfmanError::NotLoaded)?
.program_mut(self.program_name.clone().unwrap().as_str())
.unwrap()
.try_into()?;
@@ -240,7 +240,7 @@ impl TcDispatcher {
async fn attach_extensions(
&mut self,
extensions: &mut [&mut TcProgram],
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
debug!(
"TcDispatcher::attach_extensions() for if_index {}, revision {}",
self.if_index, self.revision
@@ -249,7 +249,7 @@ impl TcDispatcher {
let dispatcher: &mut SchedClassifier = self
.loader
.as_mut()
- .ok_or(BpfdError::NotLoaded)?
+ .ok_or(BpfmanError::NotLoaded)?
.program_mut(self.program_name.clone().unwrap().as_str())
.unwrap()
.try_into()?;
@@ -274,7 +274,7 @@ impl TcDispatcher {
Direction::Egress => RTDIR_FS_TC_EGRESS,
};
let path = format!("{base}/dispatcher_{if_index}_{}/link_{id}", self.revision);
- new_link.pin(path).map_err(BpfdError::UnableToPinLink)?;
+ new_link.pin(path).map_err(BpfmanError::UnableToPinLink)?;
} else {
let name = v.data.name();
let global_data = v.data.global_data();
@@ -296,11 +296,11 @@ impl TcDispatcher {
let mut loader = bpf
.load(v.data.program_bytes())
- .map_err(BpfdError::BpfLoadError)?;
+ .map_err(BpfmanError::BpfLoadError)?;
let ext: &mut Extension = loader
.program_mut(name)
- .ok_or_else(|| BpfdError::BpfFunctionNameNotValid(name.to_string()))?
+ .ok_or_else(|| BpfmanError::BpfFunctionNameNotValid(name.to_string()))?
.try_into()?;
let target_fn = format!("prog{i}");
@@ -315,7 +315,7 @@ impl TcDispatcher {
.id;
ext.pin(format!("{RTDIR_FS}/prog_{id}"))
- .map_err(BpfdError::UnableToPinProgram)?;
+ .map_err(BpfmanError::UnableToPinProgram)?;
let new_link_id = ext.attach()?;
let new_link = ext.take_link(new_link_id)?;
let fd_link: FdLink = new_link.into();
@@ -328,7 +328,7 @@ impl TcDispatcher {
"{base}/dispatcher_{if_index}_{}/link_{id}",
self.revision,
))
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
// If this program is the map(s) owner pin all maps (except for .rodata and .bss) by name.
if v.data.map_pin_path().is_none() {
@@ -345,7 +345,7 @@ impl TcDispatcher {
map_pin_path.join(name).display()
);
map.pin(map_pin_path.join(name))
- .map_err(BpfdError::UnableToPinMap)?;
+ .map_err(BpfmanError::UnableToPinMap)?;
}
}
}
@@ -353,7 +353,7 @@ impl TcDispatcher {
Ok(())
}
- fn save(&self) -> Result<(), BpfdError> {
+ fn save(&self) -> Result<(), BpfmanError> {
debug!(
"TcDispatcher::save() for if_index {}, revision {}",
self.if_index, self.revision
@@ -364,7 +364,7 @@ impl TcDispatcher {
};
let path = format!("{base}/{}_{}", self.if_index, self.revision);
serde_json::to_writer(&fs::File::create(path).unwrap(), &self)
- .map_err(|e| BpfdError::Error(format!("can't save state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("can't save state: {e}")))?;
Ok(())
}
@@ -386,7 +386,7 @@ impl TcDispatcher {
Ok(prog)
}
- pub(crate) fn delete(&mut self, full: bool) -> Result<(), BpfdError> {
+ pub(crate) fn delete(&mut self, full: bool) -> Result<(), BpfmanError> {
debug!(
"TcDispatcher::delete() for if_index {}, revision {}",
self.if_index, self.revision
@@ -397,7 +397,7 @@ impl TcDispatcher {
};
let path = format!("{base}/{}_{}", self.if_index, self.revision);
fs::remove_file(path)
- .map_err(|e| BpfdError::Error(format!("unable to cleanup state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to cleanup state: {e}")))?;
let base = match self.direction {
Direction::Ingress => RTDIR_FS_TC_INGRESS,
@@ -405,7 +405,7 @@ impl TcDispatcher {
};
let path = format!("{base}/dispatcher_{}_{}", self.if_index, self.revision);
fs::remove_dir_all(path)
- .map_err(|e| BpfdError::Error(format!("unable to cleanup state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to cleanup state: {e}")))?;
if full {
// Also detach the old dispatcher.
diff --git a/bpfd/src/multiprog/xdp.rs b/bpfman/src/multiprog/xdp.rs
similarity index 85%
rename from bpfd/src/multiprog/xdp.rs
rename to bpfman/src/multiprog/xdp.rs
index 97d994d5e..ffcb7f486 100644
--- a/bpfd/src/multiprog/xdp.rs
+++ b/bpfman/src/multiprog/xdp.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{fs, io::BufReader, path::PathBuf};
@@ -10,7 +10,7 @@ use aya::{
},
Bpf, BpfLoader,
};
-use bpfd_api::{config::XdpMode, util::directories::*, ImagePullPolicy};
+use bpfman_api::{config::XdpMode, util::directories::*, ImagePullPolicy};
use log::debug;
use serde::{Deserialize, Serialize};
use tokio::sync::{mpsc::Sender, oneshot};
@@ -20,7 +20,7 @@ use crate::{
bpf::{calc_map_pin_path, create_map_pin_path},
command::{Program, XdpProgram},
dispatcher_config::XdpDispatcherConfig,
- errors::BpfdError,
+ errors::BpfmanError,
oci_utils::image_manager::{BytecodeImage, Command as ImageManagerCommand},
utils::should_map_be_pinned,
};
@@ -48,7 +48,7 @@ impl XdpDispatcher {
revision: u32,
old_dispatcher: Option,
image_manager: Sender,
- ) -> Result {
+ ) -> Result {
debug!("XdpDispatcher::new() for if_index {if_index}, revision {revision}");
let mut extensions: Vec<&mut XdpProgram> = programs
.iter_mut()
@@ -74,7 +74,7 @@ impl XdpDispatcher {
debug!("xdp dispatcher config: {:?}", config);
let image = BytecodeImage::new(
- "quay.io/bpfd/xdp-dispatcher:v2".to_string(),
+ "quay.io/bpfman/xdp-dispatcher:v2".to_string(),
ImagePullPolicy::IfNotPresent as i32,
None,
None,
@@ -89,22 +89,22 @@ impl XdpDispatcher {
resp: tx,
})
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (path, bpf_function_name) = rx
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let (tx, rx) = oneshot::channel();
image_manager
.send(ImageManagerCommand::GetBytecode { path, resp: tx })
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?;
let program_bytes = rx
.await
- .map_err(|e| BpfdError::BpfBytecodeError(e.into()))?
- .map_err(BpfdError::BpfBytecodeError)?;
+ .map_err(|e| BpfmanError::BpfBytecodeError(e.into()))?
+ .map_err(BpfmanError::BpfBytecodeError)?;
let mut loader = BpfLoader::new()
.set_global("conf", &config, true)
.load(&program_bytes)?;
@@ -134,7 +134,7 @@ impl XdpDispatcher {
Ok(dispatcher)
}
- pub(crate) fn attach(&mut self) -> Result<(), BpfdError> {
+ pub(crate) fn attach(&mut self) -> Result<(), BpfmanError> {
debug!(
"XdpDispatcher::attach() for if_index {}, revision {}",
self.if_index, self.revision
@@ -144,7 +144,7 @@ impl XdpDispatcher {
let dispatcher: &mut Xdp = self
.loader
.as_mut()
- .ok_or(BpfdError::NotLoaded)?
+ .ok_or(BpfmanError::NotLoaded)?
.program_mut(self.program_name.clone().unwrap().as_str())
.unwrap()
.try_into()?;
@@ -163,7 +163,7 @@ impl XdpDispatcher {
let _ = TryInto::::try_into(owned_link)
.unwrap() // TODO: Don't unwrap, although due to minimum kernel version this shouldn't ever panic
.pin(path)
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
}
Ok(())
}
@@ -171,7 +171,7 @@ impl XdpDispatcher {
async fn attach_extensions(
&mut self,
extensions: &mut [&mut XdpProgram],
- ) -> Result<(), BpfdError> {
+ ) -> Result<(), BpfmanError> {
debug!(
"XdpDispatcher::attach_extensions() for if_index {}, revision {}",
self.if_index, self.revision
@@ -180,7 +180,7 @@ impl XdpDispatcher {
let dispatcher: &mut Xdp = self
.loader
.as_mut()
- .ok_or(BpfdError::NotLoaded)?
+ .ok_or(BpfmanError::NotLoaded)?
.program_mut(self.program_name.clone().unwrap().as_str())
.unwrap()
.try_into()?;
@@ -202,7 +202,7 @@ impl XdpDispatcher {
"{RTDIR_FS_XDP}/dispatcher_{if_index}_{}/link_{id}",
self.revision
);
- new_link.pin(path).map_err(BpfdError::UnableToPinLink)?;
+ new_link.pin(path).map_err(BpfmanError::UnableToPinLink)?;
} else {
let name = v.data.name();
let global_data = v.data.global_data();
@@ -224,11 +224,11 @@ impl XdpDispatcher {
let mut loader = bpf
.load(v.data.program_bytes())
- .map_err(BpfdError::BpfLoadError)?;
+ .map_err(BpfmanError::BpfLoadError)?;
let ext: &mut Extension = loader
.program_mut(name)
- .ok_or_else(|| BpfdError::BpfFunctionNameNotValid(name.to_string()))?
+ .ok_or_else(|| BpfmanError::BpfFunctionNameNotValid(name.to_string()))?
.try_into()?;
let target_fn = format!("prog{i}");
@@ -243,7 +243,7 @@ impl XdpDispatcher {
.id;
ext.pin(format!("{RTDIR_FS}/prog_{id}"))
- .map_err(BpfdError::UnableToPinProgram)?;
+ .map_err(BpfmanError::UnableToPinProgram)?;
let new_link_id = ext.attach()?;
let new_link = ext.take_link(new_link_id)?;
let fd_link: FdLink = new_link.into();
@@ -252,7 +252,7 @@ impl XdpDispatcher {
"{RTDIR_FS_XDP}/dispatcher_{if_index}_{}/link_{id}",
self.revision,
))
- .map_err(BpfdError::UnableToPinLink)?;
+ .map_err(BpfmanError::UnableToPinLink)?;
// If this program is the map(s) owner pin all maps (except for .rodata and .bss) by name.
if v.data.map_pin_path().is_none() {
@@ -269,7 +269,7 @@ impl XdpDispatcher {
map_pin_path.join(name).display()
);
map.pin(map_pin_path.join(name))
- .map_err(BpfdError::UnableToPinMap)?;
+ .map_err(BpfmanError::UnableToPinMap)?;
}
}
}
@@ -277,14 +277,14 @@ impl XdpDispatcher {
Ok(())
}
- fn save(&self) -> Result<(), BpfdError> {
+ fn save(&self) -> Result<(), BpfmanError> {
debug!(
"XdpDispatcher::save() for if_index {}, revision {}",
self.if_index, self.revision
);
let path = format!("{RTDIR_XDP_DISPATCHER}/{}_{}", self.if_index, self.revision);
serde_json::to_writer(&fs::File::create(path).unwrap(), &self)
- .map_err(|e| BpfdError::Error(format!("can't save state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("can't save state: {e}")))?;
Ok(())
}
@@ -298,25 +298,25 @@ impl XdpDispatcher {
Ok(prog)
}
- pub(crate) fn delete(&self, full: bool) -> Result<(), BpfdError> {
+ pub(crate) fn delete(&self, full: bool) -> Result<(), BpfmanError> {
debug!(
"XdpDispatcher::delete() for if_index {}, revision {}",
self.if_index, self.revision
);
let path = format!("{RTDIR_XDP_DISPATCHER}/{}_{}", self.if_index, self.revision);
fs::remove_file(path)
- .map_err(|e| BpfdError::Error(format!("unable to cleanup state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to cleanup state: {e}")))?;
let path = format!(
"{RTDIR_FS_XDP}/dispatcher_{}_{}",
self.if_index, self.revision
);
fs::remove_dir_all(path)
- .map_err(|e| BpfdError::Error(format!("unable to cleanup state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to cleanup state: {e}")))?;
if full {
let path_link = format!("{RTDIR_FS_XDP}/dispatcher_{}_link", self.if_index);
fs::remove_file(path_link)
- .map_err(|e| BpfdError::Error(format!("unable to cleanup state: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("unable to cleanup state: {e}")))?;
}
Ok(())
}
diff --git a/bpfd/src/oci_utils/cosign.rs b/bpfman/src/oci_utils/cosign.rs
similarity index 99%
rename from bpfd/src/oci_utils/cosign.rs
rename to bpfman/src/oci_utils/cosign.rs
index 16b70745a..2ec75df8d 100644
--- a/bpfd/src/oci_utils/cosign.rs
+++ b/bpfman/src/oci_utils/cosign.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::str::FromStr;
diff --git a/bpfd/src/oci_utils/image_manager.rs b/bpfman/src/oci_utils/image_manager.rs
similarity index 97%
rename from bpfd/src/oci_utils/image_manager.rs
rename to bpfman/src/oci_utils/image_manager.rs
index 9bc0b9635..2bffde7b6 100644
--- a/bpfd/src/oci_utils/image_manager.rs
+++ b/bpfman/src/oci_utils/image_manager.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{
fs,
@@ -9,7 +9,7 @@ use std::{
};
use anyhow::Context;
-use bpfd_api::ImagePullPolicy;
+use bpfman_api::ImagePullPolicy;
use flate2::read::GzDecoder;
use log::{debug, info, trace};
use oci_distribution::{
@@ -80,8 +80,8 @@ impl BytecodeImage {
}
}
-impl From for BytecodeImage {
- fn from(value: bpfd_api::v1::BytecodeImage) -> Self {
+impl From for BytecodeImage {
+ fn from(value: bpfman_api::v1::BytecodeImage) -> Self {
// This function is mapping an empty string to None for
// username and password.
let username = if value.username.is_some() {
@@ -523,7 +523,7 @@ mod tests {
let (path, _) = mgr
.get_image(
- "quay.io/bpfd-bytecode/xdp_pass:latest",
+ "quay.io/bpfman-bytecode/xdp_pass:latest",
ImagePullPolicy::Always,
None,
None,
@@ -551,7 +551,7 @@ mod tests {
let mut mgr = ImageManager::new(&tmpdir, true, rx).await.unwrap();
mgr.get_image(
- "quay.io/bpfd-bytecode/xdp_pass_private:latest",
+ "quay.io/bpfman-bytecode/xdp_pass_private:latest",
ImagePullPolicy::Always,
None,
None,
@@ -569,10 +569,10 @@ mod tests {
let (path, _) = mgr
.get_image(
- "quay.io/bpfd-bytecode/xdp_pass_private:latest",
+ "quay.io/bpfman-bytecode/xdp_pass_private:latest",
ImagePullPolicy::Always,
- Some("bpfd-bytecode+bpfdcreds".to_owned()),
- Some("JOGZ3FA6A9L2297JAT4FFN6CJU87LKTIY6X1ZGKWJ0W0XLKY0KPT5YKTBBEAGSF5".to_owned()),
+ Some("bpfman-bytecode+bpfmancreds".to_owned()),
+ Some("D49CKWI1MMOFGRCAT8SHW5A56FSVP30TGYX54BBWKY2J129XRI6Q5TVH2ZZGTJ1M".to_owned()),
)
.await
.expect("failed to pull bytecode");
@@ -597,7 +597,7 @@ mod tests {
let result = mgr
.get_image(
- "quay.io/bpfd-bytecode/xdp_pass:latest",
+ "quay.io/bpfman-bytecode/xdp_pass:latest",
ImagePullPolicy::Never,
None,
None,
diff --git a/bpfd/src/oci_utils/mod.rs b/bpfman/src/oci_utils/mod.rs
similarity index 96%
rename from bpfd/src/oci_utils/mod.rs
rename to bpfman/src/oci_utils/mod.rs
index 16911d1dc..986ffd42d 100644
--- a/bpfd/src/oci_utils/mod.rs
+++ b/bpfman/src/oci_utils/mod.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
pub(crate) mod cosign;
pub(crate) mod image_manager;
diff --git a/bpfd/src/rpc.rs b/bpfman/src/rpc.rs
similarity index 91%
rename from bpfd/src/rpc.rs
rename to bpfman/src/rpc.rs
index 7f929acef..d4c41e7e2 100644
--- a/bpfd/src/rpc.rs
+++ b/bpfman/src/rpc.rs
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
-use bpfd_api::{
+// Copyright Authors of bpfman
+use bpfman_api::{
v1::{
- attach_info::Info, bpfd_server::Bpfd, bytecode_location::Location,
+ attach_info::Info, bpfman_server::Bpfman, bytecode_location::Location,
list_response::ListResult, GetRequest, GetResponse, KprobeAttachInfo, ListRequest,
ListResponse, LoadRequest, LoadResponse, PullBytecodeRequest, PullBytecodeResponse,
TcAttachInfo, TracepointAttachInfo, UnloadRequest, UnloadResponse, UprobeAttachInfo,
@@ -20,18 +20,18 @@ use crate::command::{
};
#[derive(Debug)]
-pub struct BpfdLoader {
+pub struct BpfmanLoader {
tx: Sender,
}
-impl BpfdLoader {
- pub(crate) fn new(tx: mpsc::Sender) -> BpfdLoader {
- BpfdLoader { tx }
+impl BpfmanLoader {
+ pub(crate) fn new(tx: mpsc::Sender) -> BpfmanLoader {
+ BpfmanLoader { tx }
}
}
#[tonic::async_trait]
-impl Bpfd for BpfdLoader {
+impl Bpfman for BpfmanLoader {
async fn load(&self, request: Request) -> Result, Status> {
let request = request.into_inner();
@@ -138,7 +138,7 @@ impl Bpfd for BpfdLoader {
Ok(Response::new(reply_entry))
}
Err(e) => {
- warn!("BPFD load error: {:#?}", e);
+ warn!("BPFMAN load error: {:#?}", e);
Err(Status::aborted(format!("{e}")))
}
},
@@ -172,7 +172,7 @@ impl Bpfd for BpfdLoader {
Ok(res) => match res {
Ok(_) => Ok(Response::new(reply)),
Err(e) => {
- warn!("BPFD unload error: {}", e);
+ warn!("BPFMAN unload error: {}", e);
Err(Status::aborted(format!("{e}")))
}
},
@@ -213,7 +213,7 @@ impl Bpfd for BpfdLoader {
Ok(Response::new(reply_entry))
}
Err(e) => {
- warn!("BPFD get error: {}", e);
+ warn!("BPFMAN get error: {}", e);
Err(Status::aborted(format!("{e}")))
}
},
@@ -246,15 +246,15 @@ impl Bpfd for BpfdLoader {
}
match r.data() {
- // If filtering on `bpfd Only`, this program is of type Unsupported so skip
+ // If filtering on `bpfman Only`, this program is of type Unsupported so skip
Err(_) => {
- if request.get_ref().bpfd_programs_only()
+ if request.get_ref().bpfman_programs_only()
|| !request.get_ref().match_metadata.is_empty()
{
continue;
}
}
- // Bpfd Program
+ // Bpfman Program
Ok(data) => {
// Filter on the input metadata field if provided
let mut meta_match = true;
@@ -292,7 +292,7 @@ impl Bpfd for BpfdLoader {
Ok(Response::new(reply))
}
Err(e) => {
- warn!("BPFD list error: {}", e);
+ warn!("BPFMAN list error: {}", e);
Err(Status::aborted(format!("{e}")))
}
},
@@ -328,7 +328,7 @@ impl Bpfd for BpfdLoader {
Ok(Response::new(reply))
}
Err(e) => {
- warn!("BPFD pull_bytecode error: {:#?}", e);
+ warn!("BPFMAN pull_bytecode error: {:#?}", e);
Err(Status::aborted(format!("{e}")))
}
},
@@ -343,7 +343,7 @@ impl Bpfd for BpfdLoader {
#[cfg(test)]
mod test {
- use bpfd_api::v1::{
+ use bpfman_api::v1::{
bytecode_location::Location, AttachInfo, BytecodeLocation, LoadRequest, XdpAttachInfo,
};
use tokio::sync::mpsc::Receiver;
@@ -354,7 +354,7 @@ mod test {
#[tokio::test]
async fn test_load_with_valid_id() {
let (tx, rx) = mpsc::channel(32);
- let loader = BpfdLoader::new(tx.clone());
+ let loader = BpfmanLoader::new(tx.clone());
let attach_info = AttachInfo {
info: Some(Info::XdpAttachInfo(XdpAttachInfo {
@@ -366,8 +366,8 @@ mod test {
};
let request = LoadRequest {
bytecode: Some(BytecodeLocation {
- location: Some(Location::Image(bpfd_api::v1::BytecodeImage {
- url: "quay.io/bpfd-bytecode/xdp:latest".to_string(),
+ location: Some(Location::Image(bpfman_api::v1::BytecodeImage {
+ url: "quay.io/bpfman-bytecode/xdp:latest".to_string(),
..Default::default()
})),
..Default::default()
@@ -387,12 +387,12 @@ mod test {
#[tokio::test]
async fn test_pull_bytecode() {
let (tx, rx) = mpsc::channel(32);
- let loader = BpfdLoader::new(tx.clone());
+ let loader = BpfmanLoader::new(tx.clone());
let request = PullBytecodeRequest {
- image: Some(bpfd_api::v1::BytecodeImage {
- url: String::from("quay.io/bpfd-bytecode/xdp_pass:latest"),
- image_pull_policy: bpfd_api::ImagePullPolicy::Always.into(),
+ image: Some(bpfman_api::v1::BytecodeImage {
+ url: String::from("quay.io/bpfman-bytecode/xdp_pass:latest"),
+ image_pull_policy: bpfman_api::ImagePullPolicy::Always.into(),
username: Some(String::from("someone")),
password: Some(String::from("secret")),
}),
diff --git a/bpfd/src/serve.rs b/bpfman/src/serve.rs
similarity index 94%
rename from bpfd/src/serve.rs
rename to bpfman/src/serve.rs
index d3a4c596e..bd9558349 100644
--- a/bpfd/src/serve.rs
+++ b/bpfman/src/serve.rs
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{fs::remove_file, path::Path};
-use bpfd_api::{
+use bpfman_api::{
config::{self, Config},
util::directories::STDIR_BYTECODE_IMAGE_CONTENT_STORE,
- v1::bpfd_server::BpfdServer,
+ v1::bpfman_server::BpfmanServer,
};
use log::{debug, info};
use tokio::{
@@ -23,7 +23,7 @@ use tonic::transport::Server;
use crate::{
bpf::BpfManager,
oci_utils::ImageManager,
- rpc::BpfdLoader,
+ rpc::BpfmanLoader,
static_program::get_static_programs,
storage::StorageManager,
utils::{set_file_permissions, SOCK_MODE},
@@ -36,8 +36,8 @@ pub async fn serve(
) -> anyhow::Result<()> {
let (tx, rx) = mpsc::channel(32);
- let loader = BpfdLoader::new(tx.clone());
- let service = BpfdServer::new(loader);
+ let loader = BpfmanLoader::new(tx.clone());
+ let service = BpfmanServer::new(loader);
let mut listeners: Vec<_> = Vec::new();
@@ -131,7 +131,7 @@ async fn join_listeners(listeners: Vec>) {
async fn serve_unix(
path: String,
- service: BpfdServer,
+ service: BpfmanServer,
) -> anyhow::Result> {
// Listen on Unix socket
if Path::new(&path).exists() {
diff --git a/bpfd/src/static_program.rs b/bpfman/src/static_program.rs
similarity index 94%
rename from bpfd/src/static_program.rs
rename to bpfman/src/static_program.rs
index 54c287668..2fd306fe9 100644
--- a/bpfd/src/static_program.rs
+++ b/bpfman/src/static_program.rs
@@ -1,12 +1,14 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{
collections::HashMap,
path::{Path, PathBuf},
};
use anyhow::bail;
-use bpfd_api::{util::directories::CFGDIR_STATIC_PROGRAMS, ProgramType, TcProceedOn, XdpProceedOn};
+use bpfman_api::{
+ util::directories::CFGDIR_STATIC_PROGRAMS, ProgramType, TcProceedOn, XdpProceedOn,
+};
use log::{info, warn};
use serde::Deserialize;
use tokio::fs;
@@ -221,21 +223,21 @@ mod test {
[[programs]]
name = "pass"
- bytecode_image = { image_url = "quay.io/bpfd-bytecode/xdp_pass:latest", image_pull_policy="Always" }
+ bytecode_image = { image_url = "quay.io/bpfman-bytecode/xdp_pass:latest", image_pull_policy="Always" }
global_data = { }
program_type ="Xdp"
xdp_attach = { iface = "eth0", priority = 55, proceed_on = [], position=0 }
[[programs]]
name = "counter"
- bytecode_image = { image_url = "quay.io/bpfd-bytecode/xdp_pass:latest", image_pull_policy="Always" }
+ bytecode_image = { image_url = "quay.io/bpfman-bytecode/xdp_pass:latest", image_pull_policy="Always" }
global_data = { }
program_type ="Tc"
tc_attach = { iface = "eth0", priority = 55, proceed_on = [], position=0, direction="Ingress" }
[[programs]]
name = "tracepoint"
- bytecode_image = { image_url = "quay.io/bpfd-bytecode/tracepoint:latest", image_pull_policy="Always" }
+ bytecode_image = { image_url = "quay.io/bpfman-bytecode/tracepoint:latest", image_pull_policy="Always" }
global_data = { }
program_type ="Tracepoint"
tracepoint_attach = { tracepoint = "syscalls/sys_enter_openat" }
diff --git a/bpfd/src/storage.rs b/bpfman/src/storage.rs
similarity index 93%
rename from bpfd/src/storage.rs
rename to bpfman/src/storage.rs
index 0077bf922..3d9685637 100644
--- a/bpfd/src/storage.rs
+++ b/bpfman/src/storage.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{
collections::HashMap,
@@ -10,8 +10,8 @@ use std::{
use anyhow::{Context, Result};
use async_trait::async_trait;
use aya::maps::MapData;
-use bpfd_api::util::directories::{RTDIR_BPFD_CSI_FS, RTPATH_BPFD_CSI_SOCKET};
-use bpfd_csi::v1::{
+use bpfman_api::util::directories::{RTDIR_BPFMAN_CSI_FS, RTPATH_BPFMAN_CSI_SOCKET};
+use bpfman_csi::v1::{
identity_server::{Identity, IdentityServer},
node_server::{Node, NodeServer},
node_service_capability, GetPluginCapabilitiesRequest, GetPluginCapabilitiesResponse,
@@ -38,10 +38,10 @@ use crate::{
utils::{create_bpffs, set_dir_permissions, set_file_permissions, SOCK_MODE},
};
-const DRIVER_NAME: &str = "csi.bpfd.dev";
-const MAPS_KEY: &str = "csi.bpfd.dev/maps";
-const PROGRAM_KEY: &str = "csi.bpfd.dev/program";
-const OPERATOR_PROGRAM_KEY: &str = "bpfd.dev/ProgramName";
+const DRIVER_NAME: &str = "csi.bpfman.io";
+const MAPS_KEY: &str = "csi.bpfman.io/maps";
+const PROGRAM_KEY: &str = "csi.bpfman.io/program";
+const OPERATOR_PROGRAM_KEY: &str = "bpfman.io/ProgramName";
// Node Publish Volume Error code constant mirrored from: https://github.com/container-storage-interface/spec/blob/master/spec.md#nodepublishvolume-errors
const NPV_NOT_FOUND: i32 = 5;
const OWNER_READ_WRITE: u32 = 0o0750;
@@ -160,7 +160,7 @@ impl Node for CsiNode {
})
.ok_or(Status::new(
NPV_NOT_FOUND.into(),
- format!("Bpfd Program {program_name} not found"),
+ format!("Bpfman Program {program_name} not found"),
))?;
Ok(prog_data
.data().expect("program data is valid because we just checked it")
@@ -170,12 +170,12 @@ impl Node for CsiNode {
}
Err(_) => Err(Status::new(
NPV_NOT_FOUND.into(),
- format!("Bpfd Program {program_name} not found"),
+ format!("Bpfman Program {program_name} not found"),
)),
},
Err(_) => Err(Status::new(
NPV_NOT_FOUND.into(),
- format!("Unable to list bpfd programs {program_name} not found"),
+ format!("Unable to list bpfman programs {program_name} not found"),
)),
}?;
@@ -192,7 +192,7 @@ impl Node for CsiNode {
}
// Make a new bpf fs specifically for the pod.
- let path = &Path::new(RTDIR_BPFD_CSI_FS).join(volume_id);
+ let path = &Path::new(RTDIR_BPFMAN_CSI_FS).join(volume_id);
// Volume_id is unique to the instance of the pod, if it get's restarted it will
// be new.
@@ -284,7 +284,7 @@ impl Node for CsiNode {
})?;
// unmount the bpffs
- let path = &Path::new(RTDIR_BPFD_CSI_FS).join(volume_id);
+ let path = &Path::new(RTDIR_BPFMAN_CSI_FS).join(volume_id);
unmount(path.to_str().unwrap()).map_err(|e| {
Status::new(
5.into(),
@@ -346,7 +346,7 @@ impl StorageManager {
pub fn new(tx: mpsc::Sender) -> Self {
const VERSION: &str = env!("CARGO_PKG_VERSION");
let node_id = std::env::var("KUBE_NODE_NAME")
- .expect("cannot start bpfd csi driver if KUBE_NODE_NAME not set");
+ .expect("cannot start bpfman csi driver if KUBE_NODE_NAME not set");
let csi_identity = CsiIdentity {
name: DRIVER_NAME.to_string(),
@@ -362,7 +362,7 @@ impl StorageManager {
}
pub async fn run(self) {
- let path: &Path = Path::new(RTPATH_BPFD_CSI_SOCKET);
+ let path: &Path = Path::new(RTPATH_BPFMAN_CSI_SOCKET);
// Listen on Unix socket
if path.exists() {
// Attempt to remove the socket, since bind fails if it exists
@@ -370,9 +370,9 @@ impl StorageManager {
}
let uds = UnixListener::bind(path)
- .unwrap_or_else(|_| panic!("failed to bind {RTPATH_BPFD_CSI_SOCKET}"));
+ .unwrap_or_else(|_| panic!("failed to bind {RTPATH_BPFMAN_CSI_SOCKET}"));
let uds_stream = UnixListenerStream::new(uds);
- set_file_permissions(RTPATH_BPFD_CSI_SOCKET, SOCK_MODE).await;
+ set_file_permissions(RTPATH_BPFMAN_CSI_SOCKET, SOCK_MODE).await;
let node_service = NodeServer::new(self.csi_node);
let identity_service = IdentityServer::new(self.csi_identity);
diff --git a/bpfd/src/utils.rs b/bpfman/src/utils.rs
similarity index 80%
rename from bpfd/src/utils.rs
rename to bpfman/src/utils.rs
index 8c7272615..73cf3327b 100644
--- a/bpfd/src/utils.rs
+++ b/bpfman/src/utils.rs
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
-// Copyright Authors of bpfd
+// Copyright Authors of bpfman
use std::{os::unix::fs::PermissionsExt, path::Path, str};
@@ -11,43 +11,43 @@ use nix::{
};
use tokio::{fs, io::AsyncReadExt};
-use crate::errors::BpfdError;
+use crate::errors::BpfmanError;
-// The bpfd socket should always allow the same users and members of the same group
+// The bpfman socket should always allow the same users and members of the same group
// to Read/Write to it.
pub(crate) const SOCK_MODE: u32 = 0o0660;
// Like tokio::fs::read, but with O_NOCTTY set
-pub(crate) async fn read>(path: P) -> Result, BpfdError> {
+pub(crate) async fn read>(path: P) -> Result, BpfmanError> {
let mut data = vec![];
tokio::fs::OpenOptions::new()
.custom_flags(nix::libc::O_NOCTTY)
.read(true)
.open(path)
.await
- .map_err(|e| BpfdError::Error(format!("can't open file: {e}")))?
+ .map_err(|e| BpfmanError::Error(format!("can't open file: {e}")))?
.read_to_end(&mut data)
.await
- .map_err(|e| BpfdError::Error(format!("can't read file: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("can't read file: {e}")))?;
Ok(data)
}
// Like tokio::fs::read_to_string, but with O_NOCTTY set
-pub(crate) async fn read_to_string>(path: P) -> Result {
+pub(crate) async fn read_to_string>(path: P) -> Result {
let mut buffer = String::new();
tokio::fs::OpenOptions::new()
.custom_flags(nix::libc::O_NOCTTY)
.read(true)
.open(path)
.await
- .map_err(|e| BpfdError::Error(format!("can't open file: {e}")))?
+ .map_err(|e| BpfmanError::Error(format!("can't open file: {e}")))?
.read_to_string(&mut buffer)
.await
- .map_err(|e| BpfdError::Error(format!("can't read file: {e}")))?;
+ .map_err(|e| BpfmanError::Error(format!("can't read file: {e}")))?;
Ok(buffer)
}
-pub(crate) fn get_ifindex(iface: &str) -> Result {
+pub(crate) fn get_ifindex(iface: &str) -> Result {
match if_nametoindex(iface) {
Ok(index) => {
debug!("Map {} to {}", iface, index);
@@ -55,7 +55,7 @@ pub(crate) fn get_ifindex(iface: &str) -> Result