template/deployments/kustomize/base/service.yaml (16 lines of code) (raw):
apiVersion: v1
kind: Service
metadata:
name: {{ .Config.GetVariableValue "APPNAME" }}
namespace: {{ .Config.GetVariableValue "NAMESPACE" }}
labels:
app.kubernetes.io/name: {{ .Config.GetVariableValue "APPNAME" }}
kubernetes.azure.com/generator: {{ .Config.GetVariableValue "GENERATORLABEL" }}
spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: {{ .Config.GetVariableValue "APPNAME" }}
ports:
- protocol: TCP
port: {{ .Config.GetVariableValue "SERVICEPORT" }}
targetPort: {{ .Config.GetVariableValue "PORT" }}