|
1 |
| -docker_build("controller", ".") |
| 1 | +docker_build("controller", ".", only=("vendor","go.mod", "go.sum", "./api", "./cloud","./cmd", "./controller", "./util")) |
2 | 2 |
|
3 | 3 | local_resource(
|
4 | 4 | 'capi-controller-manager',
|
5 | 5 | cmd='clusterctl init',
|
6 | 6 | )
|
7 | 7 |
|
8 | 8 | k8s_yaml(kustomize('config/default'))
|
| 9 | + |
| 10 | +# get generated secret name so we can categorize it |
| 11 | +token_secret_name = str(local('kustomize build config/default | grep -m1 "name: cluster-api-provider-linode-token-"', quiet=True, echo_off=True)).split()[1] |
| 12 | + |
| 13 | +k8s_resource( |
| 14 | + workload="cluster-api-provider-linode-controller-manager", |
| 15 | + objects=[ |
| 16 | + "cluster-api-provider-linode-system:namespace", |
| 17 | + "linodeclusters.infrastructure.cluster.x-k8s.io:customresourcedefinition", |
| 18 | + "linodemachines.infrastructure.cluster.x-k8s.io:customresourcedefinition", |
| 19 | + "cluster-api-provider-linode-controller-manager:serviceaccount", |
| 20 | + "cluster-api-provider-linode-leader-election-role:role", |
| 21 | + "cluster-api-provider-linode-manager-role:clusterrole", |
| 22 | + "cluster-api-provider-linode-metrics-reader:clusterrole", |
| 23 | + "cluster-api-provider-linode-proxy-role:clusterrole", |
| 24 | + "cluster-api-provider-linode-leader-election-rolebinding:rolebinding", |
| 25 | + "cluster-api-provider-linode-manager-rolebinding:clusterrolebinding", |
| 26 | + "cluster-api-provider-linode-proxy-rolebinding:clusterrolebinding", |
| 27 | + "%s:secret" % token_secret_name |
| 28 | + ] |
| 29 | +) |
0 commit comments