Skip to content

Commit

Permalink
Merge pull request #28 from kanishkarj/master
Browse files Browse the repository at this point in the history
SMI conformance with Documentation
  • Loading branch information
leecalcote authored Jul 22, 2020
2 parents e2ac9e8 + 30866fa commit 1119ac5
Show file tree
Hide file tree
Showing 59 changed files with 2,736 additions and 88 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

<p style="text-align:center;" align="center">
<img align="center" src="https://raw.githubusercontent.com/layer5io/layer5/master/assets/images/layer5/layer5-tag-white-bg.png" width="45%" /></p>

Expand Down Expand Up @@ -120,9 +119,19 @@ Meshery allows you to sechedule tests and invoke them programmatically. Meshery

To manually invoke SMI Conformance test for a deployed service mesh, you can apply tests from the `smi-test` directory of this repository. Execute the following command to run the smi-conformace tests:

# To check for smi conformance of a deployed service mesh
We use kuttl to check for SMI conformance. All the tests are writtten in smi-test directory of this repository.
Execute the following command in `./smi-conformance` to run the smi-conformace tests:-

```shell
go run main.go
```

<!--
```shell
kubectl kuttl test --skip-cluster-delete=true --start-kind=false ./smi-test
```
-->

<br /><br /><p align="center"><i>If you’re using Learn Layer5 or if you like the project, please <a href="https://github.com/layer5io/meshery/stargazers">★</a> star this repository to show your support! 🤩</i></p>
</p>
Expand Down
153 changes: 153 additions & 0 deletions deploy/k8s-consul.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-a
automountServiceAccountToken: false
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-b
automountServiceAccountToken: false
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-c
automountServiceAccountToken: false
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-a-deployment
labels:
app: service-a
spec:
replicas: 1
selector:
matchLabels:
app: service-a
template:
metadata:
name: service-a
labels:
app: service-a
annotations:
'consul.hashicorp.com/connect-inject': 'true'
'consul.hashicorp.com/connect-service-upstreams': 'service-b:9092'
spec:
serviceAccountName: service-a
automountServiceAccountToken: true
containers:
- name: service-a
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
name: http
env:
- name: SERVICE_NAME
value: "Service-a"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-b-deployment
labels:
app: service-b
spec:
replicas: 1
selector:
matchLabels:
app: service-b
template:
metadata:
name: service-b
annotations:
'consul.hashicorp.com/connect-inject': 'true'
"consul.hashicorp.com/connect-service": "service-b"
labels:
app: service-b
spec:
serviceAccountName: service-b
automountServiceAccountToken: true
containers:
- name: service-b
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
env:
- name: SERVICE_NAME
value: "Service-b"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: service-c-deployment
labels:
app: service-c
spec:
replicas: 1
selector:
matchLabels:
app: service-c
template:
metadata:
name: service-c
annotations:
'consul.hashicorp.com/connect-inject': 'true'
"consul.hashicorp.com/connect-service": "service-c"
labels:
app: service-c
spec:
serviceAccountName: service-c
automountServiceAccountToken: true
containers:
- name: service-c
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
env:
- name: SERVICE_NAME
value: "Service-c"
---
apiVersion: v1
kind: Service
metadata:
name: app-a
spec:
type: LoadBalancer
selector:
app: app-a
ports:
- name: http
protocol: TCP
port: 9091
# targetPort: 9091
---
apiVersion: v1
kind: Service
metadata:
name: app-b
spec:
type: LoadBalancer
selector:
app: app-b
ports:
- name: http
protocol: TCP
port: 9091
# targetPort: 9091
---
apiVersion: v1
kind: Service
metadata:
name: app-c
spec:
type: LoadBalancer
selector:
app: app-c
ports:
- name: http
protocol: TCP
port: 9091
# targetPort: 9091
151 changes: 151 additions & 0 deletions deploy/k8s-maesh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
apiVersion: v1
kind: Namespace
metadata:
name: <NAMESPACE>
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-a
namespace: <NAMESPACE>
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-b
namespace: <NAMESPACE>
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: service-c
namespace: <NAMESPACE>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-a-deployment
namespace: <NAMESPACE>
labels:
app: app-a
spec:
replicas: 1
selector:
matchLabels:
app: app-a
template:
metadata:
labels:
app: app-a
spec:
serviceAccountName: service-a
containers:
- name: app-a
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
name: http
env:
- name: SERVICE_NAME
value: "Service-a"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-b-deployment
namespace: <NAMESPACE>
labels:
app: app-b
spec:
replicas: 1
selector:
matchLabels:
app: app-b
template:
metadata:
labels:
app: app-b
spec:
serviceAccountName: service-b
containers:
- name: app-b
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
name: http
env:
- name: SERVICE_NAME
value: "Service-b"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-c-deployment
namespace: <NAMESPACE>
labels:
app: app-c
spec:
replicas: 1
selector:
matchLabels:
app: app-c
template:
metadata:
labels:
app: app-c
spec:
serviceAccountName: service-c
containers:
- name: app-c
image: layer5/learn-layer5:latest
ports:
- containerPort: 9091
name: http
env:
- name: SERVICE_NAME
value: "Service-c"
---
apiVersion: v1
kind: Service
metadata:
name: app-a
namespace: <NAMESPACE>
spec:
type: NodePort
selector:
app: app-a
ports:
- name: http
protocol: TCP
port: 9091
targetPort: 9091
---
apiVersion: v1
kind: Service
metadata:
name: app-b
namespace: <NAMESPACE>
spec:
type: NodePort
selector:
app: app-b
ports:
- name: http
protocol: TCP
port: 9091
targetPort: 9091
---
apiVersion: v1
kind: Service
metadata:
name: app-c
namespace: <NAMESPACE>
spec:
type: NodePort
selector:
app: app-c
ports:
- name: http
protocol: TCP
port: 9091
targetPort: 9091
Loading

0 comments on commit 1119ac5

Please sign in to comment.