Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
rkthtrifork authored Aug 21, 2024
2 parents 4501ff2 + 610222a commit 7c562c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ spec:
imagePullSecrets:
{{ toYaml .Values.opensearchCluster.initHelper.imagePullSecrets | nindent 6 }}
{{- end }}
{{- if .Values.opensearchCluster.initHelper.resources }}
resources:
{{- toYaml .Values.opensearchCluster.initHelper.resources | nindent 6 }}
{{- end }}
{{- end }}
general:
{{- if .Values.opensearchCluster.general.version }}
Expand Down
11 changes: 11 additions & 0 deletions charts/opensearch-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ opensearchCluster:
limits:
memory: "1Gi"
cpu: "500m"
initHelper:
imagePullSecrets: []
# - registryKeySecretName
imagePullPolicy: IfNotPresent
resources: {}
# requests:
# memory: "1Gi"
# cpu: "500m"
# limits:
# memory: "1Gi"
# cpu: "500m"
nodePools:
- component: masters
diskSize: "30Gi"
Expand Down
6 changes: 5 additions & 1 deletion charts/opensearch-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ serviceAccount:
kubeRbacProxy:
enable: true
securityContext:
# allowPrivilegeEscalation: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
resources:
limits:
cpu: 50m
Expand Down
4 changes: 2 additions & 2 deletions opensearch-operator/pkg/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func CountRunningPodsForNodePool(k8sClient k8s.K8sClient, cr *opsterv1.OpenSearc
selector := labels.NewSelector()
selector = selector.Add(*clusterReq, *componentReq)
// List pods matching selector
list, err := k8sClient.ListPods(&client.ListOptions{LabelSelector: selector})
list, err := k8sClient.ListPods(&client.ListOptions{Namespace: cr.Namespace, LabelSelector: selector})
if err != nil {
return 0, err
}
Expand Down Expand Up @@ -281,7 +281,7 @@ func CountPVCsForNodePool(k8sClient k8s.K8sClient, cr *opsterv1.OpenSearchCluste
}
selector := labels.NewSelector()
selector = selector.Add(*clusterReq, *componentReq)
list, err := k8sClient.ListPVCs(&client.ListOptions{LabelSelector: selector})
list, err := k8sClient.ListPVCs(&client.ListOptions{Namespace: cr.Namespace, LabelSelector: selector})
if err != nil {
return 0, err
}
Expand Down

0 comments on commit 7c562c0

Please sign in to comment.