@controlplane/cli
Version:
Control Plane Corporation CLI
78 lines • 2.81 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.K8S_WELL_KNOWN_PORTS = exports.K8_NAME_PREFIX_PROTOCOLS = exports.K8S_CPLN_ANNOTATION_INTERNAL_INBOUND_ALLOW_TYPES = exports.K8S_CPLN_ANNOTATION_WORKLOAD_TYPES = exports.K8S_CPLN_ANNOTATION_INTERNAL_INBOUND_ALLOW_TYPE = exports.K8S_CPLN_ANNOTATION_INHERIT_ENV = exports.K8S_CPLN_ANNOTATION_WORKLOAD_TYPE = exports.K8S_CONVERTER_LOGGING_CONVERSIONS_PATH = exports.K8S_CONVERTER_LOGGING_BASE_URL = void 0;
/**
* The base URL of the K8s Converter Logging API.
*/
exports.K8S_CONVERTER_LOGGING_BASE_URL = 'https://k8s-converter-logging.controlplane.site';
/**
* The full URL to the `/conversions` endpoint of the K8s Converter Logging API.
* Use this to send POST requests containing conversion data.
*/
exports.K8S_CONVERTER_LOGGING_CONVERSIONS_PATH = `${exports.K8S_CONVERTER_LOGGING_BASE_URL}/conversions`;
/**
* Annotation that pins the type of the converted workload (serverless, standard or stateful).
*/
exports.K8S_CPLN_ANNOTATION_WORKLOAD_TYPE = 'cpln.io/workload-type';
/**
* Annotation that sets `inheritEnv` on every converted container, allowing GVC-level environment variables to flow in.
*/
exports.K8S_CPLN_ANNOTATION_INHERIT_ENV = 'cpln.io/inherit-env';
/**
* Annotation that overrides the internal firewall inbound allow type of the converted workload.
*/
exports.K8S_CPLN_ANNOTATION_INTERNAL_INBOUND_ALLOW_TYPE = 'cpln.io/internal-inbound-allow-type';
/**
* Workload types that can be pinned through the workload type annotation.
*/
exports.K8S_CPLN_ANNOTATION_WORKLOAD_TYPES = ['serverless', 'standard', 'stateful'];
/**
* Internal firewall inbound allow types that can be set through the internal inbound allow type annotation.
*/
exports.K8S_CPLN_ANNOTATION_INTERNAL_INBOUND_ALLOW_TYPES = ['none', 'same-gvc', 'same-org'];
/**
* Maps common service/port name prefixes to application protocols (best-effort, not exhaustive)
*/
exports.K8_NAME_PREFIX_PROTOCOLS = {
// HTTP family
http: 'http',
https: 'http',
ws: 'http',
wss: 'http',
// HTTP2 family
http2: 'http2',
h2: 'http2',
h2c: 'http2',
// gRPC family
grpc: 'grpc',
'grpc-web': 'grpc',
grpcweb: 'grpc',
};
/**
* Maps well-known port numbers to application protocols (heuristic fallback, not authoritative)
*/
exports.K8S_WELL_KNOWN_PORTS = {
// HTTP
80: 'http',
81: 'http',
3000: 'http',
3001: 'http',
3002: 'http',
8000: 'http',
8008: 'http',
8080: 'http',
8081: 'http',
8088: 'http',
8443: 'http',
9090: 'http', // Prometheus UI/http
// TLS HTTP
443: 'http',
// gRPC
50051: 'grpc',
50052: 'grpc',
50053: 'grpc',
50054: 'grpc',
50055: 'grpc',
6565: 'grpc',
};
//# sourceMappingURL=constants.js.map