Skip to content

Instantly share code, notes, and snippets.

@manaswinidas
Created January 26, 2024 04:06
Show Gist options
  • Save manaswinidas/cc600fdf71eaf1eea6a91150c0439385 to your computer and use it in GitHub Desktop.
Save manaswinidas/cc600fdf71eaf1eea6a91150c0439385 to your computer and use it in GitHub Desktop.
Make these changes in the same file as getPodContainerText
export const getLogsUrlPart = (
namespace: string,
podName: string,
containerName: string,
tail?: number,
): string =>
`/api/k8s/api/v1/namespaces/${namespace}/pods/${podName}/log?container=${containerName}${
tail ? `&tailLines=${tail}` : ''
}`;
export const getLogsUrl = (
namespace: string,
podName: string,
containerName: string,
tail?: number,
): string => `${location.origin}` + getLogsUrlPart(namespace, podName, containerName, tail);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment