question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using the CRD name if no finalizer is provided is not a good default

See original GitHub issue

Unfortunately, CRD names don’t mandate that their group be a valid domain name, therefore using <plural>.<group>/finalizer is not guaranteed to be a valid finalizer name. Possible options for the first part of the finalizer identifier:

  • FQN of the associated controller
  • CR Kind + package name
  • CR Kind / CR simple class name + .javaoperatorsdk.io

Tha last one being the less risky in terms of validation, though https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers doesn’t specify that the finalizer id be a valid kubernetes name (which it isn’t anyway because of the /) so we probably aren’t constrained to only 63 characters length.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
metacosmcommented, Nov 23, 2020

Existing TLDs are subject to change anytime, so I don’t think it’s reasonable to add them to the validation.

Well, we could retrieve the TLD list from IANA at compile time and then… 😀 </overengineering>

Furthermore one can have their own DNS with any domain name follow the format but not ending with existing tlds.

Good point. I will fix the validation code. We should still strive to generate a valid domain name in the examples and when generating default identifiers, though.

0reactions
metacosmcommented, Nov 25, 2020

This will be addressed at the fabric8 client level.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extend the Kubernetes API with CustomResourceDefinitions
When you create a new CustomResourceDefinition (CRD), the Kubernetes API Server creates a new RESTful resource path for each version you specify ...
Read more >
Namespace created by rancher can't delete #14715 - GitHub
First, edit all the Rancher namespace and remove finalizer from their metadata. Then you run kubectl delete namespace to delete those namespace.
Read more >
The Hidden Dangers of Terminating Namespaces
Dumping the Namespace resource to a file. Removing the default “kubernetes” finalizer (along with any others that may be present). Executing a ...
Read more >
Not able to completely remove Kubernetes CustomResource
So it turns out , the root cause was that Custom resources with finalizers can "deadlock". The CustomResource "functions.kubeless.io" had a.
Read more >
Custom CRDs not getting deleted in aks cluster, how to delete ...
Can you please perform a kubectl get crd -A -o jsonpath='{.items[*].metadata.finalizers' to check if the delete operation is in deadlock with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found