riff-kapp-install.sh
install a snapshot build of riff cli
make clean build install
// https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions | |
// not to be confused with an "assertion function" | |
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions | |
type ObjectType1 = { | |
prop1: string | |
} | |
type ObjectType2 = { | |
prop1: string |
// 1. | |
type FunctionType = { | |
(): void | |
function_prop: string | |
} | |
// 2. | |
type ObjectType = { | |
fn(): void | |
object_prop: string |
export default { | |
async fetch(request) { | |
return Response.json({ | |
date: Date(), | |
headers: Object.fromEntries(request.headers), | |
cf: request.cf | |
}); | |
}, | |
}; |
riff-kapp-install.sh
make clean build install
set -euo pipefail | |
set -x | |
# version and namespace | |
riff_version=0.5.0-snapshot | |
kubectl create ns apps || true | |
# build | |
kapp deploy -y -n apps -a cert-manager -f https://storage.googleapis.com/projectriff/charts/uncharted/${riff_version}/cert-manager.yaml | |
kapp deploy -y -n apps -a kpack -f https://storage.googleapis.com/projectriff/charts/uncharted/${riff_version}/kpack.yaml |
cd ~/riff/hello-node
kubectl apply k8s-config/
riff system install --manifest latest --node-port