-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mandatory tag #87
base: develop
Are you sure you want to change the base?
Mandatory tag #87
Conversation
annotations := make(map[string]string) | ||
|
||
// Read labels and annotations from files | ||
labelsPath := utils.DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH + "/labels" |
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.
use constant
if err != nil { | ||
log.Println(util.DEVTRON, "error in reading labels from podinfo, err:", err) | ||
} | ||
annotationsPath := utils.DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH + "/annotations" |
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.
use constant
labelsPath := utils.DEVTRON_SELF_DOWNWARD_API_VOLUME_PATH + "/labels" | ||
labelsOut, err := os.ReadFile(labelsPath) | ||
if err != nil { | ||
log.Println(util.DEVTRON, "error in reading labels from podinfo, err:", err) |
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.
1.not found
2. IO error
} | ||
|
||
// Combine driver options | ||
driverOptions = getBuildXDriverOptions("labels", labels, driverOptions) |
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.
enum/constant
return driverOptions | ||
} | ||
|
||
func parseKeyValuePairs(input string) map[string]string { |
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.
use std utility function/library
return keyValuePairs | ||
} | ||
|
||
func getBuildXDriverOptions(optionType string, options map[string]string, driverOptions string) string { |
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.
use library/utility function
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.
revisit this logic within buildx and explore library
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.
<img width="876" alt="Screenshot 2024-12-31 at 6 05 34 PM" src="https://git
hub.com/user-attachments/assets/d05eb13b-0790-464e-8a5c-ecd29c5e444f" />
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.
buildx has also written parsing logic in same manner
No description provided.