Update ArgoCD Rollouts to 0.10.2 to fix a compatibility issue and update necessary k8s machinery

This commit is contained in:
tete17
2021-05-31 15:35:51 +02:00
parent d6312f6f83
commit 71fdb53c2e
6 changed files with 1061 additions and 104 deletions

View File

@@ -1,6 +1,7 @@
package kube
import (
"context"
"os"
"k8s.io/client-go/tools/clientcmd"
@@ -67,7 +68,7 @@ func isOpenshift() bool {
if err != nil {
logrus.Fatalf("Unable to create Kubernetes client error = %v", err)
}
_, err = client.RESTClient().Get().AbsPath("/apis/project.openshift.io").Do().Raw()
_, err = client.RESTClient().Get().AbsPath("/apis/project.openshift.io").Do(context.TODO()).Raw()
if err == nil {
logrus.Info("Environment: Openshift")
return true