Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #21 from deislabs/grampelberg/update-apiversion
Browse files Browse the repository at this point in the history
Update apiVersion
  • Loading branch information
grampelberg authored May 6, 2019
2 parents 03629b4 + 444956e commit 4691211
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions traffic-access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ for clients.

```yaml
kind: TrafficRole
apiVersion: v1beta1
apiVersion: access.smi-spec.io/v1alpha1
metadata:
name: path-specific
namespace: default
Expand All @@ -34,7 +34,7 @@ to provide Prometheus the access to scrape metrics on the `foo` deployment.

```yaml
kind: TrafficRoleBinding
apiVersion: v1beta1
apiVersion: access.smi-spec.io/v1alpha1
metadata:
name: account-specific
namespace: default
Expand All @@ -58,7 +58,7 @@ identity.

```yaml
kind: TrafficRoleBinding
apiVersion: v1beta1
apiVersion: access.smi-spec.io/v1alpha1
metadata:
name: account-specific
namespace: default
Expand Down
20 changes: 10 additions & 10 deletions traffic-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The core resource is `TrafficMetrics`. It references a `resource`, has an `edge`
and surfaces latency percentiles and request volume.

```yaml
apiVersion: traffic.metrics.k8s.io/v1beta1
apiVersion: metrics.smi-spec.io/v1alpha1
kind: TrafficMetrics
# See ObjectReference v1 core for full spec
resource:
Expand Down Expand Up @@ -150,7 +150,7 @@ There are three different ways to get a TrafficMetricsList:
* Requesting a specific `kind` such as pods or namespaces.

```yaml
apiVersion: traffic.metrics.k8s.io/v1beta1
apiVersion: metrics.smi-spec.io/v1alpha1
kind: TrafficMetricsList
resource:
kind: Pod
Expand All @@ -164,7 +164,7 @@ There are three different ways to get a TrafficMetricsList:
* Requesting a specific `kind` such as pods and filtering with a label selector:

```yaml
apiVersion: traffic.metrics.k8s.io/v1beta1
apiVersion: metrics.smi-spec.io/v1alpha1
kind: TrafficMetricsList
resource:
kind: Pod
Expand All @@ -181,7 +181,7 @@ There are three different ways to get a TrafficMetricsList:
* Listing all the edges for a specific resource:

```yaml
apiVersion: traffic.metrics.k8s.io/v1beta1
apiVersion: metrics.smi-spec.io/v1alpha1
kind: TrafficMetricsList
resource:
name: foo-775b9cbd88-ntxsl
Expand All @@ -205,22 +205,22 @@ The `traffic.metrics.k8s.io` API will be exposed via a `APIService`:
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.mesh.metrics.k8s.io
name: v1beta1.metrics.smi-spec.io
spec:
group: mesh.metrics.k8s.io
group: metrics.smi-spec.io/v1alpha1
service:
name: mesh-metrics
namespace: default
version: v1beta1
```

The default response, or requesting `/apis/traffic.metrics.k8s.io/v1beta1/`
The default response, or requesting `/apis/metrics.smi-spec.io/v1alpha1/`
would return:

```yaml
apiVersion: v1
kind: APIResourceList
groupVersion: mesh.metrics.k8s.io/v1beta1
groupVersion: metrics.smi-spec.io/v1alpha1
resources:
- name: namespaces
namespaced: false
Expand Down Expand Up @@ -280,7 +280,7 @@ or a dashboard.

### Canary

In combination with the Canary specification, a controller can:
In combination with the TrafficSplit specification, a controller can:

* Create a new deployment `v2`.
* Add a new canary and service for `v2`.
Expand Down Expand Up @@ -362,7 +362,7 @@ Walking through the request flow:
1. An end user fires off a request to the Kubernetes API Server:

```bash
kubectl get --raw /apis/traffic.metrics.k8s.io/v1beta1/namespaces/default/deployments/
kubectl get --raw /apis/metrics.smi-spec.io/v1alpha1/namespaces/default/deployments/
```

1. The Kubernetes API server forwards this request to the `Traffic Metrics
Expand Down
2 changes: 1 addition & 1 deletion traffic-specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This resource is used to describe HTTP/1 and HTTP/2 traffic. It enumerates the
routes that can be served by an application.

```yaml
apiVersion: v1beta1
apiVersion: specs.smi-spec.io/v1alpha1
kind: HTTPRoutes
metadata:
name: the-routes
Expand Down
24 changes: 12 additions & 12 deletions traffic-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ different selector and type.
## Specification

```yaml
apiVersion: v1beta1
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: my-weights
Expand Down Expand Up @@ -176,7 +176,7 @@ For updating an application to a new version:
* Create a new traffic split named `foobar-rollout`, it will look like:

```yaml
apiVersion: v1beta1
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: foobar-rollout
Expand All @@ -197,7 +197,7 @@ For updating an application to a new version:
* When ready, increase the weight of `foobar-v2`:

```yaml
apiVersion: v1beta1
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: foobar-rollout
Expand All @@ -218,7 +218,7 @@ For updating an application to a new version:
* Send all traffic to the new version:

```yaml
apiVersion: v1beta1
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: foobar-rollout
Expand Down Expand Up @@ -258,7 +258,7 @@ For updating an application to a new version:
* TrafficSplits cannot be self-referential - consider the following definition:

```yaml
apiVersion: v1beta1
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: my-split
Expand Down Expand Up @@ -291,14 +291,14 @@ For updating an application to a new version:

## Example implementation

This example implementation is included to illustrate how the `Canary` object
operates. It is not intended to prescribe a particular implementation.
This example implementation is included to illustrate how the `TrafficSplit`
object operates. It is not intended to prescribe a particular implementation.

Assume a `Canary` object that looks like:
Assume a `TrafficSplit` object that looks like:

```yaml
apiVersion: v1beta1
kind: Canary
apiVersion: split.smi-spec.io/v1alpha1
kind: TrafficSplit
metadata:
name: my-canary
spec:
Expand All @@ -310,10 +310,10 @@ Assume a `Canary` object that looks like:
weight: 900m
```

When a new `Canary` object is created, it instantiates the following Kubernetes
When a new `TrafficSplit` object is created, it instantiates the following Kubernetes
objects:

* Service who's name is the same as `spec.service` in the Canary (`web`)
* Service who's name is the same as `spec.service` in the TrafficSplit (`web`)
* A Deployment running `nginx` which has labels that match the Service

The nginx layer serves as an HTTP(s) layer which implements the canary. In
Expand Down

0 comments on commit 4691211

Please sign in to comment.