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
+3 -3
View File
@@ -32,7 +32,7 @@ import (
"k8s.io/apimachinery/pkg/watch"
"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/executor/util"
fetcherConfig "github.com/fission/fission/pkg/fetcher/config"
@@ -147,7 +147,7 @@ func (envw *environmentWatcher) getLabels(envName string, envNamespace string, e
func (envw *environmentWatcher) watchEnvironments() {
rv := ""
for {
wi, err := envw.fissionClient.V1().Environments(metav1.NamespaceAll).Watch(metav1.ListOptions{
wi, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).Watch(metav1.ListOptions{
ResourceVersion: rv,
})
if err != nil {
@@ -181,7 +181,7 @@ func (envw *environmentWatcher) watchEnvironments() {
func (envw *environmentWatcher) sync() {
maxRetries := 10
for i := 0; i < maxRetries; i++ {
envList, err := envw.fissionClient.V1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
envList, err := envw.fissionClient.CoreV1().Environments(metav1.NamespaceAll).List(metav1.ListOptions{})
if err != nil {
if utils.IsNetworkError(err) {
envw.logger.Error("error syncing environment CRD resources due to network error, retrying later", zap.Error(err))