helm/templates/onearth.yml (11 lines of code) (raw):

{{ if ne .Values.onEarthProxyIP "" }} kind: Service apiVersion: v1 metadata: name: onearth spec: type: ExternalName externalName: {{ .Values.onEarthProxyIP }} ports: - port: 80 {{ end}}