Skip to content

Commit

Permalink
Merge pull request #169 from openinfradev/develop
Browse files Browse the repository at this point in the history
1023 develop -> release ( v3.1.0 )
  • Loading branch information
ktkfree authored Oct 23, 2023
2 parents 7cc9b31 + 0063468 commit 4aae93c
Show file tree
Hide file tree
Showing 56 changed files with 4,547 additions and 1,202 deletions.
676 changes: 625 additions & 51 deletions api/swagger/docs.go

Large diffs are not rendered by default.

676 changes: 625 additions & 51 deletions api/swagger/swagger.json

Large diffs are not rendered by default.

464 changes: 417 additions & 47 deletions api/swagger/swagger.yaml

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import (
"net/http"
"strconv"

"github.com/openinfradev/tks-api/internal/aws/ses"

"github.com/spf13/pflag"
"github.com/spf13/viper"

_ "github.com/openinfradev/tks-api/api/swagger"
"github.com/openinfradev/tks-api/internal/database"
"github.com/openinfradev/tks-api/internal/keycloak"
"github.com/openinfradev/tks-api/internal/mail"
"github.com/openinfradev/tks-api/internal/route"
argowf "github.com/openinfradev/tks-api/pkg/argo-client"
"github.com/openinfradev/tks-api/pkg/log"
Expand All @@ -34,6 +33,7 @@ func init() {
flag.String("jwt-secret", "tks-api-secret", "secret value of jwt")
flag.String("git-base-url", "https://github.com", "git base url")
flag.String("git-account", "decapod10", "git account of admin cluster")
flag.String("external-gitea-url", "http://ip-10-0-76-86.ap-northeast-2.compute.internal:30303", "gitea url for byoh agent download")
flag.String("revision", "main", "revision")
flag.String("aws-secret", "awsconfig-secret", "aws secret")
flag.Int("migrate-db", 1, "If the values is true, enable db migration. recommend only development")
Expand All @@ -52,7 +52,14 @@ func init() {
flag.String("keycloak-password", "admin", "password of keycloak")
flag.String("keycloak-client-secret", keycloak.DefaultClientSecret, "realm of keycloak")

// aws ses
flag.String("mail-provider", "aws", "mail provider")
// mail (smtp)
flag.String("smtp-host", "", "smtp hosts")
flag.Int("smtp-port", 0, "smtp port")
flag.String("smtp-username", "", "smtp username")
flag.String("smtp-password", "", "smtp password")
flag.String("smtp-from-email", "", "smtp from email")
// mail (aws ses)
flag.String("aws-region", "ap-northeast-2", "region of aws ses")
flag.String("aws-access-key-id", "", "access key id of aws ses")
flag.String("aws-secret-access-key", "", "access key of aws ses")
Expand Down Expand Up @@ -127,7 +134,7 @@ func main() {
if err != nil {
log.Fatal("failed to initialize keycloak : ", err)
}
err = ses.Initialize()
err = mail.Initialize()
if err != nil {
log.Fatal("failed to initialize ses : ", err)
}
Expand Down
73 changes: 42 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ require (
github.com/Nerzal/gocloak/v13 v13.1.0
github.com/aws/aws-sdk-go-v2 v1.20.1
github.com/aws/aws-sdk-go-v2/config v1.18.32
github.com/aws/aws-sdk-go-v2/credentials v1.13.31
github.com/aws/aws-sdk-go-v2/service/ec2 v1.110.1
github.com/aws/aws-sdk-go-v2/service/eks v1.29.2
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.16.2
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.20.2
github.com/aws/aws-sdk-go-v2/service/servicequotas v1.15.1
github.com/aws/aws-sdk-go-v2/service/ses v1.15.7
github.com/aws/aws-sdk-go-v2/service/sts v1.21.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
Expand All @@ -17,6 +24,7 @@ require (
github.com/gorilla/handlers v1.5.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket v1.4.2
github.com/opentracing/opentracing-go v1.2.0
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
Expand All @@ -25,44 +33,39 @@ require (
github.com/swaggo/http-swagger v1.3.3
github.com/swaggo/swag v1.8.5
github.com/thoas/go-funk v0.9.3
github.com/vmware-tanzu/cluster-api-provider-bringyourownhost v0.4.0
golang.org/x/crypto v0.7.0
golang.org/x/net v0.8.0
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/yaml.v3 v3.0.1
gorm.io/datatypes v1.1.1
gorm.io/driver/postgres v1.4.5
gorm.io/gorm v1.25.0
k8s.io/apimachinery v0.24.4
k8s.io/client-go v0.24.4
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
k8s.io/apimachinery v0.25.4
k8s.io/client-go v0.25.2
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/aws/aws-sdk-go v1.44.317 // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.12 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.31 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.7 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.38 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.38 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ec2 v1.110.1 // indirect
github.com/aws/aws-sdk-go-v2/service/eks v1.29.2 // indirect
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.16.2 // indirect
github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.20.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.33 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.32 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.38.2 // indirect
github.com/aws/aws-sdk-go-v2/service/servicequotas v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.13.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.15.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.21.1 // indirect
github.com/aws/smithy-go v1.14.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/spec v0.20.6 // indirect
Expand All @@ -71,9 +74,11 @@ require (
github.com/go-sql-driver/mysql v1.7.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
Expand All @@ -93,40 +98,46 @@ require (
github.com/lib/pq v1.10.4 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/segmentio/ksuid v1.0.4 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.3.0 // indirect
github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/mysql v1.4.7 // indirect
k8s.io/api v0.24.4 // indirect
k8s.io/klog/v2 v2.60.1 // indirect
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
k8s.io/api v0.25.4 // indirect
k8s.io/apiextensions-apiserver v0.23.5 // indirect
k8s.io/component-base v0.25.2 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
sigs.k8s.io/cluster-api v1.1.3 // indirect
sigs.k8s.io/controller-runtime v0.11.2 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/openinfradev/tks-api => ./
Loading

0 comments on commit 4aae93c

Please sign in to comment.