-
Notifications
You must be signed in to change notification settings - Fork 78
Implement fields related to LKE APL #496
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
Conversation
| @property | ||
| def apl_console_url(self) -> Optional[str]: | ||
| """ | ||
| Returns the URL of this cluster's APL installation if this cluster | ||
| is APL-enabled, else None. | ||
| :returns: The URL of the APL console for this cluster. | ||
| :rtype: str or None | ||
| """ | ||
|
|
||
| if not self.apl_enabled: | ||
| return None | ||
|
|
||
| return f"https://console.lke{self.id}.akamai-apl.net" | ||
|
|
||
| @property | ||
| def apl_health_check_url(self) -> Optional[str]: | ||
| """ | ||
| Returns the URL of this cluster's APL health check endpoint if this cluster | ||
| is APL-enabled, else None. | ||
| :returns: The URL of the APL console for this cluster. | ||
| :rtype: str or None | ||
| """ | ||
|
|
||
| if not self.apl_enabled: | ||
| return None | ||
|
|
||
| return f"https://auth.lke{self.id}.akamai-apl.net/ready" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the URLs here feels a little gross but this is how it's done in Cloud Manager: https://github.com/linode/manager/blob/ecc0357e61d958c2e04bebbbcbaedccc70562898/packages/manager/src/features/Kubernetes/KubernetesClusterDetail/APLSummaryPanel.tsx#L39
ykim-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yec-akamai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works well on my end, nice work!

📝 Description
This pull request adds support for fields related to LKE APL, including two new property methods under
LKEClusterto ease accessing the APL console.✔️ How to Test
The following test steps assume you have pulled down this PR locally and run
make install.Unit Testing
Integration Testing
Manual Testing