Skip to content

Commit

Permalink
Merge pull request #3 from vngcloud/dev
Browse files Browse the repository at this point in the history
RELEASE v0.2.2
  • Loading branch information
anngdinh authored Jun 18, 2024
2 parents 1a0ec05 + 487b3cc commit f57bf4d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: ["dev"]

env:
VERSION: v0.2.1
VERSION: v0.2.2
REPO: vcr.vngcloud.vn/60108-annd2-ingress

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: ["main"]

env:
VERSION: v0.2.1
VERSION: v0.2.2
REPO: vcr.vngcloud.vn/81-vks-public

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TAR_FILE ?= rootfs.tar

GOOS ?= $(shell go env GOOS)
GOPROXY ?= $(shell go env GOPROXY)
VERSION ?= v0.2.1
VERSION ?= v0.2.2
GOARCH :=
GOFLAGS :=
TAGS :=
Expand Down
16 changes: 8 additions & 8 deletions pkg/vngcloud/annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ func (s *ServiceConfig) CreatePoolOptions(pPort apiv1.ServicePort) *pool.CreateO
Members: []*pool.Member{},
}
for _, name := range s.EnableProxyProtocol {
if name == pPort.Name && pPort.Protocol == apiv1.ProtocolTCP {
if (name == "*" || name == pPort.Name) && pPort.Protocol == apiv1.ProtocolTCP {
opt.PoolProtocol = pool.CreateOptsProtocolOptProxy
break
}
Expand All @@ -328,7 +328,7 @@ func (s *ServiceConfig) CreatePoolOptions(pPort apiv1.ServicePort) *pool.CreateO

func (s *ServiceConfig) MappingProtocol(pPort apiv1.ServicePort) string {
for _, name := range s.EnableProxyProtocol {
if name == pPort.Name && pPort.Protocol == apiv1.ProtocolTCP {
if (name == "*" || name == pPort.Name) && pPort.Protocol == apiv1.ProtocolTCP {
return string(pool.CreateOptsProtocolOptProxy)
}
}
Expand All @@ -340,10 +340,10 @@ func (s *ServiceConfig) GenListenerName(clusterName string, pService *apiv1.Serv
name := fmt.Sprintf("%s_%s_%s_%s_%s_%s_%d",
consts.DEFAULT_LB_PREFIX_NAME,
utils.TrimString(clusterName, 10),
utils.TrimString(pService.Namespace, 10),
utils.TrimString(pService.Name, 10),
utils.TrimString(pService.Namespace, 9),
utils.TrimString(pService.Name, 9),
hash,
pPort.Protocol,
utils.TrimString(string(pPort.Protocol), 3),
pPort.Port)
return utils.ValidateName(name)
}
Expand All @@ -355,10 +355,10 @@ func (s *ServiceConfig) GenPoolName(clusterName string, pService *apiv1.Service,
name := fmt.Sprintf("%s_%s_%s_%s_%s_%s_%d",
consts.DEFAULT_LB_PREFIX_NAME,
utils.TrimString(clusterName, 10),
utils.TrimString(pService.Namespace, 10),
utils.TrimString(pService.Name, 10),
utils.TrimString(pService.Namespace, 9),
utils.TrimString(pService.Name, 9),
hash,
realProtocol,
utils.TrimString(realProtocol, 3),
pPort.Port)
return utils.ValidateName(name)
}

0 comments on commit f57bf4d

Please sign in to comment.