Skip to content

Commit

Permalink
fix: fix the testdata
Browse files Browse the repository at this point in the history
Signed-off-by: Kensei Nakada <handbomusic@gmail.com>
  • Loading branch information
sanposhiho committed Aug 3, 2024
1 parent e8c6ebf commit d86df6a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,14 @@ func (r *ResourceRender) ConfigMap() (*corev1.ConfigMap, error) {
// stableSelector returns a stable selector based on the owning gateway labels.
// "stable" here means the selector doesn't change when the infra is updated.
func (r *ResourceRender) stableSelector() *metav1.LabelSelector {
return resource.GetSelector(envoyLabels(r.infra.GetProxyMetadata().Labels))
labels := map[string]string{}
for k, v := range r.infra.GetProxyMetadata().Labels {
if k == gatewayapi.OwningGatewayNameLabel || k == gatewayapi.OwningGatewayNamespaceLabel || k == gatewayapi.OwningGatewayClassLabel {
labels[k] = v
}
}

return resource.GetSelector(envoyLabels(labels))
}

// Deployment returns the expected Deployment based on the provided infra.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ spec:
app.kubernetes.io/component: proxy
app.kubernetes.io/managed-by: envoy-gateway
app.kubernetes.io/name: envoy
foo.bar: custom-label
gateway.envoyproxy.io/owning-gateway-name: default
gateway.envoyproxy.io/owning-gateway-namespace: default
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ spec:
app.kubernetes.io/name: envoy
gateway.envoyproxy.io/owning-gateway-name: default
gateway.envoyproxy.io/owning-gateway-namespace: default
label1: value1-override
label2: value2
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
app.kubernetes.io/component: proxy
app.kubernetes.io/managed-by: envoy-gateway
app.kubernetes.io/name: envoy
foo.bar: custom-label
gateway.envoyproxy.io/owning-gateway-name: default
gateway.envoyproxy.io/owning-gateway-namespace: default
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
app.kubernetes.io/component: proxy
app.kubernetes.io/managed-by: envoy-gateway
app.kubernetes.io/name: envoy
foo.bar: custom-label
gateway.envoyproxy.io/owning-gateway-name: default
gateway.envoyproxy.io/owning-gateway-namespace: default
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ spec:
app.kubernetes.io/name: envoy
gateway.envoyproxy.io/owning-gateway-name: default
gateway.envoyproxy.io/owning-gateway-namespace: default
label1: value1-override
label2: value2
strategy:
type: RollingUpdate
template:
Expand Down

0 comments on commit d86df6a

Please sign in to comment.