Skip to content

Commit

Permalink
Rename go module kairos-agent (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Jul 10, 2023
1 parent 5f26f80 commit 9c5731b
Show file tree
Hide file tree
Showing 64 changed files with 178 additions and 178 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
project_name: kairos-agent
builds:
- ldflags:
- -w -s -X "github.com/kairos-io/kairos/v2/internal/common.VERSION={{.Tag}}"
- -w -s -X "github.com/kairos-io/kairos-agent/v2/internal/common.VERSION={{.Tag}}"
env:
- CGO_ENABLED=0
goos:
Expand Down
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ build-kairos-agent:
ARG VERSION=$(cat VERSION)
ARG COMMIT=$(cat COMMIT)
RUN --no-cache echo "Building Version: ${VERSION} and Commit: ${COMMIT}"
ARG LDFLAGS="-s -w -X github.com/kairos-io/kairos/v2/internal/common.VERSION=${VERSION} -X github.com/kairos-io/kairos/v2/internal/common.gitCommit=$COMMIT"
ARG LDFLAGS="-s -w -X github.com/kairos-io/kairos-agent/v2/internal/common.VERSION=${VERSION} -X github.com/kairos-io/kairos-agent/v2/internal/common.gitCommit=$COMMIT"
ENV CGO_ENABLED=${CGO_ENABLED}
RUN go build -o kairos-agent -ldflags "${LDFLAGS}" main.go && upx kairos-agent
SAVE ARTIFACT kairos-agent kairos-agent AS LOCAL build/kairos-agent
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kairos-io/kairos/v2
module github.com/kairos-io/kairos-agent/v2

go 1.20

Expand Down
6 changes: 3 additions & 3 deletions internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
hook "github.com/kairos-io/kairos/v2/internal/agent/hooks"
"github.com/kairos-io/kairos/v2/internal/bus"
config "github.com/kairos-io/kairos/v2/pkg/config"
hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/nxadm/tail"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/agent/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"path/filepath"

. "github.com/kairos-io/kairos/v2/internal/agent"
"github.com/kairos-io/kairos/v2/internal/bus"
. "github.com/kairos-io/kairos-agent/v2/internal/agent"
"github.com/kairos-io/kairos-agent/v2/internal/bus"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package agent
import (
"os"

"github.com/kairos-io/kairos/v2/internal/kairos"
"github.com/kairos-io/kairos-agent/v2/internal/kairos"

"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/bundles.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hook
import (
"github.com/kairos-io/kairos-sdk/bundles"
"github.com/kairos-io/kairos-sdk/machine"
config "github.com/kairos-io/kairos/v2/pkg/config"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
)

type BundleOption struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/gruboptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/kairos-io/kairos-sdk/system"
config "github.com/kairos-io/kairos/v2/pkg/config"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
)

type GrubOptions struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/hook.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hook

import (
config "github.com/kairos-io/kairos/v2/pkg/config"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
)

type Interface interface {
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/kcrypt.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/kairos-io/kairos-sdk/utils"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
)

type Kcrypt struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package hook

import (
"github.com/kairos-io/kairos-sdk/utils"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
)

type Lifecycle struct{}
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/hooks/mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/kairos-io/kairos-sdk/machine"
config "github.com/kairos-io/kairos/v2/pkg/config"
config "github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/mudler/yip/pkg/schema"
yip "github.com/mudler/yip/pkg/schema"
"gopkg.in/yaml.v1"
Expand Down
6 changes: 3 additions & 3 deletions internal/agent/hooks/runstage.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package hook

import (
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos/v2/pkg/utils"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"

events "github.com/kairos-io/kairos-sdk/bus"
)
Expand Down
16 changes: 8 additions & 8 deletions internal/agent/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
hook "github.com/kairos-io/kairos/v2/internal/agent/hooks"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/internal/cmd"
"github.com/kairos-io/kairos/v2/pkg/action"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
elementalUtils "github.com/kairos-io/kairos/v2/pkg/utils"
hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/internal/cmd"
"github.com/kairos-io/kairos-agent/v2/pkg/action"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
elementalUtils "github.com/kairos-io/kairos-agent/v2/pkg/utils"
qr "github.com/mudler/go-nodepair/qrcode"
"github.com/mudler/go-pluggable"
"github.com/pterm/pterm"
Expand Down
12 changes: 6 additions & 6 deletions internal/agent/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (
"context"
"fmt"
"github.com/jaypipes/ghw/pkg/block"
"github.com/kairos-io/kairos/v2/pkg/constants"
conf "github.com/kairos-io/kairos/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos/v2/pkg/utils"
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
conf "github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
"os"
"path/filepath"

"github.com/kairos-io/kairos/v2/pkg/config"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
v1mock "github.com/kairos-io/kairos/v2/tests/mocks"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
v1mock "github.com/kairos-io/kairos-agent/v2/tests/mocks"
"github.com/twpayne/go-vfs"
"github.com/twpayne/go-vfs/vfst"
"gopkg.in/yaml.v3"
Expand Down
8 changes: 4 additions & 4 deletions internal/agent/interactive_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"
"strings"

"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/internal/cmd"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/internal/cmd"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"

events "github.com/kairos-io/kairos-sdk/bus"
"github.com/kairos-io/kairos-sdk/unstructured"
Expand Down
4 changes: 2 additions & 2 deletions internal/agent/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

events "github.com/kairos-io/kairos-sdk/bus"
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/mudler/go-pluggable"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/agent/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
events "github.com/kairos-io/kairos-sdk/bus"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/internal/cmd"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/internal/cmd"
qr "github.com/mudler/go-nodepair/qrcode"
"github.com/mudler/go-pluggable"
"github.com/pterm/pterm"
Expand Down
12 changes: 6 additions & 6 deletions internal/agent/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/utils"
hook "github.com/kairos-io/kairos/v2/internal/agent/hooks"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/internal/cmd"
"github.com/kairos-io/kairos/v2/pkg/action"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/internal/cmd"
"github.com/kairos-io/kairos-agent/v2/pkg/action"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"

"github.com/mudler/go-pluggable"
"github.com/pterm/pterm"
Expand Down
12 changes: 6 additions & 6 deletions internal/agent/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
events "github.com/kairos-io/kairos-sdk/bus"
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/utils"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/pkg/action"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos/v2/pkg/github"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/pkg/action"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
"github.com/kairos-io/kairos-agent/v2/pkg/github"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/mudler/go-pluggable"
"github.com/sanity-io/litter"
log "github.com/sirupsen/logrus"
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/kairos-io/kairos/v2/internal/kairos"
"github.com/kairos-io/kairos-agent/v2/internal/kairos"

"github.com/kairos-io/kairos-sdk/utils"
"github.com/pterm/pterm"
Expand Down
4 changes: 2 additions & 2 deletions internal/webui/webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"github.com/kairos-io/kairos-sdk/schema"
"github.com/kairos-io/kairos/v2/internal/agent"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/internal/agent"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/labstack/echo/v4"
process "github.com/mudler/go-processmanager"
"github.com/nxadm/tail"
Expand Down
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import (
"runtime"
"strings"

"github.com/kairos-io/kairos-agent/v2/internal/agent"
"github.com/kairos-io/kairos-agent/v2/internal/bus"
"github.com/kairos-io/kairos-agent/v2/internal/common"
"github.com/kairos-io/kairos-agent/v2/internal/webui"
"github.com/kairos-io/kairos-agent/v2/pkg/config"
"github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
"github.com/kairos-io/kairos-sdk/bundles"
"github.com/kairos-io/kairos-sdk/collector"
"github.com/kairos-io/kairos-sdk/machine"
"github.com/kairos-io/kairos-sdk/schema"
"github.com/kairos-io/kairos-sdk/state"
"github.com/kairos-io/kairos/v2/internal/agent"
"github.com/kairos-io/kairos/v2/internal/bus"
"github.com/kairos-io/kairos/v2/internal/common"
"github.com/kairos-io/kairos/v2/internal/webui"
"github.com/kairos-io/kairos/v2/pkg/config"
"github.com/kairos-io/kairos/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
"github.com/sirupsen/logrus"

"github.com/Masterminds/semver/v3"
Expand Down
4 changes: 2 additions & 2 deletions pkg/action/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ limitations under the License.
package action

import (
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
"github.com/sirupsen/logrus"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/action/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"path/filepath"
"time"

cnst "github.com/kairos-io/kairos/v2/pkg/constants"
"github.com/kairos-io/kairos/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
cnst "github.com/kairos-io/kairos-agent/v2/pkg/constants"
"github.com/kairos-io/kairos-agent/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
)

func (i *InstallAction) installHook(hook string, chroot bool) error {
Expand Down
12 changes: 6 additions & 6 deletions pkg/action/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"regexp"

"github.com/jaypipes/ghw/pkg/block"
"github.com/kairos-io/kairos/v2/pkg/action"
"github.com/kairos-io/kairos/v2/pkg/constants"
conf "github.com/kairos-io/kairos/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
v1mock "github.com/kairos-io/kairos/v2/tests/mocks"
"github.com/kairos-io/kairos-agent/v2/pkg/action"
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
conf "github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
v1mock "github.com/kairos-io/kairos-agent/v2/tests/mocks"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/twpayne/go-vfs"
Expand Down
8 changes: 4 additions & 4 deletions pkg/action/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"path/filepath"
"time"

cnst "github.com/kairos-io/kairos/v2/pkg/constants"
"github.com/kairos-io/kairos/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
cnst "github.com/kairos-io/kairos-agent/v2/pkg/constants"
"github.com/kairos-io/kairos-agent/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
)

func (r *ResetAction) resetHook(hook string, chroot bool) error {
Expand Down
12 changes: 6 additions & 6 deletions pkg/action/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"regexp"

"github.com/jaypipes/ghw/pkg/block"
"github.com/kairos-io/kairos/v2/pkg/action"
"github.com/kairos-io/kairos/v2/pkg/constants"
conf "github.com/kairos-io/kairos/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
v1mock "github.com/kairos-io/kairos/v2/tests/mocks"
"github.com/kairos-io/kairos-agent/v2/pkg/action"
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
conf "github.com/kairos-io/kairos-agent/v2/pkg/elementalConfig"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
v1mock "github.com/kairos-io/kairos-agent/v2/tests/mocks"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/twpayne/go-vfs"
Expand Down
8 changes: 4 additions & 4 deletions pkg/action/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"path/filepath"
"time"

"github.com/kairos-io/kairos/v2/pkg/constants"
"github.com/kairos-io/kairos/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos/v2/pkg/types/v1"
"github.com/kairos-io/kairos/v2/pkg/utils"
"github.com/kairos-io/kairos-agent/v2/pkg/constants"
"github.com/kairos-io/kairos-agent/v2/pkg/elemental"
v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1"
"github.com/kairos-io/kairos-agent/v2/pkg/utils"
)

// UpgradeAction represents the struct that will run the upgrade from start to finish
Expand Down
Loading

0 comments on commit 9c5731b

Please sign in to comment.