Skip to content

Commit

Permalink
index
Browse files Browse the repository at this point in the history
Signed-off-by: 刘硕 <liushuo@zetyun.com>
  • Loading branch information
刘硕 committed Sep 12, 2023
1 parent a46e941 commit d2be8ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func ExistsPriorities(pod *v1.Pod) bool {

func GetContainerPriority(c *v1.Container) *int {
for _, e := range c.Env {
if e.Name == appspub.ContainerLaunchBarrierEnvName {
if e.Name == appspub.ContainerLaunchBarrierEnvName && len(e.ValueFrom.ConfigMapKeyRef.Key) >= priorityStartIndex {
p, _ := strconv.Atoi(e.ValueFrom.ConfigMapKeyRef.Key[priorityStartIndex:])
return &p
}
Expand Down

0 comments on commit d2be8ec

Please sign in to comment.