actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.76k stars 1.12k forks source link

Quickstart guide, installing actions-runner-controller fails #2565

Open trent-abc opened 1 year ago

trent-abc commented 1 year ago

Checks

Controller Version

v0.22.0 & v0.27.3

Helm Chart Version

No response

CertManager Version

v1.11.0

Deployment Method

Other

cert-manager installation

I followed the quickstart guide, for certmanager installation see below output:

KUBECONFIG=~/.kube/iris_kube_config.yaml kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.yaml
namespace/cert-manager created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created
serviceaccount/cert-manager-cainjector created
serviceaccount/cert-manager created
serviceaccount/cert-manager-webhook created
configmap/cert-manager-webhook created
clusterrole.rbac.authorization.k8s.io/cert-manager-cainjector created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-issuers created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificates created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-orders created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-challenges created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created
clusterrole.rbac.authorization.k8s.io/cert-manager-view created
clusterrole.rbac.authorization.k8s.io/cert-manager-edit created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created
clusterrole.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-cainjector created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-issuers created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificates created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-orders created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-challenges created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created
role.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created
role.rbac.authorization.k8s.io/cert-manager:leaderelection created
role.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created
rolebinding.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created
rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection created
rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created
service/cert-manager created
service/cert-manager-webhook created
deployment.apps/cert-manager-cainjector created
deployment.apps/cert-manager created
deployment.apps/cert-manager-webhook created
mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created
validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created

Checks

Resource Definitions

https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml

To Reproduce

kubectl apply -f https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml

Describe the bug

Exits status 1 with output:

Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runnerdeployments.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runnerreplicasets.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runners.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Describe the expected behavior

Exit 0

Whole Controller Logs

k -n actions-runner-system logs controller-manager-755dc6577f-68596 > arc.log

Defaulted container "manager" out of: manager, kube-rbac-proxy
Error from server (BadRequest): container "manager" in pod "controller-manager-755dc6577f-68596" is waiting to start: ContainerCreating

### Whole Runner Pod Logs

```shell
There are no runner pod logs yet.

Additional Context

Same thing happened for v0.27.3:

Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.27.3/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runnerdeployments.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.27.3/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runnerreplicasets.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
Error from server (Invalid): error when creating "https://github.com/actions/actions-runner-controller/releases/download/v0.27.3/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runners.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
...
for: "https://github.com/actions/actions-runner-controller/releases/download/v0.27.3/actions-runner-controller.yaml": error when patching "https://github.com/actions/actions-runner-controller/releases/download/v0.27.3/actions-runner-controller.yaml": CustomResourceDefinition.apiextensions.k8s.io "runnersets.actions.summerwind.dev" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
github-actions[bot] commented 1 year ago

Hello! Thank you for filing an issue.

The maintainers will triage your issue shortly.

In the meantime, please take a look at the troubleshooting guide for bug reports.

If this is a feature request, please review our contribution guidelines.

orilani commented 1 year ago

@trent-abc try to apply the CRD's with --server-side should solve the Too long error kubectl apply -f --server-side --force-conflicts https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml

trent-abc commented 1 year ago

@orilani Thanks that worked, then this ticket would be to modify the quickstart guide with exactly that command, do you know why it wasn't included, does it make sense for some use cases to not use --server-side? Maybe I can make a PR if I have more context.

reeve567 commented 10 months ago

In case anyone is looking for the solution with ArgoCD:

apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  syncPolicy:
    syncOptions:
    - ServerSideApply=true

Personally I'm using this paired with Helm subcharts, so this works nicely :)

BrianLeishman commented 1 month ago

@trent-abc try to apply the CRD's with --server-side should solve the Too long error kubectl apply -f --server-side --force-conflicts https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml

This gives me a different error

error: Unexpected args: [https://github.com/actions/actions-runner-controller/releases/download/v0.22.0/actions-runner-controller.yaml] See 'kubectl apply -h' for help and examples