apiVersion: v1
kind: Service
metadata:
  name: appsmith-editor
spec:
  selector:
    app: appsmith-editor
  ports:
  - port: 80
    targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: appsmith-editor
spec:
  selector:
    matchLabels:
      app: appsmith-editor
  replicas: 1
  template:
    metadata:
      labels:
        app: appsmith-editor
    spec:
      containers:
      - name: nginx
        image: appsmith/appsmith-editor
        ports:
          - containerPort: 80
        envFrom:
          - configMapRef:
              name: application-config
        volumeMounts:
          - name: nginx-config-template
            mountPath: /nginx.conf.template
            subPath: nginx.conf.template
      volumes:
      - name: nginx-config-template
        configMap:
          name: nginx-config-template
