Closed rajeevsh990 closed 1 year ago
Man, I dislike the solution around last-applied-configuration
so much, I understand why they did it, but it doesn't help.
@rajeevsh990
When installing the operator, use kubectl create -k deploy/kustomize/overlays/cluster_scoped
instead of apply
.
If you need to upgrade, you can use kubectl replace
Found a good blog explaining what replace actually does, but it seems safe to use as long as you don't use the --force flag; https://blog.atomist.com/kubernetes-apply-replace-patch/
I will update the documentation to match this.
Thanks. I tried the command kustomize build . | kubectl create -f -
and it worked. I guess, it's doing the same thing other way round which you mentioned above. Though it was tricky to find out.
prometheus-operator CRDs lead to the same error. I think the best way to deploy big CRDs is just by adding --server-side
flag to kubectl apply
:
--server-side=false:
If true, apply runs in the server instead of the client.
Describe the bug Installation of CRDs using kustomize reports following output.
namespace/grafana created customresourcedefinition.apiextensions.k8s.io/grafanadashboards.grafana.integreatly.org created customresourcedefinition.apiextensions.k8s.io/grafanadatasources.grafana.integreatly.org created customresourcedefinition.apiextensions.k8s.io/grafanafolders.grafana.integreatly.org created serviceaccount/grafana-operator-controller-manager created clusterrole.rbac.authorization.k8s.io/grafana-operator-permissions created clusterrolebinding.rbac.authorization.k8s.io/grafana-operator-permissions created deployment.apps/grafana-operator-controller-manager created The CustomResourceDefinition "grafanas.grafana.integreatly.org" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
The last line of the log errors out which indicates the total size of the CRD "grafanas.grafana.integreatly.org" exceeded the size limit.
Version v5.0.0-rc0
To Reproduce
Expected behavior A clear and concise description of what you expected to happen.
Suspect component/Location where the bug might be occurring Please provide this if you know where this bug might occur otherwise leave as
unknown
Screenshots If applicable, add screenshots to help explain your problem.
Runtime (please complete the following information):
Additional context Add any other context about the problem here. Other blogs of similar issues suggest to break-down the content of CRDs to avoid such issues. Is there any way to do that?