-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature/azure cert deploy #1132
Conversation
return err | ||
} | ||
|
||
resourceGroupName := apimConfigMap["RESOURCE_GROUP_NAME"] |
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.
Are these checked for existence anywhere?
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.
Also, if these templates aren't in tierceron with defaults, they should be...
_, err = clientFactory.NewCertificateClient().CreateOrUpdate(ctx, resourceGroupName, serviceName, certificateId, armapimanagement.CertificateCreateOrUpdateParameters{ | ||
Properties: &armapimanagement.CertificateCreateOrUpdateProperties{ | ||
Data: to.Ptr(base64.StdEncoding.EncodeToString(certBytes)), | ||
Password: to.Ptr(apimConfigMap["CERTIFICATE_PASSWORD"]), |
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.
Check for existence as well.
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 not in tierceron template somewhere, it should be.
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 cert doesn't have an associated password, would we want to pass nil as a pointer, or do a different function call omitting the password field to the properties?
}, &armapimanagement.CertificateClientCreateOrUpdateOptions{IfMatch: &etag}) | ||
|
||
if err != nil { | ||
driverConfig.CoreConfig.Log.Fatalf("failed to finish the request: %v", 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.
Don't fatal here... we never "Fatal" inside trcsh.
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 just do an error log and return the 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.
If you can identify what the likely cause of the failure is just print that instead... You could possibly log the error message but I'm not a huge fan of that either unless you know the output doesn't contain anything compromising.
Please also add: installation/trcsh/trc_templates/APIMConfig/APIMConfig/config.yml.tmpl |
No description provided.