Skip to content

Commit

Permalink
Merge pull request #107 from xmidt-org/denopink/patch/golang-base-upg…
Browse files Browse the repository at this point in the history
…rade

Bug: Patch Failing Dockerfile
  • Loading branch information
denopink authored Oct 10, 2022
2 parents bb07560 + e051283 commit 6c6d1ce
Show file tree
Hide file tree
Showing 10 changed files with 424 additions and 159 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ jobs:
ci:
uses: xmidt-org/.github/.github/workflows/go-ci.yml@go-ci-v1
with:
lint-skip: true
license-skip: true
secrets: inherit
11 changes: 3 additions & 8 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
linters-settings:
misspell:
locale: US

linters:
enable:
- bodyclose
- dupl
- errorlint
- funlen

- goconst
- gosec
- misspell
Expand All @@ -29,6 +25,5 @@ linters-settings:
errorlint:
# Report non-wrapping error creation using fmt.Errorf
errorf: false
funlen:
lines: 120
statements: 50
misspell:
locale: US
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
- Updated spec file and rpkg version macro to be able to choose when the 'v' is included in the version. [#75](https://github.com/xmidt-org/petasos/pull/75)
- Patched failing Docker image, removed deprecated Maintainer information, fixed linter issues and enabled linte. [#107](https://github.com/xmidt-org/petasos/pull/107)

## [v0.1.7]
### Added
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
FROM docker.io/library/golang:1.15-alpine as builder

MAINTAINER Jack Murdock <jack_murdock@comcast.com>
FROM docker.io/library/golang:1.19-alpine as builder

WORKDIR /src

ARG VERSION
ARG GITCOMMIT
ARG BUILDTIME


RUN apk add --no-cache --no-progress \
ca-certificates \
make \
curl \
git \
openssh \
gcc \
libc-dev \
upx

RUN go get github.com/geofffranks/spruce/cmd/spruce && chmod +x /go/bin/spruce
RUN mkdir -p /go/bin && \
curl -o /go/bin/spruce https://github.com/geofffranks/spruce/releases/download/v1.29.0/spruce-linux-amd64 && \
chmod +x /go/bin/spruce
COPY . .
RUN make test release

Expand Down
12 changes: 6 additions & 6 deletions deploy/helm/petasos/templates/petasos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ data:
##############################################################################
# For a complete view of the service config structure,
# checkout https://godoc.org/github.com/xmidt-org/webpa-common/server#WebPA
# checkout https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#WebPA
########################################
# primary endpoint Configuration
########################################
# primary defines the details needed for the primary endpoint. The
# primary endpoint accepts the events from petasos (typically).
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Basic
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Basic
primary:
# address provides the port number for the endpoint to bind to.
# ":443" is ideal, but may require some special handling due to it being
Expand All @@ -65,7 +65,7 @@ data:
# health defines the details needed for the health check endpoint. The
# health check endpoint is generally used by services (like AWS Route53
# or consul) to determine if this particular machine is healthy or not.
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Health
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Health
health:
# address provides the port number for the endpoint to bind to.
# ":80" is ideal, but may require some special handling due to it being
Expand All @@ -88,7 +88,7 @@ data:
########################################
# pprof defines the details needed for the pprof debug endpoint.
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Basic
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Basic
# (Optional)
pprof:
# address provides the port number for the endpoint to bind to.
Expand All @@ -99,7 +99,7 @@ data:
########################################
# metric defines the details needed for the prometheus metrics endpoint
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Metric
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Metric
# (Optional)
metric:
# address provides the port number for the endpoint to bind to. Port 6404
Expand Down Expand Up @@ -164,7 +164,7 @@ data:
########################################
# service configures the server for service discovery.
# defined https://godoc.org/github.com/xmidt-org/webpa-common/service/servicecfg#Options
# defined https://godoc.org/github.com/xmidt-org/webpa-common/v2/service/servicecfg#Options
# this is required, consul or fixed must be used.
service:
# defaultScheme, used for the registered servers for communication.
Expand Down
16 changes: 8 additions & 8 deletions deploy/packaging/petasos_spruce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ stage: (( grab $STAGE || "dev" ))
##############################################################################

# For a complete view of the service config structure,
# checkout https://godoc.org/github.com/xmidt-org/webpa-common/server#WebPA
# checkout https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#WebPA

########################################
# primary endpoint Configuration
########################################

# primary defines the details needed for the primary endpoint. The
# primary endpoint accepts the events from petasos (typically).
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Basic
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Basic
primary:
# address provides the port number for the endpoint to bind to.
# ":443" is ideal, but may require some special handling due to it being
Expand All @@ -67,7 +67,7 @@ primary:
# health defines the details needed for the health check endpoint. The
# health check endpoint is generally used by services (like AWS Route53
# or consul) to determine if this particular machine is healthy or not.
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Health
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Health
health:
# address provides the port number for the endpoint to bind to.
# ":80" is ideal, but may require some special handling due to it being
Expand All @@ -90,7 +90,7 @@ health:
########################################

# pprof defines the details needed for the pprof debug endpoint.
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Basic
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Basic
# (Optional)
pprof:
# address provides the port number for the endpoint to bind to.
Expand All @@ -101,7 +101,7 @@ pprof:
########################################

# metric defines the details needed for the prometheus metrics endpoint
# define https://godoc.org/github.com/xmidt-org/webpa-common/server#Metric
# define https://godoc.org/github.com/xmidt-org/webpa-common/v2/server#Metric
# (Optional)
metric:
# address provides the port number for the endpoint to bind to. Port 6404
Expand Down Expand Up @@ -166,7 +166,7 @@ log:
########################################

# service configures the server for service discovery.
# defined https://godoc.org/github.com/xmidt-org/webpa-common/service/servicecfg#Options
# defined https://godoc.org/github.com/xmidt-org/webpa-common/v2/service/servicecfg#Options
# this is required, consul or fixed must be used.
service:
# defaultScheme, used for the registered servers for communication.
Expand All @@ -184,7 +184,7 @@ service:
# disableFilter: false

# consul configures consul for service discovery.
# defined https://godoc.org/github.com/xmidt-org/webpa-common/service/consul#Options
# defined https://godoc.org/github.com/xmidt-org/webpa-common/v2/service/consul#Options
# (Optional) defaults define https://sourcegraph.com/github.com/hashicorp/consul/-/blob/api/api.go#L347
consul:
# client is the configuration needed to connect to consul.
Expand Down Expand Up @@ -263,7 +263,7 @@ service:
# Watches is a list of service(s) to watch from consul. The address of the
# of the services are stored in memory. Upon update, the internal memory is
# updated.
# defined https://godoc.org/github.com/xmidt-org/webpa-common/service/consul#Watch
# defined https://godoc.org/github.com/xmidt-org/webpa-common/v2/service/consul#Watch
# (Optional) defaults to empty list
watches:
- # service name to watch for updates.
Expand Down
114 changes: 103 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,110 @@
module github.com/xmidt-org/petasos

go 1.12
go 1.19

require (
github.com/c9s/goprocinfo v0.0.0-20190309065803-0b2ad9ac246b // indirect
github.com/go-kit/kit v0.12.0
github.com/go-kit/log v0.2.1
github.com/justinas/alice v1.2.0
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
github.com/xmidt-org/candlelight v0.0.5
github.com/xmidt-org/webpa-common v1.11.9
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.19.0
go.opentelemetry.io/otel v0.19.0
go.opentelemetry.io/otel/trace v0.19.0
github.com/spf13/viper v1.13.0
github.com/xmidt-org/candlelight v0.0.11
github.com/xmidt-org/webpa-common/v2 v2.0.7
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.1
)

require (
emperror.dev/emperror v0.33.0 // indirect
emperror.dev/errors v0.8.1 // indirect
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/billhathaway/consistentHash v0.0.0-20140718022140-addea16d2229 // indirect
github.com/c9s/goprocinfo v0.0.0-20210130143923-c95fcf8c64a8 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/mux v1.8.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/consul/api v1.14.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.3.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-rootcerts v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/serf v0.10.0 // indirect
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect
github.com/jtacoma/uritemplates v1.0.0 // indirect
github.com/lestrrat-go/blackmagic v1.0.1 // indirect
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.4 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.6 // indirect
github.com/lestrrat-go/option v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/openzipkin/zipkin-go v0.4.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/xmidt-org/argus v0.9.1 // indirect
github.com/xmidt-org/arrange v0.3.0 // indirect
github.com/xmidt-org/bascule v0.11.0 // indirect
github.com/xmidt-org/chronon v0.1.1 // indirect
github.com/xmidt-org/clortho v0.0.4 // indirect
github.com/xmidt-org/httpaux v0.3.2 // indirect
github.com/xmidt-org/sallust v0.1.6 // indirect
github.com/xmidt-org/themis v0.4.8 // indirect
github.com/xmidt-org/touchstone v0.1.2 // indirect
github.com/xmidt-org/wrp-go/v3 v3.1.4 // indirect
go.opentelemetry.io/otel v1.10.0 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.9.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.9.0 // indirect
go.opentelemetry.io/otel/metric v0.32.1 // indirect
go.opentelemetry.io/otel/sdk v1.9.0 // indirect
go.opentelemetry.io/otel/trace v1.10.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/dig v1.15.0 // indirect
go.uber.org/fx v1.18.1 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.23.0 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 6c6d1ce

Please sign in to comment.