Skip to content

Commit

Permalink
Address review comments, rd 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlowskija committed Jan 7, 2025
1 parent e80fd78 commit b5d1743
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type PodOptions struct {

// Should process namespace sharing be enabled on created pods
// +optional
ShareProcessNamespace *bool `json:"shareProcessNamespace,omitempty"`
ShareProcessNamespace bool `json:"shareProcessNamespace,omitempty"`

// Optional PodSpreadTopologyConstraints to use when scheduling pods.
// More information here: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
Expand Down
5 changes: 0 additions & 5 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion controllers/solrcloud_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ var _ = FDescribe("SolrCloud controller - General", func() {
TopologySpreadConstraints: testTopologySpreadConstraints,
DefaultInitContainerResources: testResources2,
InitContainers: extraContainers1,
ShareProcessNamespace: &testShareProcessNamespace,
ShareProcessNamespace: testShareProcessNamespace,
},
StatefulSetOptions: &solrv1beta1.StatefulSetOptions{
Annotations: testSSAnnotations,
Expand Down
4 changes: 1 addition & 3 deletions controllers/util/solr_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ func GenerateStatefulSet(solrCloud *solr.SolrCloud, solrCloudStatus *solr.SolrCl
if customPodOptions.TerminationGracePeriodSeconds != nil {
terminationGracePeriod = *customPodOptions.TerminationGracePeriodSeconds
}
if customPodOptions.ShareProcessNamespace != nil {
shareProcessNamespace = *customPodOptions.ShareProcessNamespace
}
shareProcessNamespace = customPodOptions.ShareProcessNamespace
}

// The isNotStopped readiness gate will always be used for managedUpdates
Expand Down
1 change: 1 addition & 0 deletions helm/solr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ When using the helm chart, omit `customSolrKubeOptions.`
| podOptions.tolerations | []object | | Specify a list of Kubernetes tolerations for the Solr pod |
| podOptions.topologySpreadConstraints | []object | | Specify a list of Kubernetes topologySpreadConstraints for the Solr pod. No need to provide a `labelSelector`, as the Solr Operator will default that for you. More information can be found in [the documentation](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/). |
| podOptions.serviceAccountName | string | | Optional serviceAccount to run the Solr pods under |
| podOptions.shareProcessNamespace | boolean | false | Whether containers in a pod should share the same process namespace. |
| podOptions.priorityClassName | string | | Optional priorityClassName for the Solr pod |
| podOptions.sidecarContainers | []object | | An optional list of additional containers to run along side the Solr in its pod |
| podOptions.initContainers | []object | | An optional list of additional initContainers to run before the Solr container starts |
Expand Down
3 changes: 3 additions & 0 deletions helm/solr/templates/_custom_option_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ resources:
{{- if (include "solr.serviceAccountName.solr" .) -}}
serviceAccountName: {{ include "solr.serviceAccountName.solr" . }}
{{ end }}
{{- if .Values.podOptions.shareProcessNamespace -}}
shareProcessNamespace: {{ .Values.podOptions.shareProcessNamespace}}
{{ end }}
{{- if .Values.podOptions.priorityClassName -}}
priorityClassName: {{ .Values.podOptions.priorityClassName }}
{{ end }}
Expand Down
2 changes: 2 additions & 0 deletions helm/solr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ podOptions:
# Set Solr service account individually instead of the global "serviceAccount.name"
serviceAccountName: ""

shareProcessNamespace: false

# Manage where the Solr pods are scheduled
affinity: {}
tolerations: []
Expand Down

0 comments on commit b5d1743

Please sign in to comment.