1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Extend flux migrate to work with local files

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
Matheus Pimenta
2025-10-01 14:30:46 +01:00
parent 1b46056e7d
commit a9b5be7ff4
24 changed files with 811 additions and 23 deletions

View File

@@ -0,0 +1 @@
./another-file.yaml

View File

@@ -0,0 +1,5 @@
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageUpdateAutomation
---

View File

@@ -0,0 +1,6 @@
# This file has Windows line endings.
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageUpdateAutomation
---

View File

@@ -0,0 +1 @@
some-file.yaml

View File

@@ -0,0 +1,15 @@
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1,17 @@
# This file has Windows line endings.
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1,16 @@
► starting migration of custom resources
⚠️ skipping irregular file testdata/migrate/file-system/dir/some-dir/another-file-link.yaml
⚠️ skipping irregular file testdata/migrate/file-system/dir/some-file-link.yaml
✚ testdata/migrate/file-system/dir/some-dir/another-file.yaml:2: ImageUpdateAutomation v1beta2 -> v1
✚ testdata/migrate/file-system/dir/some-dir/another-file.yml:3: ImageUpdateAutomation v1beta2 -> v1
⚠️ testdata/migrate/file-system/dir/some-file.yaml:13: unexpected GroupVersion string: image.toolkit.fluxcd.io/v1/v2
✚ testdata/migrate/file-system/dir/some-file.yaml:1: ImageRepository v1beta1 -> v1
✚ testdata/migrate/file-system/dir/some-file.yaml:7: ImagePolicy v1beta2 -> v1
⚠️ testdata/migrate/file-system/dir/some-file.yml:15: unexpected GroupVersion string: image.toolkit.fluxcd.io/v1/v2
✚ testdata/migrate/file-system/dir/some-file.yml:3: ImageRepository v1beta2 -> v1
✚ testdata/migrate/file-system/dir/some-file.yml:9: ImagePolicy v1beta1 -> v1
✔ file testdata/migrate/file-system/dir/some-dir/another-file.yaml migrated successfully
✔ file testdata/migrate/file-system/dir/some-dir/another-file.yml migrated successfully
✔ file testdata/migrate/file-system/dir/some-file.yaml migrated successfully
✔ file testdata/migrate/file-system/dir/some-file.yml migrated successfully
✔ custom resources migrated successfully

View File

@@ -0,0 +1 @@
./another-file.yaml

View File

@@ -0,0 +1,5 @@
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
---

View File

@@ -0,0 +1,6 @@
# This file has Windows line endings.
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageUpdateAutomation
---

View File

View File

@@ -0,0 +1 @@
some-file.yaml

View File

@@ -0,0 +1,15 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1,17 @@
# This file has Windows line endings.
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1 @@
./single-file.yaml

View File

@@ -0,0 +1,15 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1,15 @@
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImageRepository
---
apiVersion: image.toolkit.fluxcd.io/v1
kind: ImagePolicy
---
apiVersion: image.toolkit.fluxcd.io/v1/v2
kind: ImagePolicy

View File

@@ -0,0 +1,6 @@
► starting migration of custom resources
⚠️ testdata/migrate/file-system/single-file.yaml:13: unexpected GroupVersion string: image.toolkit.fluxcd.io/v1/v2
✚ testdata/migrate/file-system/single-file.yaml:1: ImageRepository v1beta1 -> v1
✚ testdata/migrate/file-system/single-file.yaml:7: ImagePolicy v1beta2 -> v1
✔ file testdata/migrate/file-system/single-file.yaml migrated successfully
✔ custom resources migrated successfully