mirror of https://github.com/istio/api.git
418 lines
13 KiB
HTML
418 lines
13 KiB
HTML
---
|
|
title: Workload Group
|
|
description: Describes a collection of workload instances.
|
|
location: https://istio.io/docs/reference/config/networking/workload-group.html
|
|
layout: protoc-gen-docs
|
|
generator: protoc-gen-docs
|
|
schema: istio.networking.v1alpha3.WorkloadGroup
|
|
aliases: [/docs/reference/config/networking/v1alpha3/workload-group]
|
|
number_of_entries: 8
|
|
---
|
|
<p><code>WorkloadGroup</code> describes a collection of workload instances.
|
|
It provides a specification that the workload instances can use to bootstrap
|
|
their proxies, including the metadata and identity. It is only intended to
|
|
be used with non-k8s workloads like Virtual Machines, and is meant to mimic
|
|
the existing sidecar injection and deployment specification model used for
|
|
Kubernetes workloads to bootstrap Istio proxies.</p>
|
|
<p>The following example declares a workload group representing a collection
|
|
of workloads that will be registered under <code>reviews</code> in namespace
|
|
<code>bookinfo</code>. The set of labels will be associated with each workload
|
|
instance during the bootstrap process, and the ports 3550 and 8080
|
|
will be associated with the workload group and use service account <code>default</code>.
|
|
<code>app.kubernetes.io/version</code> is just an arbitrary example of a label.</p>
|
|
<pre><code class="language-yaml">apiVersion: networking.istio.io/v1
|
|
kind: WorkloadGroup
|
|
metadata:
|
|
name: reviews
|
|
namespace: bookinfo
|
|
spec:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: reviews
|
|
app.kubernetes.io/version: "1.3.4"
|
|
template:
|
|
ports:
|
|
grpc: 3550
|
|
http: 8080
|
|
serviceAccount: default
|
|
probe:
|
|
initialDelaySeconds: 5
|
|
timeoutSeconds: 3
|
|
periodSeconds: 4
|
|
successThreshold: 3
|
|
failureThreshold: 3
|
|
httpGet:
|
|
path: /foo/bar
|
|
host: 127.0.0.1
|
|
port: 3100
|
|
scheme: HTTPS
|
|
httpHeaders:
|
|
- name: Lit-Header
|
|
value: Im-The-Best
|
|
</code></pre>
|
|
|
|
<h2 id="WorkloadGroup">WorkloadGroup</h2>
|
|
<section>
|
|
<p><code>WorkloadGroup</code> enables specifying the properties of a single workload for bootstrap and
|
|
provides a template for <code>WorkloadEntry</code>, similar to how <code>Deployment</code> specifies properties
|
|
of workloads via <code>Pod</code> templates. A <code>WorkloadGroup</code> can have more than one <code>WorkloadEntry</code>.
|
|
<code>WorkloadGroup</code> has no relationship to resources which control service registry like <code>ServiceEntry</code>
|
|
and as such doesn’t configure host name for these workloads.</p>
|
|
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="WorkloadGroup-metadata">
|
|
<td><div class="field"><div class="name"><code><a href="#WorkloadGroup-metadata">metadata</a></code></div>
|
|
<div class="type"><a href="#WorkloadGroup-ObjectMeta">ObjectMeta</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Metadata that will be used for all corresponding <code>WorkloadEntries</code>.
|
|
User labels for a workload group should be set here in <code>metadata</code> rather than in <code>template</code>.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="WorkloadGroup-template">
|
|
<td><div class="field"><div class="name"><code><a href="#WorkloadGroup-template">template</a></code></div>
|
|
<div class="type"><a href="https://istio.io/docs/reference/config/networking/workload-entry.html#WorkloadEntry">WorkloadEntry</a></div>
|
|
<div class="required">Required</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Template to be used for the generation of <code>WorkloadEntry</code> resources that belong to this <code>WorkloadGroup</code>.
|
|
Please note that <code>address</code> and <code>labels</code> fields should not be set in the template, and an empty <code>serviceAccount</code>
|
|
should default to <code>default</code>. The workload identities (mTLS certificates) will be bootstrapped using the
|
|
specified service account’s token. Workload entries in this group will be in the same namespace as the
|
|
workload group, and inherit the labels and annotations from the above <code>metadata</code> field.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="WorkloadGroup-probe">
|
|
<td><div class="field"><div class="name"><code><a href="#WorkloadGroup-probe">probe</a></code></div>
|
|
<div class="type"><a href="#ReadinessProbe">ReadinessProbe</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p><code>ReadinessProbe</code> describes the configuration the user must provide for healthchecking on their workload.
|
|
This configuration mirrors K8S in both syntax and logic for the most part.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h3 id="WorkloadGroup-ObjectMeta">ObjectMeta</h3>
|
|
<section>
|
|
<p><code>ObjectMeta</code> describes metadata that will be attached to a <code>WorkloadEntry</code>.
|
|
It is a subset of the supported Kubernetes metadata.</p>
|
|
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="WorkloadGroup-ObjectMeta-labels">
|
|
<td><div class="field"><div class="name"><code><a href="#WorkloadGroup-ObjectMeta-labels">labels</a></code></div>
|
|
<div class="type">map<string, string></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Labels to attach</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="WorkloadGroup-ObjectMeta-annotations">
|
|
<td><div class="field"><div class="name"><code><a href="#WorkloadGroup-ObjectMeta-annotations">annotations</a></code></div>
|
|
<div class="type">map<string, string></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Annotations to attach</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="ReadinessProbe">ReadinessProbe</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="ReadinessProbe-initial_delay_seconds">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-initial_delay_seconds">initialDelaySeconds</a></code></div>
|
|
<div class="type">int32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Number of seconds after the container has started before readiness probes are initiated.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-timeout_seconds">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-timeout_seconds">timeoutSeconds</a></code></div>
|
|
<div class="type">int32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Number of seconds after which the probe times out.
|
|
Defaults to 1 second. Minimum value is 1 second.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-period_seconds">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-period_seconds">periodSeconds</a></code></div>
|
|
<div class="type">int32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>How often (in seconds) to perform the probe.
|
|
Default to 10 seconds. Minimum value is 1 second.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-success_threshold">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-success_threshold">successThreshold</a></code></div>
|
|
<div class="type">int32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Minimum consecutive successes for the probe to be considered successful after having failed.
|
|
Defaults to 1 second.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-failure_threshold">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-failure_threshold">failureThreshold</a></code></div>
|
|
<div class="type">int32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Minimum consecutive failures for the probe to be considered failed after having succeeded.
|
|
Defaults to 3 seconds.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-http_get" class="oneof oneof-start">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-http_get">httpGet</a></code></div>
|
|
<div class="type"><a href="#HTTPHealthCheckConfig">HTTPHealthCheckConfig (oneof)</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p><code>httpGet</code> is performed to a given endpoint
|
|
and the status/able to connect determines health.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-tcp_socket" class="oneof">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-tcp_socket">tcpSocket</a></code></div>
|
|
<div class="type"><a href="#TCPHealthCheckConfig">TCPHealthCheckConfig (oneof)</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Health is determined by if the proxy is able to connect.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-exec" class="oneof">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-exec">exec</a></code></div>
|
|
<div class="type"><a href="#ExecHealthCheckConfig">ExecHealthCheckConfig (oneof)</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Health is determined by how the command that is executed exited.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="ReadinessProbe-grpc" class="oneof">
|
|
<td><div class="field"><div class="name"><code><a href="#ReadinessProbe-grpc">grpc</a></code></div>
|
|
<div class="type"><a href="#GrpcHealthCheckConfig">GrpcHealthCheckConfig (oneof)</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p>GRPC call is made and response/error is used to determine health.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="HTTPHealthCheckConfig">HTTPHealthCheckConfig</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="HTTPHealthCheckConfig-path">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHealthCheckConfig-path">path</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Path to access on the HTTP server.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="HTTPHealthCheckConfig-port">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHealthCheckConfig-port">port</a></code></div>
|
|
<div class="type">uint32</div>
|
|
<div class="required">Required</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Port on which the endpoint lives.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="HTTPHealthCheckConfig-host">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHealthCheckConfig-host">host</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Host name to connect to, defaults to the pod IP. You probably want to set
|
|
“Host” in httpHeaders instead.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="HTTPHealthCheckConfig-scheme">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHealthCheckConfig-scheme">scheme</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>HTTP or HTTPS, defaults to HTTP</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="HTTPHealthCheckConfig-http_headers">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHealthCheckConfig-http_headers">httpHeaders</a></code></div>
|
|
<div class="type"><a href="#HTTPHeader">HTTPHeader[]</a></div>
|
|
</div></td>
|
|
<td>
|
|
<p>Headers the proxy will pass on to make the request.
|
|
Allows repeated headers.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="GrpcHealthCheckConfig">GrpcHealthCheckConfig</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="GrpcHealthCheckConfig-port">
|
|
<td><div class="field"><div class="name"><code><a href="#GrpcHealthCheckConfig-port">port</a></code></div>
|
|
<div class="type">uint32</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Port on which the endpoint lives.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="GrpcHealthCheckConfig-service">
|
|
<td><div class="field"><div class="name"><code><a href="#GrpcHealthCheckConfig-service">service</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Service is the fully qualified name of the service to send the grpc health check request</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="HTTPHeader">HTTPHeader</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="HTTPHeader-name">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHeader-name">name</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>The header field name</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="HTTPHeader-value">
|
|
<td><div class="field"><div class="name"><code><a href="#HTTPHeader-value">value</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>The header field value</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="TCPHealthCheckConfig">TCPHealthCheckConfig</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="TCPHealthCheckConfig-host">
|
|
<td><div class="field"><div class="name"><code><a href="#TCPHealthCheckConfig-host">host</a></code></div>
|
|
<div class="type">string</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Host to connect to, defaults to localhost</p>
|
|
|
|
</td>
|
|
</tr>
|
|
<tr id="TCPHealthCheckConfig-port">
|
|
<td><div class="field"><div class="name"><code><a href="#TCPHealthCheckConfig-port">port</a></code></div>
|
|
<div class="type">uint32</div>
|
|
<div class="required">Required</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Port of host</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<h2 id="ExecHealthCheckConfig">ExecHealthCheckConfig</h2>
|
|
<section>
|
|
<table class="message-fields">
|
|
<thead>
|
|
<tr>
|
|
<th>Field</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr id="ExecHealthCheckConfig-command">
|
|
<td><div class="field"><div class="name"><code><a href="#ExecHealthCheckConfig-command">command</a></code></div>
|
|
<div class="type">string[]</div>
|
|
<div class="required">Required</div>
|
|
</div></td>
|
|
<td>
|
|
<p>Command to run. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.</p>
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|