Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.14 changes that need to be in 2.0 #3867

Merged
merged 189 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
3431032
switch to using shared charts repo (#3537)
acookin Jun 11, 2021
790846e
Update for v1.13.9
acookin Jun 29, 2021
2af1004
tcp mapping fix
acookin Jun 28, 2021
5384854
changelog update
acookin Jun 29, 2021
13c52b0
Update for v1.13.9 (#3582)
acookin Jun 30, 2021
148c0ce
Updating and manifest images for v1.13.9 (#3583)
acookin Jun 30, 2021
8343d52
Pytest runs on clean checkout and on OSX (#3585) (#3592)
acookin Jul 6, 2021
e807e1b
dont overwrite 2.0 manifests (#3589)
acookin Jul 6, 2021
0d9985a
fixes for 1.13 releng scripts (#3584)
acookin Jul 6, 2021
3c10974
set go version on build (#3636)
acookin Jul 26, 2021
2fd606d
Update for v1.13.10
Jul 14, 2021
0c90146
promote to passed works better
acookin Jul 14, 2021
e07109e
Allow "make deploy" to work.
Jul 13, 2021
7115d19
Basic Ambex visibility: save a certain number of Ambex snapshots to d…
Jul 13, 2021
6f072ef
CHANGELOG
Jul 14, 2021
4bfad6f
Support hotfix tags in CI
Jul 15, 2021
70577ca
Fix the docker tag for hotfixes.
Jul 15, 2021
8fc4b51
Note Edge Stack Consul certificate-rotation logging changes in the CH…
Jul 15, 2021
cd94125
cors origins roundtrip fix (#3612)
acookin Jul 16, 2021
b2a2234
added timeout to the mapping->docs CRD
aidanhahn Jul 20, 2021
e07dc75
add config generation test
aidanhahn Jul 22, 2021
3c53df7
Exclude hotfix tags when looking at versions.
Jul 22, 2021
8da6ca1
fix pytest schema checks
aidanhahn Jul 26, 2021
4f4ac2b
Allow switching the ambex ratelimiter off.
Jul 23, 2021
25eede6
CHANGELOG
Jul 24, 2021
9a94d25
Merge pull request #3631 from emissary-ingress/flynn/dev/ratelimit-sw…
aidanhahn Jul 26, 2021
444a2b1
add changelog notes for devportal timeout changes
aidanhahn Jul 26, 2021
6136606
Merge branch 'rel/v1.13.10' of github.com:emissary-ingress/emissary i…
aidanhahn Jul 26, 2021
405477b
Update CHANGELOG for 1.13.10
Jul 27, 2021
17c6bb2
Another minor CHANGELOG tweak
Jul 27, 2021
e0ccdd6
Updating and manifest images for v1.13.10
aidanhahn Jul 28, 2021
85d4b98
Update for v1.13.10
aidanhahn Jul 28, 2021
c2dc110
Merge pull request #3605 from emissary-ingress/rel/v1.13.10
aidanhahn Jul 28, 2021
9664ae8
Merge pull request #3643 from emissary-ingress/aidan/v1.13.10/chart-i…
aidanhahn Jul 28, 2021
4920c99
Merge pull request #3642 from emissary-ingress/aidan/v1.13.10/changel…
aidanhahn Jul 28, 2021
903790b
Update quote service yaml
Alice-Lilith Jul 29, 2021
95fdd23
pkg/busy: Clean up
LukeShu Jul 30, 2021
2f1b0ef
pkg/busy: Have the logger include sub-second precision in the timestamps
LukeShu Jul 30, 2021
db42561
pkg/busy: Be clearer that not passing the Context correctly is a bug
LukeShu Jul 30, 2021
51f1efe
Merge pull request #3648 from emissary-ingress/lukeshu/dlog-fixup
kflynn Aug 2, 2021
e448c45
hotfix yaml agent rbac: add rbac to yaml (#3651)
acookin Aug 2, 2021
e537f29
Reorder imports.
Aug 2, 2021
884aef4
Add parse_bool
Aug 2, 2021
5fe0ee7
Support ALLOW_UNTRACKED environment variable when starting a new vers…
Aug 2, 2021
8208c96
Update reviewers when starting a new release.
Aug 2, 2021
007f394
Merge pull request #3652 from emissary-ingress/flynn/dev/allow-untracked
kflynn Aug 2, 2021
cfad225
Update for v1.13.11
Aug 2, 2021
3e74a7f
Merge pull request #3653 from emissary-ingress/flynn/v1.13.11/start-r…
kflynn Aug 2, 2021
09a6377
CHANGELOG for logging tweaks.
Aug 2, 2021
c4b766f
Merge pull request #3654 from emissary-ingress/flynn/dev/logging-CHAN…
kflynn Aug 2, 2021
162b11b
Add an AMBASSADOR_GRPC_METRICS_SINK environment variable and an examp…
Aug 2, 2021
dedc636
make target to promote hotfix build (#3655)
acookin Aug 2, 2021
2cbc086
Clean up indentation.
Aug 2, 2021
342cebb
Consistent ;\
Aug 2, 2021
e671060
Fix missing `
Aug 2, 2021
bda8745
Use $$( ) instead of `` (it's slightly easier to catch a missing clos…
Aug 2, 2021
df1fb86
Missing semicolon
Aug 2, 2021
22ea26d
Drop excess ;
Aug 2, 2021
d3dc8b0
Allow overriding the hotfix commitish using HOTFIX_COMMIT. Fix a coup…
Aug 2, 2021
0d0db46
Fix push tag.
Aug 2, 2021
1482c02
Fix AWS secret key assignment.
Aug 2, 2021
b00210b
Merge pull request #3656 from emissary-ingress/rhs/grpc-metrics-sink
Aug 3, 2021
456b3b2
Merge pull request #3659 from emissary-ingress/flynn/dev/hotfix-tweaks
kflynn Aug 3, 2021
6dafc84
Merge pull request #3646 from emissary-ingress/alicewasko/quote-manif…
kflynn Aug 3, 2021
113f58b
Add progressDeadlines to chart
Alice-Lilith Aug 3, 2021
40cd13c
update changelog
Alice-Lilith Aug 3, 2021
012dee6
freeze orjson to version 3.6.0
aidanhahn Aug 4, 2021
72cbedc
Merge pull request #3663 from emissary-ingress/freeze-orjson-1.13
kflynn Aug 5, 2021
77bff5c
Remove duplicate changelog verison
Alice-Lilith Aug 6, 2021
21c0518
klogv2 for 1.13
njayp Aug 6, 2021
ae751de
Merge pull request #3672 from emissary-ingress/njayp/klog1.13
njayp Aug 9, 2021
2433b3f
Merge pull request #3660 from emissary-ingress/alicewasko/1.13-chart-…
Alice-Lilith Aug 16, 2021
4ecb3ed
1.14.0 release branch
acookin Aug 16, 2021
a72f9f5
fix ci to run on emissary-private
acookin Aug 16, 2021
c01fcf5
update envoy commit
aidanhahn Aug 16, 2021
4a6e61f
dont push manifests if IS_PRIVATE
acookin Aug 16, 2021
d18f43e
updates for embargoed
acookin Aug 16, 2021
6420cab
envoy v3 should be default
acookin Aug 16, 2021
8bebe07
run make generate
aidanhahn Aug 16, 2021
c466177
dont push manifests if IS_PRIVATE (#14)
acookin Aug 16, 2021
c7d8ae1
Merge pull request #15 from datawire/acookin/1.14/envoyv3
aidanhahn Aug 16, 2021
ddcbc5d
gotest fix (#16)
acookin Aug 16, 2021
c1b284c
run make generate
aidanhahn Aug 16, 2021
43b0d91
remove tests that were commented out on master
aidanhahn Aug 16, 2021
a192e36
Merge pull request #17 from datawire/aidanhahn/rel/v1.14.0
aidanhahn Aug 16, 2021
e8a9a48
enable deprecated apis
acookin Aug 16, 2021
2d430be
pytest corrections (#18)
aidanhahn Aug 17, 2021
a72cf2a
gzip fix (#19)
acookin Aug 17, 2021
f34f941
invalidate v3 cache
acookin Aug 17, 2021
183236b
pytest envoy v2 test fixes (#21)
acookin Aug 17, 2021
5cf7440
envoy v2 fixes maybz (#22)
acookin Aug 17, 2021
d15d3b4
reformat gold test config json
aidanhahn Aug 17, 2021
3ac4645
explicitly allow User-Agent and X-Forwarded-Proto headers in kat test
aidanhahn Aug 17, 2021
f2680af
revert extauth test change
aidanhahn Aug 17, 2021
178082c
Merge pull request #23 from datawire/aidanhahn/rel/v1.14.0
aidanhahn Aug 17, 2021
972ec38
also push rc for emissary privaet
acookin Aug 17, 2021
ae52d8b
allow chunked length (#24)
acookin Aug 18, 2021
6af849c
update pf gomod
acookin Aug 18, 2021
38c7f8f
v3 api needs ignore_case specified for ext_authz headers
aidanhahn Aug 18, 2021
7aa61e0
yank deprecated config option
aidanhahn Aug 18, 2021
081c69f
update gold tests
aidanhahn Aug 18, 2021
52ff9fa
update t_chunked_length test
aidanhahn Aug 18, 2021
1719a29
go mod tidy
aidanhahn Aug 18, 2021
0c895f5
Merge pull request #25 from datawire/aidanhahn/rel/v1.14.0
aidanhahn Aug 18, 2021
7f132a9
changelog updates for 1.14.0
acookin Aug 19, 2021
89ec5f4
Update for v1.14.0
aidanhahn Aug 19, 2021
04f0d43
Merge pull request #3710 from emissary-ingress/acookin/1.14/changelog
aidanhahn Aug 19, 2021
e2a34d6
add .z version to envoy version listed in changelog
aidanhahn Aug 19, 2021
a5bb115
Merge pull request #3711 from emissary-ingress/aidan/v1.14.0/changelo…
aidanhahn Aug 19, 2021
c2b9004
fix bad test in makefile
aidanhahn Aug 19, 2021
b9f2be5
Merge branch 'rel/v1.14.0' of github.com:emissary-ingress/emissary in…
aidanhahn Aug 19, 2021
d206224
fix another bad makefile test
aidanhahn Aug 19, 2021
d8ce92d
Updating and manifest images for v1.14.0
aidanhahn Aug 20, 2021
e82e956
Merge pull request #3712 from emissary-ingress/aidan/v1.14.0/chart-im…
aidanhahn Aug 20, 2021
8ec0548
fix yet another broken makefile test
aidanhahn Aug 20, 2021
73479e0
Merge branch 'rel/v1.14.0' of github.com:emissary-ingress/emissary in…
aidanhahn Aug 20, 2021
465b346
Merge pull request #3702 from emissary-ingress/rel/v1.14.0
aidanhahn Aug 20, 2021
0c6f955
update aes version in chart (#3713)
acookin Aug 20, 2021
205aea6
Merge pull request #12 from datawire/rel/v1.14.0
aidanhahn Aug 21, 2021
a34a153
Update for v1.14.1
aidanhahn Aug 21, 2021
2929164
Merge pull request #3714 from emissary-ingress/aidan/v1.14.1/start-re…
aidanhahn Aug 21, 2021
83a8da9
fix bad test in makefile
aidanhahn Aug 19, 2021
2f0c60b
Update for v1.14.0
aidanhahn Aug 19, 2021
48625d7
changelog updates for 1.14.0
acookin Aug 19, 2021
816744e
add .z version to envoy version listed in changelog
aidanhahn Aug 19, 2021
73ea909
fix another bad makefile test
aidanhahn Aug 19, 2021
37b9bd7
fix yet another broken makefile test
aidanhahn Aug 20, 2021
253be1b
Updating and manifest images for v1.14.0
aidanhahn Aug 20, 2021
66914bc
update aes version in chart (#3713)
acookin Aug 20, 2021
b2dd18c
Merge branch 'rel/v1.14.1' of github.com:datawire/emissary-private in…
aidanhahn Aug 21, 2021
7c2d0f0
Update for v1.14.1
aidanhahn Aug 21, 2021
866b125
Merge branch 'rel/v1.14.1' of github.com:datawire/emissary-private in…
aidanhahn Aug 21, 2021
2a57242
bump envoy
aidanhahn Aug 21, 2021
95a3104
Merge pull request #29 from datawire/aidanhahn/envoy-1.17-patched
aidanhahn Aug 21, 2021
1be09b8
update changelog
aidanhahn Aug 23, 2021
1babddf
fix flake
aidanhahn Aug 23, 2021
fec8d5d
patch IS_PRIVATE
acookin Aug 24, 2021
9f18b45
Update for v1.14.1
aidanhahn Aug 24, 2021
57e17dc
update changelog to remove superfluous patch note
aidanhahn Aug 24, 2021
b050a5a
Merge pull request #3728 from emissary-ingress/1.14.1-changelog-edit
aidanhahn Aug 24, 2021
b2d22cf
Merge pull request #3727 from emissary-ingress/aidan/v1.14.1/changelo…
aidanhahn Aug 24, 2021
f2e0f60
Updating and manifest images for v1.14.1
aidanhahn Aug 24, 2021
fd1f56b
Merge pull request #3715 from emissary-ingress/rel/v1.14.1
aidanhahn Aug 24, 2021
c7d33d5
Merge pull request #3729 from emissary-ingress/aidan/v1.14.1/chart-im…
aidanhahn Aug 24, 2021
c0e138a
allow configuring dns_type
Alice-Lilith Aug 25, 2021
ef1bbf8
lint mapping types
Alice-Lilith Aug 25, 2021
c6ac366
run make generate
acookin Aug 26, 2021
8f85745
Merge pull request #3734 from emissary-ingress/aidanhahn/fix-flake-1.…
aidanhahn Aug 26, 2021
1521139
Add tests
Alice-Lilith Sep 9, 2021
a438c42
add crd for devportal
Alice-Lilith Sep 13, 2021
a046a32
re-create pr for 1.14
Alice-Lilith Sep 14, 2021
1522c41
make generate
Alice-Lilith Sep 14, 2021
77694df
update crd type
Alice-Lilith Sep 14, 2021
009ca61
generate deepcopy
Alice-Lilith Sep 14, 2021
f6380cc
update line ending
Alice-Lilith Sep 14, 2021
0d17252
Reformat comments to trigger another CI run.
Sep 16, 2021
bd05686
add newline
Alice-Lilith Sep 16, 2021
256d559
kick the build
Alice-Lilith Sep 16, 2021
84bdbd5
Merge pull request #3788 from emissary-ingress/alicewasko/buffer-limi…
kflynn Sep 17, 2021
c6c310b
merge 1.14 changes
Alice-Lilith Sep 17, 2021
d1c726b
config respecting dns record ttl
Alice-Lilith Sep 17, 2021
fd91830
Merge pull request #3731 from emissary-ingress/alicewasko/configure-d…
kflynn Sep 17, 2021
6a950b3
merge changes from upstream
Alice-Lilith Sep 20, 2021
6abd880
set unset variable
Alice-Lilith Sep 20, 2021
1c2282d
Merge pull request #3807 from emissary-ingress/alicewasko/follow-dns-ttl
kflynn Sep 21, 2021
eba801f
Merge pull request #3786 from emissary-ingress/alicewasko/devportal-s…
kflynn Sep 21, 2021
d483f3f
Add new features to the changelog
Alice-Lilith Sep 21, 2021
17ec502
change date in changelog
Alice-Lilith Sep 21, 2021
f8be96c
change the other date
Alice-Lilith Sep 21, 2021
4294fbe
Merge pull request #3819 from emissary-ingress/alicewasko/1.14-change…
aidanhahn Sep 21, 2021
8da5b4b
Chart: CHANGELOG updates up through 1.14.1
acookin Jun 30, 2021
87d4710
Update release notes for dns_type
Oct 6, 2021
4fc4638
set go version on build (#3636)
acookin Jul 26, 2021
b7d0cdf
Ambex comment cleanup.
Jul 13, 2021
b47a33f
cors origins roundtrip fix (#3612)
acookin Jul 16, 2021
a6f0df7
added timeout to the mapping->docs CRD
aidanhahn Jul 20, 2021
be6fe70
Releng: Reorder imports and add the parse_bool() function
Aug 2, 2021
1215ee6
Releng: Support ALLOW_UNTRACKED environment variable when starting a …
Aug 2, 2021
c60a16a
Add an AMBASSADOR_GRPC_METRICS_SINK environment variable and an examp…
Aug 2, 2021
81ada38
Envoy v3 log_format fix
acookin Aug 17, 2021
c1f84c0
fix bad IS_PRIVATE tests in makefiles
aidanhahn Aug 19, 2021
d05be68
Move misplaced unit tests into python/tests/unit where they belong.
Oct 6, 2021
b2522da
config respecting dns record ttl
Alice-Lilith Oct 6, 2021
b50c623
Add dns_ttl_tests
Alice-Lilith Oct 6, 2021
80166f4
Update release notes for dns_ttl
Oct 6, 2021
9e37c18
Support buffer_limit_bytes in ambassador module
Alice-Lilith Oct 6, 2021
a471f6a
Add buffer_limit_bytes tests
Alice-Lilith Oct 6, 2021
bacadf3
Update release notes for buffer_limit_bytes
Alice-Lilith Oct 6, 2021
a02bc1b
Merge commit '4294fbe6528af6c37cf8332f1437186b7a5c73ce' into flynn/de…
Oct 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ feedback!! Join us on <a href="https://a8r.io/slack">Slack</a> and let us know w
for ease of migration. _Note that `getambassador.io/v3alpha1` is the only supported API version
for 2.0.4_ &mdash; full support for `getambassador.io/v2` will arrive soon in a later 2.X version.

- Feature: You can now set `dns_type` between `strict_dns` and `logical_dns` in a `Mapping` to configure the
Service Discovery Type.

- Feature: You can now set `respect_dns_ttl` to `true` to force the DNS refresh rate for a `Mapping` to be
set to the record's TTL obtained from DNS resolution.

- Feature: You can now set `buffer_limit_bytes` in the `ambassador` `Module` to to change the size of the
upstream read and write buffers. The default is 1MiB.

- Bugfix: The release now shows its actual released version number, rather than the internal development
version number. ([#3854])

Expand Down Expand Up @@ -269,7 +278,7 @@ installations, reduce memory footprint, and improve performance. We welcome feed
Service Discovery Type.

- Feature: You can now set `buffer_limit_bytes` in the `ambassador` `Module` to to change the size of the
upstream read and write buffers. The default is 1MiB.
upstream read and write buffers. The default is 1MiB.

## [1.14.1] 2021-08-24
[1.14.1]: https://github.com/emissary-ingress/emissary/releases/v1.14.1
Expand Down
2 changes: 1 addition & 1 deletion builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ ENTRYPOINT [ "/bin/bash" ]

FROM ${builderbase} as golang

ARG version="i-forgot-to-set-version"
ARG version="i-forgot-to-set-build-arg-version"

WORKDIR /go

Expand Down
5 changes: 4 additions & 1 deletion charts/charts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ release/promote-chart-passed:
.PHONY: release/promote-chart-passed

chart-push-ci: push-preflight
@([ $(IS_PRIVATE) ] && (echo "Private repo, not pushing chart" && exit 1)) || true
if [ ! -z $(IS_PRIVATE) ]; then \
echo "Private repo, not pushing chart" ;\
exit 1 ;\
fi;
@echo ">>> This will dirty your local tree and should only be run in CI"
@echo ">>> If running locally, you'll probably want to run make chart-clean after running this"
@[ -n "${CHART_VERSION_SUFFIX}" ] || (echo "CHART_VERSION_SUFFIX must be set for non-GA pushes" && exit 1)
Expand Down
27 changes: 27 additions & 0 deletions charts/emissary-ingress/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,33 @@ Emissary Ingress chart v7.0.0-ea provides early access to Emissary 2.0 features.
- Change: removed helm 2 support
- Feature: Add an option to create default HTTP and HTTPS listeners

## v6.9.1

- Update Ambassador API Gateway chart image to version v1.14.1: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)
- Update Ambassador Edge Stack chart image to version v1.14.1: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)

## v6.9.0

- Update Ambassador Edge Stack chart image to version v1.14.0: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)

## v6.8.0

- Update Ambassador API Gateway chart image to version v1.14.0: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)

## v6.7.14

- Feature: New Values to expose `progressDeadlineSeconds` for the Ambassador and Ambassador-agent Deployments.

## v6.7.13

- Update Ambassador API Gateway chart image to version v1.13.10: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)
- Update Ambassador Edge Stack chart image to version v1.13.10: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)

## v6.7.12

- Update Ambassador API Gateway chart image to version v1.13.9: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)
- Update Ambassador Edge Stack chart image to version v1.13.9: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)

## v6.7.11

- Update Ambassador API Gateway chart image to version v1.13.8: [CHANGELOG](https://github.com/emissary-ingress/emissary/blob/master/CHANGELOG.md)
Expand Down
3 changes: 3 additions & 0 deletions charts/emissary-ingress/crds/getambassador.io_devportals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ spec:
service:
description: Service is the service being documented
type: string
timeout_ms:
description: Timeout specifies the amount of time devportal will wait for the downstream service to report an openapi spec back
type: integer
url:
description: URL is the URL used for obtaining docs
type: string
Expand Down
4 changes: 4 additions & 0 deletions charts/emissary-ingress/crds/getambassador.io_mappings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ spec:
type: boolean
path:
type: string
timeout_ms:
type: integer
url:
type: string
type: object
Expand Down Expand Up @@ -356,6 +358,8 @@ spec:
type: array
resolver:
type: string
respect_dns_ttl:
type: boolean
retry_policy:
properties:
num_retries:
Expand Down
5 changes: 3 additions & 2 deletions cmd/ambex/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ import (
ecp_v2_server "github.com/datawire/ambassador/v2/pkg/envoy-control-plane/server/v2"
ecp_v3_server "github.com/datawire/ambassador/v2/pkg/envoy-control-plane/server/v3"

// envoy protobuf v2 -- Be sure to import the package of any types that the Python emits a
// "@type" of in the generated config, even if that package is otherwise not used by ambex.
// Envoy API v2
// Be sure to import the package of any types that're referenced with "@type" in our
// generated Envoy config, even if that package is otherwise not used by ambex.
v2 "github.com/datawire/ambassador/v2/pkg/api/envoy/api/v2"
_ "github.com/datawire/ambassador/v2/pkg/api/envoy/api/v2/auth"
v2core "github.com/datawire/ambassador/v2/pkg/api/envoy/api/v2/core"
Expand Down
129 changes: 129 additions & 0 deletions cmd/entrypoint/testutil_fake_mapping_cors_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
package entrypoint_test

import (
"testing"

"github.com/datawire/ambassador/v2/cmd/entrypoint"
bootstrap "github.com/datawire/ambassador/v2/pkg/api/envoy/config/bootstrap/v3"
v3listener "github.com/datawire/ambassador/v2/pkg/api/envoy/config/listener/v3"
route "github.com/datawire/ambassador/v2/pkg/api/envoy/config/route/v3"
http "github.com/datawire/ambassador/v2/pkg/api/envoy/extensions/filters/network/http_connection_manager/v3"
"github.com/datawire/ambassador/v2/pkg/envoy-control-plane/resource/v3"
"github.com/datawire/ambassador/v2/pkg/envoy-control-plane/wellknown"

"github.com/stretchr/testify/assert"
)

func TestMappingCORSOriginsSlice(t *testing.T) {
f := entrypoint.RunFake(t, entrypoint.FakeConfig{EnvoyConfig: true}, nil)
err := f.UpsertYAML(`
---
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: ambassador-listener-8080
namespace: default
spec:
port: 8080
protocol: HTTP
securityModel: XFP
hostBinding:
namespace:
from: ALL
---
apiVersion: getambassador.io/v3alpha1
kind: Host
metadata:
name: test-host
namespace: default
spec:
selector:
matchLabels:
host: minimal
---
apiVersion: getambassador.io/v3alpha1
kind: Mapping
metadata:
name: foo
namespace: default
labels:
host: minimal
spec:
prefix: /foo
service: foo.default
cors:
origins:
- foo.example.com
- bar.example.com
`)
assert.NoError(t, err)

err = f.Upsert(makeService("default", "foo"))
assert.NoError(t, err)

f.Flush()
snap, err := f.GetSnapshot(HasMapping("default", "foo"))
assert.NoError(t, err)
assert.NotNil(t, snap)

config, err := f.GetEnvoyConfig(func(config *bootstrap.Bootstrap) bool {
return FindCluster(config, ClusterNameContains("cluster_foo_default_default")) != nil
})

assert.NoError(t, err)

listener := findListener(config, func(l *v3listener.Listener) bool {
return l.Name == "ambassador-listener-8080"
})

assert.NotNil(t, listener)

routeAction := findVirtualHostRoute(listener, func(r *route.RouteAction) bool {
return r.GetCluster() == "cluster_foo_default_default"
})
assert.NotNil(t, routeAction)
assert.NotNil(t, routeAction.Cors)
assert.Equal(t, len(routeAction.Cors.AllowOriginStringMatch), 2)
for _, m := range routeAction.Cors.AllowOriginStringMatch {
assert.Contains(t, []string{"bar.example.com", "foo.example.com"}, m.GetExact())

}
}

func findVirtualHostRoute(listener *v3listener.Listener, predicate func(*route.RouteAction) bool) *route.RouteAction {
for _, fc := range listener.FilterChains {
for _, filter := range fc.Filters {
if filter.Name != wellknown.HTTPConnectionManager {
continue
}
hcm := resource.GetHTTPConnectionManager(filter)
if hcm != nil {
rs, ok := hcm.RouteSpecifier.(*http.HttpConnectionManager_RouteConfig)
if ok {
for _, vh := range rs.RouteConfig.VirtualHosts {
for _, vhr := range vh.Routes {
routeAction, ok := vhr.Action.(*route.Route_Route)
if ok {
if predicate(routeAction.Route) {
return routeAction.Route
}
}
}
}
}
}
}

}
return nil

}

func findListener(envoyConfig *bootstrap.Bootstrap, predicate func(*v3listener.Listener) bool) *v3listener.Listener {
for _, listener := range envoyConfig.StaticResources.Listeners {
if predicate(listener) {
return listener
}
}
return nil
}
55 changes: 55 additions & 0 deletions cmd/example-envoy-metrics-sink/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package main

import (
"context"
"io"
"os"

"github.com/datawire/dlib/dhttp"
"github.com/datawire/dlib/dlog"
"google.golang.org/grpc"
"google.golang.org/protobuf/encoding/protojson"

v2_metrics "github.com/datawire/ambassador/v2/pkg/api/envoy/service/metrics/v2"
)

type server struct{}

var _ v2_metrics.MetricsServiceServer = &server{}

func main() {
ctx := context.Background()

grpcMux := grpc.NewServer()
v2_metrics.RegisterMetricsServiceServer(grpcMux, &server{})

sc := &dhttp.ServerConfig{
Handler: grpcMux,
}

dlog.Print(ctx, "starting...")

if err := sc.ListenAndServe(ctx, ":8123"); err != nil {
dlog.Errorf(ctx, "shut down with error: %v", err)
os.Exit(1)
}

dlog.Print(ctx, "shut down without error")
}

func (s *server) StreamMetrics(stream v2_metrics.MetricsService_StreamMetricsServer) error {
dlog.Println(stream.Context(), "Started stream")
for {
in, err := stream.Recv()

if err == io.EOF {
return nil
}

if err != nil {
return err
}

dlog.Println(stream.Context(), protojson.Format(in))
}
}
26 changes: 25 additions & 1 deletion docs/releaseNotes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ items:
<code>getambassador.io/v2</code> will arrive soon in a later 2.X version.
docs: about/changes-2.0.0

- title: Mappings support configuring strict or logical DNS
type: feature
body: >-
You can now set <code>dns_type</code> between <code>strict_dns</code> and
<code>logical_dns</code> in a <code>Mapping</code> to configure the Service
Discovery Type.
docs: topics/using/mappings/#dns-configuration-for-mappings

- title: Mappings support controlling DNS refresh with DNS TTL
type: feature
body: >-
You can now set <code>respect_dns_ttl</code> to <code>true</code> to force the
DNS refresh rate for a <code>Mapping</code> to be set to the record's TTL
obtained from DNS resolution.
docs: topics/using/mappings/#dns-configuration-for-mappings

- title: Support configuring upstream buffer sizes
type: feature
body: >-
You can now set <code>buffer_limit_bytes</code> in the <code>ambassador</code>
<code>Module</code> to to change the size of the upstream read and write buffers.
The default is 1MiB.
docs: topics/running/ambassador/#modify-default-buffer-size

- title: Version number reported correctly
type: bugfix
body: >-
Expand Down Expand Up @@ -303,7 +327,7 @@ items:
body: >-
You can now set <code>buffer_limit_bytes</code> in the <code>ambassador</code>
<code>Module</code> to to change the size of the upstream read and write buffers.
The default is 1MiB.
The default is 1MiB.
docs: topics/running/ambassador/#modify-default-buffer-size

- version: 1.14.1
Expand Down
5 changes: 4 additions & 1 deletion docs/yaml.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ generate-docs-yaml:
.PHONY: generate-docs-yaml

publish-docs-yaml: generate-docs-yaml
@([ "$(IS_PRIVATE)" ] && (echo "Private repo, not pushing manifests" && exit 1)) || true
if [ ! -z $(IS_PRIVATE) ]; then \
echo "Private repo, not pushing chart" ;\
exit 1 ;\
fi;
@$(OSS_HOME)/docs/publish_yaml_s3.sh $(GENERATED_YAML_DIR)yaml/ $(generate-docs-yaml/files)
@rm -rf $(GENERATED_YAML_DIR)
.PHONY: publish-docs-yaml
Expand Down
7 changes: 7 additions & 0 deletions docs/yaml/ambassador/ambassador-rbac-prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ spec:
service:
description: Service is the service being documented
type: string
timeout_ms:
description: Timeout specifies the amount of time devportal will wait for the downstream service to report an openapi spec back
type: integer
url:
description: URL is the URL used for obtaining docs
type: string
Expand Down Expand Up @@ -1085,6 +1088,8 @@ spec:
type: boolean
path:
type: string
timeout_ms:
type: integer
url:
type: string
type: object
Expand Down Expand Up @@ -1289,6 +1294,8 @@ spec:
type: array
resolver:
type: string
respect_dns_ttl:
type: boolean
retry_policy:
properties:
num_retries:
Expand Down
Loading