Follow kubernetes APIs directory structure (#1497)

This commit is contained in:
Ta-Ching Chen
2020-01-20 17:06:46 +08:00
committed by GitHub
parent bb3e6d6907
commit 11f9ef1045
160 changed files with 542 additions and 541 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
fv1 "github.com/fission/fission/pkg/apis/fission.io/v1"
fv1 "github.com/fission/fission/pkg/apis/core/v1"
"github.com/fission/fission/pkg/crd"
"github.com/fission/fission/pkg/utils"
)
@@ -89,7 +89,7 @@ func (client *PreUpgradeTaskClient) VerifyFunctionSpecReferences() {
var fList *fv1.FunctionList
for i := 0; i < maxRetries; i++ {
fList, err = client.fissionClient.V1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
fList, err = client.fissionClient.CoreV1().Functions(metav1.NamespaceAll).List(metav1.ListOptions{})
if err == nil {
break
}
@@ -167,12 +167,12 @@ func (client *PreUpgradeTaskClient) RemoveClusterAdminRolesForFissionSAs() {
// This is because, we just deleted the ClusterRoleBindings for these service accounts in the previous function and
// for the existing functions to work, we need to give these SAs the right privileges
func (client *PreUpgradeTaskClient) NeedRoleBindings() bool {
pkgList, err := client.fissionClient.V1().Packages(metav1.NamespaceDefault).List(metav1.ListOptions{})
pkgList, err := client.fissionClient.CoreV1().Packages(metav1.NamespaceDefault).List(metav1.ListOptions{})
if err == nil && len(pkgList.Items) > 0 {
return true
}
fnList, err := client.fissionClient.V1().Functions(metav1.NamespaceDefault).List(metav1.ListOptions{})
fnList, err := client.fissionClient.CoreV1().Functions(metav1.NamespaceDefault).List(metav1.ListOptions{})
if err == nil && len(fnList.Items) > 0 {
return true
}