Skip to content

Commit

Permalink
Merge pull request #271 from solo-io/automation
Browse files Browse the repository at this point in the history
[bot] Merge automation
  • Loading branch information
djannot authored Dec 12, 2024
2 parents 70a51a5 + 682c4a0 commit f1b4ee1
Show file tree
Hide file tree
Showing 103 changed files with 7,810 additions and 422 deletions.
22 changes: 1 addition & 21 deletions gloo-gateway/1-17/enterprise-istio-ambient/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ timeout --signal=INT 3m mocha ./test.js --timeout 10000 --retries=120 --bail ||

## Lab 5 - Deploy the httpbin demo app <a name="lab-5---deploy-the-httpbin-demo-app-"></a>


We're going to deploy the httpbin application to demonstrate several features of Gloo Gateway.

You can find more information about this application [here](http://httpbin.org/).
Expand Down Expand Up @@ -1042,13 +1043,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -1125,13 +1119,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -4664,13 +4651,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const { execSync } = require('child_process');
const { expect } = require('chai');
const { diff } = require('jest-diff');

function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

describe('Gloo snapshot stability test', function() {
let contextName = process.env.{{ context | default: "CLUSTER1" }};
let delaySeconds = {{ delay | default: 5 }};

let firstSnapshot;

it('should retrieve initial snapshot', function() {
const output = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);

try {
firstSnapshot = JSON.parse(output);
} catch (err) {
throw new Error('Failed to parse JSON output from initial snapshot: ' + err.message);
}
expect(firstSnapshot).to.be.an('object');
});

it('should not change after the given delay', async function() {
await delay(delaySeconds * 1000);

let secondSnapshot;
try {
const output2 = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);
secondSnapshot = JSON.parse(output2);
} catch (err) {
throw new Error('Failed to retrieve or parse the second snapshot: ' + err.message);
}

const firstJson = JSON.stringify(firstSnapshot, null, 2);
const secondJson = JSON.stringify(secondSnapshot, null, 2);

// Show only 2 lines of context around each change
const diffOutput = diff(firstJson, secondJson, { contextLines: 2, expand: false });

if (! diffOutput.includes("Compared values have no visual difference.")) {
console.error('Differences found between snapshots:\n' + diffOutput);
throw new Error('Snapshots differ after the delay.');
} else {
console.log('No differences found. The snapshots are stable.');
}
});
});

22 changes: 1 addition & 21 deletions gloo-gateway/1-17/enterprise-istio-sidecar/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,7 @@ timeout --signal=INT 3m mocha ./test.js --timeout 10000 --retries=120 --bail ||

## Lab 5 - Deploy the httpbin demo app <a name="lab-5---deploy-the-httpbin-demo-app-"></a>


We're going to deploy the httpbin application to demonstrate several features of Gloo Gateway.

