Browse Source

Move Flux packages to pkg dir

stefanprodan 1 year ago
parent
commit
6a0e353061
100 changed files with 256 additions and 255 deletions
  1. 6
    6
      Makefile
  2. 1
    1
      cmd/fluxctl/args.go
  3. 1
    1
      cmd/fluxctl/automate_cmd.go
  4. 3
    3
      cmd/fluxctl/await.go
  5. 1
    1
      cmd/fluxctl/deautomate_cmd.go
  6. 1
    1
      cmd/fluxctl/install_cmd.go
  7. 5
    5
      cmd/fluxctl/list_images_cmd.go
  8. 2
    2
      cmd/fluxctl/list_workloads_cmd.go
  9. 1
    1
      cmd/fluxctl/lock_cmd.go
  10. 1
    1
      cmd/fluxctl/main.go
  11. 5
    5
      cmd/fluxctl/main_test.go
  12. 3
    3
      cmd/fluxctl/policy_cmd.go
  13. 6
    6
      cmd/fluxctl/release_cmd.go
  14. 2
    2
      cmd/fluxctl/release_cmd_test.go
  15. 3
    3
      cmd/fluxctl/root_cmd.go
  16. 2
    2
      cmd/fluxctl/sync_cmd.go
  17. 1
    1
      cmd/fluxctl/unlock_cmd.go
  18. 19
    19
      cmd/fluxd/main.go
  19. 1
    1
      integrations/apis/flux.weave.works/v1beta1/types.go
  20. 1
    1
      pkg/api/api.go
  21. 3
    3
      pkg/api/v10/api.go
  22. 3
    3
      pkg/api/v11/api.go
  23. 6
    6
      pkg/api/v6/api.go
  24. 4
    4
      pkg/api/v6/container.go
  25. 3
    3
      pkg/api/v6/container_test.go
  26. 1
    1
      pkg/api/v9/api.go
  27. 1
    1
      pkg/api/v9/change.go
  28. 1
    1
      pkg/api/v9/change_test.go
  29. 0
    0
      pkg/checkpoint/checkpoint.go
  30. 0
    0
      pkg/checkpoint/checkpoint_darwin.go
  31. 0
    0
      pkg/checkpoint/checkpoint_linux_amd64.go
  32. 0
    0
      pkg/checkpoint/checkpoint_linux_arm.go
  33. 0
    0
      pkg/checkpoint/checkpoint_linux_arm64.go
  34. 3
    3
      pkg/cluster/cluster.go
  35. 0
    0
      pkg/cluster/kubernetes/cached_disco.go
  36. 0
    0
      pkg/cluster/kubernetes/cached_disco_test.go
  37. 0
    0
      pkg/cluster/kubernetes/doc.go
  38. 1
    1
      pkg/cluster/kubernetes/errors.go
  39. 3
    3
      pkg/cluster/kubernetes/images.go
  40. 2
    2
      pkg/cluster/kubernetes/images_test.go
  41. 7
    7
      pkg/cluster/kubernetes/kubernetes.go
  42. 0
    0
      pkg/cluster/kubernetes/kubernetes_test.go
  43. 0
    0
      pkg/cluster/kubernetes/kubeyaml.go
  44. 3
    3
      pkg/cluster/kubernetes/manifests.go
  45. 1
    1
      pkg/cluster/kubernetes/manifests_test.go
  46. 1
    1
      pkg/cluster/kubernetes/mock.go
  47. 1
    1
      pkg/cluster/kubernetes/namespacer.go
  48. 1
    1
      pkg/cluster/kubernetes/namespacer_test.go
  49. 2
    2
      pkg/cluster/kubernetes/patch.go
  50. 1
    1
      pkg/cluster/kubernetes/patch_test.go
  51. 2
    2
      pkg/cluster/kubernetes/policies.go
  52. 4
    4
      pkg/cluster/kubernetes/policies_test.go
  53. 2
    2
      pkg/cluster/kubernetes/resource/cronjob.go
  54. 2
    2
      pkg/cluster/kubernetes/resource/daemonset.go
  55. 2
    2
      pkg/cluster/kubernetes/resource/deployment.go
  56. 0
    0
      pkg/cluster/kubernetes/resource/doc.go
  57. 5
    5
      pkg/cluster/kubernetes/resource/helmrelease.go
  58. 1
    1
      pkg/cluster/kubernetes/resource/helmrelease_test.go
  59. 0
    0
      pkg/cluster/kubernetes/resource/list.go
  60. 0
    0
      pkg/cluster/kubernetes/resource/load.go
  61. 2
    2
      pkg/cluster/kubernetes/resource/load_test.go
  62. 0
    0
      pkg/cluster/kubernetes/resource/namespace.go
  63. 3
    3
      pkg/cluster/kubernetes/resource/resource.go
  64. 2
    2
      pkg/cluster/kubernetes/resource/spec.go
  65. 2
    2
      pkg/cluster/kubernetes/resource/statefulset.go
  66. 5
    5
      pkg/cluster/kubernetes/resourcekinds.go
  67. 1
    1
      pkg/cluster/kubernetes/sshkeyring.go
  68. 4
    4
      pkg/cluster/kubernetes/sync.go
  69. 4
    4
      pkg/cluster/kubernetes/sync_test.go
  70. 1
    1
      pkg/cluster/kubernetes/testfiles/data.go
  71. 0
    0
      pkg/cluster/kubernetes/testfiles/data_test.go
  72. 3
    3
      pkg/cluster/kubernetes/update.go
  73. 4
    3
      pkg/cluster/kubernetes/update_test.go
  74. 5
    5
      pkg/cluster/mock/mock.go
  75. 1
    1
      pkg/cluster/sync.go
  76. 18
    18
      pkg/daemon/daemon.go
  77. 19
    19
      pkg/daemon/daemon_test.go
  78. 3
    3
      pkg/daemon/errors.go
  79. 4
    4
      pkg/daemon/images.go
  80. 7
    7
      pkg/daemon/images_test.go
  81. 3
    3
      pkg/daemon/loop.go
  82. 1
    1
      pkg/daemon/metrics.go
  83. 2
    2
      pkg/daemon/note.go
  84. 7
    7
      pkg/daemon/sync.go
  85. 12
    12
      pkg/daemon/sync_test.go
  86. 0
    0
      pkg/errors/errors.go
  87. 0
    0
      pkg/errors/errors_test.go
  88. 2
    2
      pkg/event/event.go
  89. 1
    1
      pkg/event/event_test.go
  90. 1
    1
      pkg/git/errors.go
  91. 0
    0
      pkg/git/export.go
  92. 1
    1
      pkg/git/export_test.go
  93. 3
    3
      pkg/git/gittest/repo.go
  94. 3
    3
      pkg/git/gittest/repo_test.go
  95. 0
    0
      pkg/git/mirrors.go
  96. 0
    0
      pkg/git/operations.go
  97. 1
    1
      pkg/git/operations_test.go
  98. 0
    0
      pkg/git/repo.go
  99. 0
    0
      pkg/git/signature.go
  100. 0
    0
      pkg/git/url.go

+ 6
- 6
Makefile View File

@@ -113,14 +113,14 @@ $(GOBIN)/fluxd: $(FLUXD_DEPS)
113 113
 integration-test: all
114 114
 	test/bin/test-flux
115 115
 
116
-generate-deploy: install/generated_templates.gogen.go
117
-	cd deploy && go run ../install/generate.go deploy
116
+generate-deploy: pkg/install/generated_templates.gogen.go
117
+	cd deploy && go run ../pkg/install/generate.go deploy
118 118
 
