Skip to content

Commit

Permalink
update k8s deployment template
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjarosch committed Jul 17, 2019
1 parent 8f500ef commit 1d024b7
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions templates/k8s_deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
labels:
app: {{ .Service.Name }}
platform: go
framework: go-kit
framework: gokit
generator: godin
version: {{ .Service.Namespace }}-{{ .Service.Name }}-version
name: {{ .Service.Name }}
Expand All @@ -30,26 +30,44 @@ spec:
labels:
app: {{ .Service.Name }}
platform: go
framework: go-kit
framework: gokit
generator: godin
version: {{ .Service.Namespace }}-{{ .Service.Name }}-version
spec:
containers:
- env:
- name: GRPC_PORT
value: "50051"
- name: TZ
value: Europe/Zurich
- name: GRPC_ADDRESS
value: "0.0.0.0:50051"
- name: DEBUG_ADDRESS
value: "0.0.0.0:3000"
- name: LOG_LEVEL
value: "info"
{{- if .Service.Transport.AMQP }}
- name: AMQP_ADDRESS
valueFrom:
secretKeyRef:
key: MESSAGE_BROKER_URL
name: rabbitmq
optional: false
{{- end }}
image: {{ .Docker.Registry }}/{{ .Service.Namespace }}-{{ .Service.Name }}:{{ .Service.Namespace }}-{{ .Service.Name }}-version
imagePullPolicy: IfNotPresent
name: contact
resources: {}
name: {{ .Service.Name }}
resources:
requests:
cpu: 1m
memory: 80Mi
securityContext:
allowPrivilegeEscalation: false
capabilities: {}
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 65534
stdin: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand Down

0 comments on commit 1d024b7

Please sign in to comment.