You can find more information about this application [here](http://httpbin.org/).
Expand Down Expand Up @@ -992,13 +993,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -1075,13 +1069,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -4614,13 +4601,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const { execSync } = require('child_process');
const { expect } = require('chai');
const { diff } = require('jest-diff');

function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

describe('Gloo snapshot stability test', function() {
let contextName = process.env.{{ context | default: "CLUSTER1" }};
let delaySeconds = {{ delay | default: 5 }};

let firstSnapshot;

it('should retrieve initial snapshot', function() {
const output = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);

try {
firstSnapshot = JSON.parse(output);
} catch (err) {
throw new Error('Failed to parse JSON output from initial snapshot: ' + err.message);
}
expect(firstSnapshot).to.be.an('object');
});

it('should not change after the given delay', async function() {
await delay(delaySeconds * 1000);

let secondSnapshot;
try {
const output2 = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);
secondSnapshot = JSON.parse(output2);
} catch (err) {
throw new Error('Failed to retrieve or parse the second snapshot: ' + err.message);
}

const firstJson = JSON.stringify(firstSnapshot, null, 2);
const secondJson = JSON.stringify(secondSnapshot, null, 2);

// Show only 2 lines of context around each change
const diffOutput = diff(firstJson, secondJson, { contextLines: 2, expand: false });

if (! diffOutput.includes("Compared values have no visual difference.")) {
console.error('Differences found between snapshots:\n' + diffOutput);
throw new Error('Snapshots differ after the delay.');
} else {
console.log('No differences found. The snapshots are stable.');
}
});
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const { execSync } = require('child_process');
const { expect } = require('chai');
const { diff } = require('jest-diff');

function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

describe('Gloo snapshot stability test', function() {
let contextName = process.env.{{ context | default: "CLUSTER1" }};
let delaySeconds = {{ delay | default: 5 }};

let firstSnapshot;

it('should retrieve initial snapshot', function() {
const output = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);

try {
firstSnapshot = JSON.parse(output);
} catch (err) {
throw new Error('Failed to parse JSON output from initial snapshot: ' + err.message);
}
expect(firstSnapshot).to.be.an('object');
});

it('should not change after the given delay', async function() {
await delay(delaySeconds * 1000);

let secondSnapshot;
try {
const output2 = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);
secondSnapshot = JSON.parse(output2);
} catch (err) {
throw new Error('Failed to retrieve or parse the second snapshot: ' + err.message);
}

const firstJson = JSON.stringify(firstSnapshot, null, 2);
const secondJson = JSON.stringify(secondSnapshot, null, 2);

// Show only 2 lines of context around each change
const diffOutput = diff(firstJson, secondJson, { contextLines: 2, expand: false });

if (! diffOutput.includes("Compared values have no visual difference.")) {
console.error('Differences found between snapshots:\n' + diffOutput);
throw new Error('Snapshots differ after the delay.');
} else {
console.log('No differences found. The snapshots are stable.');
}
});
});

22 changes: 1 addition & 21 deletions gloo-gateway/1-17/enterprise/default/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ timeout --signal=INT 3m mocha ./test.js --timeout 10000 --retries=120 --bail ||

## Lab 4 - Deploy the httpbin demo app <a name="lab-4---deploy-the-httpbin-demo-app-"></a>


We're going to deploy the httpbin application to demonstrate several features of Gloo Gateway.

You can find more information about this application [here](http://httpbin.org/).
Expand Down Expand Up @@ -932,13 +933,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -1015,13 +1009,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down Expand Up @@ -4554,13 +4541,6 @@ spec:
httpGet:
path: /status/200
port: http
resources:
limits:
cpu: 1
memory: 512Mi
requests:
cpu: 100m
memory: 256Mi
env:
- name: K8S_MEM_LIMIT
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
const { execSync } = require('child_process');
const { expect } = require('chai');
const { diff } = require('jest-diff');

function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}

describe('Gloo snapshot stability test', function() {
let contextName = process.env.{{ context | default: "CLUSTER1" }};
let delaySeconds = {{ delay | default: 5 }};

let firstSnapshot;

it('should retrieve initial snapshot', function() {
const output = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);

try {
firstSnapshot = JSON.parse(output);
} catch (err) {
throw new Error('Failed to parse JSON output from initial snapshot: ' + err.message);
}
expect(firstSnapshot).to.be.an('object');
});

it('should not change after the given delay', async function() {
await delay(delaySeconds * 1000);

let secondSnapshot;
try {
const output2 = execSync(
`kubectl --context ${contextName} -n gloo-system exec deploy/gloo -- wget -O - localhost:9095/snapshots/proxies -q`,
{ encoding: 'utf8' }
);
secondSnapshot = JSON.parse(output2);
} catch (err) {
throw new Error('Failed to retrieve or parse the second snapshot: ' + err.message);
}

const firstJson = JSON.stringify(firstSnapshot, null, 2);
const secondJson = JSON.stringify(secondSnapshot, null, 2);

// Show only 2 lines of context around each change
const diffOutput = diff(firstJson, secondJson, { contextLines: 2, expand: false });

if (! diffOutput.includes("Compared values have no visual difference.")) {
console.error('Differences found between snapshots:\n' + diffOutput);
throw new Error('Snapshots differ after the delay.');
} else {
console.log('No differences found. The snapshots are stable.');
}
});
});

Loading

0 comments on commit f1b4ee1

Please sign in to comment.