diff --git a/controllers/bpfman-agent/application-program.go b/controllers/bpfman-agent/application-program.go index 6f9f64f73..0579f9468 100644 --- a/controllers/bpfman-agent/application-program.go +++ b/controllers/bpfman-agent/application-program.go @@ -80,7 +80,9 @@ func (r *BpfApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Reque var complete bool for _, a := range appPrograms.Items { + complete = false for _, p := range a.Spec.Programs { + complete = false switch p.Type { case bpfmaniov1alpha1.ProgTypeFentry: fentryProgram := bpfmaniov1alpha1.FentryProgram{ @@ -226,8 +228,7 @@ func (r *BpfApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Reque complete, res, err = r.reconcileCommon(ctx, rec, xdpObjects) default: - r.Logger.Error(fmt.Errorf("Unsupported Bpf program type"), "Unsupported Bpf program type", "ProgType", p.Type) - // Skip this program and continue to the next one + r.Logger.Info("Unsupported Bpf program type", "ProgType", p.Type) continue } diff --git a/controllers/bpfman-agent/application-program_test.go b/controllers/bpfman-agent/application-program_test.go index 5d26ebba9..25324c783 100644 --- a/controllers/bpfman-agent/application-program_test.go +++ b/controllers/bpfman-agent/application-program_test.go @@ -66,7 +66,7 @@ func TestBpfApplicationControllerCreate(t *testing.T) { Type: bpfmaniov1alpha1.ProgTypeFentry, Fentry: &bpfmaniov1alpha1.FentryProgramInfo{ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{ - BpfFunctionName: fentryBpfFunctionName, + BpfFunctionName: bpfFentryFunctionName, }, FunctionName: fentryFunctionName, }, @@ -75,7 +75,7 @@ func TestBpfApplicationControllerCreate(t *testing.T) { Type: bpfmaniov1alpha1.ProgTypeKprobe, Kprobe: &bpfmaniov1alpha1.KprobeProgramInfo{ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{ - BpfFunctionName: kprobeBpfFunctionName, + BpfFunctionName: bpfKprobeFunctionName, }, FunctionName: kprobeFunctionName, Offset: uint64(kprobeOffset), @@ -86,7 +86,7 @@ func TestBpfApplicationControllerCreate(t *testing.T) { Type: bpfmaniov1alpha1.ProgTypeTracepoint, Tracepoint: &bpfmaniov1alpha1.TracepointProgramInfo{ BpfProgramCommon: bpfmaniov1alpha1.BpfProgramCommon{ - BpfFunctionName: tracepointBpfFunctionName, + BpfFunctionName: bpfTracepointFunctionName, }, Names: []string{tracepointName}, },