chore(helm): add API deployment and service templates
This commit is contained in:
61
helm/incidentops/templates/api-deployment.yaml
Normal file
61
helm/incidentops/templates/api-deployment.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "incidentops.fullname" . }}-api
|
||||
labels:
|
||||
{{- include "incidentops.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
replicas: {{ .Values.api.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "incidentops.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "incidentops.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
containers:
|
||||
- name: api
|
||||
image: "{{ .Values.api.image }}:{{ .Values.api.tag }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.api.port }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: ConnectionStrings__Postgres
|
||||
value: {{ include "incidentops.postgresConnectionString" . | quote }}
|
||||
- name: Redis__ConnectionString
|
||||
value: {{ include "incidentops.redisConnectionString" . | quote }}
|
||||
- name: Jwt__Issuer
|
||||
value: {{ .Values.jwt.issuer | quote }}
|
||||
- name: Jwt__Audience
|
||||
value: {{ .Values.jwt.audience | quote }}
|
||||
- name: Jwt__SigningKey
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "incidentops.fullname" . }}-secrets
|
||||
key: jwt-signing-key
|
||||
- name: Jwt__AccessTokenExpirationMinutes
|
||||
value: {{ .Values.jwt.accessTokenExpirationMinutes | quote }}
|
||||
- name: Jwt__RefreshTokenExpirationDays
|
||||
value: {{ .Values.jwt.refreshTokenExpirationDays | quote }}
|
||||
- name: Cors__Origins__0
|
||||
value: "http://{{ .Values.ingress.host }}"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: http
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
resources:
|
||||
{{- toYaml .Values.api.resources | nindent 12 }}
|
||||
17
helm/incidentops/templates/api-service.yaml
Normal file
17
helm/incidentops/templates/api-service.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "incidentops.fullname" . }}-api
|
||||
labels:
|
||||
{{- include "incidentops.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: {{ .Values.api.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "incidentops.selectorLabels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: api
|
||||
Reference in New Issue
Block a user