mirror of
https://github.com/Sheldan/OnePlusBot.git
synced 2026-03-26 23:29:51 +00:00
[OPB-xxx] upgrading abstracto version
enabling experience leaderboard dashboard deployment
This commit is contained in:
2
.env
2
.env
@@ -1,4 +1,4 @@
|
|||||||
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
|
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
|
||||||
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
|
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
|
||||||
VERSION=1.6.22
|
VERSION=1.6.22
|
||||||
ABSTRACTO_VERSION=1.5.27
|
ABSTRACTO_VERSION=1.5.32
|
||||||
1
Tiltfile
1
Tiltfile
@@ -31,6 +31,7 @@ docker_build_with_restart(
|
|||||||
docker_build(registry + 'oneplus-bot-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
|
docker_build(registry + 'oneplus-bot-db-data', 'deployment/image-packaging/src/main/docker/db-data/')
|
||||||
docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
|
docker_build(registry + 'oneplus-bot-template-data', 'deployment/image-packaging/src/main/docker/template-data/')
|
||||||
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
docker_build(registry + 'oneplus-bot-private-rest-api', 'deployment/image-packaging/src/main/docker/private-rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
||||||
|
docker_build(registry + 'oneplus-bot-rest-api', 'deployment/image-packaging/src/main/docker/rest-api/', build_args={'REGISTRY_PREFIX': abstracto_registry})
|
||||||
|
|
||||||
|
|
||||||
local('cd tilt/oneplusbot-dev && helm dep up')
|
local('cd tilt/oneplusbot-dev && helm dep up')
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{{- if .Values.restApi.enabled -}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "oneplusBot.fullname" . }}-rest-api
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: rest-api
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.restApi.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
app: rest-api
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "oneplusBot.serviceAccountName" . }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.restApi.podSecurityContext | nindent 8 }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}-rest-api
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.restApi.securityContext | nindent 12 }}
|
||||||
|
image: "{{ .Values.restApi.repository }}/{{ .Values.restApi.image }}:{{ .Values.restApi.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.restApi.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: BACKEND_HOST
|
||||||
|
value: "{{ include "oneplusBot.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
|
||||||
|
- name: BACKEND_PORT
|
||||||
|
value: "{{ .Values.service.port }}"
|
||||||
|
ports:
|
||||||
|
- name: {{ .Values.restApi.service.name }}
|
||||||
|
containerPort: {{ .Values.restApi.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .Values.restApi.service.port }}
|
||||||
|
initialDelaySeconds: {{ $.Values.restApi.livenessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ $.Values.restApi.livenessProbe.periodSeconds }}
|
||||||
|
failureThreshold: {{ $.Values.restApi.livenessProbe.failureThreshold }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .Values.restApi.service.port }}
|
||||||
|
initialDelaySeconds: {{ $.Values.restApi.readinessProbe.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ $.Values.restApi.readinessProbe.periodSeconds }}
|
||||||
|
failureThreshold: {{ $.Values.restApi.readinessProbe.failureThreshold }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.restApi.resources | nindent 12 }}
|
||||||
|
{{- with .Values.restApi.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.restApi.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.restApi.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
45
deployment/helm/oneplus-bot/templates/rest-api-ingress.yaml
Normal file
45
deployment/helm/oneplus-bot/templates/rest-api-ingress.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{{- if .Values.restApi.enabled -}}
|
||||||
|
{{- $servicePort := .Values.restApi.service.port -}}
|
||||||
|
{{- $serviceName := .Values.restApi.service.name -}}
|
||||||
|
{{- $ingressPath := .Values.restApi.ingress.path -}}
|
||||||
|
{{- $ingressPathType := .Values.restApi.ingress.pathType -}}
|
||||||
|
{{- $extraPaths := .Values.restApi.ingress.extraPaths -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ingress-rest-api
|
||||||
|
labels:
|
||||||
|
{{- with .Values.restApi.ingress.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.restApi.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- range $key, $value := . }}
|
||||||
|
{{ $key }}: {{ tpl $value $ | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
{{- with .Values.restApi.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- if .Values.restApi.ingress.hosts }}
|
||||||
|
{{- range .Values.restApi.ingress.hosts }}
|
||||||
|
- host: {{ tpl . $ }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- with $extraPaths }}
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
pathType: {{ $ingressPathType }}
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ $serviceName }}
|
||||||
|
port:
|
||||||
|
number: {{ $servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
12
deployment/helm/oneplus-bot/templates/rest-api-service.yaml
Normal file
12
deployment/helm/oneplus-bot/templates/rest-api-service.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{{- if .Values.restApi.enabled -}}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.restApi.service.name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: rest-api
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.restApi.service.targetPort }}
|
||||||
|
targetPort: {{ .Values.restApi.service.port }}
|
||||||
|
{{- end }}
|
||||||
@@ -21,7 +21,7 @@ templateDeployment:
|
|||||||
repository: harbor.sheldan.dev/abstracto
|
repository: harbor.sheldan.dev/abstracto
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: abstracto-template-deployment
|
image: abstracto-template-deployment
|
||||||
tag: 1.5.27
|
tag: 1.5.32
|
||||||
templateDeploymentData:
|
templateDeploymentData:
|
||||||
repository: harbor.sheldan.dev/oneplus-bot
|
repository: harbor.sheldan.dev/oneplus-bot
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
@@ -32,7 +32,7 @@ dbConfigDeployment:
|
|||||||
repository: harbor.sheldan.dev/abstracto
|
repository: harbor.sheldan.dev/abstracto
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: abstracto-db-deployment
|
image: abstracto-db-deployment
|
||||||
tag: 1.5.27
|
tag: 1.5.32
|
||||||
dbConfigDeploymentData:
|
dbConfigDeploymentData:
|
||||||
repository: harbor.sheldan.dev/oneplus-bot
|
repository: harbor.sheldan.dev/oneplus-bot
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
@@ -76,6 +76,46 @@ privateRestApi:
|
|||||||
nodeSelector: {}
|
nodeSelector: {}
|
||||||
tolerations: []
|
tolerations: []
|
||||||
affinity: {}
|
affinity: {}
|
||||||
|
restApi:
|
||||||
|
enabled: true
|
||||||
|
repository: harbor.sheldan.dev/oneplus-bot
|
||||||
|
pullPolicy: Always
|
||||||
|
image: oneplus-bot-rest-api
|
||||||
|
tag: 1.6.22
|
||||||
|
podAnnotations: {}
|
||||||
|
podSecurityContext: {}
|
||||||
|
securityContext: {}
|
||||||
|
livenessProbe:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
readinessProbe:
|
||||||
|
initialDelaySeconds: 2
|
||||||
|
periodSeconds: 5
|
||||||
|
failureThreshold: 3
|
||||||
|
service:
|
||||||
|
port: 8080
|
||||||
|
targetPort: 80
|
||||||
|
name: rest-api
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: null
|
||||||
|
memory: null
|
||||||
|
requests:
|
||||||
|
cpu: null
|
||||||
|
memory: null
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
labels: {}
|
||||||
|
path: /
|
||||||
|
pathType: Prefix
|
||||||
|
hosts: null
|
||||||
|
extraPaths: []
|
||||||
|
tls: []
|
||||||
grafanaDeployment:
|
grafanaDeployment:
|
||||||
repository: harbor.sheldan.dev/grafana-tools
|
repository: harbor.sheldan.dev/grafana-tools
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
ARG REGISTRY_PREFIX
|
||||||
|
ARG ABSTRACTO_VERSION
|
||||||
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api-experience:${ABSTRACTO_VERSION:-latest} AS experience-api
|
||||||
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api-core:${ABSTRACTO_VERSION:-latest} AS core-api
|
||||||
|
|
||||||
|
|
||||||
|
FROM ${REGISTRY_PREFIX}abstracto-rest-api:${ABSTRACTO_VERSION:-latest}
|
||||||
|
COPY --from=core-api /python /python
|
||||||
|
COPY --from=experience-api /python /python
|
||||||
@@ -16,6 +16,13 @@ services:
|
|||||||
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
||||||
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
||||||
image: ${REGISTRY_PREFIX}oneplus-bot-private-rest-api:${VERSION:-latest}
|
image: ${REGISTRY_PREFIX}oneplus-bot-private-rest-api:${VERSION:-latest}
|
||||||
|
rest-api-packaging:
|
||||||
|
build:
|
||||||
|
context: deployment/image-packaging/src/main/docker/rest-api
|
||||||
|
args:
|
||||||
|
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
|
||||||
|
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
|
||||||
|
image: ${REGISTRY_PREFIX}oneplus-bot-rest-api:${VERSION:-latest}
|
||||||
template-data:
|
template-data:
|
||||||
build:
|
build:
|
||||||
context: deployment/image-packaging/src/main/docker/template-data
|
context: deployment/image-packaging/src/main/docker/template-data
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -17,7 +17,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<abstracto.version>1.5.27</abstracto.version>
|
<abstracto.version>1.5.32</abstracto.version>
|
||||||
<abstracto.templates.version>1.4.35</abstracto.templates.version>
|
<abstracto.templates.version>1.4.35</abstracto.templates.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user