update
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
version: 1.0
|
|
||||||
type: application
|
|
||||||
dependencies:
|
|
||||||
- version: 0.1.0-dev0004
|
|
||||||
alias: durpapi
|
|
||||||
repository: https://gitlab.com/api/v4/projects/48282809/packages/helm/stable
|
|
||||||
name: DurpAPI
|
|
||||||
appVersion: 0.0.1
|
|
||||||
description: A Helm chart for Kubernetes
|
|
||||||
name: durpapi
|
|
||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
|
name: DurpAPI
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
type: application
|
||||||
|
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "0.1.0"
|
||||||
|
dependencies:
|
||||||
|
- name: postgresql
|
||||||
|
version: 12.5.*
|
||||||
|
repository: https://charts.bitnami.com/bitnami
|
||||||
|
condition: postgresql.enabled
|
||||||
|
|||||||
38
durpapi/templates/deployment.yaml
Normal file
38
durpapi/templates/deployment.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
|
spec:
|
||||||
|
revisionHistoryLimit: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
|
replicas: {{ .Values.deployment.hpa.minReplicas }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: api
|
||||||
|
image: "{{ .Values.deployment.image }}:{{ default .Chart.Version .Values.deployment.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.deployment.imagePullPolicy }}
|
||||||
|
readinessProbe:
|
||||||
|
{{- toYaml .Values.deployment.probe.readiness | nindent 12 }}
|
||||||
|
livenessProbe:
|
||||||
|
{{- toYaml .Values.deployment.probe.liveness | nindent 12 }}
|
||||||
|
startupProbe:
|
||||||
|
{{- toYaml .Values.deployment.probe.startup | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.targetport }}
|
||||||
|
env:
|
||||||
|
- name: host
|
||||||
|
value: {{ .Values.swagger.host }}
|
||||||
|
- name: version
|
||||||
|
value: {{ default .Chart.Version .Values.deployment.tag }}
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: {{ .Values.deployment.secretfile }}
|
||||||
24
durpapi/templates/hpa.yaml
Normal file
24
durpapi/templates/hpa.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: autoscaling/v2
|
||||||
|
kind: HorizontalPodAutoscaler
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Chart.Name }}-hpa"
|
||||||
|
spec:
|
||||||
|
scaleTargetRef:
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
minReplicas: {{ .Values.deployment.hpa.minReplicas }}
|
||||||
|
maxReplicas: {{ .Values.deployment.hpa.maxReplicas }}
|
||||||
|
metrics:
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: memory
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 80
|
||||||
|
- type: Resource
|
||||||
|
resource:
|
||||||
|
name: cpu
|
||||||
|
target:
|
||||||
|
type: Utilization
|
||||||
|
averageUtilization: 40
|
||||||
12
durpapi/templates/service.yaml
Normal file
12
durpapi/templates/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Chart.Name }}-service"
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.targetport }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
@@ -5,6 +5,31 @@ durpapi:
|
|||||||
image: registry.internal.durp.info/developerdurp/durpapi
|
image: registry.internal.durp.info/developerdurp/durpapi
|
||||||
tag: "0.1.0-dev0141"
|
tag: "0.1.0-dev0141"
|
||||||
secretfile: durpapi-secret
|
secretfile: durpapi-secret
|
||||||
|
imagePullPolicy: Always
|
||||||
|
hpa:
|
||||||
|
minReplicas: 3
|
||||||
|
maxReplicas: 10
|
||||||
|
probe:
|
||||||
|
readiness:
|
||||||
|
httpGet:
|
||||||
|
path: /api/health/getHealth
|
||||||
|
port: 8080
|
||||||
|
liveness:
|
||||||
|
httpGet:
|
||||||
|
path: /api/health/getHealth
|
||||||
|
port: 8080
|
||||||
|
startup:
|
||||||
|
httpGet:
|
||||||
|
path: /api/health/getHealth
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
targetport: 8080
|
||||||
|
|
||||||
|
swagger:
|
||||||
|
host: api.durp.info
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: true
|
enabled: true
|
||||||
auth:
|
auth:
|
||||||
|
|||||||
Reference in New Issue
Block a user