# helm_charts_jmeter-server-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ template "distributed-jmeter.fullname" . }}-server
  labels:
    app.kubernetes.io/name: {{ include "distributed-jmeter.name" . }}
    helm.sh/chart: {{ include "distributed-jmeter.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/component: server
spec:
  replicas: {{ .Values.server.replicaCount }}
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ include "distributed-jmeter.name" . }}
      app.kubernetes.io/instance: {{ .Release.Name }}
      app.kubernetes.io/component: server
  template:
    metadata:
      labels:
        app.kubernetes.io/name: {{ include "distributed-jmeter.name" . }}
        app.kubernetes.io/instance: {{ .Release.Name }}
        app.kubernetes.io/component: server
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          args: ["server"]
          ports:
            - containerPort: 50000
            - containerPort: 1099