Skip to content

Egress Rules refactoring#1863

Closed
vadimeisenbergibm wants to merge 22 commits intoistio:masterfrom
vadimeisenbergibm:egress_refactoring
Closed

Egress Rules refactoring#1863
vadimeisenbergibm wants to merge 22 commits intoistio:masterfrom
vadimeisenbergibm:egress_refactoring

Conversation

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Refactors handling egress rules to enable effective handling of multiple TCP and HTTP protocols.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:
This PR is required to enable mongo and redis TCP protocols.

Release note:

@istio-merge-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
We suggest the following additional approver: crazytan

Assign the PR to them by writing /assign @crazytan in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 27, 2017

Codecov Report

Merging #1863 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1863      +/-   ##
==========================================
+ Coverage    81.9%   81.95%   +0.04%     
==========================================
  Files         188      190       +2     
  Lines       18715    18755      +40     
==========================================
+ Hits        15328    15370      +42     
  Misses       2960     2960              
+ Partials      427      425       -2
Flag Coverage Δ
#broker 45.51% <ø> (+1.06%) ⬆️
#mixer 82.46% <ø> (-0.02%) ⬇️
#pilot 82.41% <100%> (+0.13%) ⬆️
#security 90.39% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pilot/model/config.go 97.77% <ø> (-0.4%) ⬇️
pilot/proxy/envoy/config.go 92.2% <100%> (+0.02%) ⬆️
pilot/model/validation.go 97.1% <100%> (ø) ⬆️
pilot/model/egress_rules.go 100% <100%> (ø)
mixer/adapter/prometheus/server.go 89.83% <0%> (-5.09%) ⬇️
broker/pkg/version/version.go 100% <0%> (ø)
mixer/adapter/stackdriver/metric/bufferedClient.go 92.5% <0%> (+2.5%) ⬆️
pilot/platform/kube/queue.go 90.38% <0%> (+7.69%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc39692...4b7c4de. Read the comment docs.

@vadimeisenbergibm vadimeisenbergibm changed the title [WIP] Egress refactoring Egress refactoring Nov 27, 2017
@vadimeisenbergibm vadimeisenbergibm changed the title Egress refactoring Egress Rules refactoring Nov 27, 2017

func protocolMapAsString(protocolMap map[Protocol]bool) string {
first := true
result := ""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use &bytes.Buffer{} here to speed up the string concatenation?: https://golang.org/pkg/bytes/#Buffer

)

// RejectConflictingEgressRules rejects rules that have the destination which is equal to
// the destionation of some other rule.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destionation -> destination

if cidrDestinationService &&
!IsEgressRulesSupportedTCPProtocol(Protocol(strings.ToUpper(port.Protocol))) {
errs = multierror.Append(errs, fmt.Errorf("Only the following protocols can be defined for "+
"CIDR destination service notation "+egressRulesSupportedTCPProtocols()+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use string formatting to build the entire string instead of a mix of string concatenation and string formatting?

@istio-merge-robot
Copy link
Copy Markdown

@vadimeisenbergibm PR needs rebase

@istio-merge-robot istio-merge-robot added the needs-rebase Indicates a PR needs to be rebased before being merged label Nov 28, 2017
Joerg Schad and others added 8 commits November 28, 2017 08:47
Automatic merge from submit-queue.

Make linking the kubeconfig idempotent.

Previously there were situations where we needed to manually unlink the config, e.g., after build errors.

```release-note
NONE
```
Automatic merge from submit-queue.

Update mockapi package name to match new home

**What this PR does / why we need it**:
The `mockapi` package was created by moving files. During that move, the package statements at the top of the files were not updated to match. This PR fixes that issue.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:
```release-note-none
```
…#1866)

* added ConvertCaseInsensitiveStringToProtocol and ProtocolUnsupported

* remove code duplication in convertProtocol functions

* use ConvertCaseInsensitiveStringToProtocol instead of strings.ToUpper

in conversion of a string to model.Protocol, since there are
not-all-uppercase protocols like Mongo and Redis

* removed unused metadata values

* added TestConvertCaseInsensitiveStringToProtocol

* replaced shadowing variable

* Revert "replaced shadowing variable"

This reverts commit 6a9981f.

* replaced shadowing variable
…/community. (istio#1871)

Having this file present helps our community-friendly rating that GitHub maintains.
…io#1845)

1. create corresponding CRD for HTTPAPISpec, HTTPAPISpecBinding, QuotaSpec, and QuotaSpecBinding (see https://github.com/istio/api/blob/master/mixer/v1/config/client/api_spec.proto)

2. add corresponding validation code for new model types

3. update istioConfigStore to select HTTPAPISpec and QuotaSpec config associated with destination service instances using the corresponding HTTPAPISpec and QuotaSpec bindings.

4. distribute the HTTPAPI and Quota spec to proxy as part of mixerclient filter configura
Automatic merge from submit-queue.

remove lintconfig.json, that's generated

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
none
```
Automatic merge from submit-queue.

Support one handler for mulitple GCP services and fixes

- Allow one handler handles multiple GCP services
- Expand metric support
- Minor fixes in reportBuilder
douglas-reid and others added 4 commits November 28, 2017 08:48
Automatic merge from submit-queue.

Switch Mixer tracing package to use jaeger library.

**What this PR does / why we need it**:

This PR switches Mixer from using the openzipkin tracing library to the jaeger tracing library for tracing Mixer functions.

This switch accomplishes a few key items:
- Adds Mixer support for Jaeger backends
- Removes the need for a custom fork of the OpenZipkin library
- Adds better flag support for tracing control
- Enables development of Jaeger adapter (library conflict with OpenZipkin library).

It deprecates the `--traceOutput` flag and replaces it with several additional flags:
- `zipkinURL`,
- `jaegerURL`
- `logTraceSpans`

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

Fixes istio/old_mixer_repo#1352

**Special notes for your reviewer**:

**Release note**:

```release-note
Add Jaeger support to Mixer.
```
…ess_rules.go

added more helper functions to egress_rules.go
@googlebot
Copy link
Copy Markdown
Collaborator

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. and removed cla: yes labels Nov 28, 2017
@istio-testing
Copy link
Copy Markdown
Collaborator

@vadimeisenbergibm: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
prow/istio-presubmit.sh 4b7c4de link /test istio-presubmit
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@vadimeisenbergibm
Copy link
Copy Markdown
Contributor Author

Will rebase in a new branch and open as a separate PR.

kyessenov pushed a commit to kyessenov/istio that referenced this pull request Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: no Set by the Google CLA bot to indicate the author of a PR has not signed the Google CLA. do-not-merge/post-submit needs-rebase Indicates a PR needs to be rebased before being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.