Skip to content

Commit

Permalink
extra pod is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
wagill authored and wagill committed Aug 24, 2023
1 parent f2b1174 commit e611338
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 101 deletions.
1 change: 1 addition & 0 deletions martianbank/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ version: 0.1.0
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"

1 change: 1 addition & 0 deletions martianbank/templates/accounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ spec:
- protocol: TCP
port: 50051
targetPort: 50051

62 changes: 13 additions & 49 deletions martianbank/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "martianbank.fullname" . }}
name: loan
labels:
{{- include "martianbank.labels" . | nindent 4 }}
app: loan
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
replicas: 1
selector:
matchLabels:
{{- include "martianbank.selectorLabels" . | nindent 6 }}
app: loan
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "martianbank.selectorLabels" . | nindent 8 }}
app: loan
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "martianbank.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: loan
image: ghcr.io/cisco-open/martian-bank-demo-loan
envFrom:
- configMapRef:
name: configmap-martianbank
env:
- name: SERVICE_PROTOCOL
value: {{.Values.SERVICE_PROTOCOL}}
3 changes: 2 additions & 1 deletion martianbank/templates/k8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,5 @@ spec:
- protocol: TCP
port: 8098
targetPort: 8098
{{- end }}
{{- end }}

38 changes: 0 additions & 38 deletions martianbank/templates/loan.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion martianbank/templates/mongodb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ spec:
- protocol: TCP
port: 27017
targetPort: 27017
{{ end -}}
{{ end -}}

19 changes: 8 additions & 11 deletions martianbank/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "martianbank.fullname" . }}
labels:
{{- include "martianbank.labels" . | nindent 4 }}
name: loan
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "martianbank.selectorLabels" . | nindent 4 }}
selector:
app: loan
ports:
- protocol: TCP
port: 50053
targetPort: 50053
1 change: 0 additions & 1 deletion martianbank/templates/transactions.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# transactions
---
apiVersion: apps/v1
kind: Deployment
Expand Down

0 comments on commit e611338

Please sign in to comment.