actions / actions/actions-runner-controller

Deploying Runner: failed to call webhook

Open
#2,644 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug community needs triage
Dominant language
Go
Stars
6.5k
Forks
1.5k
Avg merge
2d 2h
Merged PRs (30d)
27

Description

Checks
Controller Version

0.27.4

Helm Chart Version

Not used

CertManager Version

v1.12.0

Deployment Method

Other

cert-manager installation

We install cert-manager as a single YAML file (no templating). That installs

apiVersion: v1
kind: Namespace
metadata:
  name: cert-manager
---
# Source: cert-manager/templates/crds.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: certificaterequests.cert-manager.io
  labels:
    app: 'cert-manager'
    app.kubernetes.io/name: 'cert-manager'
    app.kubernetes.io/instance: 'cert-manager'
    # Generated labels
    app.kubernetes.io/version: "v1.12.0"
  ....

All pods are running correctly

NAME                                       READY   STATUS    RESTARTS   AGE
cert-manager-5f68c9c6dd-msjjk              1/1     Running   0          71m
cert-manager-cainjector-57d6fc9f7d-ps9z4   1/1     Running   0          71m
cert-manager-webhook-5b7ffbdc98-k8l9s      1/1     Running   0          71m
Checks
  • This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
  • I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
  • My actions-runner-controller version (v0.x.y) does support the feature
  • I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue
  • I've migrated to the workflow job webhook event (if you using webhook driven scaling)
Resource Definitions
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
  name: gh-runner
  namespace: actions-runner-system
spec:
  template:
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: cloud.google.com/gke-nodepool
                operator: In
                values:
                - github-runners-562b
      organization: myorg
      labels:
        - gke-runner
To Reproduce
1. Brand new cluster - no historic deployments
2. Includes google ACM
3. Deployed with `kubectl create -f https://github.com/actions/actions-runner-controller/releases/download/v0.27.4/actions-runner-controller.yaml`
4. Running controller 

NAME                                  READY   STATUS    RESTARTS   AGE
controller-manager-58d69dfdf8-sd7lj   2/2     Running   0          50m


5. Apply the `RunnerDeployment` yaml in `runner.yaml`
Describe the bug

When on a newly created cluster I apply the runner yaml I get the below error.

error message: Error from server (InternalError): 
error when creating "runner.yaml":
 Internal error occurred:
 failed calling webhook "[mutate.runnerdeployment.actions.summerwind.dev](http://mutate.runnerdeployment.actions.summerwind.dev/)":
  failed to call webhook: 
  Post 
  "[https://webhook-service.actions-runner-system.svc:443/mutate-actions-summerwind-dev-v1alpha1-runnerdeployment?timeout=10s](https://webhook-service.actions-runner-system.svc/mutate-actions-summerwind-dev-v1alpha1-runnerdeployment?timeout=10s)": context deadline exceeded

No resources are created for kubectl get RunnerDeployment

We've reviewed https://github.com/actions/actions-runner-controller/pull/1558

  • No mutating or validating webhooks with actions in the name exist
  • Services exist in the actions-runner-system namespace
controller-manager-metrics-service   ClusterIP   192.1xx.xx.xxx   <none>        8443/TCP   27m
webhook-service                      ClusterIP   192.1xx.xx.xxx   <none>        443/TCP    27m
Describe the expected behavior

For the RunnerDeployment to run and be created succesfully.

Whole Controller Logs
https://gist.github.com/ltatakis-optaxe/16d94dc7fb0e97e9c661bc79a6e9393f
Whole Runner Pod Logs
No runner to provide the logs. The issue.
Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the RunnerDeployment manifest and the controller logs linked in the issue, then inspect the webhook-service and its registration in the actions-runner-system namespace. Reproduce the failed apply on a new cluster and trace why the mutating webhook request times out. Done means the RunnerDeployment is created successfully without the webhook error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, go, kubernetes
Domain
ci-cd, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.