Signadot enables a de-centralized testing model where you test in a high quality environment before merging code to a shared branch. You enjoy fast feedback, discover issues early and test every change independently without impacting other developers.
Create a Sandbox by "forking" one or more baseline workloads. Customize "forked" versions with specific docker images and environment variables.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { ApiClient, SandboxesApi } from '@signadot/signadot-sdk';
// initialize client
const apiClient = new ApiClient();
apiClient.authentications.ApiKeyAuth.apiKey = SIGNADOT_API_KEY;
// A particular service that we want to fork, starting from the specified
// Kubernetes workload of kind "Deployment" called "route" in namespace
// "hotrod". To fork an Argo Rollout, use kind "Rollout".
const routeFork = SandboxFork.constructFromObject({
forkOf: ForkOf.constructFromObject(
{ kind: 'Deployment', name: 'route', namespace: 'hotrod' }),
// customizations to be applied on the fork
customizations: SandboxCustomizations.constructFromObject({
// docker image that the fork should run
images: [
Image.constructFromObject(
{ image: 'registry/docker-image:tag' })
],
// any env vars to add / modify
env: [
EnvOp.constructFromObject(
{ name: 'abc', value: 'def' })
]
}),
// endpoints that we want to expose in order to run tests
endpoints: [
ForkEndpoint.constructFromObject(
{ name: 'hotrod-route', port: 8083, protocol: 'http' })
]
});
const request = CreateSandboxRequest.constructFromObject({
name: 'test-sandbox',
description: 'route service test sandbox',
cluster: 'your-cluster',
forks: [ routeFork ]
});
// submitting the request to create sandbox via the API
const sandboxesApi = new SandboxesApi(apiClient);
const response = await sandboxesApi.createNewSandbox('org-name', request);
const sandboxID = response.sandboxID;
const endpoint = response.previewEndpoints.filter(ep => ep.name === 'hotrod-route')[0];
const previewUrl = endpoint.previewURL;
Microservice Test Isolation with Resource Plugins
Introduction We think of microservices on Kubernetes as a collection of workloads which are more often than not stateless . REST and gRPC…