Overview of the Logging library API
Logger class, various LogWriter implementations (such as ConsoleLogWriter and SilentLogWriter), and utility functions for logger creation and log level management.website·Indexed 33 days ago
https://kosko.dev/A tool for managing and linting Kubernetes manifests. Features a comprehensive set of linting rules to enforce valid HPA replicas, unique container names, and required security contexts, as well as plugins for Kustomize and Helm integration. Includes an API for manifest generation, migration, and resolution.
Logger class, various LogWriter implementations (such as ConsoleLogWriter and SilentLogWriter), and utility functions for logger creation and log level management.SilentLogWriter class implements the LogWriter interface. It is designed to be a 'no-op' logger that omits or discards all logs passed to it, making it useful for environments where logging should be disabled without changing the application logic.template-deployed-service provides a way to create a new component that bundles both a Kubernetes Deployment and a Service together. This is managed via the default template which accepts an Options configuration object.// Usage of the default template
const component = default(<Options>);The no-missing-pvc rule ensures that all PersistentVolumeClaim (PVC) references are defined by verifying that the corresponding manifests are present.
Default Behavior:
recommended preset.no-missing-pv rule ensures that all PersistentVolume references are defined by verifying that the corresponding manifests are present. This rule is enabled by default in the recommended preset, but it is disabled when components are specified via the CLI.ResolveErrorOptions interface provides optional metadata about a resolution error, including the underlying cause, the position in the manifest where the error occurred, and the value that triggered the error.interface ResolveErrorOptions {
cause?: unknown;
position?: ManifestPosition;
value?: unknown;
}Kosko can be used in browsers using the @kosko/env and @kosko/generate packages (available since @kosko/env v2.0.0 and @kosko/generate v1.2.0).
Key browser-specific constraints:
@kosko/env has no default environment loaders in the browser; you must set them manually using dynamic imports or sync loaders.generate function from @kosko/generate because it relies on glob, which is unavailable in browsers. Use the resolve function instead to resolve and validate components.The CLIError class provides two optional read-only properties to provide more context about the error:
code: A numeric error code identifying the specific type of error.output: A string containing additional output or diagnostic information related to the error.no-missing-service-account rule ensures that all ServiceAccount references in your manifests are actually defined. It checks for the presence of the corresponding ServiceAccount manifests. Note that the default service account in every namespace is always permitted and does not trigger this rule. This rule is enabled by default in the recommended preset, but is disabled if specific components are provided via the CLI.SpawnError class extends the base Error class and is used to encapsulate detailed information about a failed process spawn. It provides read-only properties that capture the command attempted, the arguments passed, the exit code, and the resulting standard output and error streams.