Skip to content

Mutating Webhook is being ignored #624

@EinavDanielDX

Description

@EinavDanielDX

I have deployed k8s-image-swapper into my cluster and it looks like the webhook is being ignored. No log in webhook server regarding pod creation could be found.

Some details:
Platform: EKS, v1.24
swapper helm chart version: 1.8.0
swapper image version: 1.5.7

Values:

image:
  tag: "1.5.7"
awsSecretName: k8s-image-swapper-aws
config:
  ImageSwapPolicy: "always"
  ImageCopyPolicy: "immediate"
  source:
    filters:
      - jmespath: "contains(container.image, '.dkr.ecr.') && contains(container.image, '.amazonaws.com')"
      - jmespath: "obj.metadata.namespace == 'kube-system'"
  target:
    type: aws
    aws:
      accountId: "my-account-id-number"
      region: eu-west-1
      ecrOptions:
        tags:
          - key: cluster
            value: my-cluster

testing:

# executed:
kubectl apply -f https://k8s.io/examples/pods/simple-pod.yaml

# result
pod/nginx created

logs on webhook server:

{"level":"info","file":"/.k8s-image-swapper.yaml","time":"2023-11-20T18:53:24Z","message":"using config file"}
6:53PM DBG auth token set, schedule next token renewal expiryAt=2023-11-21T06:53:24Z renewalAt=2023-11-21T06:51:24Z
6:53PM INF Listening on :8443

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions