Skip to content

Commit

Permalink
ensure all resources are categorized in the Tiltfile and limit docker…
Browse files Browse the repository at this point in the history
… build file watchers to go files
  • Loading branch information
eljohnson92 committed Jan 24, 2024
1 parent 77b07ab commit ad28192
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
docker_build("controller", ".")
docker_build("controller", ".", only=("vendor","go.mod", "go.sum", "./api", "./cloud","./cmd", "./controller", "./util"))

local_resource(
'capi-controller-manager',
cmd='clusterctl init',
)

k8s_yaml(kustomize('config/default'))

# get generated secret name so we can categorize it
token_secret_name = str(local('kustomize build config/default | grep -m1 "name: cluster-api-provider-linode-token-"', quiet=True, echo_off=True)).split()[1]

k8s_resource(
workload="cluster-api-provider-linode-controller-manager",
objects=[
"cluster-api-provider-linode-system:namespace",
"linodeclusters.infrastructure.cluster.x-k8s.io:customresourcedefinition",
"linodemachines.infrastructure.cluster.x-k8s.io:customresourcedefinition",
"cluster-api-provider-linode-controller-manager:serviceaccount",
"cluster-api-provider-linode-leader-election-role:role",
"cluster-api-provider-linode-manager-role:clusterrole",
"cluster-api-provider-linode-metrics-reader:clusterrole",
"cluster-api-provider-linode-proxy-role:clusterrole",
"cluster-api-provider-linode-leader-election-rolebinding:rolebinding",
"cluster-api-provider-linode-manager-rolebinding:clusterrolebinding",
"cluster-api-provider-linode-proxy-rolebinding:clusterrolebinding",
"%s:secret" % token_secret_name
]
)

0 comments on commit ad28192

Please sign in to comment.