Skip to content

Commit 1c36cd4

Browse files
committed
chore: remove openshift 3 tests
The platform was last released in 2018 and deprecated since then. By now, we should not have any customers using it.
1 parent 46d8a42 commit 1c36cd4

File tree

8 files changed

+3
-107
lines changed

8 files changed

+3
-107
lines changed

.circleci/config.yml

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -389,31 +389,6 @@ jobs:
389389
name: Notify Slack on failure
390390
when: on_fail
391391
working_directory: ~/kubernetes-monitor
392-
openshift3_integration_tests:
393-
machine:
394-
docker_layer_caching: true
395-
image: ubuntu-2004:202111-02
396-
resource_class: large
397-
steps:
398-
- checkout
399-
- setup_node16
400-
- install_python_requests
401-
- run:
402-
command: mkdir -p /tmp/logs/test/integration/openshift3
403-
name: Create temporary directory for logs
404-
- run:
405-
command: |
406-
export IMAGE_TAG_UBI_SUFFIX="-ubi8"
407-
export KUBERNETES_MONITOR_IMAGE_NAME_AND_TAG=$(./scripts/circleci-jobs/setup-integration-tests.py)
408-
npm run test:integration:openshift3:yaml
409-
name: Integration tests OpenShift 3
410-
- run:
411-
command: ./scripts/slack/notify_failure.py "${CIRCLE_BRANCH}" "${CIRCLE_JOB}" "${CIRCLE_BUILD_URL}" "${CIRCLE_PULL_REQUEST}" "${SLACK_WEBHOOK}"
412-
name: Notify Slack on failure
413-
when: on_fail
414-
- store_artifacts:
415-
path: /tmp/logs/test/integration/openshift3
416-
working_directory: ~/kubernetes-monitor
417392
openshift4_integration_tests:
418393
machine:
419394
docker_layer_caching: true
@@ -1131,13 +1106,6 @@ workflows:
11311106
- staging
11321107
requires:
11331108
- build_image
1134-
- openshift3_integration_tests:
1135-
filters:
1136-
branches:
1137-
only:
1138-
- staging
1139-
requires:
1140-
- build_image
11411109
- integration_tests_operator_on_k8s:
11421110
filters:
11431111
branches:

.circleci/config/@config.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ workflows:
7373
requires:
7474
- build_image
7575
<<: *staging_branch_only_filter
76-
- openshift3_integration_tests:
77-
requires:
78-
- build_image
79-
<<: *staging_branch_only_filter
8076
- integration_tests_operator_on_k8s:
8177
requires:
8278
- build_image

.circleci/config/jobs/openshift3_integration_tests.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"test:integration:kindolm:operator": "DEPLOYMENT_TYPE=OperatorOLM TEST_PLATFORM=kindolm CREATE_CLUSTER=true jest --logHeapUsage --ci --maxWorkers=1 test/integration/kubernetes.spec.ts",
2222
"test:integration:eks:yaml": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=eks CREATE_CLUSTER=false jest --logHeapUsage --ci --maxWorkers=1 test/integration/kubernetes.spec.ts",
2323
"test:integration:aks:yaml": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=aks CREATE_CLUSTER=false jest --logHeapUsage --ci --maxWorkers=1 test/integration/kubernetes.spec.ts",
24-
"test:integration:openshift3:yaml": "DEPLOYMENT_TYPE=YAML TEST_PLATFORM=openshift3 CREATE_CLUSTER=true jest --logHeapUsage --ci --maxWorkers=1 test/integration/kubernetes.spec.ts",
2524
"test:integration:openshift4:operator": "scripts/test-openshift4.sh",
2625
"test:coverage": "npm run test:unit -- --coverage",
2726
"test:watch": "tsc-watch --onSuccess 'npm run test:unit'",

test/helpers/kubectl.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,12 @@ export async function createPodFromImage(
108108
name: string,
109109
image: string,
110110
namespace: string,
111-
) {
111+
): Promise<void> {
112112
console.log(
113113
`Letting Kubernetes decide how to manage image ${image} with name ${name}`,
114114
);
115-
/**
116-
* HACK! The newest version of kubectl does not support generators. However, "OpenShift 3" tests run on K8s 1.11 which supports generators.
117-
* The default behaviour there is to create a Deployment, whereas new versions of kubectl create Pods.
118-
* We can't use the default behaviour for both OpenShift 3 and other tests, because we would get different results.
119-
* Hence we need to specifically select the Pod generator on OS3 but it would default to Pod on anything else.
120-
*/
121-
const generator =
122-
process.env['TEST_PLATFORM'] === 'openshift3'
123-
? '--generator=run-pod/v1'
124-
: '';
125115
await exec(
126-
`./kubectl run ${name} ${generator} --image=${image} -n ${namespace} -- sleep 999999999`,
116+
`./kubectl run ${name} --image=${image} -n ${namespace} -- sleep 999999999`,
127117
);
128118
console.log(
129119
`Done Letting Kubernetes decide how to manage image ${image} with name ${name}`,

test/setup/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ export async function deployMonitor(): Promise<string> {
188188

189189
// TODO: hack, rewrite this
190190
const imagePullPolicy =
191-
testPlatform === 'kind' ||
192-
testPlatform === 'kindolm' ||
193-
testPlatform === 'openshift3'
191+
testPlatform === 'kind' || testPlatform === 'kindolm'
194192
? 'Never'
195193
: 'Always';
196194
const deploymentImageOptions: IImageOptions = {

test/setup/platforms/index.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as kind from './kind';
22
import * as kindOlm from './kind-olm';
33
import * as eks from './eks';
44
import * as aks from './aks';
5-
import * as openshift3 from './openshift3';
65
import * as openshift4 from './openshift4';
76

87
interface IPlatformSetup {
@@ -62,17 +61,6 @@ const aksSetup: IPlatformSetup = {
6261
validateRequiredEnvironment: aks.validateRequiredEnvironment,
6362
};
6463

65-
// Use a kind cluster pinned to a specific Kubernetes version to mimic OS3.
66-
const openshift3Setup: IPlatformSetup = {
67-
create: kind.createCluster,
68-
loadImage: kind.loadImageInCluster,
69-
delete: kind.deleteCluster,
70-
config: kind.exportKubeConfig,
71-
clean: kind.clean,
72-
setupTester: openshift3.setupTester,
73-
validateRequiredEnvironment: openshift3.validateRequiredEnvironment,
74-
};
75-
7664
const openshift4Setup: IPlatformSetup = {
7765
create: openshift4.createCluster,
7866
loadImage: openshift4.returnUnchangedImageNameAndTag,
@@ -85,8 +73,6 @@ const openshift4Setup: IPlatformSetup = {
8573

8674
export function getKubernetesVersionForPlatform(testPlatform: string): string {
8775
switch (testPlatform) {
88-
case 'openshift3':
89-
return 'v1.11.10';
9076
default:
9177
return 'latest';
9278
}
@@ -97,7 +83,6 @@ export default {
9783
kindolm: kindOlmSetup,
9884
eks: eksSetup,
9985
aks: aksSetup,
100-
openshift3: openshift3Setup,
10186
openshift4: openshift4Setup,
10287
} as {
10388
[key: string]: IPlatformSetup;

test/setup/platforms/openshift3.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)