Skip to content

Conversation

@nikita-vanyasin
Copy link
Contributor

No description provided.

@nikita-vanyasin nikita-vanyasin requested review from ajanikow and jwierzbo and removed request for ajanikow and jwierzbo June 3, 2022 11:22
@nikita-vanyasin nikita-vanyasin changed the title Add CRD generator for ArangoDeployment [WIP] Add CRD generator for ArangoDeployment Jun 3, 2022
@nikita-vanyasin nikita-vanyasin force-pushed the feature/crd-generator-arangodeployment branch 2 times, most recently from 7c6d4e1 to 75b2ce3 Compare June 3, 2022 11:48
@nikita-vanyasin nikita-vanyasin changed the title [WIP] Add CRD generator for ArangoDeployment Add CRD generator for ArangoDeployment Jun 3, 2022
@nikita-vanyasin nikita-vanyasin requested a review from ajanikow June 3, 2022 12:12
@Strangerxxx
Copy link

Why it is even implemented?
I mean, It is not necessary to apply CRDs using the code of operator at all!
Why not just use code generation to generate static crds out of schemas and apply it using helm?
Lots of code for doing weird stuff nobody do
It is the worst idea since those freaking namespaced and legacy modes were implemented
There are a lot to do, instead of moving .yaml's into .go's

@ajanikow
Copy link
Collaborator

ajanikow commented Jun 7, 2022

Hello @Strangerxxx !

We want to introduce new versions in a few CRDs and change defaults (stored version).

We cannot use included Helm CRD installer (https://helm.sh/docs/chart_best_practices/custom_resource_definitions/ - important part There is no support at this time for upgrading or deleting CRDs using Helm. This was an explicit decision after much community discussion due to the danger for unintentional data loss. Furthermore, there is currently no community consensus around how to handle CRDs and their lifecycle. As this evolves, Helm will add support for those use cases.).

Currently, we have an additional helm chart that installs CRDs, but we cannot introduce a converter between specific versions to ensure backward compatibility (https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-conversion). Also, we observed that sometimes helm is able to wipe-out all CustomResources during an upgrade of CRD (that's why helm did not implement this).

If you have any other ideas on how to handle CRDs in a dynamic and proper way - please share them with us.


About Legacy & Namespaced mode - Legacy mode was the first one, which handled Operator in a single namespace with additional Cluster privileges (like for nodes). The community request was to add support for namespace limited installation mode. Overall, the Operator is able to determine access using an access check to make sure it is able to work within desired access scope.

Cluster-wide Operator installation is not supported, we recommend a way to install it per namespace - it allows you to do rolling upgrades per namespace and test multiple versions within the same Kubernetes cluster.

Best Regards,
Adam.

@ajanikow ajanikow force-pushed the feature/crd-generator-arangodeployment branch from cd6af52 to 65731b5 Compare June 9, 2022 10:03
@ajanikow ajanikow merged commit 60af345 into master Jun 9, 2022
@ajanikow ajanikow deleted the feature/crd-generator-arangodeployment branch June 9, 2022 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants