Skip to content

Owls 91563 - Changes to validate the container port names and truncate automatically generated long names #2542

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

Merged
merged 4 commits into from
Sep 23, 2021

Conversation

ankedia
Copy link
Member

@ankedia ankedia commented Sep 22, 2021

  • Validate the container port name lengths for containers provided by the customers.
  • Truncate the automatically generated port names (based on NAP names) for WebLogic Server containers.
  • Added unit tests for the customer-provided container port validation and truncation of generated port names for WLS containers.
  • External Jenkins test run is in progress at - https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/6511/

int index = containerPortsWithSamePrefix.size() + 1;
String indexStr = String.valueOf(index);
// zero fill to the left for single digit index (e.g. 01)
if (index < 10) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we're hoping that no one ever has 100 channels :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All kidding aside... It is extremely unlikely that there will be over 100 channels that are also longer than the maximum name, but we ought to do something here like generate a specific error message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) In addition to 100 channels having longer than the maximum name, these 100 channels also need to have the same first 12 characters. Anyways, I'll look into adding a specific error message.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an error message when more than 100 channels are configured with long names in f9d576a .

@rjeberhard rjeberhard merged commit ab903b1 into main Sep 23, 2021
ankedia added a commit that referenced this pull request Sep 23, 2021
…e automatically generated long names (#2542)

* Changes to validate the container port names and truncate automatically generated long names
rjeberhard pushed a commit that referenced this pull request Sep 23, 2021
…e automatically generated long names (#2542) (#2548)

* Changes to validate the container port names and truncate automatically generated long names
@ankedia ankedia deleted the OWLS_91563 branch October 10, 2021 03:09
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.

4 participants