wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
746 stars 724 forks source link

Configure optional properties for kubernetes membership scheme that are supported by hazelcast #20189

Open tharakawijekoon opened 6 months ago

tharakawijekoon commented 6 months ago

Describe the issue: It should be possible to configure the other properties that hazelcast supports[1], currently, we only have the option to configure namespace, service-name, and service-port[2]

config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false); config.getNetworkConfig().getJoin().getKubernetesConfig().setEnabled(true) .setProperty("customproperty", "custompropertyvalue")

In previous versions of Identity server with the previous implementation of the kubernetes membership scheme properties such as KUBERNETES_API_SERVER, KUBERNETES_SERVICE_HOST etc were configurable however after the upgrade these properties cannot be configured.

The default implemenation of hazelcast which is being used in newer versions of the identity server seems to have these properties[2] however they are not configurable because only a fixed set of properties are read[2].

Need to provide a way to configure the properties that are supported by hazelcast[1] and update the documentation[3]

Environment information (Please complete the following information; remove any unnecessary fields) :


[1]https://docs.hazelcast.com/hazelcast/5.3/kubernetes/kubernetes-auto-discovery#:~:text=There%20are%20several%20properties%20to%20configure%2C%20all%20of%20which%20are%20optional. [2]https://github.com/wso2/carbon-kernel/blob/4.9.x/core/org.wso2.carbon.hazelcast/src/main/java/org/wso2/carbon/hazelcast/kubernetes/KubernetesMembershipScheme.java#L83-L91 [3]https://is.docs.wso2.com/en/6.1.0/deploy/deployment-guide/#clustering-related-configurations:~:text=Optionally%2C%20a%20Kubernetes%20token%20or%20basic%20authentication%20can%20be%20used%20to%20authenticate%20with%20the%20Kubernetes%20api%20server.%20The%20following%20properties%20can%20be%20set%20under%20%5Bclustering.properties%5D%20accordingly.

tharakawijekoon commented 5 months ago

Any optional property that is mentioned in https://docs.hazelcast.com/hazelcast/5.3/kubernetes/kubernetes-auto-discovery#:~:text=There%20are%20several%20properties%20to%20configure%2C%20all%20of%20which%20are%20optional should be configurable(not just the ones given as examples).