Skip to content

Commit

Permalink
chore: add utils scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
matteogastaldello committed Jan 24, 2025
1 parent 01f42b1 commit 4aa4cb8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .ko.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
builds:
- id: installer
#main: main.go
dir: .
env:
- CGO_ENABLED=0
- CORE_PROVIDER_DEBUG=true
ldflags:
- -s -w
- -extldflags "-static"
defaultPlatforms:
- linux/arm64
#- linux/amd64
defaultBaseImage: golang:1.23-alpine3.21
11 changes: 11 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# KO_DOCKER_REPO=kind.local ko build --base-import-paths . --preserve-import-paths
KO_DOCKER_REPO=kind.local ko build --base-import-paths .

# KO_DOCKER_REPO=kind.local KIND_CLUSTER_NAME=krateo-quickstart ko build --base-import-paths .

printf '\n\nList of current docker images loaded in KinD:\n'

kubectl get nodes kind-control-plane -o json \
| jq -r '.status.images[] | " - " + .names[-1]'
18 changes: 18 additions & 0 deletions scripts/reload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

PROJECT_DIR=$( pwd )
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

cd ${PROJECT_DIR}

# SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "SCRIPT_DIR: ${SCRIPT_DIR}"

kubectl delete -f manifests/

${SCRIPT_DIR}/generate.sh
${SCRIPT_DIR}/build.sh

kubectl apply -f manifests/

kubectl apply -f crds

0 comments on commit 4aa4cb8

Please sign in to comment.