Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump deps2 #1569

Merged
merged 5 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions api/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
v1 "github.com/flanksource/canary-checker/api/v1"
"github.com/flanksource/canary-checker/pkg"
"github.com/flanksource/commons/logger"
ctemplate "github.com/flanksource/commons/template"
"github.com/flanksource/duty/connection"
dutyCtx "github.com/flanksource/duty/context"
"github.com/flanksource/duty/models"
Expand Down Expand Up @@ -50,7 +49,9 @@ type Context struct {

func (ctx *Context) Duty() dutyCtx.Context {
if ctx.duty != nil {
return *ctx.duty
return (*ctx.duty).
WithNamespace(ctx.Namespace).
WithObject(ctx.Canary.ObjectMeta)
}
duty := dutyCtx.NewContext(gocontext.Background()).
WithDB(ctx.db, ctx.pool).
Expand Down Expand Up @@ -155,12 +156,12 @@ func (ctx *Context) GetConnection(conn v1.Connection) (*models.Connection, error
"password": _conn.Password,
"domain": getDomain(_conn.Username),
}
templater := ctemplate.StructTemplater{
templater := gomplate.StructTemplater{
Values: data,
// access go values in template requires prefix everything with .
// to support $(username) instead of $(.username) we add a function for each var
ValueFunctions: true,
DelimSets: []ctemplate.Delims{
DelimSets: []gomplate.Delims{
{Left: "{{", Right: "}}"},
{Left: "$(", Right: ")"},
},
Expand Down
12 changes: 5 additions & 7 deletions fixtures/git/_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ if ! which mergestat > /dev/null; then
fi
fi


kubectl create namespace canaries || true

# creating a GITHUB_TOKEN Secret
if [[ -z "${GH_TOKEN}" ]]; then
printf "\nEnvironment variable for github token (GH_TOKEN) is missing!!!\n"
exit 1;
else
printf "\nCreating secret from github token ending with '${GH_TOKEN:(-8)}'\n"
kubectl create secret generic github-token --from-literal=GITHUB_TOKEN="${GH_TOKEN}" --namespace canaries
fi

kubectl create namespace canaries || true

kubectl create secret generic github-token --from-literal=GITHUB_TOKEN="${GH_TOKEN}" --namespace canaries
kubectl get secret github-token -o yaml --namespace canaries

helm repo add gitea-charts https://dl.gitea.io/charts
helm repo update
helm install gitea gitea-charts/gitea -f gitea.values --create-namespace --namespace gitea --wait
helm install gitea gitea-charts/gitea -f fixtures/git/gitea.values --create-namespace --namespace gitea --wait

kubectl port-forward svc/gitea-http -n gitea 3001:3000 &
PID=$!
Expand Down
12 changes: 6 additions & 6 deletions fixtures/k8s/kubernetes_bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ spec:
dyn(results).map(r, {
'name': r.Object.metadata.name,
'labels': r.Object.metadata.labels,
'pass': k8s.is_healthy(r.Object),
'message': k8s.health(r.Object).message,
'error': k8s.health(r.Object).message,
'pass': k8s.isHealthy(r.Object),
'message': k8s.getHealth(r.Object).message,
'error': k8s.getHealth(r.Object).message,
}).toJSON()
- kind: Pod
ready: true
Expand All @@ -25,7 +25,7 @@ spec:
dyn(results).map(r, {
'name': r.Object.metadata.name,
'labels': r.Object.metadata.labels,
'pass': k8s.is_healthy(r.Object),
'message': k8s.health(r.Object).message,
'error': k8s.health(r.Object).message,
'pass': k8s.isHealthy(r.Object),
'message': k8s.getHealth(r.Object).message,
'error': k8s.getHealth(r.Object).message,
}).toJSON()
120 changes: 59 additions & 61 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ module github.com/flanksource/canary-checker
go 1.20

require (
cloud.google.com/go/storage v1.35.1
cloud.google.com/go/storage v1.36.0
github.com/allegro/bigcache v1.2.1
github.com/asecurityteam/rolling v2.0.4+incompatible
github.com/aws/aws-sdk-go-v2 v1.24.0
github.com/aws/aws-sdk-go-v2/config v1.26.2
github.com/aws/aws-sdk-go-v2/credentials v1.16.13
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.30.0
github.com/aws/aws-sdk-go-v2/service/configservice v1.41.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.130.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.44.0
github.com/aws/aws-sdk-go-v2/service/ssm v1.42.0
github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b
github.com/aws/aws-sdk-go-v2 v1.24.1
github.com/aws/aws-sdk-go-v2/config v1.26.3
github.com/aws/aws-sdk-go-v2/credentials v1.16.14
github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.32.2
github.com/aws/aws-sdk-go-v2/service/configservice v1.44.0
github.com/aws/aws-sdk-go-v2/service/ec2 v1.142.1
github.com/aws/aws-sdk-go-v2/service/s3 v1.48.0
github.com/aws/aws-sdk-go-v2/service/ssm v1.44.7
github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500
github.com/dynatrace-ace/dynatrace-go-api-client/api/v2/environment/dynatrace v0.0.0-20210816162345-de2eacc8ac9a
github.com/eko/gocache/lib/v4 v4.1.5
github.com/eko/gocache/store/bigcache/v4 v4.2.1
github.com/elastic/go-elasticsearch/v8 v8.10.1
github.com/elastic/go-elasticsearch/v8 v8.11.1
github.com/fergusstrange/embedded-postgres v1.25.0
github.com/flanksource/artifacts v1.0.3
github.com/flanksource/commons v1.19.3
github.com/flanksource/duty v1.0.277
github.com/flanksource/gomplate/v3 v3.20.26
github.com/flanksource/artifacts v1.0.4
github.com/flanksource/commons v1.20.0
github.com/flanksource/duty v1.0.280
github.com/flanksource/gomplate/v3 v3.20.29
github.com/flanksource/is-healthy v0.0.0-20231003215854-76c51e3a3ff7
github.com/flanksource/kommons v0.31.4
github.com/flanksource/postq v1.0.0
github.com/friendsofgo/errors v0.9.2
github.com/go-ldap/ldap/v3 v3.4.6
github.com/go-logr/logr v1.3.0
github.com/go-logr/logr v1.4.1
github.com/go-logr/zapr v1.3.0
github.com/go-redis/redis/v8 v8.11.5
github.com/go-sql-driver/mysql v1.7.1
Expand All @@ -39,7 +39,7 @@ require (
github.com/henvic/httpretty v0.1.3
github.com/jackc/pgx/v5 v5.5.1
github.com/joshdk/go-junit v1.0.0
github.com/jszwec/csvutil v1.8.0
github.com/jszwec/csvutil v1.9.0
github.com/labstack/echo/v4 v4.11.4
github.com/liamylian/jsontime/v2 v2.0.0
github.com/lib/pq v1.10.9
Expand All @@ -54,25 +54,25 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus-community/pro-bing v0.3.0
github.com/prometheus/alertmanager v0.26.0
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/common v0.45.0
github.com/robertkrimen/otto v0.2.1
github.com/robertkrimen/otto v0.3.0
github.com/robfig/cron/v3 v3.0.1
github.com/samber/lo v1.39.0
github.com/sevennt/echo-pprof v0.1.1-0.20220616082843-66a461746b5f
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/timberio/go-datemath v0.1.0
go.mongodb.org/mongo-driver v1.12.1
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
go.opentelemetry.io/otel/trace v1.19.0
go.mongodb.org/mongo-driver v1.13.1
go.opentelemetry.io/otel v1.21.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
go.opentelemetry.io/otel/trace v1.21.0
golang.org/x/net v0.19.0
golang.org/x/sync v0.5.0
google.golang.org/genproto v0.0.0-20231127180814-3a041ad873d4
google.golang.org/grpc v1.59.0
golang.org/x/sync v0.6.0
google.golang.org/genproto v0.0.0-20240102182953-50ed04b92917
google.golang.org/grpc v1.60.1
gopkg.in/flanksource/yaml.v3 v3.2.3
gorm.io/gorm v1.25.5
gorm.io/plugin/prometheus v0.0.0-20231026031148-436184e80556
Expand All @@ -98,53 +98,51 @@ require (
github.com/TomOnTime/utfutil v0.0.0-20230223141146-125e65197b36 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/antonmedv/expr v1.15.5 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aws/aws-sdk-go v1.48.15 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect
github.com/aws/aws-sdk-go v1.49.16 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.18.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 // indirect
github.com/aws/smithy-go v1.19.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/elastic-transport-go/v8 v8.3.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.1 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/exaring/otelpgx v0.5.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/geoffgarside/ber v1.1.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.21.4 // indirect
github.com/go-openapi/errors v0.20.4 // indirect
github.com/go-openapi/inflect v0.19.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/loads v0.21.2 // indirect
github.com/go-openapi/runtime v0.26.0 // indirect
github.com/go-openapi/spec v0.20.9 // indirect
github.com/go-openapi/strfmt v0.21.7 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/go-openapi/swag v0.22.7 // indirect
github.com/go-openapi/validate v0.22.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -155,7 +153,6 @@ require (
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomarkdown/markdown v0.0.0-20230922112808-5421fefb8386 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.18.2 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
Expand Down Expand Up @@ -217,14 +214,11 @@ require (
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rodaine/table v1.1.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/sethvargo/go-retry v0.2.4 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/tidwall/gjson v1.17.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/ulikunitz/xz v0.5.11 // indirect
github.com/vadimi/go-http-ntlm v1.0.3 // indirect
Expand All @@ -244,26 +238,28 @@ require (
github.com/yuin/gopher-lua v1.1.1 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.153.0 // indirect
google.golang.org/api v0.155.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
Expand All @@ -285,4 +281,6 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

// replace "github.com/flanksource/duty" => ../duty
// replace github.com/flanksource/duty => ../duty

// replace github.com/flanksource/artifacts => ../artifacts
Loading
Loading