Change container base image to cgr.dev/chainguard/static (#2881)

* Change container base image to cgr.dev/chainguard/static
* Lint fixes
* fix test failure
* Add router deployment wait
* add check command in upgrade script

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2023-11-24 19:01:31 +05:30
committed by GitHub
parent 95faf60959
commit 62f729727a
23 changed files with 33 additions and 38 deletions
@@ -430,7 +430,7 @@ func (caaf *Container) fnCreate(ctx context.Context, fn *fv1.Function) (*fscache
kubeObjRefs := []apiv1.ObjectReference{
{
//obj.TypeMeta.Kind does not work hence this, needs investigation and a fix
// obj.TypeMeta.Kind does not work hence this, needs investigation and a fix
Kind: "deployment",
Name: depl.ObjectMeta.Name,
APIVersion: depl.TypeMeta.APIVersion,
@@ -43,7 +43,7 @@ func getPoolName(env *fv1.Environment) string {
return a
}
//To fit the 63 character limit
// To fit the 63 character limit
if len(env.ObjectMeta.Name)+len(env.ObjectMeta.Namespace) < 37 {
envPodName = env.ObjectMeta.Name + "-" + env.ObjectMeta.Namespace
} else {
+1 -1
View File
@@ -40,7 +40,7 @@ import (
type fscRequestType int
//type executorType int
// type executorType int
// FunctionServiceCache Request Types
const (
@@ -165,7 +165,7 @@ func TestFunctionServiceNewCache(t *testing.T) {
_, err = fsc.GetFuncSvc(ctx, fsvc.Function, 5, concurrency)
require.NoError(t, err)
//key := fmt.Sprintf("%v_%v", cancel.UID, fn.ObjectMeta.ResourceVersion)
// key := fmt.Sprintf("%v_%v", cancel.UID, fn.ObjectMeta.ResourceVersion)
key := crd.CacheKeyURGFromMeta(&fn.ObjectMeta)
fsc.MarkAvailable(key, fsvc.Address)
+1 -1
View File
@@ -218,7 +218,7 @@ func CleanupHpa(ctx context.Context, logger *zap.Logger, client kubernetes.Inter
func GetReaperNamespace() map[string]string {
ns := utils.DefaultNSResolver()
//to support backward compatibility we need to cleanup deployment and rolebinding created in function, buidler and default namespace as well
// to support backward compatibility we need to cleanup deployment and rolebinding created in function, buidler and default namespace as well
fissionResourceNs := ns.FissionNSWithOptions(utils.WithBuilderNs(), utils.WithFunctionNs(), utils.WithDefaultNs())
return fissionResourceNs
}
+2 -2
View File
@@ -112,12 +112,12 @@ func MergePodSpec(srcPodSpec *apiv1.PodSpec, targetPodSpec *apiv1.PodSpec) (*api
srcPodSpec.EnableServiceLinks = targetPodSpec.EnableServiceLinks
}
//TODO - Security context should be merged instead of overriding.
// TODO - Security context should be merged instead of overriding.
if targetPodSpec.SecurityContext != nil {
srcPodSpec.SecurityContext = targetPodSpec.SecurityContext
}
//TODO - Affinity should be merged instead of overriding.
// TODO - Affinity should be merged instead of overriding.
if targetPodSpec.Affinity != nil {
srcPodSpec.Affinity = targetPodSpec.Affinity
}