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

use buf to generate networking code #829

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft

use buf to generate networking code #829

wants to merge 20 commits into from

Conversation

tommartensen
Copy link
Contributor

@tommartensen tommartensen commented Apr 5, 2023

Important info

  • Due to the changes to the gRPC URIs this is a breaking change and previous infractl versions will not work.

Replacing proto tools with buf:

  • add install script
  • rename target to buf-generated-srcs
  • buf requires proto files to have a proper proto package defined, so api.v1 instead of just v1.
  • buf generated files are located under generated/proto/api/v1/ according to best pratices. This PR looks much bigger because of this - previously generated files were under generated/api/v1.
  • buf doesn't require third_party proto definitions to be part of the repository, so they are removed
  • updated github.com/grpc-ecosystem/grpc-gateway to v2
  • updated ui generated scripts and fixed function names - tested manually.

Misc:

  • update gitignore

@tommartensen tommartensen self-assigned this Apr 5, 2023
@ghost
Copy link

ghost commented Apr 5, 2023

A single node development cluster (infra-pr-829) was allocated in production infra for this PR.

CI will attempt to deploy us.gcr.io/stackrox-infra/infra-server:0.7.1-20-gd39c344df3 to it.

🔌 You can connect to this cluster with:

gcloud container clusters get-credentials infra-pr-829 --zone us-central1-a --project srox-temp-dev-test

🛠️ And pull infractl from the deployed dev infra-server with:

nohup kubectl -n infra port-forward svc/infra-server-service 8443:8443 &
make pull-infractl-from-dev-server

🚲 You can then use the dev infra instance e.g.:

bin/infractl -k -e localhost:8443 whoami

⚠️ Any clusters that you start using your dev infra instance should have a lifespan shorter then the development cluster instance. Otherwise they will not be destroyed when the dev infra instance ceases to exist when the development cluster is deleted. ⚠️

Further Development

☕ If you make changes, you can commit and push and CI will take care of updating the development cluster.

🚀 If you only modify configuration (chart/infra-server/configuration) or templates (chart/infra-server/{static,templates}), you can get a faster update with:

make install-local

Logs

Logs for the development infra depending on your @stackrox.com authuser:

Or:

kubectl -n infra logs -l app=infra-server --tail=1 -f

@tommartensen tommartensen changed the title use buf & fix stuff use buf to generate networking code Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant