gordonwatts / func_adl_server

Helm chart to get started with an analysis server - mostly experimental
MIT License
0 stars 0 forks source link

My templates look like this - is this reasonable? #10

Open gordonwatts opened 5 years ago

gordonwatts commented 5 years ago

It feels like I'm repeating things too much. Was copied from the auto-generator using the k8 command line and the helm command line.

apiVersion: apps/v1beta2
kind: Deployment
metadata:
  name: {{ template "func-adl-server.fullname" . }}-web
  labels:
    app: {{ template "func-adl-server.name" . }}
    chart: {{ template "func-adl-server.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: 1
  selector:
    # TODO: Why do I have to repeat this - this seems crazy do this twice here. Three times in one file...
    matchLabels:
      app: {{ template "func-adl-server.name" . }}-web
      release: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ template "func-adl-server.name" . }}-web
        release: {{ .Release.Name }}
    spec: