Skip to content
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

Merged
merged 12 commits into from
Jul 3, 2024
Merged

Feature/azure cert deploy #1132

merged 12 commits into from
Jul 3, 2024

Conversation

isaac-boaz-trimble
Copy link
Contributor

No description provided.

return err
}

resourceGroupName := apimConfigMap["RESOURCE_GROUP_NAME"]
Copy link
Collaborator

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?

Copy link
Collaborator

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"]),
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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)
Copy link
Collaborator

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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.

@joel-rieke
Copy link
Collaborator

Please also add: installation/trcsh/trc_templates/APIMConfig/APIMConfig/config.yml.tmpl

@joel-rieke joel-rieke merged commit 697fa5f into main Jul 3, 2024
2 checks passed
@joel-rieke joel-rieke deleted the feature/azureCertDeploy branch July 3, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants