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

Set flyteadmin grpc port correctly in config / Flyte-core flyteadmin / datacatalog expose ports #5013

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

ddl-ebrown
Copy link
Contributor

@ddl-ebrown ddl-ebrown commented Mar 6, 2024

Tracking issue

https://github.com/flyteorg/flyte/issues/

Why are the changes needed?

  • Flyteadmin setting for the grpc port is nested and grpcPort should
    not be used. Address incorrect config / documentation

  • Both flyteadmin and datacatalog have configurable ports to use for
    HTTP and GRPC, but the k8s spec for the containers doesn't expose
    matching ports.

    Fix that!

What changes were proposed in this pull request?

Correctly use the values from values.yaml inside the k8s specs for listening container ports

How was this patch tested?

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Mar 6, 2024
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.99%. Comparing base (b6f35ad) to head (53b70b7).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5013   +/-   ##
=======================================
  Coverage   58.99%   58.99%           
=======================================
  Files         645      645           
  Lines       55648    55648           
=======================================
  Hits        32831    32831           
  Misses      20222    20222           
  Partials     2595     2595           
Flag Coverage Δ
unittests 58.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ddl-ebrown ddl-ebrown force-pushed the set-containerports branch from af3821d to 03c79e0 Compare March 6, 2024 15:45
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 6, 2024
@ddl-ebrown ddl-ebrown marked this pull request as draft March 6, 2024 23:02
@ddl-ebrown
Copy link
Contributor Author

Moved back to draf for the moment - given what the config definition actually looks like.

type ServerConfig struct {
HTTPPort int `json:"httpPort" pflag:",On which http port to serve admin"`
GrpcPort int `json:"grpcPort" pflag:",deprecated"`
GrpcServerReflection bool `json:"grpcServerReflection" pflag:",deprecated"`
KubeConfig string `json:"kube-config" pflag:",Path to kubernetes client config file, default is empty, useful for incluster config."`
Master string `json:"master" pflag:",The address of the Kubernetes API server."`
Security ServerSecurityOptions `json:"security"`
GrpcConfig GrpcConfig `json:"grpc"`
// Deprecated: please use auth.AppAuth.ThirdPartyConfig instead.
DeprecatedThirdPartyConfig authConfig.ThirdPartyConfigOptions `json:"thirdPartyConfig" pflag:",Deprecated please use auth.appAuth.thirdPartyConfig instead."`
DataProxy DataProxyConfig `json:"dataProxy" pflag:",Defines data proxy configuration."`
ReadHeaderTimeoutSeconds int `json:"readHeaderTimeoutSeconds" pflag:",The amount of time allowed to read request headers."`
KubeClientConfig KubeClientConfig `json:"kubeClientConfig" pflag:",Configuration to control the Kubernetes client"`
}
type DataProxyConfig struct {
Upload DataProxyUploadConfig `json:"upload" pflag:",Defines data proxy upload configuration."`
Download DataProxyDownloadConfig `json:"download" pflag:",Defines data proxy download configuration."`
}
type DataProxyDownloadConfig struct {
MaxExpiresIn config.Duration `json:"maxExpiresIn" pflag:",Maximum allowed expiration duration."`
}
type DataProxyUploadConfig struct {
MaxSize resource.Quantity `json:"maxSize" pflag:",Maximum allowed upload size."`
MaxExpiresIn config.Duration `json:"maxExpiresIn" pflag:",Maximum allowed expiration duration."`
DefaultFileNameLength int `json:"defaultFileNameLength" pflag:",Default length for the generated file name if not provided in the request."`
StoragePrefix string `json:"storagePrefix" pflag:",Storage prefix to use for all upload requests."`
}
type GrpcConfig struct {
Port int `json:"port" pflag:",On which grpc port to serve admin"`
ServerReflection bool `json:"serverReflection" pflag:",Enable GRPC Server Reflection"`
MaxMessageSizeBytes int `json:"maxMessageSizeBytes" pflag:",The max size in bytes for incoming gRPC messages"`
EnableGrpcLatencyMetrics bool `json:"enableGrpcLatencyMetrics" pflag:",Enable grpc latency metrics. Note Histograms metrics can be expensive on Prometheus servers."`
}

I think it should be more like .grpc.port instead of .grpcPort - verifying in my environment.

@ddl-ebrown
Copy link
Contributor Author

Confirmed that the setting should be .grpc.port and not .grpcPort. I fixed all the locations where the old value was being set and regenerated all the Helm stuff, etc.

There were 4 files that I had to edit by hand that look like they should be generated, but I couldn't figure out the process for generating them:

  • deployment/eks/flyte_generated.yaml
  • deployment/gcp/flyte_generated.yaml
  • deployment/sandbox/flyte_generated.yaml
  • deployment/test/flyte_generated.yaml

@ddl-ebrown ddl-ebrown marked this pull request as ready for review March 7, 2024 01:35
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 7, 2024
@@ -626,7 +626,8 @@ configmap:
# Refer to the [server config](https://pkg.go.dev/github.com/lyft/[email protected]/pkg/config#ServerConfig).
server:
httpPort: 8088
grpcPort: 8089
grpc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -8135,7 +8135,8 @@ data:
server.yaml: |
server:
httpPort: 8088
grpcPort: 8089
grpc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this file is regenerated, so edited by hand

@@ -8132,7 +8132,8 @@ data:
server.yaml: |
server:
httpPort: 8088
grpcPort: 8089
grpc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this file is regenerated, so edited by hand

@@ -2145,7 +2145,8 @@ data:
server.yaml: |
server:
httpPort: 8088
grpcPort: 8089
grpc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this file is regenerated, so edited by hand

@@ -293,7 +293,8 @@ data:
server.yaml: |
server:
httpPort: 8088
grpcPort: 8089
grpc:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this file is regenerated, so edited by hand

@ddl-ebrown ddl-ebrown changed the title Flyte-core flyteadmin / datacatalog expose ports Set flyteadmin grpc port correctly in config / Flyte-core flyteadmin / datacatalog expose ports Mar 7, 2024
@davidmirror-ops
Copy link
Contributor

@ddl-ebrown I think running make helm from the base of your fork should re generate those files. The you can commit the changes and the kustomize test should pass

@ddl-ebrown
Copy link
Contributor Author

ddl-ebrown commented Mar 15, 2024

@ddl-ebrown I think running make helm from the base of your fork should re generate those files. The you can commit the changes and the kustomize test should pass

I always run make helm when submitting charts PRs -- which is where many of these updates came from. make helm does not produce these files though:

  • deployment/eks/flyte_generated.yaml
  • deployment/gcp/flyte_generated.yaml
  • deployment/sandbox/flyte_generated.yaml
  • deployment/test/flyte_generated.yaml

UPDATE: After rebasing and regenerating, I see that those first 3 files are no longer part of the repo. So the only unexplained file is deployment/test/flyte_generated.yaml

@ddl-ebrown
Copy link
Contributor Author

Looks like there's a new process for bumping the chart version number?

@davidmirror-ops
Copy link
Contributor

@ddl-ebrown with the merge of #5072 you should rebase and merge master to pass the lint test.
Thank you

 - Flyteadmin setting for the grpc port is nested and grpcPort should
   not be used. Address incorrect config / documentation

 - Both flyteadmin and datacatalog have configurable ports to use for
   HTTP and GRPC, but the k8s spec for the containers doesn't expose
   matching ports.

   Fix that!

Signed-off-by: ddl-ebrown <[email protected]>
@ddl-ebrown
Copy link
Contributor Author

@davidmirror-ops rebased and repushed - hopefully we're good to get this one merged.

Copy link
Contributor

@davidmirror-ops davidmirror-ops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@davidmirror-ops davidmirror-ops merged commit 361e1ef into flyteorg:master Mar 27, 2024
53 checks passed
@ddl-ebrown ddl-ebrown deleted the set-containerports branch March 28, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants