Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to patch AWSMachine: admission webhook denied the request #5331

Open
JacobValdemar opened this issue Feb 4, 2025 · 1 comment
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@JacobValdemar
Copy link

/kind bug

What steps did you take and what happened:
I added a MachineDeployment to my cluster. It seems to work as expected, but the capa-controller-manager has started logging the following:

controller.go:329 "Reconciler error" err="failed to patch AWSMachine namespace_redacted/awsmachine_name_redacted: admission webhook \"validation.awsmachine.infrastructure.cluster.x-k8s.io\" denied the request: AWSMachine.infrastructure.cluster.x-k8s.io \"awsmachine_name_redacted\" is invalid: spec: Forbidden: cannot be modified" controller="awsmachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AWSMachine" AWSMachine="namespace_redacted/awsmachine_name_redacted" namespace="namespace_redacted" name="awsmachine_name_redacted" reconcileID="db20b7fe-85c2-45f6-91d8-4cbc3a0e75cc"

I don't know if it is a problem, but the error probably occurs for a reason.

What did you expect to happen:

I expected that there wasn't any error logged by the capa-controller-manager.

Anything else you would like to add:

Configuration of AWSmachine that is referred
Name:         redacted
Namespace:    redacted
Labels:       cluster.x-k8s.io/cluster-name=redacted
              cluster.x-k8s.io/deployment-name=redacted
              cluster.x-k8s.io/set-name=redacted
              machine-template-hash=redacted
              nodeType=redacted
              type=redacted
              zone=redacted
Annotations:  cluster.x-k8s.io/cloned-from-groupkind: AWSMachineTemplate.infrastructure.cluster.x-k8s.io
              cluster.x-k8s.io/cloned-from-name: redacted
              sigs.k8s.io/cluster-api-provider-aws-last-applied-tags: redacted
              sigs.k8s.io/cluster-api-provider-last-applied-tags-on-volumes: redacted
API Version:  infrastructure.cluster.x-k8s.io/v1beta2
Kind:         AWSMachine
Metadata:
  Creation Timestamp:  2025-01-30T12:32:39Z
  Finalizers:
    awsmachine.infrastructure.cluster.x-k8s.io
  Generation:  2
  Owner References:
    API Version:           cluster.x-k8s.io/v1beta1
    Block Owner Deletion:  true
    Controller:            true
    Kind:                  Machine
    Name:                  redacted
    UID:                   redacted
  Resource Version:        707592481
  UID:                     0389350a-dd34-4a63-8075-b0a0234a458f
Spec:
  Additional Security Groups:
    Id:  redacted
  Additional Tags:
    Domain:    redacted
    Owned By:  redacted
  Ami:
    Id:  redacted
  Cloud Init:
    Secure Secrets Backend:  redacted
  Iam Instance Profile:      nodes.cluster-api-provider-aws.sigs.k8s.io
  Instance ID:               redacted
  Instance Type:             redacted
  Provider ID:               aws:///redacted/redacted
  Root Volume:
    Encrypted:   true
    Size:        128
    Type:        gp3
  Ssh Key Name:
  Subnet:
    Id:  redacted
Status:
  Addresses:
    Address:  redacted
    Type:     InternalDNS
    Address:  redacted
    Type:     InternalIP
  Conditions:
    Last Transition Time:  2025-01-30T12:33:13Z
    Status:                True
    Type:                  Ready
    Last Transition Time:  2025-01-30T12:33:13Z
    Status:                True
    Type:                  InstanceReady
    Last Transition Time:  2025-01-30T12:32:42Z
    Status:                True
    Type:                  SecurityGroupsReady
  Instance State:          running
  Ready:                   true
Events:                    <none>

I am happy to provide any additional information you may need to troubleshoot this issue.

Environment:

  • Cluster-api-provider-aws version: v2.6.1 (registry.k8s.io/cluster-api-aws/cluster-api-aws-controller)
  • Kubernetes version: (use kubectl version): v1.29.12-eks-2d5f260
  • OS (e.g. from /etc/os-release): n/a
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 4, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If CAPA/CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

2 participants