evryfs/github-actions-runner-operator

Error while installing helm chart

Closed this issue · 6 comments

Hey there, when installing using helm 3, I get the following error;

helm install github-actions-runner-operator evryfs-oss/github-actions-runner-operator --namespace github-actions-runner-operator Error: failed to install CRD crds/garo.tietoevry.com_githubactionrunners.yaml: CustomResourceDefinition.apiextensions.k8s.io "githubactionrunners.garo.tietoevry.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[podTemplateSpec].properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[spec].properties[podTemplateSpec].properties[spec].properties[containers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property]

How can I resolve this?

See https://github.com/evryfs/github-actions-runner-operator/releases/tag/v0.4.0

GitHub
Change CRD field from PodSpec to PodTemplateSpec in order to cater for metadata - making it possible to scrape with Prometheus Updated the sample resource which adds a prometheus exporter container...

Hey @davidkarlsen, thanks. The skipping the CRD seems to work indeed, but I have no idea how to apply the CRD sample, it lists the following error:

error: unable to recognize "garo_v1alpha1_githubactionrunner.yaml": no matches for kind "GithubActionRunner" in version "garo.tietoevry.com/v1alpha1"

with command
k apply -n github-actions-runner-operator -f garo_v1alpha1_githubactionrunner.yaml

As it says in the link, either:
a) helm install with --disable-openapi-validation option
or
b) k apply -f https://github.com/evryfs/github-actions-runner-operator/blob/master/config/crd/bases/garo.tietoevry.com_githubactionrunners.yaml

Still not working, the --disable-openapi-validation flag does not have any effect at all. I'm running kubernetes v1.18.6.

helm install github-actions-runner-operator evryfs-oss/github-actions-runner-operator --namespace github-actions-runner-operator --disable-openapi-validation

Error: failed to install CRD crds/garo.tietoevry.com_githubactionrunners.yaml: CustomResourceDefinition.apiextensions.k8s.io "githubactionrunners.garo.tietoevry.com" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[podTemplateSpec].properties[spec].properties[containers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property, spec.validation.openAPIV3Schema.properties[spec].properties[podTemplateSpec].properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property

Also, when using the other method I get this:

k apply -f https://github.com/evryfs/github-actions-runner-operator/blob/master/config/crd/bases/garo.tietoevry.com_githubactionrunners.yaml -n github-actions-runner-operator```

error: error parsing https://github.com/evryfs/github-actions-runner-operator/blob/master/config/crd/bases/garo.tietoevry.com_githubactionrunners.yaml: error converting YAML to JSON: yaml: line 129: mapping values are not allowed in this context

I cant seem to get it working, even when following your help.

Use k apply --validate=false -f ...