Skip to content

Commit

Permalink
Merge pull request #167 from promhippie/renovate/github.com-scaleway-…
Browse files Browse the repository at this point in the history
…scaleway-sdk-go-1.x

fix(deps): update module github.com/scaleway/scaleway-sdk-go to v1.0.0-beta.14
  • Loading branch information
tboerger authored Mar 10, 2023
2 parents a328e7c + 09ce2c7 commit 4d527a5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
github.com/prometheus/common v0.42.0
github.com/prometheus/exporter-toolkit v0.9.1
github.com/prometheus/prometheus v1.8.2-0.20210331101223-3cafc58827d1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14
github.com/urfave/cli/v2 v2.25.0
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -677,8 +677,8 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210223165440-c65ae3540d44/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13 h1:n5J2K6g/kl/iT6mODjCoSoRBGQVmIG3aMtYbofi9kxc=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.13/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14 h1:yFl3jyaSVLNYXlnNYM5z2pagEk1dYQhfr1p20T1NyKY=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.14/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=
Expand Down
19 changes: 0 additions & 19 deletions pkg/action/discoverer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ var (
"allowedActions": providerPrefix + "allowed_actions",
"arch": providerPrefix + "arch",
"blade": providerPrefix + "blade",
"bootscriptIdentifier": providerPrefix + "bootscript_id",
"bootscriptInitrd": providerPrefix + "bootscript_initrd",
"bootscriptKernel": providerPrefix + "bootscript_kernel",
"bootscriptTitle": providerPrefix + "bootscript_title",
"bootType": providerPrefix + "boot_type",
"chassis": providerPrefix + "chassis",
"cluster": providerPrefix + "cluster",
Expand Down Expand Up @@ -173,10 +169,6 @@ func (d *Discoverer) getTargets(ctx context.Context) ([]*targetgroup.Group, erro
locationHypervisor string
locationNode string
locationPlatform string
bootscriptIdentifier string
bootscriptTitle string
bootscriptKernel string
bootscriptInitrd string
securityGroupIdentifier string
securityGroupName string
placementGroupIdentifier string
Expand All @@ -196,13 +188,6 @@ func (d *Discoverer) getTargets(ctx context.Context) ([]*targetgroup.Group, erro
locationPlatform = server.Location.PlatformID
}

if server.Bootscript != nil {
bootscriptIdentifier = server.Bootscript.ID
bootscriptTitle = server.Bootscript.Title
bootscriptKernel = server.Bootscript.Kernel
bootscriptInitrd = server.Bootscript.Initrd
}

if server.SecurityGroup != nil {
securityGroupIdentifier = server.SecurityGroup.ID
securityGroupName = server.SecurityGroup.Name
Expand Down Expand Up @@ -255,10 +240,6 @@ func (d *Discoverer) getTargets(ctx context.Context) ([]*targetgroup.Group, erro
model.LabelName(Labels["node"]): model.LabelValue(locationNode),
model.LabelName(Labels["platform"]): model.LabelValue(locationPlatform),
model.LabelName(Labels["ipv6"]): model.LabelValue(ipv6Address),
model.LabelName(Labels["bootscriptIdentifier"]): model.LabelValue(bootscriptIdentifier),
model.LabelName(Labels["bootscriptTitle"]): model.LabelValue(bootscriptTitle),
model.LabelName(Labels["bootscriptKernel"]): model.LabelValue(bootscriptKernel),
model.LabelName(Labels["bootscriptInitrd"]): model.LabelValue(bootscriptInitrd),
model.LabelName(Labels["bootType"]): model.LabelValue(server.BootType),
model.LabelName(Labels["securityGroupIdentifier"]): model.LabelValue(securityGroupIdentifier),
model.LabelName(Labels["securityGroupName"]): model.LabelValue(securityGroupName),
Expand Down
3 changes: 1 addition & 2 deletions pkg/action/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"os/signal"
Expand Down Expand Up @@ -210,7 +209,7 @@ func handler(cfg *config.Config, logger log.Logger) *chi.Mux {
root.Get("/sd", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=utf-8")

content, err := ioutil.ReadFile(cfg.Target.File)
content, err := os.ReadFile(cfg.Target.File)

if err != nil {
level.Info(logger).Log(
Expand Down
3 changes: 1 addition & 2 deletions pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"reflect"
Expand Down Expand Up @@ -97,7 +96,7 @@ func (a *Adapter) writeOutput() error {
b, _ := json.MarshalIndent(arr, "", " ")

dir, _ := filepath.Split(a.output)
tmpfile, err := ioutil.TempFile(dir, "sd-adapter")
tmpfile, err := os.CreateTemp(dir, "sd-adapter")
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/command/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package command
import (
"encoding/json"
"errors"
"io/ioutil"
"os"
"path/filepath"
"strings"
Expand Down Expand Up @@ -56,7 +55,7 @@ func readConfig(file string, cfg *config.Config) error {
return nil
}

content, err := ioutil.ReadFile(file)
content, err := os.ReadFile(file)

if err != nil {
return err
Expand Down

0 comments on commit 4d527a5

Please sign in to comment.