Skip to content

Commit d2b6ddd

Browse files
authored
Merge pull request #47 from ContainerSolutions/pr42
Pr42
2 parents 9e8ca44 + 04059dd commit d2b6ddd

18 files changed

+281
-21
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
run: |
1414
curl -L https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz | tar -zxf -
1515
sudo mv kubeconform /usr/local/bin
16+
kubeconform -v
1617
- name: check all yaml
1718
run: |
1819
./bin/test.sh | tee -a apply.txt

.yamllint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ yaml-files:
55
- '*.yml'
66
- '.yamllint'
77

8+
ignore: |
9+
.github/
10+
811
rules:
912
braces: enable
1013
brackets: enable

Istio/DestinationRule/circuit-breaker.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ spec:
88
host: service-a
99
trafficPolicy:
1010
outlierDetection:
11-
consecutive5xxErrors: 7 # Default 5
12-
interval: 5m # Interval over which errors are counted and compared to the threshold. This is a periodic check, not a rolling one.
13-
baseEjectionTime: 10s # Initial period for which the endpoint is ejected from the endpoint pool. Repeated ejections are longer each time. Default 30s
14-
maxEjectionPercent: 50 # Max % of endpoints that can ejected from the endpoint pool. Default 10
15-
minHealthPercent: 50 # Min % of endpoints in the endpoint pool that must be healthy for circuit-breaking to activate. Default 0
11+
consecutive5xxErrors: 7 # Default 5
12+
interval: 5m # Interval over which errors are counted and compared to the threshold. This is a periodic check, not a rolling one.
13+
baseEjectionTime: 10s # Initial period for which the endpoint is ejected from the endpoint pool. Repeated ejections are longer each time. Default 30s
14+
maxEjectionPercent: 50 # Max % of endpoints that can ejected from the endpoint pool. Default 10
15+
minHealthPercent: 50 # Min % of endpoints in the endpoint pool that must be healthy for circuit-breaking to activate. Default 0

Istio/DestinationRule/connection-pool-settings.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ spec:
1010
trafficPolicy:
1111
connectionPool:
1212
tcp:
13-
maxConnections: 100 # Default 4bn
14-
connectTimeout: 50ms # Default 10s
15-
tcpKeepalive: # TCP-level keepalives ie SO_KEEPALIVE
16-
time: 3600s # Default 2h
17-
interval: 50s # Default 75s
13+
maxConnections: 100 # Default 4bn
14+
connectTimeout: 50ms # Default 10s
15+
tcpKeepalive: # TCP-level keepalives ie SO_KEEPALIVE
16+
time: 3600s # Default 2h
17+
interval: 50s # Default 75s
1818
http:
19-
maxRequestsPerConnection: 1 # Disables HTTP connection keep-alive/reuse. Default unlimited
20-
idleTimeout: 1m # How long a keep-alive tcp connection will stay open if unused for any http requests. Default 1h
21-
h2UpgradePolicy: UPGRADE # Upgrade http1.1 connections arriving at the sidecar to h2 from sidecar -> workload. Default: use mesh-wide setting
19+
maxRequestsPerConnection: 1 # Disables HTTP connection keep-alive/reuse. Default unlimited
20+
idleTimeout: 1m # How long a keep-alive tcp connection will stay open if unused for any http requests. Default 1h
21+
h2UpgradePolicy: UPGRADE # Upgrade http1.1 connections arriving at the sidecar to h2 from sidecar -> workload. Default: use mesh-wide setting
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: networking.istio.io/v1beta1
23
kind: DestinationRule
34
metadata:
@@ -6,4 +7,4 @@ spec:
67
host: service-a
78
trafficPolicy:
89
loadBalancer:
9-
simple: LEAST_CONN # Default: ROUND_ROBIN, others: RANDOM
10+
simple: LEAST_CONN # Default: ROUND_ROBIN, others: RANDOM

Istio/DestinationRule/sticky-sessions.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: networking.istio.io/v1beta1
23
kind: DestinationRule
34
metadata:

Istio/DestinationRule/subsets.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ metadata:
66
spec:
77
host: service-a
88
subsets:
9-
- name: v1 # Arbitrary name for subset
10-
labels: # Kubernetes Pod labels to match
11-
version: v1
12-
- name: v2
13-
labels:
14-
version: v2
9+
- name: v1 # Arbitrary name for subset
10+
labels: # Kubernetes Pod labels to match
11+
version: v1
12+
- name: v2
13+
labels:
14+
version: v2

Istio/DestinationRule/tls.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
apiVersion: networking.istio.io/v1beta1
23
kind: DestinationRule
34
metadata:
@@ -8,7 +9,7 @@ spec:
89
tls:
910
mode: SIMPLE
1011
---
11-
# NB: This establishes an mTLS connection with an upstream endpoint.
12+
# NB: This establishes an mTLS connection with an upstream endpoint.
1213
# It's for _mesh-external_ endpoints; within the mesh Istio automatically establishes mTLS connections between pairs of sidecars.
1314
apiVersion: networking.istio.io/v1beta1
1415
kind: DestinationRule

Istio/VirtualService/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# VirtualService
2+
`VirtualServices` configure routing rules for traffic.
3+
4+
Traffic is identified by the _Host_ it's addressed to in its layer 7 request header (there must be at most one VirtualService per Host).
5+
For a given protocol, Routing Rules are then tried in order until one matches the attributes of the request.
6+
The matching routing rule specifies a Service to which to send the request (a _Service_ is effectively a Kubernetes `Service`, qv).
7+
Optionally, a subset of the Service's Pods can be targeted using Subsets (see `DestinationRule`)
8+
9+
VirtualServices can be thought of as an "active" bump-on-the-wire through which requests are sent.
10+
They can apply various transforms to the traffic passing through them, such as header manipulation, delay injection, etc.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
apiVersion: networking.istio.io/v1beta1
3+
kind: VirtualService
4+
metadata:
5+
name: delay-injection
6+
spec:
7+
hosts:
8+
- service-a
9+
http:
10+
- fault:
11+
delay:
12+
fixedDelay: 10s
13+
percentage:
14+
value: 100.0
15+
route:
16+
- destination:
17+
host: service-a

0 commit comments

Comments
 (0)