Skip to content

Commit

Permalink
Merge pull request #31 from anfredette/app-crd-2
Browse files Browse the repository at this point in the history
Fixups for pr #6
  • Loading branch information
mergify[bot] authored Jun 21, 2024
2 parents 4c3fa0b + c71264c commit 1353f8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions controllers/bpfman-agent/application-program.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,5 +280,11 @@ func (r *BpfApplicationReconciler) SetupWithManager(mgr ctrl.Manager) error {
&handler.EnqueueRequestForObject{},
builder.WithPredicates(predicate.And(predicate.LabelChangedPredicate{}, nodePredicate(r.NodeName))),
).
// Watch for changes in Pod resources in case we are using a container selector.
Watches(
&v1.Pod{},
&handler.EnqueueRequestForObject{},
builder.WithPredicates(podOnNodePredicate(r.NodeName)),
).
Complete(r)
}
3 changes: 2 additions & 1 deletion controllers/bpfman-agent/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,5 +896,6 @@ func getClientset() (*kubernetes.Clientset, error) {
// sanitize a string to work as a bpfProgram name
func sanitize(name string) string {
name = strings.TrimPrefix(name, "/")
return strings.Replace(strings.Replace(name, "/", "-", -1), "_", "-", -1)
name = strings.Replace(strings.Replace(name, "/", "-", -1), "_", "-", -1)
return strings.ToLower(name)
}

0 comments on commit 1353f8e

Please sign in to comment.