mysql-operator
mysql-operator copied to clipboard
Allow additional service configuration for MysqlCluster
This pull request adds capability to set ServiceSpec for MysqlCluster.
- [x] I've made sure the Changelog.md will remain up-to-date after this PR is merged.
Or we can create some exporter services instead of making changes to the original services.
WDYT, cc @calind
The MySQLCluster
controller/resource should not be responsible for creating any additional services (as is the case of the k8s StatefulSet controller for example). The extra services should be created by the cluster operator.
The place where extra services are created might be within the mysql-cluster
helm chart.
The
MySQLCluster
controller/resource should not be responsible for creating any additional services (as is the case of the k8s StatefulSet controller for example). The extra services should be created by the cluster operator.The place where extra services are created might be within the
mysql-cluster
helm chart.
Thank you for your reply, but could you elaborate more on this? This pull request does not add any additional services. Instead, it allows changing the type of existing ones.
The
MySQLCluster
controller/resource should not be responsible for creating any additional services (as is the case of the k8s StatefulSet controller for example). The extra services should be created by the cluster operator. The place where extra services are created might be within themysql-cluster
helm chart.Thank you for your reply, but could you elaborate more on this? This pull request does not add any additional services. Instead, it allows changing the type of existing ones.
You can go in the mysql-cluster
helm chart and add two additional services as extensions, and with the extensibility of the chart, a new loadbalancer can be added without change the code
You can go in the
mysql-cluster
helm chart and add two additional services as extensions, and with the extensibility of the chart, a new loadbalancer can be added without change the code
I see that. The only issue with this approach is that I am forced to use the Helm chart for creating a cluster. Services will not be created when a cluster is created using a plain yaml file or kustomize.
You can go in the
mysql-cluster
helm chart and add two additional services as extensions, and with the extensibility of the chart, a new loadbalancer can be added without change the codeI see that. The only issue with this approach is that I am forced to use the Helm chart for creating a cluster. Services will not be created when a cluster is created using a plain yaml file or kustomize.
right
right
That's the point of my PR. ;)
You can go in the
mysql-cluster
helm chart and add two additional services as extensions, and with the extensibility of the chart, a new loadbalancer can be added without change the codeI see that. The only issue with this approach is that I am forced to use the Helm chart for creating a cluster. Services will not be created when a cluster is created using a plain yaml file or kustomize.
It's probably about design, we need to be careful about extending mysqlcluster
in order to keep it easy to use, maybe we can start with helm support? WDYT @ynnt
I do agree that this PR changes API layout a little bit (though, I do not think it changes UX or introduces any significant changes to the overall application design).
Unfortunately, the Helm chart approach simply does not work for my use case (creating mysql clusters programmatically). :(
So, feel free to close the PR if you believe it adds unnecessary complexity, I will just stick to my fork.
WDYT @calind
@cndoit18 @calind Any plans to merge it? We really need this feature