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

Backport of NET 6409 into release/1.2.x #3186

Merged
merged 256 commits into from
Nov 8, 2023

Conversation

hc-github-team-consul-core

Backport

This PR is auto-generated from #3158 to be assessed for backporting due to the inclusion of the label backport/1.2.x.

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@absolutelightning
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/consul-k8s/merges: 409 Merge conflict []

The below text is copied from the body of the original PR.


Changes proposed in this PR:

Fixes - #2433

consul-k8s CLI: Display envoy cluster stats using consul-k8s CLI

How I've tested this PR:

  • Setup Kind cluster using tutorial
  • make cli-dev
  • ./consul-k8s proxy stats -pod nginx-6d7469694f-rdmwp -kubeconfig /Users/asheshvidyut/.kube/config -namespace default > nginx
  • cat nginx
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.version_text: ""
cluster.payments.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.version_text: ""
cluster.product-api-db.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.version_text: ""
cluster.product-api.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.version_text: ""
cluster.public-api.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.version_text: ""
cluster_manager.cds.version_text: ""
control_plane.identifier: ""
listener_manager.lds.version_text: ""
cluster.consul-dataplane.assignment_stale: 0
cluster.consul-dataplane.assignment_timeout_received: 0
cluster.consul-dataplane.bind_errors: 0
cluster.consul-dataplane.circuit_breakers.default.cx_open: 0
cluster.consul-dataplane.circuit_breakers.default.cx_pool_open: 0
cluster.consul-dataplane.circuit_breakers.default.rq_open: 0
cluster.consul-dataplane.circuit_breakers.default.rq_pending_open: 0
cluster.consul-dataplane.circuit_breakers.default.rq_retry_open: 0
cluster.consul-dataplane.circuit_breakers.high.cx_open: 0
cluster.consul-dataplane.circuit_breakers.high.cx_pool_open: 0
cluster.consul-dataplane.circuit_breakers.high.rq_open: 0
cluster.consul-dataplane.circuit_breakers.high.rq_pending_open: 0
cluster.consul-dataplane.circuit_breakers.high.rq_retry_open: 0
cluster.consul-dataplane.default.total_match_count: 1
cluster.consul-dataplane.http2.deferred_stream_close: 0
cluster.consul-dataplane.http2.dropped_headers_with_underscores: 0
cluster.consul-dataplane.http2.header_overflow: 0
cluster.consul-dataplane.http2.headers_cb_no_stream: 0
cluster.consul-dataplane.http2.inbound_empty_frames_flood: 0
cluster.consul-dataplane.http2.inbound_priority_frames_flood: 0
cluster.consul-dataplane.http2.inbound_window_update_frames_flood: 0
cluster.consul-dataplane.http2.keepalive_timeout: 0
cluster.consul-dataplane.http2.metadata_empty_frames: 0
cluster.consul-dataplane.http2.outbound_control_flood: 0
cluster.consul-dataplane.http2.outbound_flood: 0
cluster.consul-dataplane.http2.pending_send_bytes: 0
cluster.consul-dataplane.http2.requests_rejected_with_underscores_in_headers: 0
cluster.consul-dataplane.http2.rx_messaging_error: 0
cluster.consul-dataplane.http2.rx_reset: 0
cluster.consul-dataplane.http2.stream_refused_errors: 0
cluster.consul-dataplane.http2.streams_active: 1
cluster.consul-dataplane.http2.trailers: 0
cluster.consul-dataplane.http2.tx_flush_timeout: 0
cluster.consul-dataplane.http2.tx_reset: 0
cluster.consul-dataplane.internal.upstream_rq_200: 1
cluster.consul-dataplane.internal.upstream_rq_2xx: 1
cluster.consul-dataplane.internal.upstream_rq_completed: 1
cluster.consul-dataplane.lb_healthy_panic: 0
cluster.consul-dataplane.lb_local_cluster_not_ok: 0
cluster.consul-dataplane.lb_recalculate_zone_structures: 0
cluster.consul-dataplane.lb_subsets_active: 0
cluster.consul-dataplane.lb_subsets_created: 0
cluster.consul-dataplane.lb_subsets_fallback: 0
cluster.consul-dataplane.lb_subsets_fallback_panic: 0
cluster.consul-dataplane.lb_subsets_removed: 0
cluster.consul-dataplane.lb_subsets_selected: 0
cluster.consul-dataplane.lb_zone_cluster_too_small: 0
cluster.consul-dataplane.lb_zone_no_capacity_left: 0
cluster.consul-dataplane.lb_zone_number_differs: 0
cluster.consul-dataplane.lb_zone_routing_all_directly: 0
cluster.consul-dataplane.lb_zone_routing_cross_zone: 0
cluster.consul-dataplane.lb_zone_routing_sampled: 0
cluster.consul-dataplane.max_host_weight: 0
cluster.consul-dataplane.membership_change: 1
cluster.consul-dataplane.membership_degraded: 0
cluster.consul-dataplane.membership_excluded: 0
cluster.consul-dataplane.membership_healthy: 1
cluster.consul-dataplane.membership_total: 1
cluster.consul-dataplane.original_dst_host_invalid: 0
cluster.consul-dataplane.retry_or_shadow_abandoned: 0
cluster.consul-dataplane.update_attempt: 0
cluster.consul-dataplane.update_empty: 0
cluster.consul-dataplane.update_failure: 0
cluster.consul-dataplane.update_no_rebuild: 0
cluster.consul-dataplane.update_success: 0
cluster.consul-dataplane.upstream_cx_active: 1
cluster.consul-dataplane.upstream_cx_close_notify: 0
cluster.consul-dataplane.upstream_cx_connect_attempts_exceeded: 0
cluster.consul-dataplane.upstream_cx_connect_fail: 0
cluster.consul-dataplane.upstream_cx_connect_timeout: 0
cluster.consul-dataplane.upstream_cx_connect_with_0_rtt: 0
cluster.consul-dataplane.upstream_cx_destroy: 0
cluster.consul-dataplane.upstream_cx_destroy_local: 0
cluster.consul-dataplane.upstream_cx_destroy_local_with_active_rq: 0
cluster.consul-dataplane.upstream_cx_destroy_remote: 0
cluster.consul-dataplane.upstream_cx_destroy_remote_with_active_rq: 0
cluster.consul-dataplane.upstream_cx_destroy_with_active_rq: 0
cluster.consul-dataplane.upstream_cx_http1_total: 0
cluster.consul-dataplane.upstream_cx_http2_total: 1
cluster.consul-dataplane.upstream_cx_http3_total: 0
cluster.consul-dataplane.upstream_cx_idle_timeout: 0
cluster.consul-dataplane.upstream_cx_max_duration_reached: 0
cluster.consul-dataplane.upstream_cx_max_requests: 0
cluster.consul-dataplane.upstream_cx_none_healthy: 0
cluster.consul-dataplane.upstream_cx_overflow: 0
cluster.consul-dataplane.upstream_cx_pool_overflow: 0
cluster.consul-dataplane.upstream_cx_protocol_error: 0
cluster.consul-dataplane.upstream_cx_rx_bytes_buffered: 17
cluster.consul-dataplane.upstream_cx_rx_bytes_total: 24037
cluster.consul-dataplane.upstream_cx_total: 1
cluster.consul-dataplane.upstream_cx_tx_bytes_buffered: 0
cluster.consul-dataplane.upstream_cx_tx_bytes_total: 367029
cluster.consul-dataplane.upstream_flow_control_backed_up_total: 0
cluster.consul-dataplane.upstream_flow_control_drained_total: 0
cluster.consul-dataplane.upstream_flow_control_paused_reading_total: 0
cluster.consul-dataplane.upstream_flow_control_resumed_reading_total: 0
cluster.consul-dataplane.upstream_http3_broken: 0
cluster.consul-dataplane.upstream_internal_redirect_failed_total: 0
cluster.consul-dataplane.upstream_internal_redirect_succeeded_total: 0
cluster.consul-dataplane.upstream_rq_0rtt: 0
cluster.consul-dataplane.upstream_rq_200: 1
cluster.consul-dataplane.upstream_rq_2xx: 1
cluster.consul-dataplane.upstream_rq_active: 1
cluster.consul-dataplane.upstream_rq_cancelled: 0
cluster.consul-dataplane.upstream_rq_completed: 1
cluster.consul-dataplane.upstream_rq_maintenance_mode: 0
cluster.consul-dataplane.upstream_rq_max_duration_reached: 0
cluster.consul-dataplane.upstream_rq_pending_active: 0
cluster.consul-dataplane.upstream_rq_pending_failure_eject: 0
cluster.consul-dataplane.upstream_rq_pending_overflow: 0
cluster.consul-dataplane.upstream_rq_pending_total: 1
cluster.consul-dataplane.upstream_rq_per_try_idle_timeout: 0
cluster.consul-dataplane.upstream_rq_per_try_timeout: 0
cluster.consul-dataplane.upstream_rq_retry: 0
cluster.consul-dataplane.upstream_rq_retry_backoff_exponential: 0
cluster.consul-dataplane.upstream_rq_retry_backoff_ratelimited: 0
cluster.consul-dataplane.upstream_rq_retry_limit_exceeded: 0
cluster.consul-dataplane.upstream_rq_retry_overflow: 0
cluster.consul-dataplane.upstream_rq_retry_success: 0
cluster.consul-dataplane.upstream_rq_rx_reset: 0
cluster.consul-dataplane.upstream_rq_timeout: 0
cluster.consul-dataplane.upstream_rq_total: 1
cluster.consul-dataplane.upstream_rq_tx_reset: 0
cluster.consul-dataplane.version: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.assignment_stale: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.assignment_timeout_received: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.bind_errors: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.default.cx_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.default.cx_pool_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.default.rq_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.default.rq_pending_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.default.rq_retry_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.high.cx_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.high.cx_pool_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.high.rq_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.high.rq_pending_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.circuit_breakers.high.rq_retry_open: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.client_ssl_socket_factory.downstream_context_secrets_not_ready: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.client_ssl_socket_factory.ssl_context_update_by_sds: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.client_ssl_socket_factory.upstream_context_secrets_not_ready: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.default.total_match_count: 2
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.init_fetch_timeout: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_healthy_panic: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_local_cluster_not_ok: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_recalculate_zone_structures: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_active: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_created: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_fallback: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_fallback_panic: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_removed: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_subsets_selected: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_cluster_too_small: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_no_capacity_left: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_number_differs: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_routing_all_directly: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_routing_cross_zone: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.lb_zone_routing_sampled: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.max_host_weight: 1
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.membership_change: 1
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.membership_degraded: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.membership_excluded: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.membership_healthy: 1
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.membership_total: 1
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.original_dst_host_invalid: 0
cluster.frontend.default.dc1.internal.79a003be-075c-5b47-4b7e-1dea66df560f.consul.outlier_detection.ejections_active: 0 ...........

