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

US-568873-Changes for certs manager to support custom keystore name #205

Merged
merged 14 commits into from
Jan 10, 2024

Conversation

Saurabh-16
Copy link
Contributor

@Saurabh-16 Saurabh-16 commented Dec 26, 2023

As part of testing , I have tested the changes with CMC deployments. I have ensured we are able to mount custom keystore name and custom keystore password.
As part of impact testing, I've tested Cloudk Deployments with 3.14, 3.15 and 3.16 CloudK versions and verified there are no regressions because of this.

@Saurabh-16 Saurabh-16 requested review from dcasavant and a team as code owners December 26, 2023 08:56
@Saurabh-16 Saurabh-16 changed the title Feature/us 572876 - changes for certs manager to support custom keystore name <Do Not Merge> Feature/us 572876 - changes for certs manager to support custom keystore name Dec 27, 2023
echo "TLS certificate for tomcat exists"
cat ${tomcat_keystore_file} | xargs printf '%b\n' | base64 --decode > "${tomcat_cert_root}/tlskeystore.jks"
export TOMCAT_KEYSTORE_DIR="${tomcat_cert_root}/tlskeystore.jks"
else
export TOMCAT_KEYSTORE_CONTENT=$tomcat_keystore_file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this export statement here in else block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah , we need this in else block as well. The reason is at the helm side , we have server.xml.tmpl where we are using this env variable always.
So whether this file exists or not , this variable should always be set to properly templatize the server.xml.
Also I want to keep this export in this block only , so put this condition in both if and else block.
https://github.com/pegasystems/pega-helm-charts/pull/688/files#diff-97c08b9274a6eb80565f293dbd88c227f1dbc0c53eae7c06401ce22baa8aaaa2R85

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition {{ if or (exists .Env.TOMCAT_KEYSTORE_CONTENT) (exists "/opt/pega/tomcatcertsmount/TOMCAT_CERTIFICATE_FILE") }} Would it not return false if env is not set? I could not understand the reason to export the env always.

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 environment variable is not set , then there are issues while detemplatizing server.xml in the containers.
I felt it is probably safe here to export this variable to avoid these XML parsing issue.

@Saurabh-16 Saurabh-16 changed the title Feature/us 572876 - changes for certs manager to support custom keystore name Changes for certs manager to support custom keystore name Jan 10, 2024
@Saurabh-16 Saurabh-16 changed the title Changes for certs manager to support custom keystore name US-568873-Changes for certs manager to support custom keystore name Jan 10, 2024
@Saurabh-16 Saurabh-16 merged commit 1964fe6 into pegasystems:master Jan 10, 2024
6 checks passed
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.

5 participants