Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kustomize] Add a dry-run option to SubstituteVariables #296

Open
souleb opened this issue Jul 5, 2022 · 0 comments
Open

[kustomize] Add a dry-run option to SubstituteVariables #296

souleb opened this issue Jul 5, 2022 · 0 comments
Labels
area/kustomize Kustomize related issues and pull requests enhancement New feature or request

Comments

@souleb
Copy link
Member

souleb commented Jul 5, 2022

We would like to add a dry-run parameter to the following func in pkg/kustomize:

func SubstituteVariables(
	ctx context.Context,
	kubeClient client.Client,
	kustomization unstructured.Unstructured,
	res *resource.Resource) (*resource.Resource, error){...}

It would become

func SubstituteVariables(
	ctx context.Context,
	kubeClient client.Client,
	kustomization unstructured.Unstructured,
	res *resource.Resource,
         dry-run bool) (*resource.Resource, error){...}

When the dry-run parameter resolve to true, we would replace the kubeAPI querys to retrieve substitutable objects by mocks.

We could then use it to enabled completely disconnected consumers (e.g flux cli in constrained environments) to use this function.

@souleb souleb added enhancement New feature or request area/kustomize Kustomize related issues and pull requests labels Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kustomize Kustomize related issues and pull requests enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant