forked from LaconicNetwork/kompose
chore: require go >=1.18, bump deps and get rid of replace directives (#1552)
This commit is contained in:
parent
d4001c92b2
commit
cb41c16bf4
98
go.mod
98
go.mod
@ -1,53 +1,77 @@
|
|||||||
module github.com/kubernetes/kompose
|
module github.com/kubernetes/kompose
|
||||||
|
|
||||||
go 1.13
|
go 1.18
|
||||||
|
|
||||||
replace github.com/Sirupsen/logrus => github.com/sirupsen/logrus v1.8.1
|
|
||||||
|
|
||||||
replace github.com/docker/cli => github.com/docker/cli v20.10.16+incompatible
|
|
||||||
|
|
||||||
replace github.com/xeipuuv/gojsonschema => github.com/xeipuuv/gojsonschema v1.2.1-0.20201027075954-b076d39a02e5
|
|
||||||
|
|
||||||
replace github.com/docker/docker => github.com/docker/docker v20.10.0-beta1.0.20201030232932-c2cc352355d4+incompatible
|
|
||||||
|
|
||||||
replace github.com/containerd/containerd => github.com/containerd/containerd v1.6.6
|
|
||||||
|
|
||||||
replace github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2
|
|
||||||
|
|
||||||
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220412211240-33da011f77ad
|
|
||||||
|
|
||||||
replace k8s.io/kubernetes => k8s.io/kubernetes v1.24.1
|
|
||||||
|
|
||||||
replace github.com/miekg/dns => github.com/miekg/dns v1.1.49
|
|
||||||
|
|
||||||
replace github.com/docker/distribution => github.com/docker/distribution v2.8.1+incompatible
|
|
||||||
|
|
||||||
replace github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt v3.2.2+incompatible
|
|
||||||
|
|
||||||
replace github.com/emicklei/go-restful => github.com/emicklei/go-restful v2.16.0+incompatible
|
|
||||||
|
|
||||||
replace golang.org/x/crypto => golang.org/x/crypto v0.0.0-20220826181053-bd7e27e6170d
|
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/compose-spec/compose-go v1.8.2
|
github.com/compose-spec/compose-go v1.8.2
|
||||||
github.com/containerd/containerd v1.6.4 // indirect
|
github.com/deckarep/golang-set v1.8.0
|
||||||
github.com/deckarep/golang-set v1.7.1
|
|
||||||
github.com/fatih/structs v1.1.0
|
github.com/fatih/structs v1.1.0
|
||||||
github.com/fsouza/go-dockerclient v1.6.6
|
github.com/fsouza/go-dockerclient v1.9.2
|
||||||
github.com/google/go-cmp v0.5.9
|
github.com/google/go-cmp v0.5.9
|
||||||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
|
||||||
github.com/joho/godotenv v1.3.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/novln/docker-parser v1.0.0
|
github.com/novln/docker-parser v1.0.0
|
||||||
github.com/openshift/api v0.0.0-20200803131051-87466835fcc0
|
github.com/openshift/api v3.9.0+incompatible
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/sirupsen/logrus v1.9.0
|
github.com/sirupsen/logrus v1.9.0
|
||||||
github.com/spf13/cast v1.3.1
|
github.com/spf13/cast v1.5.0
|
||||||
github.com/spf13/cobra v1.1.3
|
github.com/spf13/cobra v1.6.1
|
||||||
github.com/spf13/viper v1.7.1
|
github.com/spf13/viper v1.14.0
|
||||||
golang.org/x/text v0.3.8 // indirect
|
golang.org/x/tools v0.5.0
|
||||||
golang.org/x/tools v0.1.12
|
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
k8s.io/api v0.22.5
|
k8s.io/api v0.22.5
|
||||||
k8s.io/apimachinery v0.22.5
|
k8s.io/apimachinery v0.22.5
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
|
||||||
|
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||||
|
github.com/Microsoft/hcsshim v0.9.6 // indirect
|
||||||
|
github.com/containerd/cgroups v1.0.4 // indirect
|
||||||
|
github.com/containerd/containerd v1.6.14 // indirect
|
||||||
|
github.com/distribution/distribution/v3 v3.0.0-20221103125252-ebfa2a0ac0a9 // indirect
|
||||||
|
github.com/docker/docker v20.10.22+incompatible // indirect
|
||||||
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
|
github.com/docker/go-units v0.5.0 // indirect
|
||||||
|
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||||
|
github.com/go-logr/logr v1.2.3 // indirect
|
||||||
|
github.com/gogo/protobuf v1.3.2 // indirect
|
||||||
|
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||||
|
github.com/google/gofuzz v1.2.0 // indirect
|
||||||
|
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||||
|
github.com/imdario/mergo v0.3.13 // indirect
|
||||||
|
github.com/inconshreveable/mousetrap v1.0.1 // indirect
|
||||||
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
|
github.com/magiconair/properties v1.8.6 // indirect
|
||||||
|
github.com/mattn/go-shellwords v1.0.12 // indirect
|
||||||
|
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||||
|
github.com/moby/sys/mount v0.3.3 // indirect
|
||||||
|
github.com/moby/sys/mountinfo v0.6.2 // indirect
|
||||||
|
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
|
||||||
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
|
github.com/morikuni/aec v1.0.0 // indirect
|
||||||
|
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||||
|
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
|
||||||
|
github.com/opencontainers/runc v1.1.2 // indirect
|
||||||
|
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||||
|
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
|
||||||
|
github.com/spf13/afero v1.9.2 // indirect
|
||||||
|
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||||
|
github.com/spf13/pflag v1.0.5 // indirect
|
||||||
|
github.com/subosito/gotenv v1.4.1 // indirect
|
||||||
|
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
|
||||||
|
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||||
|
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
|
||||||
|
go.opencensus.io v0.23.0 // indirect
|
||||||
|
golang.org/x/mod v0.7.0 // indirect
|
||||||
|
golang.org/x/net v0.5.0 // indirect
|
||||||
|
golang.org/x/sync v0.1.0 // indirect
|
||||||
|
golang.org/x/sys v0.4.0 // indirect
|
||||||
|
golang.org/x/text v0.6.0 // indirect
|
||||||
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
|
k8s.io/klog/v2 v2.80.1 // indirect
|
||||||
|
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||||
|
)
|
||||||
|
|||||||
@ -17,7 +17,7 @@ limitations under the License.
|
|||||||
package compose
|
package compose
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
@ -179,11 +179,11 @@ func normalizeNetworkNames(netName string) (string, error) {
|
|||||||
func ReadFile(fileName string) ([]byte, error) {
|
func ReadFile(fileName string) ([]byte, error) {
|
||||||
if fileName == "-" {
|
if fileName == "-" {
|
||||||
if StdinData == nil {
|
if StdinData == nil {
|
||||||
data, err := ioutil.ReadAll(os.Stdin)
|
data, err := io.ReadAll(os.Stdin)
|
||||||
StdinData = data
|
StdinData = data
|
||||||
return data, err
|
return data, err
|
||||||
}
|
}
|
||||||
return StdinData, nil
|
return StdinData, nil
|
||||||
}
|
}
|
||||||
return ioutil.ReadFile(fileName)
|
return os.ReadFile(fileName)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package testutils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
@ -15,7 +14,7 @@ func NewCommand(cmd string) *exec.Cmd {
|
|||||||
|
|
||||||
// CreateLocalDirectory TODO: comment
|
// CreateLocalDirectory TODO: comment
|
||||||
func CreateLocalDirectory(t *testing.T) string {
|
func CreateLocalDirectory(t *testing.T) string {
|
||||||
dir, err := ioutil.TempDir(os.TempDir(), "kompose-test-")
|
dir, err := os.MkdirTemp(os.TempDir(), "kompose-test-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -79,7 +78,7 @@ func generateHelm(dirName string) error {
|
|||||||
|
|
||||||
/* Create the readme file */
|
/* Create the readme file */
|
||||||
readme := "This chart was created by Kompose\n"
|
readme := "This chart was created by Kompose\n"
|
||||||
err = ioutil.WriteFile(dirName+string(os.PathSeparator)+"README.md", []byte(readme), 0644)
|
err = os.WriteFile(dirName+string(os.PathSeparator)+"README.md", []byte(readme), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -102,7 +101,7 @@ home:
|
|||||||
var chartData bytes.Buffer
|
var chartData bytes.Buffer
|
||||||
_ = t.Execute(&chartData, details)
|
_ = t.Execute(&chartData, details)
|
||||||
|
|
||||||
err = ioutil.WriteFile(dirName+string(os.PathSeparator)+"Chart.yaml", chartData.Bytes(), 0644)
|
err = os.WriteFile(dirName+string(os.PathSeparator)+"Chart.yaml", chartData.Bytes(), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -839,7 +838,7 @@ func GetEnvsFromFile(file string, opt kobject.ConvertOptions) (map[string]string
|
|||||||
|
|
||||||
// GetContentFromFile gets the content from the file..
|
// GetContentFromFile gets the content from the file..
|
||||||
func GetContentFromFile(file string) (string, error) {
|
func GetContentFromFile(file string) (string, error) {
|
||||||
fileBytes, err := ioutil.ReadFile(file)
|
fileBytes, err := os.ReadFile(file)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrap(err, "Unable to read file")
|
return "", errors.Wrap(err, "Unable to read file")
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,6 @@ package kubernetes
|
|||||||
import (
|
import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -267,7 +266,7 @@ func (k *Kubernetes) IntiConfigMapFromFileOrDir(name, cmName, filePath string, s
|
|||||||
|
|
||||||
switch mode := fi.Mode(); {
|
switch mode := fi.Mode(); {
|
||||||
case mode.IsDir():
|
case mode.IsDir():
|
||||||
files, err := ioutil.ReadDir(filePath)
|
files, err := os.ReadDir(filePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,6 @@ package transformer
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path"
|
"path"
|
||||||
@ -290,7 +289,7 @@ func Print(name, path string, trailing string, data []byte, toStdout, generateJS
|
|||||||
} else {
|
} else {
|
||||||
// Write content separately to each file
|
// Write content separately to each file
|
||||||
file = filepath.Join(path, file)
|
file = filepath.Join(path, file)
|
||||||
if err := ioutil.WriteFile(file, data, 0644); err != nil {
|
if err := os.WriteFile(file, data, 0644); err != nil {
|
||||||
return "", errors.Wrap(err, "Failed to write %s: "+trailing)
|
return "", errors.Wrap(err, "Failed to write %s: "+trailing)
|
||||||
}
|
}
|
||||||
log.Printf("%s file %q created", formatProviderName(provider), file)
|
log.Printf("%s file %q created", formatProviderName(provider), file)
|
||||||
|
|||||||
@ -18,7 +18,6 @@ package docker
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
@ -43,7 +42,7 @@ func (c *Build) BuildImage(source string, image string, dockerfile string, build
|
|||||||
log.Infof("Building image '%s' from directory '%s'", image, path.Base(source))
|
log.Infof("Building image '%s' from directory '%s'", image, path.Base(source))
|
||||||
|
|
||||||
// Create a temporary file for tarball image packaging
|
// Create a temporary file for tarball image packaging
|
||||||
tmpFile, err := ioutil.TempFile(os.TempDir(), "kompose-image-build-")
|
tmpFile, err := os.CreateTemp(os.TempDir(), "kompose-image-build-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"testing"
|
"testing"
|
||||||
@ -23,7 +22,7 @@ func Test_stdin(t *testing.T) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("error", err)
|
fmt.Println("error", err)
|
||||||
}
|
}
|
||||||
g, err := ioutil.ReadFile("/tmp/output-k8s.json")
|
g, err := os.ReadFile("/tmp/output-k8s.json")
|
||||||
if !bytes.Equal(output, g) {
|
if !bytes.Equal(output, g) {
|
||||||
t.Errorf("Test Failed")
|
t.Errorf("Test Failed")
|
||||||
}
|
}
|
||||||
|
|||||||
3
script/test/fixtures/expose/output-os.yaml
vendored
3
script/test/fixtures/expose/output-os.yaml
vendored
@ -200,5 +200,6 @@ spec:
|
|||||||
kind: Service
|
kind: Service
|
||||||
name: web
|
name: web
|
||||||
weight: null
|
weight: null
|
||||||
status: {}
|
status:
|
||||||
|
ingress: null
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user