mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-06 09:22:46 +03:00
Fail on InvalidImageName (#4007)
This commit is contained in:
@@ -65,6 +65,18 @@ func isImagePullBackOffState(pod *v1.Pod) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func isInvalidImageName(pod *v1.Pod) bool {
|
||||
for _, containerState := range pod.Status.ContainerStatuses {
|
||||
if containerState.State.Waiting != nil {
|
||||
if containerState.State.Waiting.Reason == "InvalidImageName" {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// getClientOutOfCluster returns a k8s client set to the request from outside of cluster.
|
||||
func getClientOutOfCluster() (kubernetes.Interface, error) {
|
||||
kubeConfigPath := os.Getenv("KUBECONFIG") // cspell:words KUBECONFIG
|
||||
|
Reference in New Issue
Block a user