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

Move Flux packages to pkg dir #2464

Merged
merged 1 commit into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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.
Loading