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