Open Thnai opened 1 year ago
Bug
Describe the request I am trying to change the default service type for the operator by modifying the CRD template
Expected behavior the added default value is beeing used to create new services of the modified kind
Reproduction/Testing steps i added "default: NodePort" to serviceTemplate/properties/spec/properties/type restarted the operator pod
serviceTemplate/properties/spec/properties/type
Proposed changes(optional) looking at the operator code i found this codeblock
if spec.ServiceTemplate.Spec.Type == "" { spec.ServiceTemplate.Spec.Type = corev1.ServiceTypeClusterIP }
however i dont understand the purpose of it, if no type is specified, k8s defaults to ClusterIP anyway using git blame i backtracked why it was added. https://github.com/splunk/splunk-operator/commit/f0d5ba08eb623cf5a1bbb9da60052a4399940c58#diff-57923b610c6cabf2ed47c4c3b44b4b365366b4949242100ff5c9856e02562424
however the commit message does not give more information. So why does the operator force ClusterIP and thereby disables the ability to use the "default" field in the template?
Hello @Thnai we will look into the issue and get back to you
Please select the type of request
Bug
Tell us more
Describe the request I am trying to change the default service type for the operator by modifying the CRD template
Expected behavior the added default value is beeing used to create new services of the modified kind
Reproduction/Testing steps i added "default: NodePort" to
serviceTemplate/properties/spec/properties/type
restarted the operator podProposed changes(optional) looking at the operator code i found this codeblock
however i dont understand the purpose of it, if no type is specified, k8s defaults to ClusterIP anyway using git blame i backtracked why it was added. https://github.com/splunk/splunk-operator/commit/f0d5ba08eb623cf5a1bbb9da60052a4399940c58#diff-57923b610c6cabf2ed47c4c3b44b4b365366b4949242100ff5c9856e02562424
however the commit message does not give more information. So why does the operator force ClusterIP and thereby disables the ability to use the "default" field in the template?