You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are you?
Thank you so much for providing such a great Axon framework.
It's helping me a lot to organize my MSA.
The reason I am writing this is that I have found some improvements while deploying axon server with the helm chart you provided.
There are three points.
First, ingress.yaml needs to be modified to match the latest k8s conventions.
Second, I would like to see an option added to ask whether to enable livenessProbe and readinessProbe in the statefulset. This is because on my local minikube, if I check liveness/readiness, the pod doesn't run properly.
Third, there shouldn't be a tag at the end of image.repository in values.yaml, because statefuleset.yaml tags the image.tag value or chart.fullname.
I'm uploading the axon.yaml, ingress.yaml, and statefulset.yaml together, which override the values.yaml.
I hope this helps you fix it.
Thanks.
------------------
axon.yaml
------------------
image:
repository: axoniq/axonserver
tag: latest
pullPolicy: IfNotPresent
# Axon Server specific settings
axonserver:
# The HTTP port to use inside the container, defaults to 8024
httpPort: 8024
# The client gRPC port to use inside the container, defaults to 8124
grpcPort: 8124
healthcheck:
enabled: false
serviceAccount:
# Specifies whether a service account should be created
create: true
name: "axonserver"
volumes:
eventStore:
size: 1Gi
# Configure here how your provider lets you map disks to Kubernetes volumes
persistentVolumeSettings:
hostPath:
path: /data
data:
size: 1Gi
# Configure here how your provider lets you map disks to Kubernetes volumes
persistentVolumeSettings:
hostPath:
path: /data
services:
httpService:
enabled: true
type: ClusterIP
port: 8024
grpcService:
enabled: true
type: Headless
port: 8124
ingress:
enabled: true
hosts:
- host: myaxon.io
paths: [ "/" ]
--------------------------
templetes/ingress.yaml
--------------------------
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "axon-server-se.fullname" . -}}
{{- $svcPort := .Values.services.httpService.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "axon-server-se.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: Prefix
backend:
service:
name: {{ $fullName }}-ui
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
--------------------------------
templates/statefulset.yaml
--------------------------------
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "axon-server-se.fullname" . }}
labels:
{{- include "axon-server-se.labels" . | nindent 4 }}
spec:
serviceName: {{ include "axon-server-se.fullname" . }}
selector:
matchLabels:
{{- include "axon-server-se.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.stsAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "axon-server-se.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "axon-server-se.serviceAccountName" . }}
{{- with .Values.stsSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.axonserver.httpPort | default 8024 }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.axonserver.grpcPort | default 8124 }}
protocol: TCP
{{- if .Values.healthcheck.enabled -}}
livenessProbe:
httpGet:
path: /actuator/info
port: http
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /actuator/info
port: http
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
failureThreshold: 30
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- name: data
mountPath: /data
- name: events
mountPath: /eventdata
- name: config
mountPath: /config
readOnly: true
volumes:
{{- if eq .Values.properties.kind "ConfigMap" "InlineConfigMap" }}
- name: config
configMap:
name: {{ .Values.properties.configMapName | default "axon-server-config" }}
{{- end}}
{{- if eq .Values.properties.kind "Secret" "InlineSecret" }}
- name: config
secret:
secretName: {{ .Values.properties.secretName | default "axon-server-secret" }}
{{- end}}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: events
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.volumes.eventStore.size | default "5Gi" }}
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.volumes.data.size | default "1Gi" }}
The text was updated successfully, but these errors were encountered:
How are you?
Thank you so much for providing such a great Axon framework.
It's helping me a lot to organize my MSA.
The reason I am writing this is that I have found some improvements while deploying axon server with the helm chart you provided.
There are three points.
First, ingress.yaml needs to be modified to match the latest k8s conventions.
Second, I would like to see an option added to ask whether to enable livenessProbe and readinessProbe in the statefulset. This is because on my local minikube, if I check liveness/readiness, the pod doesn't run properly.
Third, there shouldn't be a tag at the end of image.repository in values.yaml, because statefuleset.yaml tags the image.tag value or chart.fullname.
I'm uploading the axon.yaml, ingress.yaml, and statefulset.yaml together, which override the values.yaml.
I hope this helps you fix it.
Thanks.
The text was updated successfully, but these errors were encountered: