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

[tlse] TLS database connection #349

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Feb 21, 2024

The my.cnf file gets added to the secret holding the service configs. The content of my.cnf is centrally managed in the mariadb-operator and retrieved calling db.GetDatabaseClientConfig(tlsCfg)

Depends-On: openstack-k8s-operators/mariadb-operator#190
Depends-On: openstack-k8s-operators/mariadb-operator#191

Jira: OSPRH-4547

@stuggi
Copy link
Contributor Author

stuggi commented Feb 22, 2024

/hold

@stuggi
Copy link
Contributor Author

stuggi commented Feb 22, 2024

/test cinder-operator-build-deploy-tempest

customData := map[string]string{cinder.CustomConfigFileName: instance.Spec.CustomServiceConfig}
customData := map[string]string{
cinder.CustomConfigFileName: instance.Spec.CustomServiceConfig,
"my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I understand the code, with hints from reading the corresponding PR in glance-operator, but I don't understand the "for now just get the default my.cnf" comment. For now? Is this a TODO that needs to be revisited?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right now we request the default my.cnf by either tlsCfg being nil, or &tls.Service{}. GetDatabaseClientConfig() also supports to add client cert config, but there is additional work needed to support client certs. thats what I meant with the default config.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ack, makes sense now!

customData := map[string]string{cinder.CustomConfigFileName: instance.Spec.CustomServiceConfig}
customData := map[string]string{
cinder.CustomConfigFileName: instance.Spec.CustomServiceConfig,
"my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, I prefer to avoid hard-coding the same string in multiple locations. Consider defining (and using) this in pkg/cinder/const.go along with the other XxxFileName constants:

MyCnfFileName = "my.cnf"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I can do that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

The my.cnf file gets added to the secret holding the service configs.
The content of my.cnf is centrally managed in the mariadb-operator
and retrieved calling db.GetDatabaseClientConfig(tlsCfg)

Depends-On: openstack-k8s-operators/mariadb-operator#190
Depends-On: openstack-k8s-operators/mariadb-operator#191

Jira: OSPRH-4547
Copy link
Contributor

openshift-ci bot commented Feb 28, 2024

@stuggi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/cinder-operator-build-deploy-tempest 6010e3b link false /test cinder-operator-build-deploy-tempest

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@stuggi
Copy link
Contributor Author

stuggi commented Feb 28, 2024

openshift/release#49290

Copy link
Contributor

@ASBishop ASBishop left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Feb 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ASBishop, stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit c46d63a into openstack-k8s-operators:main Feb 28, 2024
6 of 7 checks passed
ASBishop pushed a commit to ASBishop/cinder-operator that referenced this pull request Mar 11, 2024
…rators/fix_up

Donot trigger dependent jobs on irrelevant files changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants