actions / actions-runner-controller

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

Upgrade CRDs through kubectl apply -k #2233

Open smeeklai opened 1 year ago

smeeklai commented 1 year ago

What would you like added?

Add kustomization.yaml file into crds folder so we can run kubectl apply -k LINK to upgrade CRDs because Helm doesn't manage CRD resources.

Why is this needed?

It should be easier to update CRDs when we need

Additional context

Example from ArgoCD helm chart

https://artifacthub.io/packages/helm/argo/argo-cd#custom-resource-definitions https://github.com/argoproj/argo-cd/blob/master/manifests/crds/kustomization.yaml

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.

yyvess commented 1 year ago

@smeeklai Should not required, use the option ServerSideApply Look on https://argo-cd.readthedocs.io/en/latest/user-guide/sync-options/


apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
  syncPolicy:
    syncOptions:
    - ServerSideApply=true
`
smeeklai commented 1 year ago

I'm not sure I miss something or not but from what I know, when I upgrade the actions-runner-controller, I also need to make sure my CRDs is up-to-date as well. Helm doesn't manage CRDs after it installed. So I need to copy the files from crd folder to make change one by one. My proposal is to add a kustomization file into the application crd folder so we can run kubectl apply -k LINK_TO_KUSTOMIZATION_FILE to update the CRDs for each upgrade easily.