Skip to content

Commit

Permalink
modification for k8s 1.23.15
Browse files Browse the repository at this point in the history
Signed-off-by: Shelley-BaoYue <[email protected]>
  • Loading branch information
Shelley-BaoYue committed Jan 16, 2023
1 parent 9e211f7 commit e10f4d1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion edge/cmd/edgemark/hollow_edgecore.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func EdgeCoreConfig(config *hollowEdgeNodeConfig) *v1alpha2.EdgeCoreConfig {
edgeCoreConfig := v1alpha2.NewDefaultEdgeCoreConfig()

falseFlag := false
trueFlag := true

// overWrite config
edgeCoreConfig.DataBase.DataSource = "/edgecore.db"
Expand All @@ -144,7 +145,7 @@ func EdgeCoreConfig(config *hollowEdgeNodeConfig) *v1alpha2.EdgeCoreConfig {

edgeCoreConfig.Modules.Edged.HostnameOverride = config.NodeName
edgeCoreConfig.Modules.Edged.NodeLabels = config.NodeLabels
edgeCoreConfig.Modules.Edged.RegisterNode = true
edgeCoreConfig.Modules.Edged.TailoredKubeletConfig.RegisterNode = &trueFlag
edgeCoreConfig.Modules.Edged.TailoredKubeletConfig.CgroupsPerQOS = &falseFlag
edgeCoreConfig.Modules.Edged.ContainerRuntime = kubetypes.RemoteContainerRuntime
edgeCoreConfig.Modules.Edged.TailoredKubeletConfig.EnableControllerAttachDetach = &falseFlag
Expand Down
1 change: 0 additions & 1 deletion edge/pkg/edged/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func ConvertConfigEdgedFlagToConfigKubeletFlag(in *v1alpha2.TailoredKubeletFlag,
out.HostnameOverride = in.HostnameOverride
out.NodeIP = in.NodeIP
out.RootDirectory = in.RootDirectory
out.RegisterNode = in.RegisterNode
out.RegisterWithTaints = in.RegisterWithTaints
out.RemoteRuntimeEndpoint = in.RemoteRuntimeEndpoint
out.RemoteImageEndpoint = in.RemoteImageEndpoint
Expand Down
8 changes: 4 additions & 4 deletions edge/test/integration/appdeployment/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ var _ = Describe("Application deployment in edgecore Testing", func() {
//Generate the random string and assign as a UID
UID = "deployment-app-" + edge.GetRandomString(10)
httpact := v1.HTTPGetAction{Path: "/var/lib/edged", Scheme: "HTTP", Port: intstr.IntOrString{Type: intstr.Type(1), IntVal: 1884, StrVal: "1884"}}
handler := v1.Handler{HTTPGet: &httpact}
probe := v1.Probe{Handler: handler, TimeoutSeconds: 1, InitialDelaySeconds: 10, PeriodSeconds: 15}
handler := v1.ProbeHandler{HTTPGet: &httpact}
probe := v1.Probe{ProbeHandler: handler, TimeoutSeconds: 1, InitialDelaySeconds: 10, PeriodSeconds: 15}
IsAppDeployed := HandleAddAndDeletePods(http.MethodPut, ctx.Cfg.TestManager+AppHandler, UID, []v1.Container{{Name: UID, Image: ctx.Cfg.AppImageURL[0], LivenessProbe: &probe, ImagePullPolicy: v1.PullIfNotPresent}}, v1.RestartPolicyOnFailure)
Expect(IsAppDeployed).Should(BeTrue())
CheckPodRunningState(ctx.Cfg.EdgedEndpoint+AppHandler, UID)
Expand All @@ -163,8 +163,8 @@ var _ = Describe("Application deployment in edgecore Testing", func() {
//Generate the random string and assign as a UID
UID = "deployment-app-" + edge.GetRandomString(10)
httpact := v1.HTTPGetAction{Path: "/var/lib/edged", Scheme: "HTTP", Port: intstr.IntOrString{Type: intstr.Type(1), IntVal: 10255, StrVal: "10255"}}
handler := v1.Handler{HTTPGet: &httpact}
probe := v1.Probe{Handler: handler, TimeoutSeconds: 1, InitialDelaySeconds: 10, PeriodSeconds: 15}
handler := v1.ProbeHandler{HTTPGet: &httpact}
probe := v1.Probe{ProbeHandler: handler, TimeoutSeconds: 1, InitialDelaySeconds: 10, PeriodSeconds: 15}
IsAppDeployed := HandleAddAndDeletePods(http.MethodPut, ctx.Cfg.TestManager+AppHandler, UID, []v1.Container{{Name: UID, Image: ctx.Cfg.AppImageURL[0], ReadinessProbe: &probe, ImagePullPolicy: v1.PullIfNotPresent}}, v1.RestartPolicyOnFailure)
Expect(IsAppDeployed).Should(BeTrue())
CheckPodRunningState(ctx.Cfg.EdgedEndpoint+AppHandler, UID)
Expand Down
2 changes: 1 addition & 1 deletion keadm/cmd/keadm/app/cmd/util/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
dockerclient "github.com/docker/docker/client"
"github.com/docker/go-connections/nat"
internalapi "k8s.io/cri-api/pkg/apis"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
"k8s.io/klog/v2"
"k8s.io/kubernetes/pkg/kubelet/cri/remote"
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
Expand Down

0 comments on commit e10f4d1

Please sign in to comment.