Skip to content

Commit

Permalink
feat: eng-775-remove-stargate-server-from-stack (#1314)
Browse files Browse the repository at this point in the history
Co-authored-by: David Ragot <david@formance.com>
  • Loading branch information
Dav-14 and David Ragot committed Mar 11, 2024
1 parent 239e6cf commit 4041aaa
Show file tree
Hide file tree
Showing 38 changed files with 23 additions and 2,426 deletions.
23 changes: 0 additions & 23 deletions ee/stargate/.earthly/ingress/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions ee/stargate/.earthly/ingress/Chart.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions ee/stargate/.earthly/ingress/templates/ingress.yml

This file was deleted.

1 change: 0 additions & 1 deletion ee/stargate/.earthly/ingress/values.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions ee/stargate/.earthly/stargate-values.yaml

This file was deleted.

16 changes: 2 additions & 14 deletions ee/stargate/Earthfile
Expand Up @@ -49,18 +49,6 @@ deploy:
END
FROM --pass-args core+vcluster-deployer-image
RUN kubectl patch Versions.formance.com default -p "{\"spec\":{\"stargate\": \"${tag}\"}}" --type=merge
COPY .earthly/stargate-values.yaml stargate-values.yaml
COPY helm helm
ARG --required user
RUN --secret tld helm upgrade --namespace formance-system --create-namespace --install formance-stargate ./helm \
-f stargate-values.yaml \
--set config.auth_issuer_url=https://$user.$tld/api \
--set image.tag=$tag
COPY .earthly/ingress ingress-chart
RUN --secret tld helm upgrade --install stargate-ingress ./ingress-chart \
--namespace formance-system \
--set user=$user \
--set tld=$tld

lint:
FROM core+builder-image
Expand All @@ -74,7 +62,7 @@ lint:

pre-commit:
WAIT
BUILD --pass-args +tidy
BUILD --pass-args +tidy
END
BUILD --pass-args +lint

Expand All @@ -92,4 +80,4 @@ grpc-generate:
LET protoName=stargate.proto
COPY $protoName .
DO core+GRPC_GEN --protoName=$protoName
SAVE ARTIFACT generated AS LOCAL internal/generated
SAVE ARTIFACT generated AS LOCAL internal/generated
6 changes: 3 additions & 3 deletions ee/stargate/cmd/client.go
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/formancehq/stack/components/stargate/internal/client"
"github.com/formancehq/stack/components/stargate/internal/client/controllers"
"github.com/formancehq/stack/components/stargate/internal/client/interceptors"
"github.com/formancehq/stack/ee/stargate/internal/client"
"github.com/formancehq/stack/ee/stargate/internal/client/controllers"
"github.com/formancehq/stack/ee/stargate/internal/client/interceptors"
"github.com/formancehq/stack/libs/go-libs/otlp/otlpmetrics"
"github.com/formancehq/stack/libs/go-libs/otlp/otlptraces"
app "github.com/formancehq/stack/libs/go-libs/service"
Expand Down
24 changes: 0 additions & 24 deletions ee/stargate/cmd/root.go
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/formancehq/stack/libs/go-libs/otlp/otlpmetrics"
"github.com/formancehq/stack/libs/go-libs/otlp/otlptraces"
"github.com/formancehq/stack/libs/go-libs/publish"
"github.com/formancehq/stack/libs/go-libs/service"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand All @@ -32,32 +31,9 @@ func NewRootCommand() *cobra.Command {
version := newVersion()
root.AddCommand(version)

server := newServer()
root.AddCommand(server)

client := newClient()
root.AddCommand(client)

publish.InitCLIFlags(server, func(cd *publish.ConfigDefault) {
// We want to override the default values of flags here in order for the
// Max reconnect flag to be set to -1, which means infinite reconnects.
// NOTE(polo): the value provided in the env vars will still override
// this one, so make sure to check if the value is set or not in the env
// vars
cd.PublisherNatsMaxReconnect = -1
})
server.Flags().String(serviceHttpAddrFlag, "localhost:8080", "Listen address for http API")
server.Flags().String(serviceGrpcAddrFlag, "localhost:3068", "Listen address for grpc API")
server.Flags().String(authIssuerURLFlag, "", "JWKS URL")
server.Flags().Int(maxRetriesJWKSFetchingFlag, 3, "Max retries for fetching JWKS")
server.Flags().Duration(natsRequestTimeout, 10*time.Second, "NATS request timeout (in seconds)")
if err := viper.BindPFlags(server.Flags()); err != nil {
panic(err)
}
if err := viper.BindPFlags(server.PersistentFlags()); err != nil {
panic(err)
}

client.Flags().String(organizationIDFlag, "", "Organization ID")
client.Flags().String(stackIDFlag, "", "Stack ID")
client.Flags().String(bindFlag, "0.0.0.0:8080", "Listen address for http API")
Expand Down
79 changes: 0 additions & 79 deletions ee/stargate/cmd/server.go

This file was deleted.

0 comments on commit 4041aaa

Please sign in to comment.