Skip to content

Commit

Permalink
[release-v1.11] [SRVKS-987] Fix deprecated fields (#97)
Browse files Browse the repository at this point in the history
* Fix deprecated fields

* Run openshift/release/download_release_artifacts.sh

---------

Co-authored-by: norbjd <norbjd@users.noreply.github.com>
Co-authored-by: Kenjiro Nakayama <nakayamakenjiro@gmail.com>
  • Loading branch information
3 people authored Aug 15, 2023
1 parent d7dfed7 commit edce0fd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions config/200-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ data:
routes:
- match:
safe_regex:
google_re2: {}
regex: '/(certs|stats(/prometheus)?|server_info|clusters|listeners|ready)?'
headers:
- name: ':method'
exact_match: GET
string_match:
exact: GET
route:
cluster: service_stats
clusters:
Expand Down
4 changes: 2 additions & 2 deletions openshift/release/artifacts/net-kourier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ data:
routes:
- match:
safe_regex:
google_re2: {}
regex: '/(certs|stats(/prometheus)?|server_info|clusters|listeners|ready)?'
headers:
- name: ':method'
exact_match: GET
string_match:
exact: GET
route:
cluster: service_stats
clusters:
Expand Down
3 changes: 1 addition & 2 deletions pkg/envoy/api/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package envoy

import (
core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
"google.golang.org/protobuf/types/known/wrapperspb"
)

// headersToAdd generates a list of HeaderValueOption from a map of headers.
Expand All @@ -36,7 +35,7 @@ func headersToAdd(headers map[string]string) []*core.HeaderValueOption {
},
// In Knative Serving, headers are set instead of appended.
// Ref: https://github.com/knative/serving/pull/6366
Append: wrapperspb.Bool(false),
AppendAction: core.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD,
})
}

Expand Down
5 changes: 2 additions & 3 deletions pkg/envoy/api/headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
"google.golang.org/protobuf/testing/protocmp"
"google.golang.org/protobuf/types/known/wrapperspb"
"gotest.tools/v3/assert"
)

Expand Down Expand Up @@ -50,13 +49,13 @@ func TestHeadersToAdd(t *testing.T) {
Key: "foo",
Value: "bar",
},
Append: wrapperspb.Bool(false),
AppendAction: core.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD,
}, {
Header: &core.HeaderValue{
Key: "baz",
Value: "lol",
},
Append: wrapperspb.Bool(false),
AppendAction: core.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD,
}},
}}

Expand Down
2 changes: 1 addition & 1 deletion pkg/envoy/api/weighted_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestNewWeightedCluster(t *testing.T) {
Key: "foo",
Value: "bar",
},
Append: wrapperspb.Bool(false),
AppendAction: core.HeaderValueOption_OVERWRITE_IF_EXISTS_OR_ADD,
}},
}

Expand Down

0 comments on commit edce0fd

Please sign in to comment.