-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5572272
commit 7d41fde
Showing
5 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore everything first to avoid context bloat | ||
* | ||
|
||
!dist/linode-cloud-controller-manager-linux-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
load("ext://deployment", "deployment_create") | ||
load("ext://k8s_attach", "k8s_attach") | ||
load("ext://restart_process", "docker_build_with_restart") | ||
load("ext://helm_resource", "helm_resource") | ||
|
||
allow_k8s_contexts(k8s_context()) | ||
|
||
# in order to use this registry you must add `127.0.0.1 registry-proxy` in your /etc/hosts | ||
# and add http://registry-proxy:5000 to the list of insecure registries in docker daemon. | ||
load("ext://k8s_attach", "k8s_attach") | ||
|
||
local_resource( | ||
"registry-probe", | ||
serve_cmd="sleep infinity", | ||
readiness_probe=probe( | ||
period_secs=15, | ||
http_get=http_get_action(host="registry-proxy", port=5000, path="/"), | ||
), | ||
labels=["registry"], | ||
) | ||
|
||
k8s_attach( | ||
"registry-port-forward", | ||
"deployment/docker-registry", | ||
namespace="registry", | ||
port_forwards=[5000], | ||
labels=["registry"], | ||
) | ||
default_registry("registry-proxy:5000", host_from_cluster="docker.local") | ||
|
||
labels = ["ccm-linode"] | ||
|
||
local_resource( | ||
"linode-cloud-controller-manager-linux-amd64", | ||
"make build-linux", | ||
deps=[ | ||
"*.go", | ||
"cloud/**/*.go", | ||
"sentry/**/*.go", | ||
"go.*", | ||
"Makefile", | ||
], | ||
ignore=["./build/",], | ||
labels=labels, | ||
) | ||
|
||
docker_build_with_restart( | ||
"linode/linode-cloud-controller-manager", | ||
".", | ||
# dockerfile="./Dockerfile", | ||
entrypoint=["/linode-cloud-controller-manager-linux-amd64"], | ||
ignore=["**/*.go", "go.*"], | ||
live_update=[ | ||
sync("./dist/linode-cloud-controller-manager-linux-amd64", "/linode-cloud-controller-manager-linux-amd64"), | ||
], | ||
) | ||
|
||
# Avoiding helm_resource because orchestrating `helm install` over an | ||
# argocd app seems to require deleting the app which is slow and upsets pulumi. | ||
chart_yaml = helm( | ||
"deploy/chart", | ||
name="ccm-linode", | ||
namespace="kube-system", | ||
values="./tilt.values.yaml", | ||
) | ||
k8s_yaml(chart_yaml) | ||
|
||
# k8s_resource( | ||
# "ccm-linode", labels=labels | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"packages": [ | ||
"go_1_17@latest", | ||
"tilt@latest", | ||
"kubernetes-helm@latest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"lockfile_version": "1", | ||
"packages": { | ||
"go_1_17@latest": { | ||
"last_modified": "2022-11-10T13:14:32Z", | ||
"resolved": "github:NixOS/nixpkgs/72d8853228c9758820c39b8659415b6d89279493#go_1_17", | ||
"source": "devbox-search", | ||
"version": "1.17.13", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/3sz4dvj5wfbm708d2idk5zl2fmbm7v5g-go-1.17.13" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/a242dvsmkl42p1crw19cc4mp1majvgr9-go-1.17.13" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/0kfpsk25ni9zq75pa61xp6lf7al9lk2q-go-1.17.13" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/s9qsfgwh0m950sfn49gvpqsi41zbxiyq-go-1.17.13" | ||
} | ||
} | ||
}, | ||
"kubernetes-helm@latest": { | ||
"last_modified": "2023-11-19T17:46:56Z", | ||
"resolved": "github:NixOS/nixpkgs/0bf3f5cf6a98b5d077cdcdb00a6d4b3d92bc78b5#kubernetes-helm", | ||
"source": "devbox-search", | ||
"version": "3.13.2", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/bm0hydn3x8qicnnpp1j59affzbh802g6-kubernetes-helm-3.13.2" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/rlxzcdijanfnr1cycmasxlqqbkhmfllc-kubernetes-helm-3.13.2" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/wihx37d21rxyvp5d10ki9qr57mmqa96n-kubernetes-helm-3.13.2" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/2nsswfqlz4nc2hrbxchz7n98ccg9jfjx-kubernetes-helm-3.13.2" | ||
} | ||
} | ||
}, | ||
"tilt@latest": { | ||
"last_modified": "2023-11-19T17:46:56Z", | ||
"resolved": "github:NixOS/nixpkgs/0bf3f5cf6a98b5d077cdcdb00a6d4b3d92bc78b5#tilt", | ||
"source": "devbox-search", | ||
"version": "0.33.6", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/d0kpgvk6vvb8lvsvmh338zxfnb9b7vp9-tilt-0.33.6" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/d61h2m341hza65rs8ay04fjmdgwmw1m6-tilt-0.33.6" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/30kfkrlyrbk3bzwr524kmqmsygf5a89p-tilt-0.33.6" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/9yqsnwx8khnbf86z81cyaaqmh4qkfy2i-tilt-0.33.6" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
env: | ||
- name: LINODE_HOSTNAME_ONLY_INGRESS | ||
value: "false" | ||
nodeSelector: | ||
node-role.kubernetes.io/master: "true" | ||
secretRef: | ||
apiTokenRef: apiToken | ||
name: linode-api-secret | ||
regionRef: region |