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

Support external cert secret #559

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ericsyh
Copy link

@ericsyh ericsyh commented Dec 11, 2024

Fixes #

Motivation

To support the scenario that users have pre-generated tls certificates. Case like users have existing certificate secrets created by cert-manager or by manual, with this PR we can allow the zk, bk, broker, proxy and toolset to use the pre-generated secrets.

Modifications

In the values, we add several new fields:

  • tls.common.caSecretName: the pre-generated ca certificate, only used when the untrustedCa equals true
  • tls.component.certSecretName: the pre-generated tls certificate for each component.
  • tls.component.untrustedCa: untrustedCa means the selfsigned, and will require the caSecret.

Verifying this change

  • Make sure that the change passes the CI checks.

Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
# settings for generating certs for proxy
proxy:
enabled: false
cert_name: tls-proxy
createCert: true # set to false if you want to use an existing certificate
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

Please add documentation comments for the added untrustedCa configuration keys. I wonder if this is the best possible name for the configuration key. Please consider a better name, for example mountKeyAndCertificate etc. if that's what this is about.

Copy link
Author

Choose a reason for hiding this comment

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

updated the description in 20ed697

# settings for generating certs for broker
broker:
enabled: false
cert_name: tls-broker
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this key Values.broker.untrustedCa being referenced in the templates.

Copy link
Author

Choose a reason for hiding this comment

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

this comment is fixed by 736dbf8 commit

# settings for generating certs for bookies
bookie:
enabled: false
cert_name: tls-bookie
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this key Values.bookie.untrustedCa being referenced in the templates.

Copy link
Author

Choose a reason for hiding this comment

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

this comment is fixed by 736dbf8 commit

# settings for generating certs for zookeeper
zookeeper:
enabled: false
cert_name: tls-zookeeper
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this key Values.zookeeper.untrustedCa being referenced in the templates.

Copy link
Author

Choose a reason for hiding this comment

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

this comment is fixed by 736dbf8 commit

# settings for generating certs for recovery
autorecovery:
cert_name: tls-recovery
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this key Values.autorecovery.untrustedCa being referenced in the templates.

Copy link
Author

Choose a reason for hiding this comment

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

this comment is fixed by 736dbf8 commit

# settings for generating certs for toolset
toolset:
cert_name: tls-toolset
# specify name of secret contain certificate if using pre-generated certificate
certSecretName:
untrustedCa: true
Copy link
Member

Choose a reason for hiding this comment

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

I don't see this key Values.toolset.untrustedCa being referenced in the templates.

Copy link
Author

Choose a reason for hiding this comment

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

this comment is fixed by 736dbf8 commit

Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
Signed-off-by: ericsyh <ericshenyuhao@outlook.com>
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.

2 participants