Skip to content

Commit

Permalink
Merge pull request #327 from msherif1234/svc_acct
Browse files Browse the repository at this point in the history
OCPBUGS-42593: hardening service account automount
  • Loading branch information
mergify[bot] authored Oct 30, 2024
2 parents 40a1e71 + 02a49cc commit ed47e2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/bpfman-operator/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/predicate"
Expand Down Expand Up @@ -321,6 +322,7 @@ func LoadAndConfigureBpfmanDs(config *corev1.ConfigMap, path string) *appsv1.Dae
staticBpfmanDeployment.Spec.Template.ObjectMeta.Annotations["bpfman.io.bpfman.agent.metricaddr"] = bpfmanMetricAddr
staticBpfmanDeployment.Name = internal.BpfmanDsName
staticBpfmanDeployment.Namespace = config.Namespace
staticBpfmanDeployment.Spec.Template.Spec.AutomountServiceAccountToken = ptr.To(true)
for cindex, container := range staticBpfmanDeployment.Spec.Template.Spec.Containers {
if container.Name == internal.BpfmanContainerName {
staticBpfmanDeployment.Spec.Template.Spec.Containers[cindex].Image = bpfmanImage
Expand Down

0 comments on commit ed47e2b

Please sign in to comment.