diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml index 98b896f..39202fe 100644 --- a/.github/workflows/ci-dev.yml +++ b/.github/workflows/ci-dev.yml @@ -5,7 +5,7 @@ on: branches: ["dev"] env: - VERSION: v0.2.1 + VERSION: v0.2.2 REPO: vcr.vngcloud.vn/60108-annd2-ingress jobs: diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 3308a93..b55df28 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -5,7 +5,7 @@ on: branches: ["main"] env: - VERSION: v0.2.1 + VERSION: v0.2.2 REPO: vcr.vngcloud.vn/81-vks-public jobs: diff --git a/Makefile b/Makefile index 99e3c87..3a744bf 100644 --- a/Makefile +++ b/Makefile @@ -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 := diff --git a/pkg/vngcloud/annotation.go b/pkg/vngcloud/annotation.go index 8cd9595..aee90f4 100644 --- a/pkg/vngcloud/annotation.go +++ b/pkg/vngcloud/annotation.go @@ -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 } @@ -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) } } @@ -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) } @@ -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) }