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

Commit

Permalink
Fix api version properly
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Leong <[email protected]>
  • Loading branch information
adleong committed Mar 25, 2020
1 parent 6f6c8e1 commit 3a22549
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
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: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
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: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
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: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
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: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
kind: TrafficMetricsList
resource:
name: foo-775b9cbd88-ntxsl
Expand All @@ -207,20 +207,20 @@ kind: APIService
metadata:
name: v1alpha1.metrics.smi-spec.io
spec:
group: metrics.smi-spec.io/v1alpha1
group: metrics.smi-spec.io/v1alpha2
service:
name: mesh-metrics
namespace: default
version: v1alpha1
```

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

```yaml
apiVersion: v1
kind: APIResourceList
groupVersion: metrics.smi-spec.io/v1alpha1
groupVersion: metrics.smi-spec.io/v1alpha2
resources:
- name: namespaces
namespaced: false
Expand Down Expand Up @@ -270,7 +270,7 @@ and contains a `backend` field which indicates to which backend those metrics
correspond.

```yaml
apiVersion: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
kind: TrafficMetrics
# See ObjectReference v1 core for full spec
resource:
Expand Down Expand Up @@ -312,7 +312,7 @@ route only. If the `route` field is empty, the traffic metrics apply to the
resource as a whole.

```yaml
apiVersion: metrics.smi-spec.io/v1alpha1
apiVersion: metrics.smi-spec.io/v1alpha2
kind: TrafficMetrics
# See ObjectReference v1 core for full spec
resource:
Expand Down Expand Up @@ -445,7 +445,7 @@ Walking through the request flow:
1. An end user fires off a request to the Kubernetes API Server:

```bash
kubectl get --raw /apis/metrics.smi-spec.io/v1alpha1/namespaces/default/deployments/
kubectl get --raw /apis/metrics.smi-spec.io/v1alpha2/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 @@ -19,7 +19,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: specs.smi-spec.io/v1alpha2
apiVersion: specs.smi-spec.io/v1alpha1
kind: HTTPRouteGroup
metadata:
name: the-routes
Expand Down

0 comments on commit 3a22549

Please sign in to comment.