How I expect reviewers to test this PR:

Checklist:


Overview of commits

wilkermichael and others added 30 commits June 8, 2023 22:39
…ersion of kind and k8s 1.27 (#2304)

* update cloud tests to use 1.24, 1.25 and 1.26 version of kubernetes for more coverage

* updated readme for supported kubernetes versions

* added changelog
* [API Gateway] WAN Federation test and fixes

* Fix unit tests
* Fix when gateways are deleted before we get services populated into cache

* a bit of cleanup
…assConfig are obeyed (#2272)

* Add unit tests verifying that scaling parameters on GatewayClassConfig are obeyed

* Add test case for scaling w/ no min or max configured
* Rename GatewayClassController to prevent name collision

* Use gateway instead of gatewayclass in name

* Use the constant in ownership checks

* Change GatewayClass name to "consul"

* Change GatewayClass name in cases

* Change ApiGatewayClass back
* Fix SupportedKinds array to be what Conformance test expects

* Fix cert validation status condition for listeners

* Add programmed condition for listeners

* Fix unit test

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
* first pass at halting: got httproute and api-gateway done

* clean up test

* Handle all set for infinite reconcile check

* Add table tests for minimal setup

* Added some odd field names to test normalization is handled correctly

* Use funky casing http routes
* Added helm inputs for managing audit logs
* Remove unwanted changes from values
* fix: use correct flag when translating namespaces

* Use non-normalized namespace when deregistering services

* Guard against namespace queries when namespaces not enabled in cache
* added imagePullPolicy for images in values.yaml

* fix: renamed pullPolicy key according to image

* fixed dafault always in tmpl

* changed structure of image in yaml

* revert changes

* added global imagePullPolicy

* fixed typo

* added changelog file
This brings consul-k8s in line with consul.
Most importantly, the backport assistant was updated to automatically assign created PRs to the author of the PR that is being backported.
* update changelog based on changes made to 1.2.x

* fixed test cases
- enterprise cases were in the OSS test cases
* trigger conformance tests nightly, squash

* remove extra line

* Update nightly-api-gateway-conformance.yml
making scripts more robust and removing changing helm chart
* Fix cache and service deletion issue

* Add comments

* add in acceptance test

* Fix indentation

* Fix unit test for deleting gateway w/ consul services

* Remove redundant service deregistration code

* Exit loop early once registration is found for service

* Fix import blocking

* Set status on pods added to test

* Apply suggestions from code review

* Reduce count of test gateways to 10 from 100

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
Co-authored-by: Sarah Alsmiller <sarah.alsmiller@hashicorp.com>
* Adding support for weighted k8s service

* Adding changelog

* if per-app weight is 0 then pull the weight to 1

* Addressing review comments

* Addressing review comments

* Addressing review comments

* Comment update

* Comment update

* Parameterized table test

* Parameterized table test

* fixing linting issue

* fixing linting issue

---------

Co-authored-by: srahul3 <rahulsharma@hashicorp.com>
* Bumping go-discover to the lastest version
* pinned kind configuration for CI tests
- created a yaml file with the desired pinned versions
- created a script to read the yaml
- added a make target which can be used in CI to get the desired kind inputs/config

---------

Co-authored-by: Curt Bushko <cbushko@gmail.com>
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
- allow configuration of acceptance testing matrices
DanStough and others added 16 commits October 24, 2023 09:38
* better handle gateway timeout errors

* strings not refs

* changelog

* Add missing import, fix import blocking

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
…2946)

* Setup observability metrics tests

* Cleanup http_client.go and observability_test.go

* Refactor tests by using table driven approach

* Refactor and add comments to the client

* Remove param to token function

* remove consul export test redundant

* Remove hardcoded collector image

* Move metrics validation from server to consul-k8s tests and update to use the /records endpoint

* Change to achooo docker hub and fix lint errors
…44487) (#3139)

Bump google.golang.org/grpc to 1.56.3

This resolves [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487).

Also bump `consul-server-connection-manager` to latest to align with
that library's matching gRPC upgrade.
* Update kind to 1.28.0
absolutelightning and others added 4 commits November 8, 2023 11:28
* init

* fix help and synopsis

* added some tests

* change log

* some fixes

* rename var name

* tests for get envoy stats

* fix tests

* Update cli/cmd/envoy-stats/envoy_stats.go

Co-authored-by: Thomas Eckert <teckert@hashicorp.com>

* proxy stats command

* fix command options

* pr comment resolved

* fix globaloptions

* fix lint

---------

Co-authored-by: Thomas Eckert <teckert@hashicorp.com>
@absolutelightning absolutelightning marked this pull request as ready for review November 8, 2023 06:10
@absolutelightning absolutelightning enabled auto-merge (squash) November 8, 2023 06:14
@absolutelightning absolutelightning merged commit bc1de04 into release/1.2.x Nov 8, 2023
21 of 45 checks passed
@absolutelightning absolutelightning deleted the backport/NET-6409/rightly-saved-elf branch November 8, 2023 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.