diff --git a/.gitignore b/.gitignore index 574a0917..20936080 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ .zed/ result -# Materialized helm subchart deps (regenerated by helmfile) +# Materialized helm subchart deps (regenerated by helm dependency update) k8s/charts/*/charts/ # Bun deps for scripts/ (regenerated by `bun install`) diff --git a/.justfile b/.justfile index 614fef42..4b165005 100644 --- a/.justfile +++ b/.justfile @@ -170,7 +170,7 @@ sops-edit FILE: ############################################################################ # -# Kubes (k3s + helmfile) +# Kubes (k3s + flux) # ############################################################################ diff --git a/nix/files/zed.nix b/nix/files/zed.nix index 02b01e88..bec4328a 100644 --- a/nix/files/zed.nix +++ b/nix/files/zed.nix @@ -21,8 +21,6 @@ "**/templates/**/*.tpl" "**/templates/**/*.yaml" "**/templates/**/*.yml" - "**/helmfile.d/**/*.yaml" - "**/helmfile.d/**/*.yml" "**/values*.yaml" ]; }; diff --git a/scripts/check-pinned-images.ts b/scripts/check-pinned-images.ts index 45816680..ef9469ac 100644 --- a/scripts/check-pinned-images.ts +++ b/scripts/check-pinned-images.ts @@ -3,7 +3,6 @@ // private registry with active dev where pinning would break the // push-and-redeploy loop. -const HELMFILE = "k8s/helmfile.yaml"; const GLOB = "k8s/charts/*/**/*.yaml"; const FLUX_DIRS = [ "k8s/flux/infra-crds", @@ -14,8 +13,6 @@ const FLUX_DIRS = [ ]; const ALLOW_FLOATING = new Set(); -type Release = { chart: string }; -type Helmfile = { releases: Release[] }; type HelmRelease = { kind?: string; spec?: { chart?: { spec?: { chart?: string } } }; @@ -28,17 +25,6 @@ function chartNameFromPath(templatePath: string): string { async function deployedChartNames(): Promise> { const names = new Set(); - if (await Bun.file(HELMFILE).exists()) { - const helmfile = Bun.YAML.parse( - await Bun.file(HELMFILE).text(), - ) as Helmfile; - for (const release of helmfile.releases) { - if (release.chart.startsWith("./charts/")) { - names.add(release.chart.replace(/^\.\/charts\//, "")); - } - } - } - for (const dir of FLUX_DIRS) { const glob = new Bun.Glob(`${dir}/**/*.yaml`); for await (const path of glob.scan(".")) { diff --git a/scripts/check-release-names.ts b/scripts/check-release-names.ts index 3e85d19a..50611499 100644 --- a/scripts/check-release-names.ts +++ b/scripts/check-release-names.ts @@ -1,8 +1,6 @@ // Every deployed local Helm chart must reference an actual -// k8s/charts//Chart.yaml. During the Flux migration, deployed charts can -// be declared in helmfile.yaml or Flux HelmRelease manifests. +// k8s/charts//Chart.yaml. -const HELMFILE = "k8s/helmfile.yaml"; const FLUX_DIRS = [ "k8s/flux/infra-crds", "k8s/flux/infra-core", @@ -12,7 +10,6 @@ const FLUX_DIRS = [ ]; type Release = { name: string; chart: string }; -type Helmfile = { releases: Release[] }; type HelmRelease = { kind?: string; metadata?: { name?: string }; @@ -51,29 +48,14 @@ async function fluxLocalReleases(): Promise { return releases; } -async function helmfileLocalReleases(): Promise { - if (!(await Bun.file(HELMFILE).exists())) return []; - - const helmfile = Bun.YAML.parse(await Bun.file(HELMFILE).text()) as Helmfile; - return helmfile.releases.filter((release) => - release.chart.startsWith("./charts/"), - ); -} - function chartYamlPath(chart: string): string { - return ( - chart.replace(/^\.\/charts\//, "k8s/charts/").replace(/^\.\//, "") + - "/Chart.yaml" - ); + return chart.replace(/^\.\//, "") + "/Chart.yaml"; } export async function checkReleaseNames(): Promise { const errors: string[] = []; - const releases = [ - ...(await helmfileLocalReleases()), - ...(await fluxLocalReleases()), - ]; + const releases = await fluxLocalReleases(); for (const release of releases) { const chartYaml = chartYamlPath(release.chart);