Extend flux migrate to work with local files
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
0
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file
vendored
Normal file
0
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file
vendored
Normal file
1
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file-link.yaml
vendored
Symbolic link
1
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file-link.yaml
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
./another-file.yaml
|
||||
5
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file.yaml
vendored
Normal file
5
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
apiVersion: image.toolkit.fluxcd.io/v1
|
||||
kind: ImageUpdateAutomation
|
||||
---
|
||||
|
||||
6
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file.yml
vendored
Normal file
6
cmd/flux/testdata/migrate/file-system/dir.golden/some-dir/another-file.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file has Windows line endings.
|
||||
|
||||
apiVersion: image.toolkit.fluxcd.io/v1
|
||||
kind: ImageUpdateAutomation
|
||||
---
|
||||
|
||||
0
cmd/flux/testdata/migrate/file-system/dir.golden/some-file
vendored
Normal file
0
cmd/flux/testdata/migrate/file-system/dir.golden/some-file
vendored
Normal file
1
cmd/flux/testdata/migrate/file-system/dir.golden/some-file-link.yaml
vendored
Symbolic link
1
cmd/flux/testdata/migrate/file-system/dir.golden/some-file-link.yaml
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
some-file.yaml
|
||||
15
cmd/flux/testdata/migrate/file-system/dir.golden/some-file.yaml
vendored
Normal file
15
cmd/flux/testdata/migrate/file-system/dir.golden/some-file.yaml
vendored
Normal 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
|
||||
|
||||
17
cmd/flux/testdata/migrate/file-system/dir.golden/some-file.yml
vendored
Normal file
17
cmd/flux/testdata/migrate/file-system/dir.golden/some-file.yml
vendored
Normal 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
|
||||
|
||||
16
cmd/flux/testdata/migrate/file-system/dir.output.golden
vendored
Normal file
16
cmd/flux/testdata/migrate/file-system/dir.output.golden
vendored
Normal 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
|
||||
0
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file
vendored
Normal file
0
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file
vendored
Normal file
1
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file-link.yaml
vendored
Symbolic link
1
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file-link.yaml
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
./another-file.yaml
|
||||
5
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file.yaml
vendored
Normal file
5
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
||||
kind: ImageUpdateAutomation
|
||||
---
|
||||
|
||||
6
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file.yml
vendored
Normal file
6
cmd/flux/testdata/migrate/file-system/dir/some-dir/another-file.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# This file has Windows line endings.
|
||||
|
||||
apiVersion: image.toolkit.fluxcd.io/v1beta2
|
||||
kind: ImageUpdateAutomation
|
||||
---
|
||||
|
||||
0
cmd/flux/testdata/migrate/file-system/dir/some-file
vendored
Normal file
0
cmd/flux/testdata/migrate/file-system/dir/some-file
vendored
Normal file
1
cmd/flux/testdata/migrate/file-system/dir/some-file-link.yaml
vendored
Symbolic link
1
cmd/flux/testdata/migrate/file-system/dir/some-file-link.yaml
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
some-file.yaml
|
||||
15
cmd/flux/testdata/migrate/file-system/dir/some-file.yaml
vendored
Normal file
15
cmd/flux/testdata/migrate/file-system/dir/some-file.yaml
vendored
Normal 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
|
||||
|
||||
17
cmd/flux/testdata/migrate/file-system/dir/some-file.yml
vendored
Normal file
17
cmd/flux/testdata/migrate/file-system/dir/some-file.yml
vendored
Normal 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
|
||||
|
||||
1
cmd/flux/testdata/migrate/file-system/single-file-link.yaml
vendored
Symbolic link
1
cmd/flux/testdata/migrate/file-system/single-file-link.yaml
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
./single-file.yaml
|
||||
0
cmd/flux/testdata/migrate/file-system/single-file-wrong-ext.json
vendored
Normal file
0
cmd/flux/testdata/migrate/file-system/single-file-wrong-ext.json
vendored
Normal file
15
cmd/flux/testdata/migrate/file-system/single-file.yaml
vendored
Normal file
15
cmd/flux/testdata/migrate/file-system/single-file.yaml
vendored
Normal 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
|
||||
|
||||
15
cmd/flux/testdata/migrate/file-system/single-file.yaml.golden
vendored
Normal file
15
cmd/flux/testdata/migrate/file-system/single-file.yaml.golden
vendored
Normal 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
|
||||
|
||||
6
cmd/flux/testdata/migrate/file-system/single-file.yaml.output.golden
vendored
Normal file
6
cmd/flux/testdata/migrate/file-system/single-file.yaml.output.golden
vendored
Normal 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
|
||||
Reference in New Issue
Block a user