Skip to content

Commit

Permalink
add working kube examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hookenz committed Jun 12, 2024
1 parent 4a14bed commit ed1fa0d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tilt/Tiltfile.kubernetes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
load('ext://restart_process', 'docker_build_with_restart')

# For some reason, tiltfile doesn't support a pattern like /**/*.go for deps. It does for ignore though!?
local_resource(
'build_agent',
cmd="make agent",
Expand Down Expand Up @@ -32,14 +35,17 @@ local_resource(
],
)

docker_build('portainer-agent',
# can be a local registry or this temporary one. Change yourname and randomstring to suit your needs
default_registry('ttl.sh/yourname-randomstring')

docker_build_with_restart('portainer_agent',
'.',
only = ['dist', 'build', 'static', 'config'],
entrypoint='./agent',
dockerfile='build/linux/alpine.Dockerfile',
only = ['dist', 'build', 'static', 'config'],
live_update = [
sync('./dist', '/app'),
sync('./static', '/app/static'),
restart_container()
])

k8s_yaml('portainer-agent-edge-k8s.yaml')
k8s_yaml('portainer-agent-k8s-lb.yaml')
3 changes: 3 additions & 0 deletions tilt/dot.env.docker-example
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# If you need to override the timezone. For example running portainer outside a container
# connecting to an agent inside portainer. You may need to set the Timezone and pass in the Timezone database
# to the container
TZ=Pacific/Auckland
LOG_LEVEL=DEBUG
EDGE=1
Expand Down
1 change: 1 addition & 0 deletions tilt/dot.env.kubernetes-example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LOG_LEVEL=DEBUG

0 comments on commit ed1fa0d

Please sign in to comment.