forked from LaconicNetwork/kompose
Added sirupsen and updated all occurances
Updated `sirupsen`, `docker/cli`, `docker/libcompose` in `glide`, Also changed `Sirupsen` with `sirupsen` in all kompose packages as well as in `docker/distribution` packages
This commit is contained in:
parent
d02492ad59
commit
5de4aa85f8
@ -6,7 +6,7 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
@ -19,9 +19,9 @@ package cmd
|
||||
import (
|
||||
"strings"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/kubernetes/kompose/pkg/app"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@ -21,7 +21,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ limitations under the License.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/kubernetes/kompose/pkg/app"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
|
||||
@ -7,11 +7,6 @@ import:
|
||||
- package: github.com/sirupsen/logrus
|
||||
version: 1.0.3
|
||||
|
||||
- package: github.com/Sirupsen/logrus
|
||||
repo: git@github.com:/sirupsen/logrus
|
||||
vcs: git
|
||||
version: 1.0.3
|
||||
|
||||
- package: github.com/xeipuuv/gojsonschema
|
||||
version: 93e72a773fade158921402d6a24c819b48aba29d
|
||||
|
||||
@ -24,7 +19,7 @@ import:
|
||||
|
||||
# We use libcompose to parse v1 and v2 of Docker Compose
|
||||
- package: github.com/docker/libcompose
|
||||
version: 4a647d664afbe05c41455c9d534d8239671eb46a
|
||||
version: 57bd716502dcbe1799f026148016022b0f3b989c
|
||||
subpackages:
|
||||
- config
|
||||
- lookup
|
||||
@ -32,7 +27,7 @@ import:
|
||||
|
||||
# We use docker/cli to parse v3 of Docker Compose
|
||||
- package: github.com/docker/cli
|
||||
version: 9bdb0763b9e667dc01adf36ba98a2b7bd47bdc75
|
||||
version: 9b7656cc05d2878c85dc1252f5813f0ad77d808f
|
||||
|
||||
# Docker parser library for image names
|
||||
- package: github.com/novln/docker-parser
|
||||
|
||||
@ -19,7 +19,7 @@ package app
|
||||
import (
|
||||
"strings"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
// install kubernetes api
|
||||
|
||||
@ -26,10 +26,10 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Bundle is docker bundle file loader, implements Loader interface
|
||||
|
||||
@ -24,11 +24,11 @@ import (
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Compose is docker compose file loader, implements Loader interface
|
||||
|
||||
@ -25,6 +25,8 @@ import (
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/docker/cli/cli/compose/types"
|
||||
"github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/project"
|
||||
@ -32,14 +34,18 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func durationPtr(value time.Duration) *time.Duration {
|
||||
return &value
|
||||
}
|
||||
|
||||
func TestParseHealthCheck(t *testing.T) {
|
||||
helperValue := uint64(2)
|
||||
check := types.HealthCheckConfig{
|
||||
Test: []string{"CMD-SHELL", "echo", "foobar"},
|
||||
Timeout: "1s",
|
||||
Interval: "2s",
|
||||
Timeout: durationPtr(1 * time.Second),
|
||||
Interval: durationPtr(2 * time.Second),
|
||||
Retries: &helperValue,
|
||||
StartPeriod: "3s",
|
||||
StartPeriod: durationPtr(3 * time.Second),
|
||||
}
|
||||
|
||||
// CMD-SHELL or SHELL is included Test within docker/cli, thus we remove the first value in Test
|
||||
|
||||
@ -26,13 +26,13 @@ import (
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/docker/libcompose/config"
|
||||
"github.com/docker/libcompose/lookup"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/kubernetes/kompose/pkg/transformer"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will
|
||||
|
||||
@ -31,9 +31,9 @@ import (
|
||||
|
||||
"os"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// converts os.Environ() ([]string) to map[string]string
|
||||
@ -171,16 +171,16 @@ func parseHealthCheck(composeHealthCheck types.HealthCheckConfig) (kobject.Healt
|
||||
var timeout, interval, retries, startPeriod int32
|
||||
|
||||
// Here we convert the timeout from 1h30s (example) to 36030 seconds.
|
||||
if composeHealthCheck.Timeout != "" {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.Timeout)
|
||||
if composeHealthCheck.Timeout != nil {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.Timeout.String())
|
||||
if err != nil {
|
||||
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check timeout variable")
|
||||
}
|
||||
timeout = int32(parse.Seconds())
|
||||
}
|
||||
|
||||
if composeHealthCheck.Interval != "" {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.Interval)
|
||||
if composeHealthCheck.Interval != nil {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.Interval.String())
|
||||
if err != nil {
|
||||
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check interval variable")
|
||||
}
|
||||
@ -191,8 +191,8 @@ func parseHealthCheck(composeHealthCheck types.HealthCheckConfig) (kobject.Healt
|
||||
retries = int32(*composeHealthCheck.Retries)
|
||||
}
|
||||
|
||||
if composeHealthCheck.StartPeriod != "" {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.StartPeriod)
|
||||
if composeHealthCheck.StartPeriod != nil {
|
||||
parse, err := time.ParseDuration(composeHealthCheck.StartPeriod.String())
|
||||
if err != nil {
|
||||
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check startPeriod variable")
|
||||
}
|
||||
|
||||
@ -30,11 +30,11 @@ import (
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/joho/godotenv"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/kubernetes/kompose/pkg/transformer"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
||||
@ -22,12 +22,12 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/kubernetes/kompose/pkg/transformer"
|
||||
buildapi "github.com/openshift/origin/pkg/build/api"
|
||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
// install kubernetes api
|
||||
_ "k8s.io/kubernetes/pkg/api/install"
|
||||
|
||||
@ -23,7 +23,7 @@ import (
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
"github.com/kubernetes/kompose/pkg/transformer/kubernetes"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
kapi "k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
|
||||
@ -24,8 +24,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/kubernetes/kompose/pkg/kobject"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"path/filepath"
|
||||
|
||||
|
||||
@ -18,10 +18,10 @@ package docker
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
dockerlib "github.com/fsouza/go-dockerclient"
|
||||
"github.com/kubernetes/kompose/pkg/utils/archive"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
@ -18,10 +18,10 @@ package docker
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
dockerlib "github.com/fsouza/go-dockerclient"
|
||||
"github.com/novln/docker-parser"
|
||||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Push will provide methods for interaction with API regarding pushing images
|
||||
|
||||
2
vendor/github.com/docker/distribution/context/http.go
generated
vendored
2
vendor/github.com/docker/distribution/context/http.go
generated
vendored
@ -8,7 +8,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"github.com/docker/distribution/uuid"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
2
vendor/github.com/docker/distribution/context/logger.go
generated
vendored
2
vendor/github.com/docker/distribution/context/logger.go
generated
vendored
@ -3,7 +3,7 @@ package context
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
|
||||
2
vendor/github.com/docker/distribution/manifest/schema1/verify.go
generated
vendored
2
vendor/github.com/docker/distribution/manifest/schema1/verify.go
generated
vendored
@ -3,7 +3,7 @@ package schema1
|
||||
import (
|
||||
"crypto/x509"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/libtrust"
|
||||
)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user