1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 15:06:23 +00:00

Get latest logline if healthcheck fails

This commit is contained in:
Sebastiaan van Steenis
2018-05-21 20:11:11 +02:00
committed by Alena Prokharchyk
parent 70fca52c33
commit aabce06714
3 changed files with 21 additions and 4 deletions

View File

@@ -346,8 +346,8 @@ func ReadFileFromContainer(ctx context.Context, dClient *client.Client, hostname
return string(file), nil
}
func ReadContainerLogs(ctx context.Context, dClient *client.Client, containerName string) (io.ReadCloser, error) {
return dClient.ContainerLogs(ctx, containerName, types.ContainerLogsOptions{Follow: true, ShowStdout: true, ShowStderr: true, Timestamps: false})
func ReadContainerLogs(ctx context.Context, dClient *client.Client, containerName string, follow bool, tail string) (io.ReadCloser, error) {
return dClient.ContainerLogs(ctx, containerName, types.ContainerLogsOptions{Follow: follow, ShowStdout: true, ShowStderr: true, Timestamps: false, Tail: tail})
}
func tryRegistryAuth(pr v3.PrivateRegistry) types.RequestPrivilegeFunc {