Remove service account/role binding/role permissions from Fission services (#2655)
* Remove cluster role references * Convert secret/package getter cluster roles to role * Remove all cluster role binding permissions * Remove unwanted permission * Try removing all RBAC-related code * Remove additional constants * Add functionality for service account checks * Restrict permission across services * Remove package informer factory from the executor * Revert service account check code for now * Skip adding roles in place of cluster roles * Remove additional permission from the router Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
package container
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@@ -14,7 +12,6 @@ import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/intstr"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
|
||||
fv1 "github.com/fission/fission/pkg/apis/core/v1"
|
||||
"github.com/fission/fission/pkg/fetcher"
|
||||
@@ -91,16 +88,6 @@ func MakeFetcherConfig(sharedMountPath string) (*Config, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (cfg *Config) SetupServiceAccount(ctx context.Context, kubernetesClient kubernetes.Interface, namespace string, context interface{}) error {
|
||||
_, err := utils.SetupSA(ctx, kubernetesClient, fv1.FissionFetcherSA, namespace)
|
||||
if err != nil {
|
||||
log.Printf("Error : %v creating %s in ns : %s for: %#v", err, fv1.FissionFetcherSA, namespace, context)
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cfg *Config) SharedMountPath() string {
|
||||
return cfg.sharedMountPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user