Skip to content

Commit

Permalink
adapter-k8s, remove old adapters package
Browse files Browse the repository at this point in the history
  • Loading branch information
patuwwy committed Jun 29, 2023
1 parent c348536 commit 5e5c727
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 1,966 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@scramjet/adapters",
"name": "@scramjet/adapter-k8s",
"version": "0.34.4",
"description": "This package is part of Scramjet Transform Hub. This module holds the docker adapters utilized by Scramjet Transform Hub",
"main": "./src/index.ts",
Expand All @@ -15,7 +15,6 @@
"author": "Scramjet <open-source@scramjet.org>",
"license": "AGPL-3.0",
"dependencies": {
"@kubernetes/client-node": "^0.17.1",
"@scramjet/model": "^0.34.4",
"@scramjet/obj-logger": "^0.34.4",
"@scramjet/pre-runner": "^0.34.4",
Expand All @@ -24,15 +23,15 @@
"@scramjet/sth-config": "^0.34.4",
"@scramjet/symbols": "^0.34.4",
"@scramjet/utility": "^0.34.4",
"dockerode": "^3.3.4",
"@scramjet/adapters-utils": "^0.34.4",
"@kubernetes/client-node": "^0.17.1",
"scramjet": "^4.36.9",
"shell-escape": "^0.2.0",
"systeminformation": "^5.12.7",
"ts.data.json": "^2.2.0"
},
"devDependencies": {
"@scramjet/types": "^0.34.4",
"@types/dockerode": "<=3.3.3",
"@types/js-yaml": "4.0.5",
"@types/node": "15.12.5",
"@types/request": "2.48.8",
Expand Down
11 changes: 11 additions & 0 deletions packages/adapter-k8s/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Adapter module must provide SequenceAdapter, InstanceAdapter classes, init method and name field.
*/
export { KubernetesSequenceAdapter as SequenceAdapter } from "./kubernetes-sequence-adapter";
export { KubernetesInstanceAdapter as InstanceAdapter } from "./kubernetes-instance-adapter";

export const init = (..._args: any[]) => {
return true;
};

export const name = "kubernetes";
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { ObjLogger } from "@scramjet/obj-logger";
import { createReadStream } from "fs";
import { KubernetesClientAdapter } from "./kubernetes-client-adapter";
import { adapterConfigDecoder } from "./kubernetes-config-decoder";
import { getRunnerEnvEntries } from "./get-runner-env";
import { getRunnerEnvEntries } from "@scramjet/adapters-utils";
import { PassThrough } from "stream";
import { RunnerExitCode } from "@scramjet/symbols";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ import fs from "fs/promises";
import path from "path";
import { exec } from "child_process";
import { isDefined, readStreamedJSON } from "@scramjet/utility";
import { sequencePackageJSONDecoder } from "./validate-sequence-package-json";
import { detectLanguage, sequencePackageJSONDecoder } from "@scramjet/adapters-utils";
import { adapterConfigDecoder } from "./kubernetes-config-decoder";
import { detectLanguage } from "./utils";

/**
* Returns existing Sequence configuration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Scramjet Transform Hub Adapters

This module holds two types of adapters utilized by Scramjet Transform Hub: Instance Adapter and Sequence Adapter. These Adapters allows for running the Sequence identification and Instance execution in two basic modes: as a non containerized standalone processes or in a Docker container.
This module holds two types of adapters utilized by Scramjet Transform Hub: Instance Adapter and Sequence Adapter. These Adapters allows for running the Sequence identification and Instance execution in standalone processes.

The adapter provides two main exports:

* [DockerSequenceAdapter](./src/docker-sequence-adapter.ts) - An adapter for preparing Sequence to be run in Docker container.
* [DockerInstanceAdapter](./src/docker-instance-adapter.ts) - An adapter for running Instance by Runner executed in Docker container.
* [SequenceAdapter](./src/process-sequence-adapter.ts) - An adapter for preparing Sequence to be run in subprocess.
* [InstanceAdapter](./src/process-instance-adapter.ts) - An adapter for running Instance by Runner executed in subprocess.

## Docs

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
285 changes: 0 additions & 285 deletions packages/adapters/src/docker-instance-adapter.ts

This file was deleted.

Loading

0 comments on commit 5e5c727

Please sign in to comment.