func (f *Framework) DeployNginxWithConfigMapVolume(cm string) error {
	f.NginxVolumeConfigMap = cm
	defer func() { f.NginxVolumeConfigMap = "" }()
	if err := f.newNginx(); err != nil {
		return err
	}
	if err := f.waitUntilAppNginxPodsReady(); err != nil {
		return err
	}
	return nil
}
DeployNginxWithConfigMapVolume deploys Nginx with an extra volume (ConfigMap type).
package framework
import (
	"net/http"
	"net/url"
	"github.com/gavv/httpexpect/v2"
	"github.com/gruntwork-io/terratest/modules/k8s"
	"github.com/onsi/ginkgo"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
const (
	_nginxManifest = `
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: {{ .NginxReplicas }}
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      name: nginx
      labels:
        app: nginx
    spec:
{{ if .NginxVolumeConfigMap }}
      volumes:
      - name: conf
        configMap:
          name: {{ .NginxVolumeConfigMap }}
{{ end }}
      containers:
      - name: nginx
        image: {{ .LocalRegistry }}/nginx:1.19.3
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
          protocol: TCP
          name: http
{{ if .NginxVolumeConfigMap }}
        volumeMounts:
        - name: conf
          mountPath: /etc/nginx/conf.d
{{ end }}
---
apiVersion: v1
kind: Service
metadata:
  name: nginx
spec:
  selector:
    app: nginx
  ports:
  - name: http
    targetPort: 80
    port: 80
    protocol: TCP
`
)