IF Commons GitHub

logical/kubernetes

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-estate-iac-importers FR-004

Kubernetes manifests: one YAML text with documents separated by ---. A Deployment, StatefulSet, DaemonSet, Job or CronJob is an application (with the image of its first container); a Service is an endpoint for each of its ports (open to the internet where it is a LoadBalancer, to the partners where it is a NodePort, internal where it is a ClusterIP), exposed by the applications its selector picks; an Ingress is an endpoint for each host (https where it has a TLS section), that depends on the services it routes to. Secrets are never read: a Secret is not an asset, and its data is not copied.

import { importKubernetes } from "./kubernetes.ts";
importKubernetes("k.yaml", "apiVersion: v1\nkind: Service\nmetadata:\n  name: web\nspec:\n  ports:\n    - port: 80\n").assets.length; // 1

Source: commons/estate-iac/src/logical/kubernetes.ts

1 of 4 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.documentsOffunctionno test imports it
function documentsOf(text: string): readonly string[]

The documents of a text of several, split at the lines that are only ---.

logical.importKubernetesfunctionno test imports it
function importKubernetes(source: string, text: string): Imports

The assets and links of the manifests in a text.

documentsOffunctionno test imports it
function documentsOf(text: string): readonly string[]

The documents of a text of several, split at the lines that are only ---.

importKubernetesfunction
function importKubernetes(source: string, text: string): Imports

The assets and links of the manifests in a text.

Imported by 7 tests of the run (7 passed, 0 failed): the library's results

Titles, headings, exports, tables, columns and requirements. Esc closes.