-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add kustomize configs for all intg test cases
Signed-off-by: Mohamed Mahmoud <[email protected]>
- Loading branch information
1 parent
1b38498
commit da52dac
Showing
35 changed files
with
619 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: bpfman.io/v1alpha1 | ||
kind: KprobeProgram | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: kprobeprogram | ||
name: go-kprobe-counter-example | ||
spec: | ||
bpffunctionname: kprobe_counter | ||
# Select all nodes | ||
nodeselector: {} | ||
func_name: try_to_wake_up | ||
offset: 0 | ||
retprobe: false | ||
bytecode: | ||
image: | ||
url: quay.io/bpfman-bytecode/go-kprobe-counter:latest | ||
imagepullpolicy: IfNotPresent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: go-kprobe-counter | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: bpfman-app-go-kprobe-counter | ||
namespace: go-kprobe-counter | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: go-kprobe-counter-ds | ||
namespace: go-kprobe-counter | ||
labels: | ||
k8s-app: go-kprobe-counter | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: go-kprobe-counter | ||
template: | ||
metadata: | ||
labels: | ||
name: go-kprobe-counter | ||
spec: | ||
nodeSelector: {} | ||
dnsPolicy: ClusterFirstWithHostNet | ||
serviceAccountName: bpfman-app-go-kprobe-counter | ||
securityContext: | ||
runAsNonRoot: true | ||
fsGroup: 65534 | ||
tolerations: | ||
# these tolerations are to have the daemonset runnable on control plane nodes | ||
# remove them if your control plane nodes should not run pods | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: Exists | ||
effect: NoSchedule | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
containers: | ||
- name: go-kprobe-counter | ||
image: quay.io/bpfman-userspace/go-kprobe-counter:latest | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: [ALL] | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
env: | ||
- name: NODENAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
volumeMounts: | ||
- name: go-kprobe-counter-maps | ||
mountPath: /run/kprobe/maps | ||
readOnly: true | ||
volumes: | ||
- name: go-kprobe-counter-maps | ||
csi: | ||
driver: csi.bpfman.io | ||
volumeAttributes: | ||
csi.bpfman.io/program: go-kprobe-counter-example | ||
csi.bpfman.io/maps: kprobe_stats_map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: [bytecode.yaml, deployment.yaml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
# Patch the deployment.yaml to change container image in Daemonset | ||
# to new tag on the image. | ||
images: | ||
- name: quay.io/bpfman-userspace/go-kprobe-counter | ||
newName: quay.io/bpfman-userspace/go-kprobe-counter | ||
newTag: latest | ||
# Patch the bytecode.yaml to change tag on the "url" field (which is an | ||
# image) to new value. Since this is being done with an environment | ||
# variable and using sed to replace, moved to patch.yaml.env which is | ||
# converted to patch.yaml using the sed command in Makefile. | ||
patches: | ||
- path: patch.yaml | ||
target: | ||
kind: kprobeProgram | ||
name: go-kprobe-counter-example | ||
resources: [../../../test/integration/kprobe/base ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Patch the bytecode.yaml to change image and tag on the "url" field | ||
# (which is an image) to new value. | ||
- op: replace | ||
path: /spec/bytecode/image/url | ||
value: quay.io/bpfman-bytecode/go-kprobe-counter:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Patch the bytecode.yaml to change image and tag on the "url" field | ||
# (which is an image) to new value. | ||
- op: replace | ||
path: "/spec/bytecode/image/url" | ||
value: URL_BC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: bpfman.io/v1alpha1 | ||
kind: TcProgram | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: tcprogram | ||
name: go-tc-counter-example | ||
spec: | ||
bpffunctionname: stats | ||
# Select all nodes | ||
nodeselector: {} | ||
interfaceselector: | ||
primarynodeinterface: true | ||
priority: 55 | ||
direction: ingress | ||
bytecode: | ||
image: | ||
url: quay.io/bpfman-bytecode/go-tc-counter:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: go-tc-counter | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: bpfman-app-go-tc-counter | ||
namespace: go-tc-counter | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: go-tc-counter-ds | ||
namespace: go-tc-counter | ||
labels: | ||
k8s-app: go-tc-counter | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: go-tc-counter | ||
template: | ||
metadata: | ||
labels: | ||
name: go-tc-counter | ||
spec: | ||
nodeSelector: {} | ||
dnsPolicy: ClusterFirstWithHostNet | ||
serviceAccountName: bpfman-app-go-tc-counter | ||
securityContext: | ||
runAsNonRoot: true | ||
fsGroup: 65534 | ||
tolerations: | ||
# these tolerations are to have the daemonset runnable on control plane nodes | ||
# remove them if your control plane nodes should not run pods | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: Exists | ||
effect: NoSchedule | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
containers: | ||
- name: go-tc-counter | ||
image: quay.io/bpfman-userspace/go-tc-counter:latest | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: [ALL] | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
env: | ||
- name: NODENAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
volumeMounts: | ||
- name: go-tc-counter-maps | ||
mountPath: /run/tc/maps | ||
readOnly: true | ||
volumes: | ||
- name: go-tc-counter-maps | ||
csi: | ||
driver: csi.bpfman.io | ||
volumeAttributes: | ||
csi.bpfman.io/program: go-tc-counter-example | ||
csi.bpfman.io/maps: tc_stats_map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: [bytecode.yaml, deployment.yaml] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
# Patch the deployment.yaml to change container image in Daemonset | ||
# to new tag on the image. | ||
images: | ||
- name: quay.io/bpfman-userspace/go-tc-counter | ||
newName: quay.io/bpfman-userspace/go-tc-counter | ||
newTag: latest | ||
# Patch the bytecode.yaml to change tag on the "url" field (which is an | ||
# image) to new value. Since this is being done with an environment | ||
# variable and using sed to replace, moved to patch.yaml.env which is | ||
# converted to patch.yaml using the sed command in Makefile. | ||
patches: | ||
- path: patch.yaml | ||
target: | ||
kind: TcProgram | ||
name: go-tc-counter-example | ||
resources: [../../../test/integration/tc/base ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# Patch the bytecode.yaml to change image and tag on the "url" field | ||
# (which is an image) to new value. | ||
- op: replace | ||
path: /spec/bytecode/image/url | ||
value: quay.io/bpfman-bytecode/go-tc-counter:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Patch the bytecode.yaml to change image and tag on the "url" field | ||
# (which is an image) to new value. | ||
- op: replace | ||
path: "/spec/bytecode/image/url" | ||
value: URL_BC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: bpfman.io/v1alpha1 | ||
kind: TracepointProgram | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: tracepointprogram | ||
name: go-tracepoint-counter-example | ||
spec: | ||
bpffunctionname: tracepoint_kill_recorder | ||
# Select all nodes | ||
nodeselector: {} | ||
names: [syscalls/sys_enter_kill] | ||
bytecode: | ||
image: | ||
url: quay.io/bpfman-bytecode/go-tracepoint-counter:latest | ||
imagepullpolicy: IfNotPresent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: go-tracepoint-counter | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: bpfman-app-go-tracepoint-counter | ||
namespace: go-tracepoint-counter | ||
--- | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: go-tracepoint-counter-ds | ||
namespace: go-tracepoint-counter | ||
labels: | ||
k8s-app: go-tracepoint-counter | ||
spec: | ||
selector: | ||
matchLabels: | ||
name: go-tracepoint-counter | ||
template: | ||
metadata: | ||
labels: | ||
name: go-tracepoint-counter | ||
spec: | ||
nodeSelector: {} | ||
dnsPolicy: ClusterFirstWithHostNet | ||
securityContext: | ||
runAsNonRoot: true | ||
fsGroup: 65534 | ||
serviceAccountName: bpfman-app-go-tracepoint-counter | ||
tolerations: | ||
# these tolerations are to have the daemonset runnable on control plane nodes | ||
# remove them if your control plane nodes should not run pods | ||
- key: node-role.kubernetes.io/control-plane | ||
operator: Exists | ||
effect: NoSchedule | ||
- key: node-role.kubernetes.io/master | ||
operator: Exists | ||
effect: NoSchedule | ||
containers: | ||
- name: go-tracepoint-counter | ||
image: quay.io/bpfman-userspace/go-tracepoint-counter:latest | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: [ALL] | ||
runAsUser: 65534 | ||
runAsGroup: 65534 | ||
env: | ||
- name: NODENAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
volumeMounts: | ||
- name: go-tracepoint-counter-maps | ||
mountPath: /run/tracepoint/maps | ||
readOnly: true | ||
volumes: | ||
- name: go-tracepoint-counter-maps | ||
csi: | ||
driver: csi.bpfman.io | ||
volumeAttributes: | ||
csi.bpfman.io/program: go-tracepoint-counter-example | ||
csi.bpfman.io/maps: tracepoint_stats_map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: [bytecode.yaml, deployment.yaml] |
Oops, something went wrong.