You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It only allows self signed cert generation if ingress is enabled, and tls is disabled. Alternatively, you have to pass the values of the certificate in as non-base64 literals, which causes an issue with the selenium.jks binary.
Possible Bug: The PR introduces the ability to use an external TLS secret, but there is no validation to ensure that the external secret exists or is correctly formatted before it is used. This could lead to runtime errors if the secret is missing or misconfigured.
Documentation Clarity: The documentation update in the README.md could be more explicit about the steps required to use an external TLS secret, including necessary commands and expected file formats.
-In the chart, there is directory [certs](./certs) contains the default certificate, private key (as PKCS8 format), and Java Keystore (JKS) to teach Java about secure connection (since we are using a non-standard CA) for your trial, local testing purpose.+In the chart, there is directory [certs](./certs) contains the default certificate, private key (as PKCS8 format), and Java Keystore (JKS) to teach Java about secure connection (since we are using a non-standard CA) for your trial, local testing purpose. **Note: Using self-signed certificates in production environments can expose you to security risks.**
Apply this suggestion
Suggestion importance[1-10]: 9
Why: Adding a security warning is crucial for informing users about the risks of using self-signed certificates in production environments, thus improving the overall security awareness.
9
Maintainability
Ensure secrets are only created when TLS is enabled and not managed externally
Add a condition to check for the existence of the externalSecretName before creating the secret to avoid conflicts and ensure that secrets are not unnecessarily created when managed externally.
-{{- if not .Values.tls.externalSecretName }}+{{- if and (not .Values.tls.externalSecretName) (.Values.tls.enabled) }}
apiVersion: v1
kind: Secret
metadata:
Apply this suggestion
Suggestion importance[1-10]: 8
Why: This suggestion enhances maintainability by adding a condition to check if TLS is enabled and not managed externally before creating the secret, preventing potential conflicts and unnecessary secret creation.
8
Refactor the template to centralize and simplify the truncation and trimming logic
Refactor the template to avoid redundancy by defining a helper template for the common truncation and suffix trimming logic.
Why: The refactoring suggestion improves maintainability by reducing redundancy and centralizing common logic, making the template easier to manage and understand. However, it is not a critical change.
7
Best practice
Improve the clarity of variable names related to TLS configuration
Consider using a more descriptive variable name for the Helm template that generates the TLS secret name. The current name externalSecretName is generic and might not clearly convey its purpose related to TLS configuration.
Why: The suggestion improves the clarity of the variable name, making it more descriptive and specific to TLS configuration. However, it is a minor improvement and not crucial for functionality.
Thanks for your feedback and initial contribution. I believe PR #2306 is able to do needful for the requirement. If have time you can walk through the details.
I am closing this PR.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Description
The tls-cert-secret.yaml has limited functionality.
It only allows self signed cert generation if ingress is enabled, and tls is disabled. Alternatively, you have to pass the values of the certificate in as non-base64 literals, which causes an issue with the
selenium.jks
binary.Motivation and Context
solves #2293
Types of changes
Checklist
PR Type
Enhancement, Documentation
Description
_nameHelpers.tpl
to conditionally use the external TLS secret name if provided.tls-cert-secret.yaml
to skip secret creation when an external TLS secret name is specified.values.yaml
to include theexternalSecretName
field in the TLS configuration.Changes walkthrough 📝
_nameHelpers.tpl
Add support for external TLS secret reference
charts/selenium-grid/templates/_nameHelpers.tpl
provided.
tls-cert-secret.yaml
Conditional secret creation based on external TLS secret
charts/selenium-grid/templates/tls-cert-secret.yaml
secret name is provided.
values.yaml
Add externalSecretName field to TLS configuration
charts/selenium-grid/values.yaml
externalSecretName
field to TLS configuration.README.md
Update README with external TLS secret reference
charts/selenium-grid/README.md
TLS secret.