Skip to content

Commit

Permalink
update for review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
takara9 committed May 23, 2024
1 parent 9ffd6ec commit b913430
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/aqua/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
runs:
using: composite
steps:
- uses: aquaproj/aqua-installer@v3.0.0 # v3.0.0
- uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1
with:
aqua_version: v2.25.1
env:
Expand Down
3 changes: 2 additions & 1 deletion hooks/mutate_pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/webhook"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
"k8s.io/apimachinery/pkg/runtime"
)

type podMutator struct {
Expand Down Expand Up @@ -50,7 +51,7 @@ func (m *podMutator) Handle(ctx context.Context, req admission.Request) admissio
m.log.Info("mutating pod,", "name", namespacedName, "profile", m.profileName)

po := &corev1.Pod{}
err := admission.Decoder.Decode(*m.decoder, req, po)
err := admission.NewDecoder(runtime.NewScheme()).Decode(req, po)
if err != nil {
m.log.Error(err, "failed to decode pod", "name", namespacedName, "profile", m.profileName)
return admission.Errored(http.StatusBadRequest, err)
Expand Down

0 comments on commit b913430

Please sign in to comment.