61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
{{- $name := include "hrbox.component" (dict "ctx" . "name" "goworker") -}}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ $name }}
|
|
labels:
|
|
{{- include "hrbox.labels" (dict "ctx" . "name" "goworker") | nindent 4 }}
|
|
spec:
|
|
minReadySeconds: 5
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 1
|
|
replicas: {{ .Values.app.replicas.goworker }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "goworker") | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "goworker") | nindent 8 }}
|
|
app: goworker
|
|
annotations:
|
|
checksum/app-secret: {{ include (print $.Template.BasePath "/00-app-secret.yaml") . | sha256sum }}
|
|
spec:
|
|
{{- include "hrbox.imagePullSecrets" . | nindent 6 }}
|
|
containers:
|
|
- name: goworker
|
|
image: {{ .Values.image.goworker | quote }}
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
stdin: true
|
|
tty: true
|
|
ports:
|
|
- name: http
|
|
containerPort: 8686
|
|
env:
|
|
{{- include "envs_all" . | indent 12 }}
|
|
{{- include "hrbox.resources" (dict "ctx" . "component" "goworker") | indent 10 }}
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ $name }}
|
|
labels:
|
|
{{- include "hrbox.labels" (dict "ctx" . "name" "goworker") | nindent 4 }}
|
|
annotations:
|
|
prometheus.io/scrape: "true"
|
|
prometheus.io/port: "8686"
|
|
prometheus.io/path: "/metrics"
|
|
spec:
|
|
selector:
|
|
{{- include "hrbox.selectorLabels" (dict "ctx" . "name" "goworker") | nindent 4 }}
|
|
ports:
|
|
- name: http
|
|
port: 8686
|
|
targetPort: 8686
|
|
protocol: TCP
|