-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from layer5io/smi-conformace
Added support to check for CRDs
- Loading branch information
Showing
9 changed files
with
312 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: traffictargets.access.smi-spec.io | ||
spec: | ||
group: access.smi-spec.io | ||
status: | ||
acceptedNames: | ||
kind: TrafficTarget | ||
shortNames: | ||
- tt | ||
plural: traffictargets | ||
singular: traffictarget | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-a | ||
labels: | ||
app: app-a | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-a | ||
template: | ||
metadata: | ||
labels: | ||
app: app-a | ||
spec: | ||
containers: | ||
- name: app-a | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
status: | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-b | ||
labels: | ||
app: app-b | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-b | ||
template: | ||
metadata: | ||
labels: | ||
app: app-b | ||
spec: | ||
containers: | ||
- name: app-b | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
status: | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-c | ||
labels: | ||
app: app-c | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-c | ||
template: | ||
metadata: | ||
labels: | ||
app: app-c | ||
spec: | ||
containers: | ||
- name: app-c | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
status: | ||
availableReplicas: 1 | ||
readyReplicas: 1 | ||
replicas: 1 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-a | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: app-a | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-b | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: app-b | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-c | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: app-c | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-a | ||
labels: | ||
app: app-a | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-a | ||
template: | ||
metadata: | ||
labels: | ||
app: app-a | ||
spec: | ||
containers: | ||
- name: app-a | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-b | ||
labels: | ||
app: app-b | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-b | ||
template: | ||
metadata: | ||
labels: | ||
app: app-b | ||
spec: | ||
containers: | ||
- name: app-b | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: app-c | ||
labels: | ||
app: app-c | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: app-c | ||
template: | ||
metadata: | ||
labels: | ||
app: app-c | ||
spec: | ||
containers: | ||
- name: app-c | ||
image: layer5/sample-app-service:dev | ||
imagePullPolicy: Never | ||
ports: | ||
- containerPort: 9091 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-a | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: app-a | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-b | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: app-b | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-c | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: app-c | ||
ports: | ||
- name: http | ||
protocol: TCP | ||
port: 9091 | ||
targetPort: 9091 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kudo.dev/v1alpha1 | ||
kind: TestStep | ||
delete: | ||
- apiVersion: v1 | ||
kind: Pod | ||
name: my-pod | ||
commands: | ||
- command: chmod +x ./execThis.sh | ||
- command: sh ./execThis.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
echo $(kubectl get service service-a --namespace=$NAMESPACE -o jsonpath="{.spec.ports[0].nodePort}") | ||
kubectl describe pods --namespace=$NAMESPACE | ||
curl --location --request POST 'http://localhost:'$(echo $(kubectl get service service-a --namespace=$NAMESPACE -o jsonpath="{.spec.ports[0].nodePort}"))'/call' -w "%{http_code}" --data-raw '{"host": "http://service-b/post",}' | ||
|
||
|
||
curl --location --request GET 'localhost:'$(echo $(kubectl get service service-a --namespace=$NAMESPACE -o jsonpath="{.spec.ports[0].nodePort}"))'/metrics' --header 'Content-Type: application/json' --data-raw '{"hello": "bye"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: httproutegroups.specs.smi-spec.io | ||
spec: | ||
group: specs.smi-spec.io | ||
scope: Namespaced | ||
status: | ||
acceptedNames: | ||
kind: HTTPRouteGroup | ||
shortNames: | ||
- htr | ||
plural: httproutegroups | ||
singular: httproutegroup | ||
|
||
--- | ||
|
||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: tcproutes.specs.smi-spec.io | ||
spec: | ||
group: specs.smi-spec.io | ||
scope: Namespaced | ||
status: | ||
acceptedNames: | ||
kind: TCPRoute | ||
shortNames: | ||
- tr | ||
plural: tcproutes | ||
singular: tcproute | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: trafficsplits.split.smi-spec.io | ||
spec: | ||
group: split.smi-spec.io | ||
scope: Namespaced | ||
status: | ||
acceptedNames: | ||
kind: TrafficSplit | ||
listKind: TrafficSplitList | ||
plural: trafficsplits | ||
singular: trafficsplit | ||
shortNames: | ||
- ts |