apiVersion: apps/v1
kind: Deployment
metadata:
  name: voting-app
  labels:
    name: voting-app
    app: demo-voting-app
spec:
  replicas: 1
  selector:
    matchLabels:
      name: voting-app
      app: demo-voting-app
    
  template:
    metadata:
      name: voting-app
      labels:
        name: voting-app
        app: demo-voting-app
      annotations:
        'consul.hashicorp.com/connect-inject': 'true'
        'consul.hashicorp.com/connect-service-upstreams': 'redis:6379'
    spec:
      containers:
        - name: voting-app
          image: kodekloud/examplevotingapp_vote:v1
          ports:
            - containerPort: 80
