most-kilobyte-1525
07/30/2025, 7:58 AMexport const healthCheck = talosClientConfig.clientConfiguration.apply(clientConfiguration =>
talos.getClusterHealth({
endpoints: [CONTROLPLANE_IP],
controlPlaneNodes: [CONTROLPLANE_IP],
workerNodes: WORKER_IPS,
clientConfiguration: clientConfiguration,
})
);
const cilium = healthCheck.apply(healthCheck => new k8s.helm.v3.Chart("cilium", {
chart: "cilium",
version: "1.15.6",
namespace: "kube-system",
fetchOpts: {
repo: "<https://helm.cilium.io/>",
},
values: {
ipam: {
mode: "kubernetes",
},
kubeProxyReplacement: false,
securityContext: {
capabilities: {
ciliumAgent: [
"CHOWN",
"KILL",
"NET_ADMIN",
"NET_RAW",
"IPC_LOCK",
"SYS_ADMIN",
"SYS_RESOURCE",
"DAC_OVERRIDE",
"FOWNER",
"SETGID",
"SETUID",
],
cleanCiliumState: [
"NET_ADMIN",
"SYS_ADMIN",
"SYS_RESOURCE",
],
},
},
cgroup: {
autoMount: {
enabled: false,
},
hostRoot: "/sys/fs/cgroup",
},
}
}));
I cannot use healthCheck in dependsOn I get typescript error and .apply() doesn't show in preview.
What is the correct approach?
Thanks in advance.steep-sunset-89396
07/31/2025, 6:03 AMdependsOn
(doc). Reading your code, this is what you should be using to set dependencies between the healthCheck and the Chart.
Finally, in your example above, you should not create a resource within a .apply()
- This is a will known anti-pattern which might leads to problems and confusion later on.most-kilobyte-1525
07/31/2025, 6:14 AMmost-kilobyte-1525
07/31/2025, 6:14 AM