Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Move Flux packages to pkg dir
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Sep 23, 2019
1 parent 38ba08d commit a4ad7dd
Show file tree
Hide file tree
Showing 224 changed files with 489 additions and 489 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ $(GOBIN)/fluxd: $(FLUXD_DEPS)
integration-test: all
test/bin/test-flux

generate-deploy: install/generated_templates.gogen.go
cd deploy && go run ../install/generate.go deploy
generate-deploy: pkg/install/generated_templates.gogen.go
cd deploy && go run ../pkg/install/generate.go deploy

install/generated_templates.gogen.go: install/templates/*
cd install && go run generate.go embedded-templates
pkg/install/generated_templates.gogen.go: pkg/install/templates/*
cd pkg/install && go run generate.go embedded-templates

check-generated: generate-deploy install/generated_templates.gogen.go
git diff --exit-code -- integrations/apis integrations/client install/generated_templates.gogen.go
check-generated: generate-deploy pkg/install/generated_templates.gogen.go
git diff --exit-code -- integrations/apis integrations/client pkg/install/generated_templates.gogen.go

build-docs:
@cd docs && docker build -t flux-docs .
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/update"
)

func AddCauseFlags(cmd *cobra.Command, opts *update.Cause) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/automate_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/spf13/cobra"

"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/update"
)

type workloadAutomateOpts struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/fluxctl/await.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"io"
"time"

"github.com/fluxcd/flux/api"
"github.com/fluxcd/flux/job"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/api"
"github.com/fluxcd/flux/pkg/job"
"github.com/fluxcd/flux/pkg/update"
)

var ErrTimeout = errors.New("timeout")
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/deautomate_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/spf13/cobra"

"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/update"
)

type workloadDeautomateOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/install_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/install"
"github.com/fluxcd/flux/pkg/install"
)

type installOpts install.TemplateParameters
Expand Down
10 changes: 5 additions & 5 deletions cmd/fluxctl/list_images_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/api/v10"
"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/registry"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/api/v10"
"github.com/fluxcd/flux/pkg/api/v6"
"github.com/fluxcd/flux/pkg/registry"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/update"
)

type imageListOpts struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/fluxctl/list_workloads_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/pkg/api/v6"
"github.com/fluxcd/flux/pkg/policy"
)

type workloadListOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/lock_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/spf13/cobra"

"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/update"
)

type workloadLockOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/pkg/errors"

fluxerr "github.com/fluxcd/flux/errors"
fluxerr "github.com/fluxcd/flux/pkg/errors"
)

func run(args []string) int {
Expand Down
10 changes: 5 additions & 5 deletions cmd/fluxctl/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"testing"
"time"

"github.com/fluxcd/flux/pkg/http/client"
"github.com/gorilla/mux"
"github.com/fluxcd/flux/http/client"

transport "github.com/fluxcd/flux/http"
"github.com/fluxcd/flux/job"
transport "github.com/fluxcd/flux/pkg/http"
"github.com/fluxcd/flux/pkg/job"
)

func mockServiceOpts(trip *genericMockRoundTripper) *rootOpts {
Expand All @@ -24,8 +24,8 @@ func mockServiceOpts(trip *genericMockRoundTripper) *rootOpts {
}
mockAPI := client.New(&c, transport.NewAPIRouter(), "", "")
return &rootOpts{
API: mockAPI,
Timeout: 10*time.Second,
API: mockAPI,
Timeout: 10 * time.Second,
}
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/fluxctl/policy_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/policy"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/update"
)

type workloadPolicyOpts struct {
Expand Down
12 changes: 6 additions & 6 deletions cmd/fluxctl/release_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/api/v11"
"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/cluster"
"github.com/fluxcd/flux/job"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/api/v11"
"github.com/fluxcd/flux/pkg/api/v6"
"github.com/fluxcd/flux/pkg/cluster"
"github.com/fluxcd/flux/pkg/job"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/update"
)

type workloadReleaseOpts struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/fluxctl/release_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"reflect"
"testing"

"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/update"
)

func TestReleaseCommand_CLIConversion(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/fluxctl/root_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"

"github.com/fluxcd/flux/api"
transport "github.com/fluxcd/flux/http"
"github.com/fluxcd/flux/http/client"
"github.com/fluxcd/flux/pkg/api"
transport "github.com/fluxcd/flux/pkg/http"
"github.com/fluxcd/flux/pkg/http/client"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/fluxctl/sync_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/spf13/cobra"

"github.com/fluxcd/flux/git"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/git"
"github.com/fluxcd/flux/pkg/update"
)

type syncOpts struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/fluxctl/unlock_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/spf13/cobra"

"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/update"
)

type workloadUnlockOpts struct {
Expand Down
38 changes: 19 additions & 19 deletions cmd/fluxd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@ import (
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"

"github.com/fluxcd/flux/checkpoint"
"github.com/fluxcd/flux/cluster"
"github.com/fluxcd/flux/cluster/kubernetes"
"github.com/fluxcd/flux/daemon"
"github.com/fluxcd/flux/git"
"github.com/fluxcd/flux/gpg"
transport "github.com/fluxcd/flux/http"
"github.com/fluxcd/flux/http/client"
daemonhttp "github.com/fluxcd/flux/http/daemon"
"github.com/fluxcd/flux/image"
hrclient "github.com/fluxcd/flux/integrations/client/clientset/versioned"
"github.com/fluxcd/flux/job"
"github.com/fluxcd/flux/manifests"
"github.com/fluxcd/flux/registry"
"github.com/fluxcd/flux/registry/cache"
registryMemcache "github.com/fluxcd/flux/registry/cache/memcached"
registryMiddleware "github.com/fluxcd/flux/registry/middleware"
"github.com/fluxcd/flux/remote"
"github.com/fluxcd/flux/ssh"
fluxsync "github.com/fluxcd/flux/sync"
"github.com/fluxcd/flux/pkg/checkpoint"
"github.com/fluxcd/flux/pkg/cluster"
"github.com/fluxcd/flux/pkg/cluster/kubernetes"
"github.com/fluxcd/flux/pkg/daemon"
"github.com/fluxcd/flux/pkg/git"
"github.com/fluxcd/flux/pkg/gpg"
transport "github.com/fluxcd/flux/pkg/http"
"github.com/fluxcd/flux/pkg/http/client"
daemonhttp "github.com/fluxcd/flux/pkg/http/daemon"
"github.com/fluxcd/flux/pkg/image"
"github.com/fluxcd/flux/pkg/job"
"github.com/fluxcd/flux/pkg/manifests"
"github.com/fluxcd/flux/pkg/registry"
"github.com/fluxcd/flux/pkg/registry/cache"
registryMemcache "github.com/fluxcd/flux/pkg/registry/cache/memcached"
registryMiddleware "github.com/fluxcd/flux/pkg/registry/middleware"
"github.com/fluxcd/flux/pkg/remote"
"github.com/fluxcd/flux/pkg/ssh"
fluxsync "github.com/fluxcd/flux/pkg/sync"
)

var version = "unversioned"
Expand Down
2 changes: 1 addition & 1 deletion integrations/apis/flux.weave.works/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/helm/pkg/chartutil"

"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/pkg/resource"
)

// +genclient
Expand Down
2 changes: 1 addition & 1 deletion api/api.go → pkg/api/api.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package api

import "github.com/fluxcd/flux/api/v11"
import "github.com/fluxcd/flux/pkg/api/v11"

// Server defines the minimal interface a Flux must satisfy to adequately serve a
// connecting fluxctl. This interface specifically does not facilitate connecting
Expand Down
6 changes: 3 additions & 3 deletions api/v10/api.go → pkg/api/v10/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package v10
import (
"context"

"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/api/v9"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/api/v6"
"github.com/fluxcd/flux/pkg/api/v9"
"github.com/fluxcd/flux/pkg/update"
)

type ListImagesOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions api/v11/api.go → pkg/api/v11/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package v11
import (
"context"

"github.com/fluxcd/flux/api/v10"
"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/pkg/api/v10"
"github.com/fluxcd/flux/pkg/api/v6"
"github.com/fluxcd/flux/pkg/resource"
)

type ListServicesOptions struct {
Expand Down
12 changes: 6 additions & 6 deletions api/v6/api.go → pkg/api/v6/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package v6
import (
"context"

"github.com/fluxcd/flux/cluster"
"github.com/fluxcd/flux/git"
"github.com/fluxcd/flux/job"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/ssh"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/cluster"
"github.com/fluxcd/flux/pkg/git"
"github.com/fluxcd/flux/pkg/job"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/ssh"
"github.com/fluxcd/flux/pkg/update"
)

type ImageStatus struct {
Expand Down
8 changes: 4 additions & 4 deletions api/v6/container.go → pkg/api/v6/container.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package v6

import (
"github.com/fluxcd/flux/pkg/image"
"github.com/fluxcd/flux/pkg/policy"
"github.com/fluxcd/flux/pkg/registry"
"github.com/fluxcd/flux/pkg/update"
"github.com/pkg/errors"
"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/registry"
"github.com/fluxcd/flux/update"
)

// Container describes an individual container including current image info and
Expand Down
6 changes: 3 additions & 3 deletions api/v6/container_test.go → pkg/api/v6/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/stretchr/testify/assert"

"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/update"
"github.com/fluxcd/flux/pkg/image"
"github.com/fluxcd/flux/pkg/policy"
"github.com/fluxcd/flux/pkg/update"
)

type justSlice []image.Info
Expand Down
2 changes: 1 addition & 1 deletion api/v9/api.go → pkg/api/v9/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package v9
import (
"context"

"github.com/fluxcd/flux/api/v6"
"github.com/fluxcd/flux/pkg/api/v6"
)

type Server interface {
Expand Down
2 changes: 1 addition & 1 deletion api/v9/change.go → pkg/api/v9/change.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"

"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/pkg/image"
)

type ChangeKind string
Expand Down
2 changes: 1 addition & 1 deletion api/v9/change_test.go → pkg/api/v9/change_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"github.com/fluxcd/flux/image"
"github.com/fluxcd/flux/pkg/image"
)

func TestChangeEncoding(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cluster/cluster.go → pkg/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"errors"

"github.com/fluxcd/flux/policy"
"github.com/fluxcd/flux/resource"
"github.com/fluxcd/flux/ssh"
"github.com/fluxcd/flux/pkg/policy"
"github.com/fluxcd/flux/pkg/resource"
"github.com/fluxcd/flux/pkg/ssh"
)

// Constants for workload ready status. These are defined here so that
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a4ad7dd

Please sign in to comment.