Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/provider/kubernetes/topology_injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (m *ProxyTopologyInjector) Handle(ctx context.Context, req admission.Reques
if err := m.Decoder.Decode(req, binding); err != nil {
klog.Error(err, "decoding binding failed", "request.ObjectKind", req.Object.Object.GetObjectKind())
topologyInjectorEventsTotal.WithFailure(metrics.ReasonError).Increment()
return admission.Errored(http.StatusInternalServerError, err)
return admission.Allowed("internal error, skipped")
}

if binding.Target.Name == "" {
Expand All @@ -48,7 +48,7 @@ func (m *ProxyTopologyInjector) Handle(ctx context.Context, req admission.Reques
if err := m.Get(ctx, podName, pod); err != nil {
klog.Error(err, "get pod failed", "pod", podName.String())
topologyInjectorEventsTotal.WithFailure(metrics.ReasonError).Increment()
return admission.Errored(http.StatusInternalServerError, err)
return admission.Allowed("internal error, skipped")
}

// Skip non-proxy pods
Expand All @@ -65,7 +65,7 @@ func (m *ProxyTopologyInjector) Handle(ctx context.Context, req admission.Reques
if err := m.Get(ctx, nodeName, node); err != nil {
klog.Error(err, "get node failed", "node", node.Name)
topologyInjectorEventsTotal.WithFailure(metrics.ReasonError).Increment()
return admission.Errored(http.StatusInternalServerError, err)
return admission.Allowed("internal error, skipped")
}

var patch string
Expand All @@ -77,7 +77,7 @@ func (m *ProxyTopologyInjector) Handle(ctx context.Context, req admission.Reques
if err := m.Patch(ctx, pod, rawPatch); err != nil {
klog.Error(err, "patch pod failed", "pod", podName.String())
topologyInjectorEventsTotal.WithFailure(metrics.ReasonError).Increment()
return admission.Errored(http.StatusInternalServerError, err)
return admission.Allowed("internal error, skipped")
}
klog.V(1).Info("patch pod succeeded", "pod", podName.String())
topologyInjectorEventsTotal.WithSuccess().Increment()
Expand Down