Skip to content

Commit 9005204

Browse files
authored
Mkl (#288)
* mkl
1 parent a0adcf6 commit 9005204

91 files changed

Lines changed: 4382 additions & 4358 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

input/kube-yaml/service-exposure.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,84 @@ For configuration details, see [Listener resource][listener-resource].
119119
**📌 NOTE**
120120
There must be a `MATCHING-CONNECTOR` for the service to operate.
121121

122+
<a id="kube-creating-multikeylistener-yaml"></a>
123+
## Creating a multi-key listener using YAML
124+
<!--PROCEDURE-->
125+
126+
A multi-key listener binds a single local host and port to multiple routing keys in remote sites.
127+
Use a multi-key listener when you want one service endpoint to aggregate traffic from multiple connectors.
128+
129+
With multi-key listeners, you must choose a strategy which determines how the traffic is distributed:
130+
131+
* priority - Uses the first routing key in list that is available for traffic. If the connector becomes unavailable, the listener matches with the next available routing key in list.
132+
* weighted - Uses the routing keys in proportion to the assigned weights. For example, if `backend1` is assigned 25 and `backend2` is assigned 75, then only a quarter of the TCP connections are directed to `backend1`.
133+
134+
Multi-key listeners provide predictable traffic distribution from the client side and typically are not influenced by link costs.
135+
136+
For configuration details, see [MultiKeyListener resource][multikeylistener-resource].
137+
138+
**Prerequisites**
139+
140+
* Multiple connectors created with different routing keys. See [Creating a connector using YAML](#kube-creating-connector-yaml).
141+
142+
**Procedure**
143+
144+
1. Identify the connectors that you want to aggregate.
145+
Note the routing keys for each connector.
146+
147+
2. Determine which strategy is best for your use case. For example, failover is best achieved using the `priority` strategy.
148+
149+
150+
3. Create a multi-key listener resource YAML file.
151+
For example:
152+
```yaml
153+
apiVersion: skupper.io/v2alpha1
154+
kind: MultiKeyListener
155+
metadata:
156+
name: mkl-backend
157+
spec:
158+
host: mkl-backend
159+
port: 9092
160+
strategy:
161+
weighted:
162+
routingKeys:
163+
east-backend: 1
164+
west-backend: 1
165+
```
166+
This creates a listener named `mkl-backend` that exposes a single endpoint on port 9092 and distributes traffic evenly across the `east-backend` and `west-backend` routing keys.
167+
168+
To prefer one routing key first and fall back to another, use the `priority` strategy:
169+
```yaml
170+
apiVersion: skupper.io/v2alpha1
171+
kind: MultiKeyListener
172+
metadata:
173+
name: mkl-backend-priority
174+
spec:
175+
host: mkl-backend-priority
176+
port: 9095
177+
strategy:
178+
priority:
179+
routingKeys:
180+
- east-backend-http
181+
- west-backend-http
182+
```
183+
184+
To create the multi-key listener resource:
185+
186+
```bash
187+
kubectl apply -f <filename>
188+
```
189+
190+
where `<filename>` is the name of a YAML file that is saved on your local filesystem.
191+
192+
4. Check the multi-key listener status:
193+
```bash
194+
kubectl get multikeylistener
195+
```
196+
197+
**📌 NOTE**
198+
If you need to change strategy after you created a multi-key listener, you must delete and recreate the resource. This does not affect changing routing keys or weights.
199+
122200
<a id="kube-creating-attachedconnector-yaml"></a>
123201
## Creating a connector for a different namespace using YAML
124202
<!--PROCEDURE-->
@@ -200,3 +278,4 @@ For configuration details, see [Connector resource][connector-resource].
200278

201279
[connector-resource]: https://skupperproject.github.io/refdog/resources/connector.html
202280
[listener-resource]: https://skupperproject.github.io/refdog/resources/listener.html
281+
[multikeylistener-resource]: https://skupperproject.github.io/refdog/resources/multi-key-listener.html

input/refdog/commands/connector/create.md

Lines changed: 3 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -63,51 +63,9 @@ help for create
6363
</div>
6464
<div class="attribute-body">
6565

66-
The hostname or IP address of the local connector
66+
The hostname or IP address of the local connector (default "localhost") -r, --routing-key string The identifier used to route traffic from listeners to connectors
6767

68-
69-
70-
</div>
71-
</div>
72-
73-
<div class="attribute">
74-
<div class="attribute-heading">
75-
<h3 id="option-include-not-ready">--include-not-ready</h3>
76-
<div class="attribute-type-info">boolean</div>
77-
</div>
78-
<div class="attribute-body">
79-
80-
If true, include server pods that are not in the ready state. -r, --routing-key string The identifier used to route traffic from listeners to connectors
81-
82-
83-
84-
</div>
85-
</div>
86-
87-
<div class="attribute">
88-
<div class="attribute-heading">
89-
<h3 id="option-selector">--selector</h3>
90-
<div class="attribute-type-info">&lt;string&gt;</div>
91-
</div>
92-
<div class="attribute-body">
93-
94-
A Kubernetes label selector for specifying target server pods.
95-
96-
97-
98-
</div>
99-
</div>
100-
101-
<div class="attribute">
102-
<div class="attribute-heading">
103-
<h3 id="option-timeout">--timeout</h3>
104-
<div class="attribute-type-info">&lt;duration&gt;</div>
105-
</div>
106-
<div class="attribute-body">
107-
108-
raise an error if the operation does not complete in the given period of time (expressed in seconds). (default 1m0s)
109-
110-
<table class="fields"><tr><th>Default</th><td><p><code>1m0s</code></p>
68+
<table class="fields"><tr><th>Default</th><td><p><code>&quot;localhost&quot;</code></p>
11169
</td></table>
11270

11371
</div>
@@ -134,54 +92,11 @@ the name of a Kubernetes secret containing the generated or externally-supplied
13492
</div>
13593
<div class="attribute-body">
13694

137-
The connector type. Choices: [tcp]. (default "tcp")
95+
The connector type. Choices: [tcp]. (default "tcp") ``` ``` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
13896

13997
<table class="fields"><tr><th>Default</th><td><p><code>&quot;tcp&quot;</code></p>
14098
</td><tr><th>Choices</th><td><table class="choices"><tr><th><code>tcp</code></th><td></td></tr></table></td></table>
14199

142-
</div>
143-
</div>
144-
145-
<div class="attribute">
146-
<div class="attribute-heading">
147-
<h3 id="option-wait">--wait</h3>
148-
<div class="attribute-type-info">&lt;string&gt;</div>
149-
</div>
150-
<div class="attribute-body">
151-
152-
Wait for the given status before exiting. Choices: configured, ready, none (default "configured")
153-
154-
<table class="fields"><tr><th>Default</th><td><p><code>&quot;configured&quot;</code></p>
155-
</td></table>
156-
157-
</div>
158-
</div>
159-
160-
<div class="attribute">
161-
<div class="attribute-heading">
162-
<h3 id="option-workload">--workload</h3>
163-
<div class="attribute-type-info">&lt;string&gt;</div>
164-
</div>
165-
<div class="attribute-body">
166-
167-
A Kubernetes resource name that identifies a workload expressed like resource-type/resource-name. Expected resource types: service, daemonset, deployment, and statefulset. ``` ``` -c, --context string Set the kubeconfig context
168-
169-
170-
171-
</div>
172-
</div>
173-
174-
<div class="attribute">
175-
<div class="attribute-heading">
176-
<h3 id="option-kubeconfig">--kubeconfig</h3>
177-
<div class="attribute-type-info">&lt;string&gt;</div>
178-
</div>
179-
<div class="attribute-body">
180-
181-
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
182-
183-
184-
185100
</div>
186101
</div>
187102

input/refdog/commands/connector/delete.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,11 @@ raise an error if the operation does not complete in the given period of time (e
7272
</div>
7373
<div class="attribute-body">
7474

75-
Wait for deletion to complete before exiting (default true) ``` ``` -c, --context string Set the kubeconfig context
75+
Wait for deletion to complete before exiting (default true) ``` ``` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
7676

7777
<table class="fields"><tr><th>Default</th><td><p><code>true</code></p>
7878
</td></table>
7979

80-
</div>
81-
</div>
82-
83-
<div class="attribute">
84-
<div class="attribute-heading">
85-
<h3 id="option-kubeconfig">--kubeconfig</h3>
86-
<div class="attribute-type-info">&lt;string&gt;</div>
87-
</div>
88-
<div class="attribute-body">
89-
90-
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
91-
92-
93-
9480
</div>
9581
</div>
9682

input/refdog/commands/connector/generate.md

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,9 @@ help for generate
6666
</div>
6767
<div class="attribute-body">
6868

69-
The hostname or IP address of the local connector
69+
The hostname or IP address of the local connector (default "localhost") -o, --output string print resources to the console instead of submitting them to the Skupper controller. Choices: json, yaml (default "yaml")
7070

71-
72-
73-
</div>
74-
</div>
75-
76-
<div class="attribute">
77-
<div class="attribute-heading">
78-
<h3 id="option-include-not-ready">--include-not-ready</h3>
79-
<div class="attribute-type-info">boolean</div>
80-
</div>
81-
<div class="attribute-body">
82-
83-
If true, include server pods that are not in the ready state. -o, --output string print resources to the console instead of submitting them to the Skupper controller. Choices: json, yaml (default "yaml")
84-
85-
<table class="fields"><tr><th>Default</th><td><p><code>&quot;yaml&quot;</code></p>
71+
<table class="fields"><tr><th>Default</th><td><p><code>&quot;localhost&quot;</code></p>
8672
</td></table>
8773

8874
</div>
@@ -99,20 +85,6 @@ The identifier used to route traffic from listeners to connectors
9985

10086

10187

102-
</div>
103-
</div>
104-
105-
<div class="attribute">
106-
<div class="attribute-heading">
107-
<h3 id="option-selector">--selector</h3>
108-
<div class="attribute-type-info">&lt;string&gt;</div>
109-
</div>
110-
<div class="attribute-body">
111-
112-
A Kubernetes label selector for specifying target server pods.
113-
114-
115-
11688
</div>
11789
</div>
11890

@@ -137,39 +109,11 @@ the name of a Kubernetes secret containing the generated or externally-supplied
137109
</div>
138110
<div class="attribute-body">
139111

140-
The connector type. Choices: [tcp]. (default "tcp")
112+
The connector type. Choices: [tcp]. (default "tcp") ``` ``` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
141113

142114
<table class="fields"><tr><th>Default</th><td><p><code>&quot;tcp&quot;</code></p>
143115
</td><tr><th>Choices</th><td><table class="choices"><tr><th><code>tcp</code></th><td></td></tr></table></td></table>
144116

145-
</div>
146-
</div>
147-
148-
<div class="attribute">
149-
<div class="attribute-heading">
150-
<h3 id="option-workload">--workload</h3>
151-
<div class="attribute-type-info">&lt;string&gt;</div>
152-
</div>
153-
<div class="attribute-body">
154-
155-
A Kubernetes resource name that identifies a workload expressed like resource-type/resource-name. Expected resource types: service, daemonset, deployment, and statefulset. ``` ``` -c, --context string Set the kubeconfig context
156-
157-
158-
159-
</div>
160-
</div>
161-
162-
<div class="attribute">
163-
<div class="attribute-heading">
164-
<h3 id="option-kubeconfig">--kubeconfig</h3>
165-
<div class="attribute-type-info">&lt;string&gt;</div>
166-
</div>
167-
<div class="attribute-body">
168-
169-
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
170-
171-
172-
173117
</div>
174118
</div>
175119

input/refdog/commands/connector/status.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,7 @@ Has matching listeners: 1
5555
</div>
5656
<div class="attribute-body">
5757

58-
help for status -o, --output string print status of connectors Choices: json, yaml ``` ``` -c, --context string Set the kubeconfig context
59-
60-
61-
62-
</div>
63-
</div>
64-
65-
<div class="attribute">
66-
<div class="attribute-heading">
67-
<h3 id="option-kubeconfig">--kubeconfig</h3>
68-
<div class="attribute-type-info">&lt;string&gt;</div>
69-
</div>
70-
<div class="attribute-body">
71-
72-
Path to the kubeconfig file to use -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
58+
help for status -o, --output string print status of connectors Choices: json, yaml ``` ``` -n, --namespace string Set the namespace -p, --platform string Set the platform type to use [kubernetes, podman, docker, linux] ```
7359

7460

7561

0 commit comments

Comments
 (0)