Skip to content

Support the ability to generate templates on tests based on a mocked Kubernetes cluster #3

Description

@aiyengar2

As a followup to https://github.com/aiyengar2/hull/issues/2, while the solution requested in the previous issue allows users to be able to mimic a helm install instead of a helm template / helm install --dry-run, it would not allow for environment-agnostic tests since the underlying Kubernetes cluster used may be different for different users, which can produce different results in tests.

Instead of assuming that a consistent environment is used in all test runs, Hull should offer the ability to start a HTTP server on a port that mocks one or more "read-only" API servers that are preconfigured to contain certain manifests of resources.

Ideally, from a user standpoint, a user would simply need to provide a manifest of resources (either a manifest string that can be go embedded from a file or a []runtime.Object) and a mock API server should be generated with a rest.Config that points to it that can be used for the e.RenderWithClient call; as a result, this mocked API server will be used as the basis for calling Helm which can result in tests that are fully environment-agnostic as they don't need a live Kubernetes cluster to be pre-setup to run tests with specific expectations.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions