Remove unwanted permissions from Fission components (#2568)
* Remove unwanted permissions from Fission components
* Remove unwanted permission from buildermgr
* Remove rbac permissions from controller
* Remove unwanted namespace permission
* Remove unwanted fission resource permissions
* Add deployment list permission for buildermgr
* add deployment create permission for buildermgr
* Update action version
* Add rolebinding permission for buildermanager
* Reduce permissions for fetcher and builder components
* Aded deployment delete permission to buildermgr
* Add logger to wait crds function
* Revert "Grant CustomResourcedefintion read permission to specific components (#2567)"
This reverts commit 8fe62b755c.
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -259,7 +259,7 @@ func StartExecutor(ctx context.Context, logger *zap.Logger, functionNamespace st
|
||||
return errors.Wrap(err, "failed to get kubernetes client")
|
||||
}
|
||||
|
||||
err = crd.WaitForCRDs(ctx, fissionClient)
|
||||
err = crd.WaitForCRDs(ctx, logger, fissionClient)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error waiting for CRDs")
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ func TestExecutor(t *testing.T) {
|
||||
log.Panicf("failed to ensure crds: %v", err)
|
||||
}
|
||||
|
||||
err = crd.WaitForCRDs(ctx, fissionClient)
|
||||
err = crd.WaitForCRDs(ctx, logger, fissionClient)
|
||||
if err != nil {
|
||||
log.Panicf("failed to wait crds: %v", err)
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ func (deploy *NewDeploy) getDeploymentSpec(ctx context.Context, fn *fv1.Function
|
||||
},
|
||||
Spec: apiv1.PodSpec{
|
||||
Containers: []apiv1.Container{*container},
|
||||
ServiceAccountName: "fission-fetcher",
|
||||
ServiceAccountName: fv1.FissionFetcherSA,
|
||||
TerminationGracePeriodSeconds: &gracePeriodSeconds,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ func (gp *GenericPool) genDeploymentSpec(env *fv1.Environment) (*appsv1.Deployme
|
||||
},
|
||||
Spec: apiv1.PodSpec{
|
||||
Containers: []apiv1.Container{*container},
|
||||
ServiceAccountName: "fission-fetcher",
|
||||
ServiceAccountName: fv1.FissionFetcherSA,
|
||||
// TerminationGracePeriodSeconds should be equal to the
|
||||
// sleep time of preStop to make sure that SIGTERM is sent
|
||||
// to pod after 6 mins.
|
||||
|
||||
Reference in New Issue
Block a user