pod_porter package

Subpackages

Submodules

pod_porter.pod_porter module

Pod Porter Main Application

class pod_porter.pod_porter.PorterMapsRunner(path: str, release_name: str | None = None, values_override: str | None = None)[source]

Bases: object

A class to represent the PorterMapRunner for collecting and running maps

Parameters:
  • path (str) – The path to the directory containing the map.yaml and values.yaml files

  • release_name (Optional[str] = None) – The name of the release

Return type:

None

Returns:

Nothing

get_map_data() MapSchema[source]

Get the map data

Return type:

MapSchema

Returns:

The map data

render_compose() str[source]

Render the compose file

Return type:

str

Returns:

The rendered compose file

static validate_compose_json_schema(compose_data: dict) None[source]

Validate the created compose data against the compose spec JSON schema https://github.com/compose-spec/compose-spec/blob/main/schema/compose-spec.json

Parameters:

compose_data (dict) – The compose data

Return type:

None

Returns:

Nothing it validates the JSON data against the JSON schema

pod_porter.pod_porter.validate_json_against_schema(values_data: dict, json_schema: dict) None[source]

Validate a data set against a JSON schema

Parameters:
  • values_data (dict) – The data to validate

  • json_schema (dict) – The schema to validate against

Return type:

None

Returns:

Nothing

Raises:

ValueError: If the validation fails

pod_porter.pod_porter_cli module

CLI for pod_porter

pod_porter.pod_porter_cli.cli() None[source]

Function to run the command line

Return type:

None

Returns:

Nothing it is the CLI

pod_porter.pod_porter_cli.cli_argument_parser() ArgumentParser[source]

Function to create the argument parser

Return type:

ArgumentParser

Returns:

The argument parser

pod_porter.pod_porter_cli.common_sub_parser_arguments(sub_arg_parser: ArgumentParser) None[source]

Add common arguments to a sub parser

Parameters:

sub_arg_parser (ArgumentParser) – The sub parser to add the arguments to

Return type:

None

Returns:

Nothing it appends the arguments to the sub parser

pod_porter.pod_porter_cli.common_sub_parser_map_arguments(sub_arg_parser: ArgumentParser) None[source]

Add common arguments to a sub parser

Parameters:

sub_arg_parser (ArgumentParser) – The sub parser to add the arguments to

Return type:

None

Returns:

Nothing it appends the arguments to the sub parser

pod_porter.pod_porter_cli.common_sub_parser_output_path(sub_arg_parser: ArgumentParser) None[source]

Add common arguments to a sub parser

Parameters:

sub_arg_parser (ArgumentParser) – The sub parser to add the arguments to

Return type:

None

Returns:

Nothing it appends the arguments to the sub parser

Module contents

init for pod_porter