[CDAP-21155] Trim name of statefulset objects to 52 characters#146
Merged
[CDAP-21155] Trim name of statefulset objects to 52 characters#146
Conversation
bhardwaj-priyanshu
approved these changes
Mar 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
CDAP-21155 Trim name of statefulset objects to 52 characters in cdap-operator
AppFabric Processor pod doesn’t get created if CDAP master resource name is longer than 28 characters.
Following errors are seen in the K8s cluster:
Root Cause
K8s generates a
metadata.labelfor appfabric processor pod (managed by statefulsets) namedcontroller-revision-hashwhich has value of formatcdap-<CDAP Master name>-appfabricprocessor-<10 character hash>(eg.cdap-abcdefghijabcdefghijabcdefghij-appfabricprocessor-64c9bb6f49), which exceeds limit of 63 characters for label values.This is a known limitation / issue in K8s which hasn’t been resolved yet: kubernetes/kubernetes#79337
Solution
Trim the name of stateful set objects to 52 characters so that the value of generated label value is within limit of 63 characters.
Verification
Deployed CDAP master resource with name having 30 characters
Deployed CDAP master resource with name having shorter name( < 28 characters)