forked from opensearch-project/helm-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: dehaocheng <[email protected]>
- Loading branch information
Showing
13 changed files
with
2,231 additions
and
1,086 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
charts/opensearch/templates/configmap.yaml → ...s/opensearch/templates/dataConfigmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{{- if .Values.data.maxUnavailable }} | ||
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: policy/v1 | ||
{{- else -}} | ||
apiVersion: policy/v1beta1 | ||
{{- end }} | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: "{{ .Values.data.name }}-pdb" | ||
labels: | ||
{{- with .Values.data.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
maxUnavailable: {{ .Values.data.maxUnavailable }} | ||
selector: | ||
matchLabels: | ||
{{- with .Values.data.selectorLabels }} | ||
{{- toYaml . | nindent 6 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.data.serviceName }} | ||
labels: | ||
{{- with .Values.data.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.data.service.labels }} | ||
{{ toYaml .Values.data.service.labels | indent 4 }} | ||
{{- end }} | ||
annotations: | ||
{{ toYaml .Values.data.service.annotations | indent 4 }} | ||
spec: | ||
type: {{ .Values.data.service.type }} | ||
{{- if (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) }} | ||
{{- if .Values.data.service.ipFamilyPolicy }} | ||
ipFamilyPolicy: {{ .Values.data.service.ipFamilyPolicy }} | ||
{{- end }} | ||
{{- if .Values.data.service.ipFamilies }} | ||
ipFamilies: {{ .Values.data.service.ipFamilies }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
{{- with .Values.data.selectorLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
ports: | ||
- name: {{ .Values.data.service.httpPortName | default "http" }} | ||
protocol: TCP | ||
port: {{ .Values.data.httpPort }} | ||
{{- if .Values.data.service.nodePort }} | ||
nodePort: {{ .Values.data.service.nodePort }} | ||
{{- end }} | ||
- name: {{ .Values.data.service.transportPortName | default "transport" }} | ||
protocol: TCP | ||
port: {{ .Values.data.transportPort }} | ||
{{- if .Values.data.service.loadBalancerIP }} | ||
loadBalancerIP: {{ .Values.data.service.loadBalancerIP }} | ||
{{- end }} | ||
{{- with .Values.data.service.loadBalancerSourceRanges }} | ||
loadBalancerSourceRanges: | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
{{- if .Values.data.service.externalTrafficPolicy }} | ||
externalTrafficPolicy: {{ .Values.data.service.externalTrafficPolicy }} | ||
{{- end }} | ||
--- | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.data.serviceName }}-headless | ||
labels: | ||
{{- with .Values.data.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- if .Values.data.service.labelsHeadless }} | ||
{{ toYaml .Values.data.service.labelsHeadless | indent 4 }} | ||
{{- end }} | ||
annotations: | ||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" | ||
{{- if .Values.data.service.headless.annotations }} | ||
{{ toYaml .Values.data.service.headless.annotations | indent 4 }} | ||
{{- end }} | ||
spec: | ||
clusterIP: None # This is needed for statefulset hostnames like opensearch-0 to resolve | ||
# Create endpoints also if the related pod isn't ready | ||
publishNotReadyAddresses: true | ||
selector: | ||
{{- with .Values.data.selectorLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
ports: | ||
- name: {{ .Values.data.service.httpPortName | default "http" }} | ||
port: {{ .Values.data.httpPort }} | ||
- name: {{ .Values.data.service.transportPortName | default "transport" }} | ||
port: {{ .Values.data.transportPort }} | ||
- name: {{ .Values.data.service.metricsPortName | default "metrics" }} | ||
port: {{ .Values.data.metricsPort }} |
Oops, something went wrong.