actions / actions-runner-controller

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

AutoscalingRunnerSet CRD is too big to install via ArgoCD, requires annotation #3415

Closed rteeling-evernorth closed 2 months ago

rteeling-evernorth commented 2 months ago

Checks

Controller Version

0.7.0,0.8.2,0.9.0

Deployment Method

ArgoCD

Checks

To Reproduce

Install the chart via ArgoCD with the Custom Resource Definitions

Describe the bug

The AutoscalingRunnerSet Custom Resource Definition is too large to be installed via ArgoCD.

Describe the expected behavior

The CRD should install with the rest of the helm chart

Additional Context

This can be easily fixed by adding the annotation `argocd.argoproj.io/sync-options: Replace=true`. This annotation should be inert outside of ArgoCD.

I can open a pull request upon request, however I am not sure how people feel about adding this.

Controller Logs

N/A - The controller cannot start without the CRD installed

Runner Pod Logs

N/A
github-actions[bot] commented 2 months 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.

nikatar commented 2 months ago

I faced the same problem.

one or more objects failed to apply, reason: CustomResourceDefinition.apiextensions.k8s.io "autoscalingrunnersets.actions.github.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes. Retrying attempt #5 at 8:40PM.

image

rteeling-evernorth commented 2 months ago

@nikatar you can bandaid this for the moment by adding argocd.argoproj.io/sync-options: Replace=true to that crd's annotations, but i want to get this there by default

nikatar commented 2 months ago

Solution https://www.arthurkoziel.com/fixing-argocd-crd-too-long-error/

    syncOptions:
      - ServerSideApply=true
rteeling-evernorth commented 2 months ago

Yeah, that will work too

nikola-jokic commented 2 months ago

Hey @rteeling-evernorth,

I don't think we can do anything about it. CRDs are generated, and bundled together. You should just use server side apply. As long as there is a way to install CRDs and the controller, I don't think we should change this.

nikatar commented 2 months ago

I think this issue can be closed

DesmondH0 commented 2 months ago

I am wondering if gha-runner-scale-set-controller chart could support additional annotation to CRDs like prometheus-operator-crds chart does 🤔

So user could easily add the server-side apply via helm values