-
Notifications
You must be signed in to change notification settings - Fork 79
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
Implement grpc env-set and env-unset #213
Conversation
76b2862
to
4757dd2
Compare
pkg/server/app/app.go
Outdated
@@ -218,6 +225,103 @@ func (ops *AppOperations) Get(appName string) (*App, error) { | |||
return a, nil | |||
} | |||
|
|||
func (ops *AppOperations) appInstance(user *storage.User, appName string) (*App, error) { | |||
team, err := ops.kops.NamespaceLabel(appName, TeresaTeamLabel) |
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.
AppOperations has method ops.TeamName
pkg/server/app/app.go
Outdated
return nil, auth.ErrPermissionDenied | ||
} | ||
|
||
an, err := ops.kops.NamespaceAnnotation(appName, TeresaAnnotation) |
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.
for this line until 247, you should change to app, err := ops.Get(appName)
.
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.
Oh boy 👍
For now it has just the name of the protected env vars.
4757dd2
to
c6e8d36
Compare
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
Proper logging (possibly using middleware) and adding context to errors will be done in the next PR's.
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)