google-online-store-with-helm / charts / microservices / templates / deployment.yaml
deployment.yaml
Raw
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Values.appName }}
  namespace: {{ .Values.nameSpace}}
spec:
  selector:
    matchLabels:
      app: {{ .Values.appName }}
  replicas: {{ .Values.appReplicaCount }}
  template:
    metadata:
      labels:
        app: {{ .Values.appName }}
    spec:
      containers:
      - name: {{ .Values.appName }}
        image: "{{ .Values.appImage }}:{{ .Values.appVersion }}"
        ports:
        - containerPort: {{ .Values.containerPort }}
        env:
        {{- range .Values.containerEnvVars }}
        - name: {{ .name }}
          value: {{ .value | quote }}
        {{- end }}
        resources:
          requests:
            cpu: {{ .Values.appCPURequest }}
            memory: {{ .Values.appMemoryRequest }}
          limits:
            cpu: {{ .Values.appCPULimit }}
            memory: {{ .Values.appMemoryLimit }}