Created
July 11, 2024 09:35
-
-
Save syntassodev/70be5ad016792b5f5488b28a23f1f034 to your computer and use it in GitHub Desktop.
blog: prod to dev code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubeconform \ | |
-schema-location default \ | |
-schema-location promise-schema.json \ | |
/path/to/resource-request.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
input_file="${INPUT_FILE:-"/kratix/input/object.yaml"}" | |
output_dir="${OUTPUT_DIR:-"/kratix/output/"}" | |
name="$(cat "${input_file}" | yq '.spec.namespaceName')" | |
kubectl create namespace "${name}" \ | |
--dry-run --output yaml > ${output_dir}/namespace.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat promise.yaml | yq '.spec.api' > crd.yaml | |
kubectl apply --dry-run=server --filename crd.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment