Compare commits

...

63 Commits

Author SHA1 Message Date
Sheldan
597d3b8a8a [OPB-xxx] updating abstracto version to 1.5.57
adding config for currency conversion
fixing ban message template folder name
2025-01-15 23:06:44 +01:00
release-bot
bc353fed55 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-11-22 22:22:14 +00:00
release-bot
31279bb059 [maven-release-plugin] prepare for next development iteration 2024-11-22 22:16:29 +00:00
release-bot
8e6804a1dc [maven-release-plugin] prepare release oneplusbot-1.6.34 2024-11-22 22:16:28 +00:00
Sheldan
a39124e208 [OPB-xxx] updating abstracto version to 1.5.51
adapting templates to use the default locale
2024-11-22 23:12:07 +01:00
release-bot
42a94359bb Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-11-05 22:37:27 +00:00
release-bot
3bddf1d1c4 [maven-release-plugin] prepare for next development iteration 2024-11-05 22:33:17 +00:00
release-bot
c10dc6765c [maven-release-plugin] prepare release oneplusbot-1.6.33 2024-11-05 22:33:16 +00:00
Sheldan
0b4b163e43 [OPB-xxx] updating abstracto version to 1.5.50 2024-11-05 23:29:44 +01:00
release-bot
7be4891075 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-11-04 20:03:40 +00:00
release-bot
6f0ce5af12 [maven-release-plugin] prepare for next development iteration 2024-11-04 19:58:17 +00:00
release-bot
f9d50fa6cc [maven-release-plugin] prepare release oneplusbot-1.6.32 2024-11-04 19:58:16 +00:00
Sheldan
095a5d826f [OPB-xxx] updating agent version for build and release 2024-11-04 20:54:18 +01:00
release-bot
88efc47ce2 [maven-release-plugin] prepare for next development iteration 2024-11-04 19:42:06 +00:00
release-bot
d8a6c9b2ce [maven-release-plugin] prepare release oneplusbot-1.6.31 2024-11-04 19:42:03 +00:00
Sheldan
6088a5ad6e [OPB-xxx] updating abstracto version 2024-11-04 20:38:21 +01:00
release-bot
e44180d4b7 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-06-13 16:44:52 +00:00
release-bot
ad1f6bdd08 [maven-release-plugin] prepare for next development iteration 2024-06-13 16:40:08 +00:00
release-bot
46567418ad [maven-release-plugin] prepare release oneplusbot-1.6.30 2024-06-13 16:40:06 +00:00
Sheldan
46a812db9c [OPB-xxx] updating abstracto version 2024-06-13 18:37:04 +02:00
release-bot
d5768d673f Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-06-08 07:36:13 +00:00
release-bot
ec327e0371 [maven-release-plugin] prepare for next development iteration 2024-06-08 07:31:45 +00:00
release-bot
a1bc14a87c [maven-release-plugin] prepare release oneplusbot-1.6.29 2024-06-08 07:31:44 +00:00
Sheldan
b7391eaad6 [OPB-xxx] changing ban notification text 2024-06-08 09:27:58 +02:00
Sheldan
71feb8bae1 [OPB-xxx] updating abstracto version 2024-06-08 09:14:43 +02:00
Sheldan
a43a7fd910 [OPB-xxx] fixing incorrect ID formatting for leave template 2024-05-15 22:09:42 +02:00
release-bot
6d2dfd712f Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-05-05 22:36:20 +00:00
release-bot
4be04f7d58 [maven-release-plugin] prepare for next development iteration 2024-05-05 22:32:11 +00:00
release-bot
78baed209e [maven-release-plugin] prepare release oneplusbot-1.6.28 2024-05-05 22:32:09 +00:00
Sheldan
82c63aa255 [OPB-xxx] upgrading abstracto version 2024-05-06 00:27:44 +02:00
release-bot
94e1501169 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-04-05 13:53:22 +00:00
release-bot
6df6a6caa8 [maven-release-plugin] prepare for next development iteration 2024-04-05 13:48:29 +00:00
release-bot
c1701accc6 [maven-release-plugin] prepare release oneplusbot-1.6.27 2024-04-05 13:48:27 +00:00
Sheldan
cac654fc10 [OPB-xxx] upgrading abstracto version 2024-04-05 15:45:03 +02:00
Sheldan
72c8d4dbf3 [OPB-xxx] adding environment variable to get the url the bot can be reached at 2024-04-05 01:59:47 +02:00
release-bot
563f2bd35a Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-03-27 21:59:13 +00:00
release-bot
3f54b4c57d [maven-release-plugin] prepare for next development iteration 2024-03-27 21:54:46 +00:00
release-bot
0ca48d1676 [maven-release-plugin] prepare release oneplusbot-1.6.26 2024-03-27 21:54:44 +00:00
Sheldan
01232e1a7a [OPB-xxx] fixing release job 2024-03-27 22:51:56 +01:00
release-bot
7284ddc1f1 [maven-release-plugin] prepare for next development iteration 2024-03-27 21:42:23 +00:00
release-bot
90f88f6254 [maven-release-plugin] prepare release oneplusbot-1.6.25 2024-03-27 21:42:21 +00:00
Sheldan
05c95a0a00 [OPB-xxx] updating abstracto version 2024-03-27 22:28:47 +01:00
Sheldan
88cb53fad1 [OPB-xxx] fixing not updating rest api version on release 2024-03-27 00:45:22 +01:00
release-bot
b445b1c99b Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-03-26 23:38:35 +00:00
release-bot
313670d87f [maven-release-plugin] prepare for next development iteration 2024-03-26 23:34:06 +00:00
release-bot
7810acc5b8 [maven-release-plugin] prepare release oneplusbot-1.6.24 2024-03-26 23:34:04 +00:00
Sheldan
ce6a2da5d1 [OPB-xxx] updating docker compose file version 2024-03-27 00:31:02 +01:00
release-bot
0220254c84 [maven-release-plugin] prepare for next development iteration 2024-03-26 23:17:42 +00:00
release-bot
e369802bda [maven-release-plugin] prepare release oneplusbot-1.6.23 2024-03-26 23:17:40 +00:00
Sheldan
718445bbd6 [OPB-xxx] upgrading abstracto version
enabling experience leaderboard dashboard deployment
2024-03-27 00:13:23 +01:00
release-bot
6b777c9f20 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-03-17 12:56:15 +00:00
release-bot
d254f111b4 [maven-release-plugin] prepare for next development iteration 2024-03-17 12:52:21 +00:00
release-bot
fef4b0ad01 [maven-release-plugin] prepare release oneplusbot-1.6.22 2024-03-17 12:52:19 +00:00
Sheldan
ac93e11a47 [OPB-xxx] remove not accurate technology section 2024-03-17 13:49:31 +01:00
Sheldan
5bfe4a4aeb [OPB-xxx] upgrading abstracto version 2024-03-17 13:22:36 +01:00
Sheldan
216c578e08 [OPB-xxx] restructuring to use local postgres container for dev purposes
adding debug options to local dev version
removing deprecated flag from tilt file
2024-03-17 13:22:05 +01:00
release-bot
568cc85907 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-03-06 22:04:45 +00:00
release-bot
b19b3a9840 [maven-release-plugin] prepare for next development iteration 2024-03-06 21:59:09 +00:00
release-bot
54359e513e [maven-release-plugin] prepare release oneplusbot-1.6.21 2024-03-06 21:59:07 +00:00
Sheldan
65a86d2a52 [OPB-xxx] updating abstracto version to 1.5.26 2024-03-06 22:53:27 +01:00
release-bot
704d18e2f6 Commit from GitHub Actions (Publishes a new version of OnePlusBot) 2024-02-19 00:51:52 +00:00
release-bot
82d889019c [maven-release-plugin] prepare for next development iteration 2024-02-19 00:47:28 +00:00
release-bot
921789cd0b [maven-release-plugin] prepare release oneplusbot-1.6.20 2024-02-19 00:47:26 +00:00
202 changed files with 298 additions and 91 deletions

4
.env
View File

@@ -1,4 +1,4 @@
REGISTRY_PREFIX=harbor.sheldan.dev/oneplus-bot/
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
VERSION=1.6.19
ABSTRACTO_VERSION=1.5.25
VERSION=1.6.34
ABSTRACTO_VERSION=1.5.57

View File

@@ -14,7 +14,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3

View File

@@ -5,7 +5,7 @@ permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
@@ -60,7 +60,8 @@ jobs:
"bot.tag": "${{ env.version }}",
"templateDeploymentData.tag": "${{ env.version }}",
"dbConfigDeploymentData.tag": "${{ env.version }}",
"privateRestApi.tag": "${{ env.version }}"
"privateRestApi.tag": "${{ env.version }}",
"restApi.tag": "${{ env.version }}"
}
- name: Update .env version
run:
@@ -71,7 +72,7 @@ jobs:
with:
path: .env
- name: Build and push Docker containers
run: docker-compose build && docker-compose push
run: docker compose build && docker compose push
env:
REGISTRY_PREFIX: ${{ steps.dotenv.outputs.registry_prefix }}
VERSION: ${{ steps.dotenv.outputs.version }}

2
.gitignore vendored
View File

@@ -22,5 +22,7 @@ target/
*.rar
*.tgz
Chart.lock
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

3
.tiltignore Normal file
View File

@@ -0,0 +1,3 @@
*.tgz
tilt/oneplusbot-dev/tmpcharts/
tilt/oneplusbot-dev/charts/*.tgz

View File

@@ -11,11 +11,3 @@ Custom features which were ported
- [x] Setup channel handling
- [x] Referral link handling
# Technologies used in addition to the ones provided in abstracto
- [grafana](https://github.com/grafana/grafana) for visualization of the bot status and metrics
- [Loki](https://github.com/grafana/loki) to visualize and query log files
- [pgAdmin](https://github.com/postgres/pgadmin4) to view the database
- [prometheus](https://github.com/prometheus/prometheus) for metric collection
- [postgres](https://github.com/postgres/postgres) as a database
- [loki](https://github.com/grafana/loki) for log aggregation

View File

@@ -18,7 +18,7 @@ local_resource(
docker_build_with_restart(
registry + 'oneplus-bot-image',
'./application/executable/target/jar',
entrypoint=['java', '-noverify', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
entrypoint=['java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005', '-cp', '.:./lib/*', 'dev.sheldan.oneplus.bot.executable.Application'],
dockerfile='./application/executable/Dockerfile',
live_update=[
sync('./application/executable/target/jar/BOOT-INF/lib', '/app/lib'),
@@ -31,9 +31,11 @@ docker_build_with_restart(
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-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})
k8s_yaml(helm('deployment/helm/oneplus-bot', values=
local('cd tilt/oneplusbot-dev && helm dep up')
k8s_yaml(helm('tilt/oneplusbot-dev', values=
['./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.yaml',
'secrets://./../OnePlusBot-environments/argocd/apps/oneplus-bot/values/local/values.secrets.yaml']
))

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId>

View File

@@ -2,8 +2,8 @@ spring.datasource.url=jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_NAME}
spring.datasource.username= ${DB_USER}
spring.datasource.password= ${DB_PASS}
spring.datasource.hikari.maximum-pool-size=${hikariPoolSize}
spring.jpa.hibernate.default_schema=abstracto
spring.jpa.properties.hibernate.default_schema=abstracto
spring.jpa.hibernate.default_schema=${DB_SCHEMA}
spring.jpa.properties.hibernate.default_schema=${DB_SCHEMA}
spring.quartz.jdbc.initialize-schema=never
management.metrics.tags.application=OnePlusBot
management.endpoint.health.probes.enabled=true

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<artifactId>oneplus-bot-customizations</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-customizations</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,17 +3,13 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.custom</groupId>
<artifactId>oneplus-bot-customizations</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>starboard-custom</artifactId>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<build>
<plugins>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-modules</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -66,14 +66,14 @@ public class FAQ extends AbstractConditionableCommand {
.forEach(faqResponseMessageModel ->
messageFutures.add(FutureUtils.
toSingleFutureGeneric(channelService.
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_TEMPLATE_KEY,
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_TEMPLATE_KEY,
faqResponseMessageModel, commandContext.getChannel()))));
return FutureUtils.toSingleFutureGeneric(messageFutures);
} else {
return FutureUtils
.toSingleFutureGeneric(
channelService.
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
faqResponseModel, commandContext.getChannel()));
}
})
@@ -85,7 +85,7 @@ public class FAQ extends AbstractConditionableCommand {
return FutureUtils
.toSingleFutureGeneric(
channelService.
sendEmbedTemplateInTextChannelList(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
sendEmbedTemplateInMessageChannel(FAQ_RESPONSE_NO_COMMAND_FOUND_TEMPLATE_KEY,
model, commandContext.getChannel()))
.thenApply(unused -> CommandResult.fromSuccess());
}

View File

@@ -52,7 +52,7 @@ public class FAQUsage extends AbstractConditionableCommand {
model = faqUsageServiceBean.getFAQUsageModel(server, commandName);
}
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(FAQ_USAGE_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(FAQ_USAGE_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
.thenApply(unused -> CommandResult.fromSuccess());
}

View File

@@ -39,7 +39,7 @@ public class ListFAQCommands extends AbstractConditionableCommand {
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
AServer server = serverManagementService.loadServer(commandContext.getGuild());
ListFAQCommandsModel model = faqServiceBean.getCommandListingForServer(server);
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInTextChannelList(LIST_FAQ_COMMANDS_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
return FutureUtils.toSingleFutureGeneric(channelService.sendEmbedTemplateInMessageChannel(LIST_FAQ_COMMANDS_RESPONSE_TEMPLATE_KEY, model, commandContext.getChannel()))
.thenApply(unused -> CommandResult.fromSuccess());
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -119,7 +119,7 @@ public class ReferralListener implements AsyncMessageReceivedListener {
.build();
ServerUser serverUser = ServerUser.fromMember(message.getMember());
CompletableFutureList<Message> sendFutures = new CompletableFutureList<>(channelService
.sendEmbedTemplateInMessageChannelList(REFERRAL_POST_EMBED_TEMPLATE_KEY, postModel, message.getChannel()));
.sendEmbedTemplateInMessageChannel(REFERRAL_POST_EMBED_TEMPLATE_KEY, postModel, message.getChannel()));
CompletableFuture<Void> deletionFuture = messageService.deleteMessage(message);
CompletableFuture.allOf(sendFutures.getMainFuture(), deletionFuture)
.thenAccept(unused -> self.updateReferralStateInDatabase(serverUser))
@@ -139,7 +139,7 @@ public class ReferralListener implements AsyncMessageReceivedListener {
private void deleteAndNotify(Message message, String usedTemplate, Object usedModel) {
CompletableFutureList<Message> futures = new CompletableFutureList<>(channelService
.sendEmbedTemplateInMessageChannelList(usedTemplate, usedModel, message.getChannel()));
.sendEmbedTemplateInMessageChannel(usedTemplate, usedModel, message.getChannel()));
futures.getMainFuture().thenAccept(unused ->
scheduledExecutorService.schedule(() ->
futures.getObjects().forEach(createdMessage -> messageService.deleteMessage(createdMessage)),

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<artifactId>oneplus-bot-modules</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplus-bot-modules</artifactId>
<groupId>dev.sheldan.oneplus.bot.application.modules</groupId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -5,13 +5,13 @@
<parent>
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<groupId>dev.sheldan.oneplus.bot.application</groupId>
<artifactId>application</artifactId>
<packaging>pom</packaging>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
<modules>
<module>executable</module>
<module>oneplus-bot-customizations</module>

View File

@@ -2,4 +2,4 @@ apiVersion: v2
name: oneplus-bot
description: A Helm chart for Kubernetes
type: application
version: 1.6.19
version: 1.6.34

View File

@@ -4,4 +4,5 @@ metadata:
name: api-keys
data:
discordToken: {{ $.Values.apiKeys.discord.token | b64enc }} # b64enc is needed, because a stringData secret field cannot hold numeric values
youtubeApiKey: {{ $.Values.apiKeys.youtube.apiKey | b64enc }}
youtubeApiKey: {{ $.Values.apiKeys.youtube.apiKey | b64enc }}
freeCurrencyApiApiKey: {{ $.Values.apiKeys.freeCurrencyApi.apiKey | b64enc }}

View File

@@ -48,7 +48,7 @@ spec:
name: db-credentials
key: dbName
- name: DB_SCHEME
value: "abstracto"
value: {{ .Values.dbCredentials.schema }}
volumeMounts:
- mountPath: "/var/db-config/"
name: database-config-mount

View File

@@ -57,6 +57,8 @@ spec:
secretKeyRef:
name: db-credentials
key: dbName
- name: DB_SCHEMA
value: {{ .Values.dbCredentials.schema }}
- name: NEWS_FORUM_POST_NOTIFICATION_SERVER_ID
value: "{{ .Values.bot.config.newsForumPostNotificationServerId }}"
- name: TOKEN
@@ -73,8 +75,15 @@ spec:
key: youtubeApiKey
- name: PRIVATE_REST_API_HOST
value: "{{ .Values.privateRestApi.service.name }}.{{ .Release.Namespace }}.svc.cluster.local"
- name: FREE_CURRENCY_API_API_KEY
valueFrom:
secretKeyRef:
name: api-keys
key: freeCurrencyApiApiKey
- name: PRIVATE_REST_API_PORT
value: "{{ .Values.privateRestApi.service.targetPort }}"
- name: FRONTEND_BASE
value: "https://{{ .Values.bot.host }}"
{{- range $key, $value := .Values.bot.propertyConfig }}
- name: {{ $key | quote }}
value: {{ $value | quote}}

View File

@@ -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 }}

View 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 }}

View 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 }}

View File

@@ -48,7 +48,7 @@ spec:
name: db-credentials
key: dbName
- name: DB_SCHEME
value: "abstracto."
value: "{{ .Values.dbCredentials.schema }}."
volumeMounts:
- mountPath: "/var/template-config/"
name: template-config-mount

View File

@@ -3,7 +3,7 @@ bot:
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: IfNotPresent
image: oneplus-bot-image
tag: 1.6.19
tag: 1.6.34
livenessProbe:
initialDelaySeconds: 60
periodSeconds: 5
@@ -16,40 +16,42 @@ bot:
newsForumPostNotificationServerId: null
propertyConfig:
hikariPoolSize: 10
host: null
templateDeployment:
enabled: true
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-template-deployment
tag: 1.5.25
tag: 1.5.57
templateDeploymentData:
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
image: oneplus-bot-template-data
tag: 1.6.19
tag: 1.6.34
dbConfigDeployment:
enabled: true
repository: harbor.sheldan.dev/abstracto
pullPolicy: Always
image: abstracto-db-deployment
tag: 1.5.25
tag: 1.5.57
dbConfigDeploymentData:
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
image: oneplus-bot-db-data
tag: 1.6.19
tag: 1.6.34
dbCredentials:
host: null
port: null
userName: null
password: null
name: null
schema: abstracto
privateRestApi:
enabled: true
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
image: oneplus-bot-private-rest-api
tag: 1.6.19
tag: 1.6.34
podAnnotations: {}
podSecurityContext: {}
securityContext: {}
@@ -75,6 +77,46 @@ privateRestApi:
nodeSelector: {}
tolerations: []
affinity: {}
restApi:
enabled: true
repository: harbor.sheldan.dev/oneplus-bot
pullPolicy: Always
image: oneplus-bot-rest-api
tag: 1.6.34
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:
repository: harbor.sheldan.dev/grafana-tools
pullPolicy: Always
@@ -96,6 +138,8 @@ apiKeys:
twitch:
secret: null
clientId: null
freeCurrencyApi:
apiKey: null
imagePullSecrets: null
nameOverride: ''
fullnameOverride: ''

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.deployment</groupId>
<artifactId>deployment</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -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

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>oneplusbot</artifactId>
<groupId>dev.sheldan.oneplus.bot</groupId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,4 +1,4 @@
version: "3.7"
version: "3.8"
services:
bot:
@@ -16,6 +16,13 @@ services:
REGISTRY_PREFIX: ${ABSTRACTO_PREFIX}
ABSTRACTO_VERSION: ${ABSTRACTO_VERSION}
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:
build:
context: deployment/image-packaging/src/main/docker/template-data

View File

@@ -12,13 +12,13 @@
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<abstracto.version>1.5.25</abstracto.version>
<abstracto.templates.version>1.4.33</abstracto.templates.version>
<abstracto.version>1.5.57</abstracto.version>
<abstracto.templates.version>1.4.49</abstracto.templates.version>
</properties>
<modules>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
<artifactId>customization-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.customizations</groupId>
<artifactId>customization-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.modules</groupId>
<artifactId>oneplus-bot-module-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,13 +3,13 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>oneplus-bot-templates</artifactId>
<packaging>pom</packaging>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
<modules>
<module>module-templates</module>
<module>customization-templates</module>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>oneplus-bot-templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.overrides</groupId>
<artifactId>template-overrides</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot</groupId>
<artifactId>oneplusbot</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modules>
@@ -14,7 +14,7 @@
<groupId>dev.sheldan.oneplus.bot.templates</groupId>
<artifactId>templates</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
<packaging>pom</packaging>
</project>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.oneplus.bot.templates.translations.customizations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.6.20-SNAPSHOT</version>
<version>1.6.35-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Some files were not shown because too many files have changed in this diff Show More