-
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
74cd6d2
commit 3fe2acb
Showing
7 changed files
with
185 additions
and
8 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,5 @@ | ||
.* | ||
deploy/ | ||
e2e/ | ||
examples/ | ||
hack/ |
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
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
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,75 @@ | ||
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", | ||
# No glob support :( | ||
deps=[ | ||
"cloud/", | ||
"go.mod", | ||
"go.sum", | ||
"main.go", | ||
"Makefile", | ||
"sentry/", | ||
], | ||
ignore=[ | ||
"**/*.bin", | ||
"**/gomock*", | ||
"cloud/linode/mock_client_test.go", | ||
], | ||
labels=labels, | ||
) | ||
|
||
entrypoint = "/linode-cloud-controller-manager-linux" | ||
docker_build_with_restart( | ||
"linode/linode-cloud-controller-manager", | ||
".", | ||
entrypoint=[entrypoint], | ||
ignore=["**/*.go", "go.*", "Makefile"], | ||
live_update=[ | ||
sync( | ||
"dist/linode-cloud-controller-manager-linux-amd64", | ||
entrypoint, | ||
), | ||
], | ||
build_args={"BUILD_SOURCE": "local"}, | ||
platform="linux/amd64", | ||
) | ||
|
||
chart_yaml = helm( | ||
"deploy/chart", | ||
name="ccm-linode", | ||
namespace="kube-system", | ||
values="./tilt.values.yaml", | ||
) | ||
k8s_yaml(chart_yaml) |
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_20@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_20@latest": { | ||
"last_modified": "2024-01-02T02:19:20Z", | ||
"resolved": "github:NixOS/nixpkgs/63143ac2c9186be6d9da6035fa22620018c85932#go_1_20", | ||
"source": "devbox-search", | ||
"version": "1.20.12", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/vgygiqcs16im3ffw6p0bv9zihixxg0cl-go-1.20.12" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/rlk4nvwrz6rl7r87sn5g6v2vr2mhq8nv-go-1.20.12" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/vw51wxs8110al4q12pbg3vpi78w8ijk9-go-1.20.12" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/s05mmkyf6sm6vskb4fwbjq0x93sqalqr-go-1.20.12" | ||
} | ||
} | ||
}, | ||
"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 |