119
-install/generated_templates.gogen.go: install/templates/*
120
-	cd install && go run generate.go embedded-templates
119
+pkg/install/generated_templates.gogen.go: pkg/install/templates/*
120
+	cd pkg/install && go run generate.go embedded-templates
121 121
 
122
-check-generated: generate-deploy install/generated_templates.gogen.go
123
-	git diff --exit-code -- integrations/apis integrations/client install/generated_templates.gogen.go
122
+check-generated: generate-deploy pkg/install/generated_templates.gogen.go
123
+	git diff --exit-code -- integrations/apis integrations/client pkg/install/generated_templates.gogen.go
124 124
 
125 125
 build-docs:
126 126
 	@cd docs && docker build -t flux-docs .

+ 1
- 1
cmd/fluxctl/args.go View File

@@ -11,7 +11,7 @@ import (
11 11
 
12 12
 	"github.com/spf13/cobra"
13 13
 
14
-	"github.com/fluxcd/flux/update"
14
+	"github.com/fluxcd/flux/pkg/update"
15 15
 )
16 16
 
17 17
 func AddCauseFlags(cmd *cobra.Command, opts *update.Cause) {

+ 1
- 1
cmd/fluxctl/automate_cmd.go View File

@@ -3,7 +3,7 @@ package main
3 3
 import (
4 4
 	"github.com/spf13/cobra"
5 5
 
6
-	"github.com/fluxcd/flux/update"
6
+	"github.com/fluxcd/flux/pkg/update"
7 7
 )
8 8
 
9 9
 type workloadAutomateOpts struct {

+ 3
- 3
cmd/fluxctl/await.go View File

@@ -7,9 +7,9 @@ import (
7 7
 	"io"
8 8
 	"time"
9 9
 
10
-	"github.com/fluxcd/flux/api"
11
-	"github.com/fluxcd/flux/job"
12
-	"github.com/fluxcd/flux/update"
10
+	"github.com/fluxcd/flux/pkg/api"
11
+	"github.com/fluxcd/flux/pkg/job"
12
+	"github.com/fluxcd/flux/pkg/update"
13 13
 )
14 14
 
15 15
 var ErrTimeout = errors.New("timeout")

+ 1
- 1
cmd/fluxctl/deautomate_cmd.go View File

@@ -3,7 +3,7 @@ package main
3 3
 import (
4 4
 	"github.com/spf13/cobra"
5 5
 
6
-	"github.com/fluxcd/flux/update"
6
+	"github.com/fluxcd/flux/pkg/update"
7 7
 )
8 8
 
9 9
 type workloadDeautomateOpts struct {

+ 1
- 1
cmd/fluxctl/install_cmd.go View File

@@ -6,7 +6,7 @@ import (
6 6
 
7 7
 	"github.com/spf13/cobra"
8 8
 
9
-	"github.com/fluxcd/flux/install"
9
+	"github.com/fluxcd/flux/pkg/install"
10 10
 )
11 11
 
12 12
 type installOpts install.TemplateParameters

+ 5
- 5
cmd/fluxctl/list_images_cmd.go View File

@@ -8,11 +8,11 @@ import (
8 8
 
9 9
 	"github.com/spf13/cobra"
10 10
 
11
-	"github.com/fluxcd/flux/api/v10"
12
-	"github.com/fluxcd/flux/api/v6"
13
-	"github.com/fluxcd/flux/registry"
14
-	"github.com/fluxcd/flux/resource"
15
-	"github.com/fluxcd/flux/update"
11
+	"github.com/fluxcd/flux/pkg/api/v10"
12
+	"github.com/fluxcd/flux/pkg/api/v6"
13
+	"github.com/fluxcd/flux/pkg/registry"
14
+	"github.com/fluxcd/flux/pkg/resource"
15
+	"github.com/fluxcd/flux/pkg/update"
16 16
 )
17 17
 
18 18
 type imageListOpts struct {

+ 2
- 2
cmd/fluxctl/list_workloads_cmd.go View File

@@ -8,8 +8,8 @@ import (
8 8
 
9 9
 	"github.com/spf13/cobra"
10 10
 
11
-	"github.com/fluxcd/flux/api/v6"
12
-	"github.com/fluxcd/flux/policy"
11
+	"github.com/fluxcd/flux/pkg/api/v6"
12
+	"github.com/fluxcd/flux/pkg/policy"
13 13
 )
14 14
 
15 15
 type workloadListOpts struct {

+ 1
- 1
cmd/fluxctl/lock_cmd.go View File

@@ -3,7 +3,7 @@ package main
3 3
 import (
4 4
 	"github.com/spf13/cobra"
5 5
 
6
-	"github.com/fluxcd/flux/update"
6
+	"github.com/fluxcd/flux/pkg/update"
7 7
 )
8 8
 
9 9
 type workloadLockOpts struct {

+ 1
- 1
cmd/fluxctl/main.go View File

@@ -5,7 +5,7 @@ import (
5 5
 
6 6
 	"github.com/pkg/errors"
7 7
 
8
-	fluxerr "github.com/fluxcd/flux/errors"
8
+	fluxerr "github.com/fluxcd/flux/pkg/errors"
9 9
 )
10 10
 
11 11
 func run(args []string) int {

+ 5
- 5
cmd/fluxctl/main_test.go View File

@@ -11,11 +11,11 @@ import (
11 11
 	"testing"
12 12
 	"time"
13 13
 
14
+	"github.com/fluxcd/flux/pkg/http/client"
14 15
 	"github.com/gorilla/mux"
15
-	"github.com/fluxcd/flux/http/client"
16 16
 
17
-	transport "github.com/fluxcd/flux/http"
18
-	"github.com/fluxcd/flux/job"
17
+	transport "github.com/fluxcd/flux/pkg/http"
18
+	"github.com/fluxcd/flux/pkg/job"
19 19
 )
20 20
 
21 21
 func mockServiceOpts(trip *genericMockRoundTripper) *rootOpts {
@@ -24,8 +24,8 @@ func mockServiceOpts(trip *genericMockRoundTripper) *rootOpts {
24 24
 	}
25 25
 	mockAPI := client.New(&c, transport.NewAPIRouter(), "", "")
26 26
 	return &rootOpts{
27
-		API: mockAPI,
28
-		Timeout: 10*time.Second,
27
+		API:     mockAPI,
28
+		Timeout: 10 * time.Second,
29 29
 	}
30 30
 }
31 31
 

+ 3
- 3
cmd/fluxctl/policy_cmd.go View File

@@ -7,9 +7,9 @@ import (
7 7
 
8 8
 	"github.com/spf13/cobra"
9 9
 
10
-	"github.com/fluxcd/flux/policy"
11
-	"github.com/fluxcd/flux/resource"
12
-	"github.com/fluxcd/flux/update"
10
+	"github.com/fluxcd/flux/pkg/policy"
11
+	"github.com/fluxcd/flux/pkg/resource"
12
+	"github.com/fluxcd/flux/pkg/update"
13 13
 )
14 14
 
15 15
 type workloadPolicyOpts struct {

+ 6
- 6
cmd/fluxctl/release_cmd.go View File

@@ -8,12 +8,12 @@ import (
8 8
 
9 9
 	"github.com/spf13/cobra"
10 10
 
11
-	"github.com/fluxcd/flux/api/v11"
12
-	"github.com/fluxcd/flux/api/v6"
13
-	"github.com/fluxcd/flux/cluster"
14
-	"github.com/fluxcd/flux/job"
15
-	"github.com/fluxcd/flux/resource"
16
-	"github.com/fluxcd/flux/update"
11
+	"github.com/fluxcd/flux/pkg/api/v11"
12
+	"github.com/fluxcd/flux/pkg/api/v6"
13
+	"github.com/fluxcd/flux/pkg/cluster"
14
+	"github.com/fluxcd/flux/pkg/job"
15
+	"github.com/fluxcd/flux/pkg/resource"
16
+	"github.com/fluxcd/flux/pkg/update"
17 17
 )
18 18
 
19 19
 type workloadReleaseOpts struct {

+ 2
- 2
cmd/fluxctl/release_cmd_test.go View File

@@ -5,8 +5,8 @@ import (
5 5
 	"reflect"
6 6
 	"testing"
7 7
 
8
-	"github.com/fluxcd/flux/resource"
9
-	"github.com/fluxcd/flux/update"
8
+	"github.com/fluxcd/flux/pkg/resource"
9
+	"github.com/fluxcd/flux/pkg/update"
10 10
 )
11 11
 
12 12
 func TestReleaseCommand_CLIConversion(t *testing.T) {

+ 3
- 3
cmd/fluxctl/root_cmd.go View File

@@ -12,9 +12,9 @@ import (
12 12
 	"github.com/spf13/cobra"
13 13
 	"github.com/spf13/pflag"
14 14
 
15
-	"github.com/fluxcd/flux/api"
16
-	transport "github.com/fluxcd/flux/http"
17
-	"github.com/fluxcd/flux/http/client"
15
+	"github.com/fluxcd/flux/pkg/api"
16
+	transport "github.com/fluxcd/flux/pkg/http"
17
+	"github.com/fluxcd/flux/pkg/http/client"
18 18
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
19 19
 )
20 20
 

+ 2
- 2
cmd/fluxctl/sync_cmd.go View File

@@ -7,8 +7,8 @@ import (
7 7
 
8 8
 	"github.com/spf13/cobra"
9 9
 
10
-	"github.com/fluxcd/flux/git"
11
-	"github.com/fluxcd/flux/update"
10
+	"github.com/fluxcd/flux/pkg/git"
11
+	"github.com/fluxcd/flux/pkg/update"
12 12
 )
13 13
 
14 14
 type syncOpts struct {

+ 1
- 1
cmd/fluxctl/unlock_cmd.go View File

@@ -3,7 +3,7 @@ package main
3 3
 import (
4 4
 	"github.com/spf13/cobra"
5 5
 
6
-	"github.com/fluxcd/flux/update"
6
+	"github.com/fluxcd/flux/pkg/update"
7 7
 )
8 8
 
9 9
 type workloadUnlockOpts struct {

+ 19
- 19
cmd/fluxd/main.go View File

@@ -30,26 +30,26 @@ import (
30 30
 	"k8s.io/client-go/tools/clientcmd"
31 31
 	"k8s.io/klog"
32 32
 
33
-	"github.com/fluxcd/flux/checkpoint"
34
-	"github.com/fluxcd/flux/cluster"
35
-	"github.com/fluxcd/flux/cluster/kubernetes"
36
-	"github.com/fluxcd/flux/daemon"
37
-	"github.com/fluxcd/flux/git"
38
-	"github.com/fluxcd/flux/gpg"
39
-	transport "github.com/fluxcd/flux/http"
40
-	"github.com/fluxcd/flux/http/client"
41
-	daemonhttp "github.com/fluxcd/flux/http/daemon"
42
-	"github.com/fluxcd/flux/image"
43 33
 	hrclient "github.com/fluxcd/flux/integrations/client/clientset/versioned"
44
-	"github.com/fluxcd/flux/job"
45
-	"github.com/fluxcd/flux/manifests"
46
-	"github.com/fluxcd/flux/registry"
47
-	"github.com/fluxcd/flux/registry/cache"
48
-	registryMemcache "github.com/fluxcd/flux/registry/cache/memcached"
49
-	registryMiddleware "github.com/fluxcd/flux/registry/middleware"
50
-	"github.com/fluxcd/flux/remote"
51
-	"github.com/fluxcd/flux/ssh"
52
-	fluxsync "github.com/fluxcd/flux/sync"
34
+	"github.com/fluxcd/flux/pkg/checkpoint"
35
+	"github.com/fluxcd/flux/pkg/cluster"
36
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes"
37
+	"github.com/fluxcd/flux/pkg/daemon"
38
+	"github.com/fluxcd/flux/pkg/git"
39
+	"github.com/fluxcd/flux/pkg/gpg"
40
+	transport "github.com/fluxcd/flux/pkg/http"
41
+	"github.com/fluxcd/flux/pkg/http/client"
42
+	daemonhttp "github.com/fluxcd/flux/pkg/http/daemon"
43
+	"github.com/fluxcd/flux/pkg/image"
44
+	"github.com/fluxcd/flux/pkg/job"
45
+	"github.com/fluxcd/flux/pkg/manifests"
46
+	"github.com/fluxcd/flux/pkg/registry"
47
+	"github.com/fluxcd/flux/pkg/registry/cache"
48
+	registryMemcache "github.com/fluxcd/flux/pkg/registry/cache/memcached"
49
+	registryMiddleware "github.com/fluxcd/flux/pkg/registry/middleware"
50
+	"github.com/fluxcd/flux/pkg/remote"
51
+	"github.com/fluxcd/flux/pkg/ssh"
52
+	fluxsync "github.com/fluxcd/flux/pkg/sync"
53 53
 )
54 54
 
55 55
 var version = "unversioned"

+ 1
- 1
integrations/apis/flux.weave.works/v1beta1/types.go View File

@@ -9,7 +9,7 @@ import (
9 9
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10 10
 	"k8s.io/helm/pkg/chartutil"
11 11
 
12
-	"github.com/fluxcd/flux/resource"
12
+	"github.com/fluxcd/flux/pkg/resource"
13 13
 )
14 14
 
15 15
 // +genclient

api/api.go → pkg/api/api.go View File

@@ -1,6 +1,6 @@
1 1
 package api
2 2
 
3
-import "github.com/fluxcd/flux/api/v11"
3
+import "github.com/fluxcd/flux/pkg/api/v11"
4 4
 
5 5
 // Server defines the minimal interface a Flux must satisfy to adequately serve a
6 6
 // connecting fluxctl. This interface specifically does not facilitate connecting

api/v10/api.go → pkg/api/v10/api.go View File

@@ -4,9 +4,9 @@ package v10
4 4
 import (
5 5
 	"context"
6 6
 
7
-	"github.com/fluxcd/flux/api/v6"
8
-	"github.com/fluxcd/flux/api/v9"
9
-	"github.com/fluxcd/flux/update"
7
+	"github.com/fluxcd/flux/pkg/api/v6"
8
+	"github.com/fluxcd/flux/pkg/api/v9"
9
+	"github.com/fluxcd/flux/pkg/update"
10 10
 )
11 11
 
12 12
 type ListImagesOptions struct {

api/v11/api.go → pkg/api/v11/api.go View File

@@ -4,9 +4,9 @@ package v11
4 4
 import (
5 5
 	"context"
6 6
 
7
-	"github.com/fluxcd/flux/api/v10"
8
-	"github.com/fluxcd/flux/api/v6"
9
-	"github.com/fluxcd/flux/resource"
7
+	"github.com/fluxcd/flux/pkg/api/v10"
8
+	"github.com/fluxcd/flux/pkg/api/v6"
9
+	"github.com/fluxcd/flux/pkg/resource"
10 10
 )
11 11
 
12 12
 type ListServicesOptions struct {

api/v6/api.go → pkg/api/v6/api.go View File

@@ -3,12 +3,12 @@ package v6
3 3
 import (
4 4
 	"context"
5 5
 
6
-	"github.com/fluxcd/flux/cluster"
7
-	"github.com/fluxcd/flux/git"
8
-	"github.com/fluxcd/flux/job"
9
-	"github.com/fluxcd/flux/resource"
10
-	"github.com/fluxcd/flux/ssh"
11
-	"github.com/fluxcd/flux/update"
6
+	"github.com/fluxcd/flux/pkg/cluster"
7
+	"github.com/fluxcd/flux/pkg/git"
8
+	"github.com/fluxcd/flux/pkg/job"
9
+	"github.com/fluxcd/flux/pkg/resource"
10
+	"github.com/fluxcd/flux/pkg/ssh"
11
+	"github.com/fluxcd/flux/pkg/update"
12 12
 )
13 13
 
14 14
 type ImageStatus struct {

api/v6/container.go → pkg/api/v6/container.go View File

@@ -1,11 +1,11 @@
1 1
 package v6
2 2
 
3 3
 import (
4
+	"github.com/fluxcd/flux/pkg/image"
5
+	"github.com/fluxcd/flux/pkg/policy"
6
+	"github.com/fluxcd/flux/pkg/registry"
7
+	"github.com/fluxcd/flux/pkg/update"
4 8
 	"github.com/pkg/errors"
5
-	"github.com/fluxcd/flux/image"
6
-	"github.com/fluxcd/flux/policy"
7
-	"github.com/fluxcd/flux/registry"
8
-	"github.com/fluxcd/flux/update"
9 9
 )
10 10
 
11 11
 // Container describes an individual container including current image info and

api/v6/container_test.go → pkg/api/v6/container_test.go View File

@@ -5,9 +5,9 @@ import (
5 5
 
6 6
 	"github.com/stretchr/testify/assert"
7 7
 
8
-	"github.com/fluxcd/flux/image"
9
-	"github.com/fluxcd/flux/policy"
10
-	"github.com/fluxcd/flux/update"
8
+	"github.com/fluxcd/flux/pkg/image"
9
+	"github.com/fluxcd/flux/pkg/policy"
10
+	"github.com/fluxcd/flux/pkg/update"
11 11
 )
12 12
 
13 13
 type justSlice []image.Info

api/v9/api.go → pkg/api/v9/api.go View File

@@ -4,7 +4,7 @@ package v9
4 4
 import (
5 5
 	"context"
6 6
 
7
-	"github.com/fluxcd/flux/api/v6"
7
+	"github.com/fluxcd/flux/pkg/api/v6"
8 8
 )
9 9
 
10 10
 type Server interface {

api/v9/change.go → pkg/api/v9/change.go View File

@@ -4,7 +4,7 @@ import (
4 4
 	"encoding/json"
5 5
 	"errors"
6 6
 
7
-	"github.com/fluxcd/flux/image"
7
+	"github.com/fluxcd/flux/pkg/image"
8 8
 )
9 9
 
10 10
 type ChangeKind string

api/v9/change_test.go → pkg/api/v9/change_test.go View File

@@ -5,7 +5,7 @@ import (
5 5
 	"reflect"
6 6
 	"testing"
7 7
 
8
-	"github.com/fluxcd/flux/image"
8
+	"github.com/fluxcd/flux/pkg/image"
9 9
 )
10 10
 
11 11
 func TestChangeEncoding(t *testing.T) {

checkpoint/checkpoint.go → pkg/checkpoint/checkpoint.go View File


checkpoint/checkpoint_darwin.go → pkg/checkpoint/checkpoint_darwin.go View File


checkpoint/checkpoint_linux_amd64.go → pkg/checkpoint/checkpoint_linux_amd64.go View File


checkpoint/checkpoint_linux_arm.go → pkg/checkpoint/checkpoint_linux_arm.go View File


checkpoint/checkpoint_linux_arm64.go → pkg/checkpoint/checkpoint_linux_arm64.go View File


cluster/cluster.go → pkg/cluster/cluster.go View File

@@ -4,9 +4,9 @@ import (
4 4
 	"context"
5 5
 	"errors"
6 6
 
7
-	"github.com/fluxcd/flux/policy"
8
-	"github.com/fluxcd/flux/resource"
9
-	"github.com/fluxcd/flux/ssh"
7
+	"github.com/fluxcd/flux/pkg/policy"
8
+	"github.com/fluxcd/flux/pkg/resource"
9
+	"github.com/fluxcd/flux/pkg/ssh"
10 10
 )
11 11
 
12 12
 // Constants for workload ready status. These are defined here so that

cluster/kubernetes/cached_disco.go → pkg/cluster/kubernetes/cached_disco.go View File


cluster/kubernetes/cached_disco_test.go → pkg/cluster/kubernetes/cached_disco_test.go View File


cluster/kubernetes/doc.go → pkg/cluster/kubernetes/doc.go View File


cluster/kubernetes/errors.go → pkg/cluster/kubernetes/errors.go View File

@@ -3,7 +3,7 @@ package kubernetes
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	fluxerr "github.com/fluxcd/flux/errors"
6
+	fluxerr "github.com/fluxcd/flux/pkg/errors"
7 7
 )
8 8
 
9 9
 func ObjectMissingError(obj string, err error) *fluxerr.Error {

cluster/kubernetes/images.go → pkg/cluster/kubernetes/images.go View File

@@ -11,9 +11,9 @@ import (
11 11
 	apierrors "k8s.io/apimachinery/pkg/api/errors"
12 12
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13 13
 
14
-	"github.com/fluxcd/flux/image"
15
-	"github.com/fluxcd/flux/registry"
16
-	"github.com/fluxcd/flux/resource"
14
+	"github.com/fluxcd/flux/pkg/image"
15
+	"github.com/fluxcd/flux/pkg/registry"
16
+	"github.com/fluxcd/flux/pkg/resource"
17 17
 )
18 18
 
19 19
 func mergeCredentials(log func(...interface{}) error,

cluster/kubernetes/images_test.go → pkg/cluster/kubernetes/images_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	apiv1 "k8s.io/api/core/v1"
10 10
 	"k8s.io/client-go/kubernetes/fake"
11 11
 
12
-	"github.com/fluxcd/flux/image"
13
-	"github.com/fluxcd/flux/registry"
12
+	"github.com/fluxcd/flux/pkg/image"
13
+	"github.com/fluxcd/flux/pkg/registry"
14 14
 )
15 15
 
16 16
 func noopLog(...interface{}) error {

cluster/kubernetes/kubernetes.go → pkg/cluster/kubernetes/kubernetes.go View File

@@ -18,11 +18,11 @@ import (
18 18
 	k8sclientdynamic "k8s.io/client-go/dynamic"
19 19
 	k8sclient "k8s.io/client-go/kubernetes"
20 20
 
21
-	"github.com/fluxcd/flux/cluster"
22
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
23 21
 	fhrclient "github.com/fluxcd/flux/integrations/client/clientset/versioned"
24
-	"github.com/fluxcd/flux/resource"
25
-	"github.com/fluxcd/flux/ssh"
22
+	"github.com/fluxcd/flux/pkg/cluster"
23
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
24
+	"github.com/fluxcd/flux/pkg/resource"
25
+	"github.com/fluxcd/flux/pkg/ssh"
26 26
 )
27 27
 
28 28
 type coreClient k8sclient.Interface
@@ -43,9 +43,9 @@ func MakeClusterClientset(core coreClient, dyn dynamicClient, fluxhelm fluxHelmC
43 43
 	helmop helmOperatorClient, disco discoveryClient) ExtendedClient {
44 44
 
45 45
 	return ExtendedClient{
46
-		coreClient:      	core,
47
-		dynamicClient:   	dyn,
48
-		fluxHelmClient:  	fluxhelm,
46
+		coreClient:         core,
47
+		dynamicClient:      dyn,
48
+		fluxHelmClient:     fluxhelm,
49 49
 		helmOperatorClient: helmop,
50 50
 		discoveryClient:    disco,
51 51
 	}

cluster/kubernetes/kubernetes_test.go → pkg/cluster/kubernetes/kubernetes_test.go View File


cluster/kubernetes/kubeyaml.go → pkg/cluster/kubernetes/kubeyaml.go View File


cluster/kubernetes/manifests.go → pkg/cluster/kubernetes/manifests.go View File

@@ -10,9 +10,9 @@ import (
10 10
 	"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
11 11
 	"k8s.io/apimachinery/pkg/runtime/schema"
12 12
 
13
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
14
-	"github.com/fluxcd/flux/image"
15
-	"github.com/fluxcd/flux/resource"
13
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
14
+	"github.com/fluxcd/flux/pkg/image"
15
+	"github.com/fluxcd/flux/pkg/resource"
16 16
 )
17 17
 
18 18
 // ResourceScopes maps resource definitions (GroupVersionKind) to whether they are namespaced or not

cluster/kubernetes/manifests_test.go → pkg/cluster/kubernetes/manifests_test.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"github.com/stretchr/testify/assert"
12 12
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13 13
 
14
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
14
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
15 15
 )
16 16
 
17 17
 func TestLocalCRDScope(t *testing.T) {

cluster/kubernetes/mock.go → pkg/cluster/kubernetes/mock.go View File

@@ -1,6 +1,6 @@
1 1
 package kubernetes
2 2
 
3
-import kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
3
+import kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
4 4
 
5 5
 type ConstNamespacer string
6 6
 

cluster/kubernetes/namespacer.go → pkg/cluster/kubernetes/namespacer.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	"k8s.io/client-go/discovery"
9 9
 	"k8s.io/client-go/tools/clientcmd"
10 10
 
11
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
11
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
12 12
 )
13 13
 
14 14
 // The namespace to presume if something doesn't have one, and we

cluster/kubernetes/namespacer_test.go → pkg/cluster/kubernetes/namespacer_test.go View File

@@ -8,7 +8,7 @@ import (
8 8
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
9 9
 	corefake "k8s.io/client-go/kubernetes/fake"
10 10
 
11
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
11
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
12 12
 )
13 13
 
14 14
 var getAndList = metav1.Verbs([]string{"get", "list"})

cluster/kubernetes/patch.go → pkg/cluster/kubernetes/patch.go View File

@@ -15,8 +15,8 @@ import (
15 15
 	"k8s.io/apimachinery/pkg/util/strategicpatch"
16 16
 	k8sscheme "k8s.io/client-go/kubernetes/scheme"
17 17
 
18
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
19
-	"github.com/fluxcd/flux/resource"
18
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
19
+	"github.com/fluxcd/flux/pkg/resource"
20 20
 )
21 21
 
22 22
 func createManifestPatch(originalManifests, modifiedManifests []byte, originalSource, modifiedSource string) ([]byte, error) {

cluster/kubernetes/patch_test.go → pkg/cluster/kubernetes/patch_test.go View File

@@ -6,7 +6,7 @@ import (
6 6
 	"github.com/stretchr/testify/assert"
7 7
 	"gopkg.in/yaml.v2"
8 8
 
9
-	"github.com/fluxcd/flux/cluster/kubernetes/resource"
9
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
10 10
 )
11 11
 
12 12
 func TestPatchAndApply(t *testing.T) {

cluster/kubernetes/policies.go → pkg/cluster/kubernetes/policies.go View File

@@ -3,8 +3,8 @@ package kubernetes
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
7
-	"github.com/fluxcd/flux/resource"
6
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
7
+	"github.com/fluxcd/flux/pkg/resource"
8 8
 )
9 9
 
10 10
 func (m *manifests) UpdateWorkloadPolicies(def []byte, id resource.ID, update resource.PolicyUpdate) ([]byte, error) {

cluster/kubernetes/policies_test.go → pkg/cluster/kubernetes/policies_test.go View File

@@ -9,8 +9,8 @@ import (
9 9
 	"github.com/go-kit/kit/log"
10 10
 	"github.com/stretchr/testify/assert"
11 11
 
12
-	"github.com/fluxcd/flux/policy"
13
-	"github.com/fluxcd/flux/resource"
12
+	"github.com/fluxcd/flux/pkg/policy"
13
+	"github.com/fluxcd/flux/pkg/resource"
14 14
 )
15 15
 
16 16
 func TestUpdatePolicies(t *testing.T) {
@@ -170,8 +170,8 @@ func TestUpdatePolicies(t *testing.T) {
170 170
 		},
171 171
 		{
172 172
 			name: "add tag policy with alternative prefix does not change existing prefix",
173
-			in: []string{"filter.fluxcd.io/nginx", "glob:*"},
174
-			out: []string{"filter.fluxcd.io/nginx", "glob:*"},
173
+			in:   []string{"filter.fluxcd.io/nginx", "glob:*"},
174
+			out:  []string{"filter.fluxcd.io/nginx", "glob:*"},
175 175
 			update: resource.PolicyUpdate{
176 176
 				Add: policy.Set{policy.TagPrefix("nginx"): "glob:*"},
177 177
 			},

cluster/kubernetes/resource/cronjob.go → pkg/cluster/kubernetes/resource/cronjob.go View File

@@ -1,8 +1,8 @@
1 1
 package resource
2 2
 
3 3
 import (
4
-	"github.com/fluxcd/flux/image"
5
-	"github.com/fluxcd/flux/resource"
4
+	"github.com/fluxcd/flux/pkg/image"
5
+	"github.com/fluxcd/flux/pkg/resource"
6 6
 )
7 7
 
8 8
 type CronJob struct {

cluster/kubernetes/resource/daemonset.go → pkg/cluster/kubernetes/resource/daemonset.go View File

@@ -1,8 +1,8 @@
1 1
 package resource
2 2
 
3 3
 import (
4
-	"github.com/fluxcd/flux/image"
5
-	"github.com/fluxcd/flux/resource"
4
+	"github.com/fluxcd/flux/pkg/image"
5
+	"github.com/fluxcd/flux/pkg/resource"
6 6
 )
7 7
 
8 8
 type DaemonSet struct {

cluster/kubernetes/resource/deployment.go → pkg/cluster/kubernetes/resource/deployment.go View File

@@ -1,8 +1,8 @@
1 1
 package resource
2 2
 
3 3
 import (
4
-	"github.com/fluxcd/flux/image"
5
-	"github.com/fluxcd/flux/resource"
4
+	"github.com/fluxcd/flux/pkg/image"
5
+	"github.com/fluxcd/flux/pkg/resource"
6 6
 )
7 7
 
8 8
 type Deployment struct {

cluster/kubernetes/resource/doc.go → pkg/cluster/kubernetes/resource/doc.go View File


cluster/kubernetes/resource/helmrelease.go → pkg/cluster/kubernetes/resource/helmrelease.go View File

@@ -6,8 +6,8 @@ import (
6 6
 	"sort"
7 7
 	"strings"
8 8
 
9
-	"github.com/fluxcd/flux/image"
10
-	"github.com/fluxcd/flux/resource"
9
+	"github.com/fluxcd/flux/pkg/image"
10
+	"github.com/fluxcd/flux/pkg/resource"
11 11
 )
12 12
 
13 13
 const (
@@ -21,20 +21,20 @@ const (
21 21
 	//     image: some/image:version
22 22
 	//
23 23
 	// The name refers to the source of the image value.
24
-	ReleaseContainerName  = "chart-image"
24
+	ReleaseContainerName = "chart-image"
25 25
 
26 26
 	// ImageBasePath is the default base path for image path mappings
27 27
 	// in a HelmRelease resource.
28 28
 	ImageBasePath = "spec.values."
29 29
 	// ImageRegistryPrefix is the annotation key prefix for image
30 30
 	// registry path mappings.
31
-	ImageRegistryPrefix   = "registry.fluxcd.io/"
31
+	ImageRegistryPrefix = "registry.fluxcd.io/"
32 32
 	// ImageRepositoryPrefix is the annotation key prefix for image
33 33
 	// repository path mappings.
34 34
 	ImageRepositoryPrefix = "repository.fluxcd.io/"
35 35
 	// ImageRepositoryPrefix is the annotation key prefix for image
36 36
 	// tag path mappings.
37
-	ImageTagPrefix        = "tag.fluxcd.io/"
37
+	ImageTagPrefix = "tag.fluxcd.io/"
38 38
 )
39 39
 
40 40
 // ContainerImageMap holds the YAML dot notation paths to a

cluster/kubernetes/resource/helmrelease_test.go → pkg/cluster/kubernetes/resource/helmrelease_test.go View File

@@ -5,7 +5,7 @@ import (
5 5
 	"github.com/stretchr/testify/assert"
6 6
 	"testing"
7 7
 
8
-	"github.com/fluxcd/flux/resource"
8
+	"github.com/fluxcd/flux/pkg/resource"
9 9
 )
10 10
 
11 11
 func TestSortedContainers(t *testing.T) {

cluster/kubernetes/resource/list.go → pkg/cluster/kubernetes/resource/list.go View File


cluster/kubernetes/resource/load.go → pkg/cluster/kubernetes/resource/load.go View File


cluster/kubernetes/resource/load_test.go → pkg/cluster/kubernetes/resource/load_test.go View File

@@ -8,8 +8,8 @@ import (
8 8
 
9 9
 	"github.com/stretchr/testify/assert"
10 10
 
11
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
12
-	"github.com/fluxcd/flux/resource"
11
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
12
+	"github.com/fluxcd/flux/pkg/resource"
13 13
 )
14 14
 
15 15
 // for convenience

cluster/kubernetes/resource/namespace.go → pkg/cluster/kubernetes/resource/namespace.go View File


cluster/kubernetes/resource/resource.go → pkg/cluster/kubernetes/resource/resource.go View File

@@ -6,9 +6,9 @@ import (
6 6
 	jsonyaml "github.com/ghodss/yaml"
7 7
 	"gopkg.in/yaml.v2"
8 8
 
9
-	fluxerr "github.com/fluxcd/flux/errors"
10
-	"github.com/fluxcd/flux/policy"
11
-	"github.com/fluxcd/flux/resource"
9
+	fluxerr "github.com/fluxcd/flux/pkg/errors"
10
+	"github.com/fluxcd/flux/pkg/policy"
11
+	"github.com/fluxcd/flux/pkg/resource"
12 12
 )
13 13
 
14 14
 const (

cluster/kubernetes/resource/spec.go → pkg/cluster/kubernetes/resource/spec.go View File

@@ -3,8 +3,8 @@ package resource
3 3
 import (
4 4
 	"fmt"
5 5
 
6
-	"github.com/fluxcd/flux/image"
7
-	"github.com/fluxcd/flux/resource"
6
+	"github.com/fluxcd/flux/pkg/image"
7
+	"github.com/fluxcd/flux/pkg/resource"
8 8
 )
9 9
 
10 10
 // Types that daemonsets, deployments, and other things have in

cluster/kubernetes/resource/statefulset.go → pkg/cluster/kubernetes/resource/statefulset.go View File

@@ -1,8 +1,8 @@
1 1
 package resource
2 2
 
3 3
 import (
4
-	"github.com/fluxcd/flux/image"
5
-	"github.com/fluxcd/flux/resource"
4
+	"github.com/fluxcd/flux/pkg/image"
5
+	"github.com/fluxcd/flux/pkg/resource"
6 6
 )
7 7
 
8 8
 type StatefulSet struct {

cluster/kubernetes/resourcekinds.go → pkg/cluster/kubernetes/resourcekinds.go View File

@@ -10,13 +10,13 @@ import (
10 10
 	apiv1 "k8s.io/api/core/v1"
11 11
 	meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12 12
 
13
-	"github.com/fluxcd/flux/cluster"
14
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
15
-	"github.com/fluxcd/flux/image"
16 13
 	hr_v1beta1 "github.com/fluxcd/flux/integrations/apis/flux.weave.works/v1beta1"
17 14
 	fhr_v1alpha2 "github.com/fluxcd/flux/integrations/apis/helm.integrations.flux.weave.works/v1alpha2"
18
-	"github.com/fluxcd/flux/policy"
19
-	"github.com/fluxcd/flux/resource"
15
+	"github.com/fluxcd/flux/pkg/cluster"
16
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
17
+	"github.com/fluxcd/flux/pkg/image"
18
+	"github.com/fluxcd/flux/pkg/policy"
19
+	"github.com/fluxcd/flux/pkg/resource"
20 20
 )
21 21
 
22 22
 // AntecedentAnnotation is an annotation on a resource indicating that

cluster/kubernetes/sshkeyring.go → pkg/cluster/kubernetes/sshkeyring.go View File

@@ -11,7 +11,7 @@ import (
11 11
 	"k8s.io/apimachinery/pkg/types"
12 12
 	"k8s.io/client-go/kubernetes/typed/core/v1"
13 13
 
14
-	"github.com/fluxcd/flux/ssh"
14
+	"github.com/fluxcd/flux/pkg/ssh"
15 15
 )
16 16
 
17 17
 const (

cluster/kubernetes/sync.go → pkg/cluster/kubernetes/sync.go View File

@@ -25,10 +25,10 @@ import (
25 25
 	"k8s.io/client-go/discovery"
26 26
 	"k8s.io/client-go/rest"
27 27
 
28
-	"github.com/fluxcd/flux/cluster"
29
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
30
-	"github.com/fluxcd/flux/policy"
31
-	"github.com/fluxcd/flux/resource"
28
+	"github.com/fluxcd/flux/pkg/cluster"
29
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
30
+	"github.com/fluxcd/flux/pkg/policy"
31
+	"github.com/fluxcd/flux/pkg/resource"
32 32
 )
33 33
 
34 34
 const (

cluster/kubernetes/sync_test.go → pkg/cluster/kubernetes/sync_test.go View File

@@ -25,11 +25,11 @@ import (
25 25
 	corefake "k8s.io/client-go/kubernetes/fake"
26 26
 	k8s_testing "k8s.io/client-go/testing"
27 27
 
28
-	"github.com/fluxcd/flux/cluster"
29
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
30 28
 	fhrfake "github.com/fluxcd/flux/integrations/client/clientset/versioned/fake"
31
-	"github.com/fluxcd/flux/resource"
32
-	"github.com/fluxcd/flux/sync"
29
+	"github.com/fluxcd/flux/pkg/cluster"
30
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
31
+	"github.com/fluxcd/flux/pkg/resource"
32
+	"github.com/fluxcd/flux/pkg/sync"
33 33
 )
34 34
 
35 35
 const (

cluster/kubernetes/testfiles/data.go → pkg/cluster/kubernetes/testfiles/data.go View File

@@ -7,7 +7,7 @@ import (
7 7
 	"strings"
8 8
 	"testing"
9 9
 
10
-	"github.com/fluxcd/flux/resource"
10
+	"github.com/fluxcd/flux/pkg/resource"
11 11
 )
12 12
 
13 13
 func TempDir(t *testing.T) (string, func()) {

cluster/kubernetes/testfiles/data_test.go → pkg/cluster/kubernetes/testfiles/data_test.go View File


cluster/kubernetes/update.go → pkg/cluster/kubernetes/update.go View File

@@ -4,9 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"strings"
6 6
 
7
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
8
-	"github.com/fluxcd/flux/image"
9
-	"github.com/fluxcd/flux/resource"
7
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
8
+	"github.com/fluxcd/flux/pkg/image"
9
+	"github.com/fluxcd/flux/pkg/resource"
10 10
 )
11 11
 
12 12
 // updateWorkloadContainer takes a YAML document stream (one or more

cluster/kubernetes/update_test.go → pkg/cluster/kubernetes/update_test.go View File

@@ -3,9 +3,9 @@ package kubernetes
3 3
 import (
4 4
 	"testing"
5 5
 
6
-	kresource "github.com/fluxcd/flux/cluster/kubernetes/resource"
7
-	"github.com/fluxcd/flux/image"
8
-	"github.com/fluxcd/flux/resource"
6
+	kresource "github.com/fluxcd/flux/pkg/cluster/kubernetes/resource"
7
+	"github.com/fluxcd/flux/pkg/image"
8
+	"github.com/fluxcd/flux/pkg/resource"
9 9
 )
10 10
 
11 11
 type update struct {
@@ -975,6 +975,7 @@ spec:
975 975
 `
976 976
 
977 977
 const case14resource = "maria:helmrelease/mariadb"
978
+
978 979
 var case14ImageMap = kresource.ContainerImageMap{
979 980
 	BasePath:   kresource.ImageBasePath,
980 981
 	Repository: "mariadb.customImage",

cluster/mock/mock.go → pkg/cluster/mock/mock.go View File

@@ -4,11 +4,11 @@ import (
4 4
 	"bytes"
5 5
 	"context"
6 6
 
7
-	"github.com/fluxcd/flux/cluster"
8
-	"github.com/fluxcd/flux/image"
9
-	"github.com/fluxcd/flux/manifests"
10
-	"github.com/fluxcd/flux/resource"
11
-	"github.com/fluxcd/flux/ssh"
7
+	"github.com/fluxcd/flux/pkg/cluster"
8
+	"github.com/fluxcd/flux/pkg/image"
9
+	"github.com/fluxcd/flux/pkg/manifests"
10
+	"github.com/fluxcd/flux/pkg/resource"
11
+	"github.com/fluxcd/flux/pkg/ssh"
12 12
 )
13 13
 
14 14
 // Doubles as a cluster.Cluster and cluster.Manifests implementation

cluster/sync.go → pkg/cluster/sync.go View File

@@ -3,7 +3,7 @@ package cluster
3 3
 import (
4 4
 	"strings"
5 5
 
6
-	"github.com/fluxcd/flux/resource"
6
+	"github.com/fluxcd/flux/pkg/resource"
7 7
 )
8 8
 
9 9
 // Definitions for use in synchronising a cluster with a git repo.

daemon/daemon.go → pkg/daemon/daemon.go View File

@@ -11,24 +11,24 @@ import (
11 11
 	"github.com/go-kit/kit/log"
12 12
 	"github.com/pkg/errors"
13 13
 
14
-	"github.com/fluxcd/flux/api"
15
-	"github.com/fluxcd/flux/api/v10"
16
-	"github.com/fluxcd/flux/api/v11"
17
-	"github.com/fluxcd/flux/api/v6"
18
-	"github.com/fluxcd/flux/api/v9"
19
-	"github.com/fluxcd/flux/cluster"
20
-	"github.com/fluxcd/flux/event"
21
-	"github.com/fluxcd/flux/git"
22
-	"github.com/fluxcd/flux/guid"
23
-	"github.com/fluxcd/flux/image"
24
-	"github.com/fluxcd/flux/job"
25
-	"github.com/fluxcd/flux/manifests"
26
-	"github.com/fluxcd/flux/policy"
27
-	"github.com/fluxcd/flux/registry"
28
-	"github.com/fluxcd/flux/release"
29
-	"github.com/fluxcd/flux/resource"
30
-	"github.com/fluxcd/flux/sync"
31
-	"github.com/fluxcd/flux/update"
14
+	"github.com/fluxcd/flux/pkg/api"
15
+	"github.com/fluxcd/flux/pkg/api/v10"
16
+	"github.com/fluxcd/flux/pkg/api/v11"
17
+	"github.com/fluxcd/flux/pkg/api/v6"
18
+	"github.com/fluxcd/flux/pkg/api/v9"
19
+	"github.com/fluxcd/flux/pkg/cluster"
20
+	"github.com/fluxcd/flux/pkg/event"
21
+	"github.com/fluxcd/flux/pkg/git"
22
+	"github.com/fluxcd/flux/pkg/guid"
23
+	"github.com/fluxcd/flux/pkg/image"
24
+	"github.com/fluxcd/flux/pkg/job"
25
+	"github.com/fluxcd/flux/pkg/manifests"
26
+	"github.com/fluxcd/flux/pkg/policy"
27
+	"github.com/fluxcd/flux/pkg/registry"
28
+	"github.com/fluxcd/flux/pkg/release"
29
+	"github.com/fluxcd/flux/pkg/resource"
30
+	"github.com/fluxcd/flux/pkg/sync"
31
+	"github.com/fluxcd/flux/pkg/update"
32 32
 )
33 33
 
34 34
 const (

daemon/daemon_test.go → pkg/daemon/daemon_test.go View File

@@ -15,25 +15,25 @@ import (
15 15
 
16 16
 	"github.com/stretchr/testify/assert"
17 17
 
18
-	"github.com/fluxcd/flux/api/v10"
19
-	"github.com/fluxcd/flux/api/v11"
20
-	"github.com/fluxcd/flux/api/v6"
21
-	"github.com/fluxcd/flux/api/v9"
22
-	"github.com/fluxcd/flux/cluster"
23
-	"github.com/fluxcd/flux/cluster/kubernetes"
24
-	"github.com/fluxcd/flux/cluster/mock"
25
-	"github.com/fluxcd/flux/event"
26
-	"github.com/fluxcd/flux/git"
27
-	"github.com/fluxcd/flux/git/gittest"
28
-	"github.com/fluxcd/flux/image"
29
-	"github.com/fluxcd/flux/job"
30
-	"github.com/fluxcd/flux/manifests"
31
-	"github.com/fluxcd/flux/policy"
32
-	"github.com/fluxcd/flux/registry"
33
-	registryMock "github.com/fluxcd/flux/registry/mock"
34
-	"github.com/fluxcd/flux/resource"
35
-	fluxsync "github.com/fluxcd/flux/sync"
36
-	"github.com/fluxcd/flux/update"
18
+	"github.com/fluxcd/flux/pkg/api/v10"
19
+	"github.com/fluxcd/flux/pkg/api/v11"
20
+	"github.com/fluxcd/flux/pkg/api/v6"
21
+	"github.com/fluxcd/flux/pkg/api/v9"
22
+	"github.com/fluxcd/flux/pkg/cluster"
23
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes"
24
+	"github.com/fluxcd/flux/pkg/cluster/mock"
25
+	"github.com/fluxcd/flux/pkg/event"
26
+	"github.com/fluxcd/flux/pkg/git"
27
+	"github.com/fluxcd/flux/pkg/git/gittest"
28
+	"github.com/fluxcd/flux/pkg/image"
29
+	"github.com/fluxcd/flux/pkg/job"
30
+	"github.com/fluxcd/flux/pkg/manifests"
31
+	"github.com/fluxcd/flux/pkg/policy"
32
+	"github.com/fluxcd/flux/pkg/registry"
33
+	registryMock "github.com/fluxcd/flux/pkg/registry/mock"
34
+	"github.com/fluxcd/flux/pkg/resource"
35
+	fluxsync "github.com/fluxcd/flux/pkg/sync"
36
+	"github.com/fluxcd/flux/pkg/update"
37 37
 )
38 38
 
39 39
 const (

daemon/errors.go → pkg/daemon/errors.go View File

@@ -4,9 +4,9 @@ import (
4 4
 	"fmt"
5 5
 	"sync"
6 6
 
7
-	fluxerr "github.com/fluxcd/flux/errors"
8
-	"github.com/fluxcd/flux/job"
9
-	"github.com/fluxcd/flux/resource"
7
+	fluxerr "github.com/fluxcd/flux/pkg/errors"
8
+	"github.com/fluxcd/flux/pkg/job"
9
+	"github.com/fluxcd/flux/pkg/resource"
10 10
 )
11 11
 
12 12
 type SyncErrors struct {

daemon/images.go → pkg/daemon/images.go View File

@@ -7,10 +7,10 @@ import (
7 7
 	"github.com/go-kit/kit/log"
8 8
 	"github.com/pkg/errors"
9 9
 
10
-	"github.com/fluxcd/flux/cluster"
11
-	"github.com/fluxcd/flux/policy"
12
-	"github.com/fluxcd/flux/resource"
13
-	"github.com/fluxcd/flux/update"
10
+	"github.com/fluxcd/flux/pkg/cluster"
11
+	"github.com/fluxcd/flux/pkg/policy"
12
+	"github.com/fluxcd/flux/pkg/resource"
13
+	"github.com/fluxcd/flux/pkg/update"
14 14
 )
15 15
 
16 16
 func (d *Daemon) pollForNewAutomatedWorkloadImages(logger log.Logger) {

daemon/images_test.go → pkg/daemon/images_test.go View File

@@ -6,13 +6,13 @@ import (
6 6
 
7 7
 	"github.com/go-kit/kit/log"
8 8
 
9
-	"github.com/fluxcd/flux/cluster"
10
-	"github.com/fluxcd/flux/image"
11
-	"github.com/fluxcd/flux/policy"
12
-	"github.com/fluxcd/flux/registry"
13
-	registryMock "github.com/fluxcd/flux/registry/mock"
14
-	"github.com/fluxcd/flux/resource"
15
-	"github.com/fluxcd/flux/update"
9
+	"github.com/fluxcd/flux/pkg/cluster"
10
+	"github.com/fluxcd/flux/pkg/image"
11
+	"github.com/fluxcd/flux/pkg/policy"
12
+	"github.com/fluxcd/flux/pkg/registry"
13
+	registryMock "github.com/fluxcd/flux/pkg/registry/mock"
14
+	"github.com/fluxcd/flux/pkg/resource"
15
+	"github.com/fluxcd/flux/pkg/update"
16 16
 )
17 17
 
18 18
 const (

daemon/loop.go → pkg/daemon/loop.go View File

@@ -8,9 +8,9 @@ import (
8 8
 
9 9
 	"github.com/go-kit/kit/log"
10 10
 
11
-	"github.com/fluxcd/flux/git"
12
-	fluxmetrics "github.com/fluxcd/flux/metrics"
13
-	fluxsync "github.com/fluxcd/flux/sync"
11
+	"github.com/fluxcd/flux/pkg/git"
12
+	fluxmetrics "github.com/fluxcd/flux/pkg/metrics"
13
+	fluxsync "github.com/fluxcd/flux/pkg/sync"
14 14
 )
15 15
 
16 16
 type LoopVars struct {

daemon/metrics.go → pkg/daemon/metrics.go View File

@@ -4,7 +4,7 @@ import (
4 4
 	"github.com/go-kit/kit/metrics/prometheus"
5 5
 	stdprometheus "github.com/prometheus/client_golang/prometheus"
6 6
 
7
-	fluxmetrics "github.com/fluxcd/flux/metrics"
7
+	fluxmetrics "github.com/fluxcd/flux/pkg/metrics"
8 8
 )
9 9
 
10 10
 var (

daemon/note.go → pkg/daemon/note.go View File

@@ -1,8 +1,8 @@
1 1
 package daemon
2 2
 
3 3
 import (
4
-	"github.com/fluxcd/flux/job"
5
-	"github.com/fluxcd/flux/update"
4
+	"github.com/fluxcd/flux/pkg/job"
5
+	"github.com/fluxcd/flux/pkg/update"
6 6
 )
7 7
 
8 8
 type note struct {

daemon/sync.go → pkg/daemon/sync.go View File

@@ -9,13 +9,13 @@ import (
9 9
 	"path/filepath"
10 10
 	"time"
11 11
 
12
-	"github.com/fluxcd/flux/cluster"
13
-	"github.com/fluxcd/flux/event"
14
-	"github.com/fluxcd/flux/git"
15
-	"github.com/fluxcd/flux/manifests"
16
-	"github.com/fluxcd/flux/resource"
17
-	fluxsync "github.com/fluxcd/flux/sync"
18
-	"github.com/fluxcd/flux/update"
12
+	"github.com/fluxcd/flux/pkg/cluster"
13
+	"github.com/fluxcd/flux/pkg/event"
14
+	"github.com/fluxcd/flux/pkg/git"
15
+	"github.com/fluxcd/flux/pkg/manifests"
16
+	"github.com/fluxcd/flux/pkg/resource"
17
+	fluxsync "github.com/fluxcd/flux/pkg/sync"
18
+	"github.com/fluxcd/flux/pkg/update"
19 19
 )
20 20
 
21 21
 // revisionRatchet is for keeping track of transitions between

daemon/sync_test.go → pkg/daemon/sync_test.go View File

@@ -14,18 +14,18 @@ import (
14 14
 
15 15
 	"github.com/go-kit/kit/log"
16 16
 
17
-	"github.com/fluxcd/flux/cluster"
18
-	"github.com/fluxcd/flux/cluster/kubernetes"
19
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
20
-	"github.com/fluxcd/flux/cluster/mock"
21
-	"github.com/fluxcd/flux/event"
22
-	"github.com/fluxcd/flux/git"
23
-	"github.com/fluxcd/flux/git/gittest"
24
-	"github.com/fluxcd/flux/job"
25
-	"github.com/fluxcd/flux/manifests"
26
-	registryMock "github.com/fluxcd/flux/registry/mock"
27
-	"github.com/fluxcd/flux/resource"
28
-	fluxsync "github.com/fluxcd/flux/sync"
17
+	"github.com/fluxcd/flux/pkg/cluster"
18
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes"
19
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
20
+	"github.com/fluxcd/flux/pkg/cluster/mock"
21
+	"github.com/fluxcd/flux/pkg/event"
22
+	"github.com/fluxcd/flux/pkg/git"
23
+	"github.com/fluxcd/flux/pkg/git/gittest"
24
+	"github.com/fluxcd/flux/pkg/job"
25
+	"github.com/fluxcd/flux/pkg/manifests"
26
+	registryMock "github.com/fluxcd/flux/pkg/registry/mock"
27
+	"github.com/fluxcd/flux/pkg/resource"
28
+	fluxsync "github.com/fluxcd/flux/pkg/sync"
29 29
 )
30 30
 
31 31
 const (

errors/errors.go → pkg/errors/errors.go View File


errors/errors_test.go → pkg/errors/errors_test.go View File


event/event.go → pkg/event/event.go View File

@@ -7,9 +7,9 @@ import (
7 7
 	"strings"
8 8
 	"time"
9 9
 
10
+	"github.com/fluxcd/flux/pkg/resource"
11
+	"github.com/fluxcd/flux/pkg/update"
10 12
 	"github.com/pkg/errors"
11
-	"github.com/fluxcd/flux/resource"
12
-	"github.com/fluxcd/flux/update"
13 13
 )
14 14
 
15 15
 // These are all the types of events.

event/event_test.go → pkg/event/event_test.go View File

@@ -4,7 +4,7 @@ import (
4 4
 	"encoding/json"
5 5
 	"testing"
6 6
 
7
-	"github.com/fluxcd/flux/update"
7
+	"github.com/fluxcd/flux/pkg/update"
8 8
 )
9 9
 
10 10
 var (

git/errors.go → pkg/git/errors.go View File

@@ -4,7 +4,7 @@ import (
4 4
 	"errors"
5 5
 	"strings"
6 6
 
7
-	fluxerr "github.com/fluxcd/flux/errors"
7
+	fluxerr "github.com/fluxcd/flux/pkg/errors"
8 8
 )
9 9
 
10 10
 var NoRepoError = &fluxerr.Error{

git/export.go → pkg/git/export.go View File


git/export_test.go → pkg/git/export_test.go View File

@@ -5,7 +5,7 @@ import (
5 5
 	"testing"
6 6
 	"time"
7 7
 
8
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
8
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
9 9
 )
10 10
 
11 11
 func TestExportAtRevision(t *testing.T) {

git/gittest/repo.go → pkg/git/gittest/repo.go View File

@@ -7,9 +7,9 @@ import (
7 7
 	"path/filepath"
8 8
 	"testing"
9 9
 
10
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
11
-	"github.com/fluxcd/flux/git"
12
-	"github.com/fluxcd/flux/resource"
10
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
11
+	"github.com/fluxcd/flux/pkg/git"
12
+	"github.com/fluxcd/flux/pkg/resource"
13 13
 )
14 14
 
15 15
 // Repo creates a new clone-able git repo, pre-populated with some kubernetes

git/gittest/repo_test.go → pkg/git/gittest/repo_test.go View File

@@ -11,9 +11,9 @@ import (
11 11
 
12 12
 	"context"
13 13
 
14
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
15
-	"github.com/fluxcd/flux/git"
16
-	"github.com/fluxcd/flux/gpg/gpgtest"
14
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
15
+	"github.com/fluxcd/flux/pkg/git"
16
+	"github.com/fluxcd/flux/pkg/gpg/gpgtest"
17 17
 )
18 18
 
19 19
 type Note struct {

git/mirrors.go → pkg/git/mirrors.go View File


git/operations.go → pkg/git/operations.go View File


git/operations_test.go → pkg/git/operations_test.go View File

@@ -11,8 +11,8 @@ import (
11 11
 	"testing"
12 12
 	"time"
13 13
 
14
+	"github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles"
14 15
 	"github.com/stretchr/testify/assert"
15
-	"github.com/fluxcd/flux/cluster/kubernetes/testfiles"
16 16
 )
17 17
 
18 18
 const (

git/repo.go → pkg/git/repo.go View File


git/signature.go → pkg/git/signature.go View File


git/url.go → pkg/git/url.go View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save