-
Notifications
You must be signed in to change notification settings - Fork 8
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
Switch from using teams backend to nais api #199
Conversation
NAIS-api uses a grpc client for internal communication. This also upgrades the project to Go 1.22 because nais-api requires Go 1.22.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but some names are ambiguous, see comments.
I don't understand why the 1.22 change is needed, nais api is not a code dependency? Afaic - next time, it should be a separate PR, but for now it's fine.
pkg/hookd/config/config.go
Outdated
@@ -32,8 +32,8 @@ type Config struct { | |||
LogLinkFormatter string `json:"log-link-formatter"` | |||
MetricsPath string `json:"metrics-path"` | |||
ProvisionKey string `json:"provision-key"` | |||
TeamsAPIKey string `json:"teams-api-key"` | |||
TeamsURL string `json:"teams-url"` | |||
NaisAPITarget string `json:"nais-api-target"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to nais-api-address
pkg/hookd/config/config.go
Outdated
TeamsAPIKey string `json:"teams-api-key"` | ||
TeamsURL string `json:"teams-url"` | ||
NaisAPITarget string `json:"nais-api-target"` | ||
NaisAPIInsecure bool `json:"nais-api-insecure"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "insecure" mean?
I don't mind having "insecure" in the name, but I'd prefer if the option reflected what it actually does.
pkg/naisapi/naisapi.go
Outdated
client protoapi.TeamsClient | ||
} | ||
|
||
func New(target string, insecureConnection bool) (*Client, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewClient
maybe?
The package in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't create dependencies to nais/api
only to get the .proto
and client code. Better to copy the proto file into this repo on-demand (with a Makefile stanza perhaps) and generate the client code locally.
NAIS-api uses a grpc client for internal communication.
This also upgrades the project to Go 1.22 because nais-api requires Go 1.22.
Denne krever at nais-api er på plass. Så før merging og utrulling, så må tenants utenom ci-nais og dev-nais skru av hookd reconcile i Fasit.