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

[installer] Small render improvements #9947

Merged
merged 2 commits into from
May 12, 2022
Merged

[installer] Small render improvements #9947

merged 2 commits into from
May 12, 2022

Conversation

csweichel
Copy link
Contributor

@csweichel csweichel commented May 11, 2022

Description

This PR makes two small improvements to the render command:

  • --output-split-files which produces individual files for each Kubernetes object the installer produces. This is helpful when needing to filter (i.e. remove) some of the generated objects, e.g. NetworkPolicies
  • installer render --config - which reads the config from stdin. This is helpful when using the Docker image to render the config, because it removes the need to faff with volumes to pass in the config.

How to test

#!/bin/bash

# prepare config
docker run --rm -it eu.gcr.io/gitpod-core-dev/build/installer:cw-misc-installer.0 init > cfg.yaml
curl -o yq -L https://github.com/mikefarah/yq/releases/download/v4.25.1/yq_linux_amd64 && chmod +x yq
./yq -i '.domain="foo.com"' cfg.yaml

# test output split files
mkdir -p output
cat cfg.yaml | docker run -v $PWD/output:/o --rm -i eu.gcr.io/gitpod-core-dev/build/installer:cw-misc-installer.0 render --config - --output-split-files /o
ls output

# test reading the config from STDIN
cat cfg.yaml | docker run --rm -i eu.gcr.io/gitpod-core-dev/build/installer:cw-misc-installer.0 render --config - > k8s.yaml

Release Notes

[installer] Miscellaneous `render` improvements

csweichel added 2 commits May 11, 2022 20:27
this makes rendering using the Docker image much easier because you can
just pipe the config to the installer.
@csweichel csweichel marked this pull request as ready for review May 11, 2022 20:42
@csweichel csweichel requested a review from a team May 11, 2022 20:42
@github-actions github-actions bot added the team: delivery Issue belongs to the self-hosted team label May 11, 2022
Copy link
Contributor

@nandajavarma nandajavarma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Tested and everything works as expected.

@roboquat roboquat merged commit 43fdcac into main May 12, 2022
@roboquat roboquat deleted the cw/misc-installer branch May 12, 2022 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note size/M team: delivery Issue belongs to the self-hosted team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants