diff --git a/.goreleaser.yml b/.goreleaser.yml index b072a4e..0a4874b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -8,20 +8,27 @@ before: - go generate ./... builds: - env: - - CGO_ENABLED=0 + - CGO_ENABLED=1 goos: - - linux - darwin + goarch: + - amd64 + - arm + - arm64 + ignore: + - goos: linux + goarch: arm64 + - goos: linux + goarch: arm archives: - replacements: darwin: Darwin linux: Linux - 386: i386 amd64: x86_64 checksum: name_template: 'checksums.txt' snapshot: - name_template: "{{ incpatch .Version }}-next" + name_template: "{{ incpatch .Version }}" changelog: sort: asc filters: diff --git a/CHANGELOG.md b/CHANGELOG.md index 955316b..f272a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### [v1.0](https://github.com/OpenSLO/slogen/releases/tag/v1.0.0) - **Feature** : Support for OpenSLO v1 spec for `SLO`, `AlertPolicy` and `AlertNotificationTarget` + - `AlertPolicy` and `AlertNotificationTarget` based approach removes the need for created duplicate alerting configs with each `SLO` - **Feature** : Support for sumologic native SLO & SLO based monitors. - **Feature** : Generates flow graph of which `SLO` are using which `AlertPolicy` and `AlertNotificationTarget` diff --git a/README.md b/README.md index dd4e2ed..dc4aec3 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ It can be done with export PATH=`go env GOPATH`/bin:$PATH ``` +The pre-compiled binaries for specific platforms are also available on the [release](https://github.com/OpenSLO/slogen/releases) page. + ### Using the tool ##### Set the sumologic auth as `ENV` variables as required by the [terraform provider](https://registry.terraform.io/providers/SumoLogic/sumologic/latest/docs#environment-variables): diff --git a/credits/LIST.md b/credits/LIST.md index 1cfd0a7..47c137b 100644 --- a/credits/LIST.md +++ b/credits/LIST.md @@ -54,7 +54,7 @@ golang.org/x/oauth2,Unknown,BSD-3-Clause google.golang.org/genproto/googleapis,Unknown,Apache-2.0 google.golang.org/api/internal/third_party/uritemplates,Unknown,BSD-3-Clause github.com/kr/pretty,https://github.com/kr/pretty/blob/master/License,MIT -github.com/OpenSLO/oslo/pkg/manifest,https://github.com/OpenSLO/oslo/blob/master/pkg/manifest/LICENSE,Apache-2.0 +github.com/agaurav/oslo/pkg/manifest,https://github.com/agaurav/oslo/blob/master/pkg/manifest/LICENSE,Apache-2.0 github.com/fatih/color,https://github.com/fatih/color/blob/master/LICENSE.md,MIT github.com/hashicorp/hcl,https://github.com/hashicorp/hcl/blob/master/LICENSE,MPL-2.0 github.com/hashicorp/go-cleanhttp,https://github.com/hashicorp/go-cleanhttp/blob/master/LICENSE,MPL-2.0 diff --git a/go.mod b/go.mod index 4ad4e8b..748f496 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/OpenSLO/slogen go 1.18 require ( - //github.com/OpenSLO/oslo v0.5.1 + //github.com/agaurav/oslo v0.5.1 github.com/fatih/color v1.13.0 github.com/go-resty/resty/v2 v2.7.0 github.com/goccy/go-graphviz v0.0.9 @@ -19,7 +19,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 ) -require github.com/OpenSLO/oslo v0.0.0-00010101000000-000000000000 +require github.com/agaurav/oslo v0.5.14-0.20220809161632-b86360f4da5b require ( github.com/chzyer/readline v1.5.1 // indirect @@ -55,5 +55,3 @@ require ( gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) - -replace github.com/OpenSLO/oslo => github.com/agaurav/oslo v0.5.13 diff --git a/go.sum b/go.sum index 639561a..1746f1b 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C6 github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/agaurav/oslo v0.5.13 h1:rnUZeqAQQfJqKRoZoalBlI/YqePmFF7unKH6CMeMEsA= -github.com/agaurav/oslo v0.5.13/go.mod h1:QEy6FSCxj2DkXBtjCiCvQz2DG9CRhdGM/pNp+iZ1AcY= +github.com/agaurav/oslo v0.5.14-0.20220809161632-b86360f4da5b h1:7x/mWECFJe/7sX1vS6WWMQhMF+YDHYTcbDVnt9DC3rs= +github.com/agaurav/oslo v0.5.14-0.20220809161632-b86360f4da5b/go.mod h1:wzCbY/MYe5WNWj6DkqHs0vUzHf4t07N3TqpNYgw8kmo= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= diff --git a/libs/gen.go b/libs/gen.go index 80e06dd..ec4cb9b 100644 --- a/libs/gen.go +++ b/libs/gen.go @@ -4,9 +4,9 @@ import ( "bytes" "embed" "fmt" - oslo "github.com/OpenSLO/oslo/pkg/manifest/v1" "github.com/OpenSLO/slogen/libs/specs" "github.com/OpenSLO/slogen/libs/sumologic" + oslo "github.com/agaurav/oslo/pkg/manifest/v1" "os" "path/filepath" "sort" diff --git a/libs/spec.go b/libs/spec.go index ba8ff56..a9ea38d 100644 --- a/libs/spec.go +++ b/libs/spec.go @@ -2,9 +2,9 @@ package libs import ( "fmt" - oslo "github.com/OpenSLO/oslo/pkg/manifest/v1" - "github.com/OpenSLO/oslo/pkg/manifest/v1alpha" "github.com/OpenSLO/slogen/libs/specs" + oslo "github.com/agaurav/oslo/pkg/manifest/v1" + "github.com/agaurav/oslo/pkg/manifest/v1alpha" "gopkg.in/yaml.v3" "os" ) diff --git a/libs/specs/specs.go b/libs/specs/specs.go index 48acc15..9a28f74 100644 --- a/libs/specs/specs.go +++ b/libs/specs/specs.go @@ -1,6 +1,6 @@ package specs -import "github.com/OpenSLO/oslo/pkg/manifest/v1" +import "github.com/agaurav/oslo/pkg/manifest/v1" type OpenSLOSpec struct { *v1.SLO `yaml:",inline"` diff --git a/libs/sumologic/native.go b/libs/sumologic/native.go index 933d55e..9b150a6 100644 --- a/libs/sumologic/native.go +++ b/libs/sumologic/native.go @@ -2,9 +2,9 @@ package sumologic import ( "fmt" - oslo "github.com/OpenSLO/oslo/pkg/manifest/v1" "github.com/OpenSLO/slogen/libs/specs" "github.com/OpenSLO/slogen/libs/sumologic/sumotf" + oslo "github.com/agaurav/oslo/pkg/manifest/v1" "log" "strconv" "strings"