Skip to content

Commit

Permalink
Update Tilt:
Browse files Browse the repository at this point in the history
Remove all old manifests and use Tilt to
deploy the stack via Helm and rebuild Smee
and deploy a new image on changes.

Signed-off-by: Jacob Weinstock <[email protected]>
  • Loading branch information
jacobweinstock committed Nov 18, 2024
1 parent 79c6cd4 commit 1befe8a
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 253 deletions.
32 changes: 27 additions & 5 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
local_resource(
'compile smee',
'make cmd/smee/smee-linux-amd64'
local_resource('compile smee',
cmd='make cmd/smee/smee-linux-amd64',
deps=["go.mod", "go.sum", "internal", "Dockerfile", "cmd/smee/main.go", "cmd/smee/flag.go", "cmd/smee/backend.go"]
)
docker_build(
'quay.io/tinkerbell/smee',
'.',
dockerfile='Dockerfile',
only=['.']
)
k8s_yaml(kustomize('./manifests/kustomize/overlays/kind'))
#k8s_yaml(kustomize('./manifests/kustomize/overlays/k3d'))
default_registry('ttl.sh/meohmy-dghentld')

trusted_proxies = os.getenv('trusted_proxies', '')
lb_ip = os.getenv('LB_IP', '192.168.2.114')
stack_version = os.getenv('STACK_CHART_VERSION', '0.5.0')
layer2_interface = os.getenv('LAYER2_INTERFACE', 'eth1')

load('ext://helm_resource', 'helm_resource')
helm_resource('stack',
chart='oci://ghcr.io/tinkerbell/charts/stack',
namespace='tink',
image_deps=['quay.io/tinkerbell/smee'],
image_keys=[('smee.image')],
flags=[
'--create-namespace',
'--version=%s' % stack_version,
'--set=global.trustedProxies={%s}' % trusted_proxies,
'--set=global.publicIP=%s' % lb_ip,
'--set=stack.kubevip.interface=%s' % layer2_interface,
'--set=stack.relay.sourceInterface=%s' % layer2_interface,
],
release_name='tink-stack'
)
2 changes: 1 addition & 1 deletion internal/iso/iso.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (h *Handler) RoundTrip(req *http.Request) (*http.Response, error) {
return nil, err
}
if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusPartialContent {
log.Info("the request to get the source ISO returned a status other than ok (200)", "sourceIso", h.SourceISO, "status", resp.Status)
log.Info("the request to get the source ISO returned a status other than ok (200) or partial content (206)", "sourceIso", h.SourceISO, "status", resp.Status)
return resp, nil
}
// by setting this header we are telling the logging middleware to not log its default log message.
Expand Down
21 changes: 0 additions & 21 deletions manifests/kind/config.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions manifests/kustomize/base/deployment.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/kustomize/base/kustomization.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions manifests/kustomize/base/namespace.yaml

This file was deleted.

46 changes: 0 additions & 46 deletions manifests/kustomize/base/rbac.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions manifests/kustomize/overlays/dev/ingress.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions manifests/kustomize/overlays/dev/kustomization.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions manifests/kustomize/overlays/dev/service.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions manifests/kustomize/overlays/k3d/deployment_patch.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/kustomize/overlays/k3d/kustomization.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions manifests/kustomize/overlays/kind/deployment_patch.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/kustomize/overlays/kind/kustomization.yaml

This file was deleted.

0 comments on commit 1befe8a

Please sign in to comment.