Add secondary hostname capabilities#129
Conversation
|
Customer who was testing mentioned that the following value didn't work properly tlsSecondary.certificateSecret Customer wanted to use only the above secret instead of using I added the logic for this to the helm chart tests
I think I tested the scenario's that should be working. Please verify carefully as the changes for this PR are getting bigger and bigger. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds secondary hostname capabilities for Terraform Enterprise by extending the Helm chart to include secondary TLS and service configurations.
- Introduces a new tlsSecondary block in values.yaml to support secondary certificate management.
- Adds a new serviceSecondary configuration along with corresponding template changes in service.yaml, secret.yaml, deployment.yaml, and config-map.yaml.
- Updates env-config.yaml and Chart.yaml to reflect secondary hostname settings and version bumps.
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| values.yaml | Adds new tlsSecondary and serviceSecondary configurations. |
| templates/service.yaml | Introduces conditional creation of a secondary service. |
| templates/secret.yaml | Adds secret creation for secondary certificates based on provided data. |
| templates/deployment.yaml | Mounts secondary certificate volumes if secondary TLS is enabled. |
| templates/config-map.yaml | Adds secondary TLS file paths as environment variables. |
| env-config.yaml | Provides commented out secondary hostname environment variables. |
| Chart.yaml | Bumps chart and app version to reflect the new secondary feature. |
Comments suppressed due to low confidence (2)
values.yaml:70
- Clarify in the comments that the certificateSecret field is optional because a default value is used when not specified, to help users understand its role.
# certificateSecret: terraform-enterprise-certificates-secondary
values.yaml:224
- [nitpick] Review the indentation of comments under serviceSecondary to ensure consistency and improve readability of the YAML file.
# Add annotations here for specific cloud provider configurations.
Based on the requirement with internal reference TF-24247
I made sure of the following changes
The helm chart was not able to use the ability of the secondary hostname features because it was missing the option to add the secondary certificates as needed
To accomplish that I added the following option to the values
If the
tlsSecondary.certDataandtlsSecondary.keyDatais not specified then it will not create the secret or any reference in the pod itselfAlso added the serviceSecondary to make sure you can specify alternative service configured for the second hostname. If the
.Values.env.variables.TFE_HOSTNAME_SECONDARYis not specified it will not be createdI tested in the following way.
no secondary hostname references
This should still work with the adjustments done to the PR. The environment gets created without issues.
Secondary hostname references
It should add the secondary hostname resources. The environment gets created without issues.
I add the following values
I use the
helm upgradecommandAs a result
You now have 2 loadbalancers and you can connect to the secondary hostname with VCS