Skip to content

Commit

Permalink
chore: Move K8s label defs to the STUNner package
Browse files Browse the repository at this point in the history
  • Loading branch information
rg0now committed Feb 21, 2024
1 parent 115a536 commit 439e2d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/go-logr/logr v1.4.1
github.com/go-logr/zapr v1.3.0
github.com/l7mp/stunner v0.17.11
github.com/l7mp/stunner v0.17.12
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.30.0
github.com/stretchr/testify v1.8.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/l7mp/stunner v0.17.11 h1:b/jA0YwZhS0UQ1CuZWxUP5hhGea1U/+zF/Cky2J95Uw=
github.com/l7mp/stunner v0.17.11/go.mod h1:l8QQqt1B108z1shXzl3/LLZhrQLy6gOIYbF7baA5xCY=
github.com/l7mp/stunner v0.17.12 h1:1IRNrCPtV/VZnbC6DMWhEBO2I0sDc1tOhAX01+GO63s=
github.com/l7mp/stunner v0.17.12/go.mod h1:coyJ/CrOcM4B6z+zoYUxfVPPOXZhd4NnbjiAQ093Uq0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
Expand Down
12 changes: 6 additions & 6 deletions pkg/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,30 @@ const (
// ConfigMaps, and Deployments) dynamically created and maintained by the operator. Note
// that the Deployments and Services created by the operator will have both the AppLabelKey
// and the OwnedByLabelKey labels set.
OwnedByLabelKey = "stunner.l7mp.io/owned-by"
OwnedByLabelKey = stnrconfv1.DefaultOwnedByLabelKey

// OwnedByLabelValue is the value of OwnedByLabelKey to indicate that a resource is
// maintained by the operator.
OwnedByLabelValue = "stunner"
OwnedByLabelValue = stnrconfv1.DefaultOwnedByLabelValue

// RelatedGatewayKey is the name of the label that is used to tie a LoadBalancer service, a
// STUNner dataplane ConfigMap, or a stunnerd Deployment (in managed mode) to a
// Gateway. The value is either a singular pair of a namespace and name when of the related
// Gateway (in the form "namespace/name", mostly used for associating a LB Service to a
// Gateway) or GatewayConfig (used for ConfigMaps storing STUNner dataplane configs in
// legacy mode, which usually belong to multiple Gateways).
RelatedGatewayKey = "stunner.l7mp.io/related-gateway-name"
RelatedGatewayKey = stnrconfv1.DefaultRelatedGatewayKey

// RelatedGatewayNamespace is the name of the label that is used to tie a LoadBalancer
// service, a STUNner dataplane ConfigMap, or a stunnerd Deployment (in managed mode) to a
// Gateway. The value is the namespace of the related Gateway.
RelatedGatewayNamespace = "stunner.l7mp.io/related-gateway-namespace"
RelatedGatewayNamespace = stnrconfv1.DefaultRelatedGatewayNamespace

// AppLabelKey defines the label used to mark the pods of the stunnerd Deployment.
AppLabelKey = "app"
AppLabelKey = stnrconfv1.DefaultAppLabelKey

// AppLabelValue defines the label value used to mark the pods of the stunnerd deployment.
AppLabelValue = "stunner"
AppLabelValue = stnrconfv1.DefaultAppLabelValue

// ServiceTypeAnnotationKey defines the type of the service created to expose each Gateway
// to external clients. Can be either `None` (no service created), `ClusterIP`, `NodePort`,
Expand Down

0 comments on commit 439e2d1

Please sign in to comment.