Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Feb 26, 2024
1 parent 65fd011 commit 3ae9a9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/k8s/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ func (*client) LabelSelector(key string, op selection.Operator, vals []string) (
return labels.NewSelector().Add(*requirements), nil
}

// Patcher is an interface for patching resources with controller-runtime client.
type Patcher interface {
// ApplyPodAnnotations applies the given annotations to the agent pod with server-side apply.
ApplyPodAnnotations(ctx context.Context, name, namespace string, entries map[string]string) error
}

Expand Down
1 change: 1 addition & 0 deletions pkg/agent/core/ngt/service/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ func WithExportIndexInfoDuration(dur string) Option {
}
}

// WithPatcher returns the functional option to set the patcher for patching k8s resources.
func WithPatcher(p client.Patcher) Option {
return func(n *ngt) error {
if p == nil {
Expand Down

0 comments on commit 3ae9a9e

Please sign in to comment.