configurable oxia coordinator configmap and entrypoint (#606)

This commit is contained in:
Artem Nosulchyk 2025-05-19 09:16:40 -04:00 committed by GitHub
parent 8382906775
commit fa1456ea4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 6 deletions

View File

@ -106,7 +106,11 @@ Define coordinator entrypoint
{{- define "oxia.coordinator.entrypoint" -}} {{- define "oxia.coordinator.entrypoint" -}}
- "oxia" - "oxia"
- "coordinator" - "coordinator"
{{- if .Values.oxia.coordinator.customConfigMapName }}
- "--conf=configmap:{{ template "pulsar.namespace" . }}/{{ .Values.oxia.coordinator.customConfigMapName }}"
{{- else }}
- "--conf=configmap:{{ template "pulsar.namespace" . }}/{{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-coordinator" - "--conf=configmap:{{ template "pulsar.namespace" . }}/{{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-coordinator"
{{- end }}
- "--log-json" - "--log-json"
- "--metadata=configmap" - "--metadata=configmap"
- "--k8s-namespace={{ template "pulsar.namespace" . }}" - "--k8s-namespace={{ template "pulsar.namespace" . }}"

View File

@ -16,7 +16,7 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
# #
{{- if .Values.components.oxia }} {{- if and .Values.components.oxia (not .Values.oxia.coordinator.customConfigMapName) }}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:

View File

@ -49,18 +49,22 @@ spec:
{{ toYaml . | indent 8 }} {{ toYaml . | indent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- if .Values.oxia.server.nodeSelector }} {{- if .Values.oxia.coordinator.nodeSelector }}
nodeSelector: nodeSelector:
{{ toYaml .Values.oxia.server.nodeSelector | indent 8 }} {{ toYaml .Values.oxia.coordinator.nodeSelector | indent 8 }}
{{- end }} {{- end }}
{{- if .Values.oxia.server.tolerations }} {{- if .Values.oxia.coordinator.tolerations }}
tolerations: tolerations:
{{ toYaml .Values.oxia.server.tolerations | indent 8 }} {{ toYaml .Values.oxia.coordinator.tolerations | indent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-coordinator serviceAccountName: {{ template "pulsar.fullname" . }}-{{ .Values.oxia.component }}-coordinator
containers: containers:
- command: - command:
{{- if .Values.oxia.coordinator.entrypoint }}
{{ toYaml .Values.oxia.coordinator.entrypoint | indent 12 }}
{{- else }}
{{- include "oxia.coordinator.entrypoint" . | nindent 12 }} {{- include "oxia.coordinator.entrypoint" . | nindent 12 }}
{{- end }}
image: "{{ .Values.images.oxia.repository }}:{{ .Values.images.oxia.tag }}" image: "{{ .Values.images.oxia.repository }}:{{ .Values.images.oxia.tag }}"
imagePullPolicy: "{{ template "pulsar.imagePullPolicy" (dict "image" .Values.images.oxia "root" .) }}" imagePullPolicy: "{{ template "pulsar.imagePullPolicy" (dict "image" .Values.images.oxia "root" .) }}"
name: coordinator name: coordinator

View File

@ -525,6 +525,8 @@ oxia:
tolerations: [] tolerations: []
# nodeSelector: # nodeSelector:
# cloud.google.com/gke-nodepool: default-pool # cloud.google.com/gke-nodepool: default-pool
# customConfigMapName: ""
# entrypoint: []
## templates/server-statefulset.yaml ## templates/server-statefulset.yaml
server: server:
# annotations for the app (statefulset/deployment) # annotations for the app (statefulset/deployment)