-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add ecr * feat: add redis * feat: add queue system values * feat: add redis service * feat: add queuing api * feat: add labels * feat: add queuing api service * feat: add job * fix: rollback for merge
- Loading branch information
Showing
7 changed files
with
228 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
src/kubernetes/ticketing-chart/templates/deployment-queuing.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ticketing-queuing-api | ||
labels: | ||
{{- include "ticketing-chart.queuingLabels" . | nindent 4 }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 8 }} | ||
spec: | ||
nodeSelector: | ||
role: backend | ||
|
||
containers: | ||
- name: ticketing-queuing-api | ||
image: "{{ .Values.queuing_system.image.repository }}:{{ .Values.queuing_system.image.tag }}" | ||
|
||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "100Mi" | ||
|
||
imagePullPolicy: Always | ||
command: ['npm', 'run', 'start:api'] | ||
|
||
ports: | ||
- name: http | ||
containerPort: {{ .Values.queuing_system.config.PORT }} | ||
protocol: TCP | ||
|
||
env: | ||
- name: NODE_ENV | ||
value: "{{ .Values.queuing_system.config.NODE_ENV }}" | ||
- name: PORT | ||
value: "{{ .Values.queuing_system.config.PORT }}" | ||
- name: REDIS_HOST | ||
value: "{{ .Values.queuing_system.config.REDIS_HOST }}" | ||
- name: REDIS_PORT | ||
value: "{{ .Values.queuing_system.config.REDIS_PORT }}" | ||
|
||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: http | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ticketing-queuing-job | ||
labels: | ||
{{- include "ticketing-chart.queuingLabels" . | nindent 4 }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 8 }} | ||
spec: | ||
nodeSelector: | ||
role: backend | ||
|
||
containers: | ||
- name: ticketing-queuing-api | ||
image: "{{ .Values.queuing_system.image.repository }}:{{ .Values.queuing_system.image.tag }}" | ||
|
||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "100Mi" | ||
|
||
imagePullPolicy: Always | ||
command: ['npm', 'run', 'start:job'] | ||
|
||
env: | ||
- name: NODE_ENV | ||
value: "{{ .Values.queuing_system.config.NODE_ENV }}" | ||
- name: REDIS_HOST | ||
value: "{{ .Values.queuing_system.config.REDIS_HOST }}" | ||
- name: REDIS_PORT | ||
value: "{{ .Values.queuing_system.config.REDIS_PORT }}" | ||
- name: JOB_INTEVAL_SEC | ||
value: "{{ .Values.queuing_system.config.JOB_INTEVAL_SEC }}" | ||
- name: JOB_MOVE_PER_INTEVAL | ||
value: "{{ .Values.queuing_system.config.JOB_MOVE_PER_INTEVAL }}" | ||
- name: JOB_TICKET_EXPIRED_SEC | ||
value: "{{ .Values.queuing_system.config.JOB_TICKET_EXPIRED_SEC }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: ticketing-redis | ||
labels: | ||
{{- include "ticketing-chart.queuingLabels" . | nindent 4 }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
|
||
containers: | ||
- name: redis | ||
image: {{ .Values.redis.image }} | ||
command: | ||
- redis-server | ||
env: | ||
- name: MASTER | ||
value: "true" | ||
ports: | ||
- name: redis | ||
containerPort: {{ .Values.redis.port }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ticketing-redis | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: {{ .Values.redis.port }} | ||
targetPort: {{ .Values.redis.port }} | ||
selector: | ||
{{- include "ticketing-chart.queuingSelectorLabels" . | nindent 4 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters