Skip to content

Commit

Permalink
Merge pull request #9 from slr71/main
Browse files Browse the repository at this point in the history
DD-17: added `ephemeral-storage` requests and limits.
  • Loading branch information
slr71 authored Mar 12, 2024
2 parents 36ddbd6 + f52ed40 commit d82ecbe
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 232 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build-prerelease.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/build-release.yml

This file was deleted.

50 changes: 4 additions & 46 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,8 @@ on:
- main
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.53

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
#
# Note: by default the `.golangci.yml` file should be at the root of the repository.
# The location of the configuration file can be changed by using `--config=`
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true

# Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
# install-mode: "goinstall"
call-workflow-passing-data:
uses: cyverse-de/github-workflows/.github/workflows/[email protected]
with:
go-version: 1.21
16 changes: 16 additions & 0 deletions .github/workflows/skaffold-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: skaffold-build

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"

jobs:
call-workflow-passing-data:
uses: cyverse-de/github-workflows/.github/workflows/[email protected]
with:
build-prerelease: ${{ contains(github.ref_name, '-rc') }}
secrets:
harbor-username: ${{ secrets.HARBOR_USERNAME }}
harbor-password: ${{ secrets.HARBOR_PASSWORD }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17
FROM golang:1.21

WORKDIR /build

Expand Down
8 changes: 4 additions & 4 deletions bags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"net/http"
"strings"

Expand Down Expand Up @@ -216,7 +216,7 @@ func (b *BagsApp) AddBag(writer http.ResponseWriter, request *http.Request) {
http.Error(writer, err.Error(), status)
}

if body, err = ioutil.ReadAll(request.Body); err != nil {
if body, err = io.ReadAll(request.Body); err != nil {
errored(writer, fmt.Sprintf("error reading body: %s", err))
return
}
Expand Down Expand Up @@ -274,7 +274,7 @@ func (b *BagsApp) UpdateBag(writer http.ResponseWriter, request *http.Request) {
return
}

if body, err = ioutil.ReadAll(request.Body); err != nil {
if body, err = io.ReadAll(request.Body); err != nil {
errored(writer, fmt.Sprintf("error reading body: %s", err))
return
}
Expand Down Expand Up @@ -307,7 +307,7 @@ func (b *BagsApp) UpdateDefaultBag(writer http.ResponseWriter, request *http.Req
http.Error(writer, err.Error(), status)
}

if body, err = ioutil.ReadAll(request.Body); err != nil {
if body, err = io.ReadAll(request.Body); err != nil {
errored(writer, fmt.Sprintf("error reading body: %s", err))
return
}
Expand Down
33 changes: 25 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
module github.com/cyverse-de/user-info

go 1.13
go 1.21

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/DATA-DOG/go-sqlmock v1.3.0
github.com/cyverse-de/configurate v0.0.0-20171005230251-9b512d37328e
github.com/cyverse-de/dbutil v1.0.1
github.com/cyverse-de/go-mod/otelutils v0.0.2
github.com/cyverse-de/queries v1.0.1
github.com/gorilla/mux v1.8.0
github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb // indirect
github.com/lib/pq v1.10.4
github.com/sirupsen/logrus v1.0.5-0.20180129181852-768a92a02685
github.com/spf13/viper v1.0.0
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.30.0
)

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v0.0.0-20171017181929-23c074d0eceb // indirect
github.com/magiconair/properties v1.7.6 // indirect
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/pelletier/go-toml v1.1.0 // indirect
github.com/sirupsen/logrus v1.0.5-0.20180129181852-768a92a02685
github.com/pkg/errors v0.9.1 // indirect
github.com/spf13/afero v1.0.2 // indirect
github.com/spf13/cast v1.2.0 // indirect
github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect
github.com/spf13/pflag v1.0.0 // indirect
github.com/spf13/viper v1.0.0
github.com/uptrace/opentelemetry-go-extra/otelsql v0.1.11 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.30.0
go.opentelemetry.io/otel v1.6.1 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.6.1 // indirect
go.opentelemetry.io/otel/metric v0.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.6.1 // indirect
go.opentelemetry.io/otel/trace v1.6.1 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit d82ecbe

Please sign in to comment.