# helm_charts_jmeter-master-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ template "distributed-jmeter.fullname" . }}-master
  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: master
spec:
  replicas: {{ .Values.master.replicaCount }}
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app.kubernetes.io/name: {{ include "distributed-jmeter.name" . }}
      app.kubernetes.io/instance: {{ .Release.Name }}
      app.kubernetes.io/component: master
  template:
    metadata:
      labels:
        app.kubernetes.io/name:  {{ include "distributed-jmeter.name" . }}
        app.kubernetes.io/instance: {{ .Release.Name }}
        app.kubernetes.io/component: master
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          args:
            - master
          ports:
            - containerPort: 60000