-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: Add support for creating a configmap semaphore config using CLI. Fixes #14671 #14724
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
base: main
Are you sure you want to change the base?
Conversation
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
…Fixes argoproj#14671 Signed-off-by: Darko Janjic <[email protected]>
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.
small questions but otherwise looks good
} | ||
|
||
func (s *syncServer) DeleteSyncLimit(ctx context.Context, req *syncpkg.DeleteSyncLimitRequest) (*syncpkg.DeleteSyncLimitResponse, error) { | ||
fmt.Printf("Deleting sync limit for ConfigMap %s in namespace %s with key %s\n", req.Name, req.Namespace, req.Key) |
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.
You can remove this print or replace it proper logging
Use: "get", | ||
Short: "Get a configmap sync limit", | ||
Args: cobra.ExactArgs(1), | ||
Example: `argo sync get configmap my-cm --key my-key`, |
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.
Example: `argo sync get configmap my-cm --key my-key`, | |
Example: `argo sync configmap get my-cm --key my-key`, |
the command and the method are switched
Key: req.Key, | ||
SizeLimit: req.SizeLimit, | ||
}, false) | ||
} |
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.
A Create doing an Update violates some API principles, is this common in the current codebase?
return nil, sutils.ToStatusError(err, codes.Internal) | ||
} | ||
|
||
delete(cm.Data, req.Key) |
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.
if the deleted key is the only key in the Configmap, should the CM also be deleted? otherwise the CM will be created with no data
### Examples | ||
|
||
``` | ||
argo sync get configmap my-cm --key my-key |
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.
argo sync get configmap my-cm --key my-key | |
argo sync configmap get my-cm --key my-key |
Fixes #14671
Motivation
This adds support for creating configmap sync configuration using CLI.
Modifications
Verification
Documentation