Skip to content

Instantly share code, notes, and snippets.

@syntassodev
Created July 11, 2024 09:35
Show Gist options
  • Save syntassodev/70be5ad016792b5f5488b28a23f1f034 to your computer and use it in GitHub Desktop.
Save syntassodev/70be5ad016792b5f5488b28a23f1f034 to your computer and use it in GitHub Desktop.
blog: prod to dev code
kubeconform \
-schema-location default \
-schema-location promise-schema.json \
/path/to/resource-request.yaml
#!/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
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