Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leader election failure and crd too long issue #9

Merged
merged 3 commits into from
Aug 4, 2021

Conversation

Jeffwan
Copy link
Collaborator

@Jeffwan Jeffwan commented Aug 4, 2021

  1. Fix leader election failure that controller can not start with --leader-elect
  2. Fix CRD too long issue. This is a known issue. See make install fails with metadata.annotations too long .. kubernetes-sigs/kubebuilder#1140 for more details
  3. Add README.md and CONTRIBUTING.md

Original name has a “.” which doesn’t meet requirement of  DNS-1123 (subdomain must consist of lower case alphanumeric characters,  '-' or '.', and must start and end with an alphanumeric character)
Since auto generated crd embed PodTemplateSpec, it results in some failures like `The CustomResourceDefinition "..." is invalid: metadata.annotations: Too long: must have at most 262144 characters`

Everytime we run `kubectl apply`, it will sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object."

Using kubectl create helps workaround the issue but create will fail if crd exist so it need us to change logics to check and create.

In end end, we specify `maxDescLen` on controller-tools when generating the CRD and it helps reduce size.
@Jeffwan Jeffwan merged commit 5722272 into ray-project:master Aug 4, 2021
@Jeffwan Jeffwan deleted the manifests branch August 4, 2021 07:38
lowang-bh pushed a commit to lowang-bh/kuberay that referenced this pull request Sep 24, 2023
* Fix leader election problem

Original name has a “.” which doesn’t meet requirement of  DNS-1123 (subdomain must consist of lower case alphanumeric characters,  '-' or '.', and must start and end with an alphanumeric character)

* Add README.md and CONTRIBUTING.md

* Fix crd too long issue

Since auto generated crd embed PodTemplateSpec, it results in some failures like `The CustomResourceDefinition "..." is invalid: metadata.annotations: Too long: must have at most 262144 characters`

Everytime we run `kubectl apply`, it will sets the kubectl.kubernetes.io/last-applied-configuration: '{...}' annotation on each object. The annotation contains the contents of the object configuration file that was used to create the object."

Using kubectl create helps workaround the issue but create will fail if crd exist so it need us to change logics to check and create.

In end end, we specify `maxDescLen` on controller-tools when generating the CRD and it helps reduce size.
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.

None yet

1 participant