Skip to content

Conversation

@git-ival
Copy link
Contributor

@git-ival git-ival commented Jan 9, 2024

Issue:

Problem

  • There was no function to get pod logs with customized PodOptions
  • There was no function to get a []string of pod names
  • The "Verify Cluster" functions all default to a 30 minute timeout that is not configurable, this limits the usage of these functions if/when provisioning/creating many clusters at once

Solution

  • Update deprecated Stream() call to StreamWithContext()
  • Add GetPodLogsWithOpts() to extensions/kubeconfig
  • Add GetPods() and GetPodNames() extensions/kubeconfig
  • Add "Verify Cluster" function variants that also take a custom timeout as input (defaults to 30-minute default of the non-custom function variants)

Testing

Engineering Testing

Manual Testing

Automated Testing

QA Testing Considerations

Regressions Considerations

@git-ival git-ival force-pushed the update-extensions-misc branch 2 times, most recently from 3214384 to a54ff3f Compare March 5, 2024 23:37
@git-ival git-ival added the automation-enhancement To indicate this is related to enhancements in code related to automation label Mar 14, 2024
@git-ival git-ival mentioned this pull request Apr 12, 2024
@git-ival git-ival force-pushed the update-extensions-misc branch 3 times, most recently from 72c3e59 to 06e5fe0 Compare April 18, 2024 22:51
@git-ival git-ival removed the request for review from floatingman May 22, 2024 18:40
@git-ival git-ival force-pushed the update-extensions-misc branch from 06e5fe0 to d7dd482 Compare July 5, 2024 15:10
@git-ival git-ival force-pushed the update-extensions-misc branch from d5be1ca to 82ba209 Compare July 5, 2024 21:54
@git-ival git-ival requested a review from igomez06 July 5, 2024 21:54
return logs, nil
}

func GetPodLogsWithOpts(client *rancher.Client, clusterID string, podName string, namespace string, bufferSizeStr string, opts *corev1.PodLogOptions) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a go doc comment here?

Copy link
Contributor

@igomez06 igomez06 left a comment

Choose a reason for hiding this comment

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

looks good just add some go doc comments and we're good.

k8Scheme "k8s.io/client-go/kubernetes/scheme"
)

func GetPods(client *rancher.Client, clusterID string, namespace string, listOptions *metav1.ListOptions) ([]corev1.Pod, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Same with the functions here.

@git-ival git-ival requested a review from bmdepesa as a code owner May 14, 2025 16:49
@git-ival git-ival force-pushed the update-extensions-misc branch from 6746674 to 0c61553 Compare May 14, 2025 16:50
@git-ival git-ival requested a review from igomez06 May 14, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation-enhancement To indicate this is related to enhancements in code related to automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants