This commit is contained in:
parent
4d319a76d2
commit
6d77a82b9f
@ -27,7 +27,7 @@ apply plugin: 'application'
|
||||
|
||||
group 'com.kmlabz.birbnetes'
|
||||
version '0.0.1'
|
||||
mainClassName = "io.ktor.server.tomcat.EngineMain"
|
||||
mainClassName = "io.ktor.server.netty.EngineMain"
|
||||
|
||||
sourceSets {
|
||||
main.kotlin.srcDirs = main.java.srcDirs = ['src']
|
||||
@ -44,7 +44,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "io.ktor:ktor-server-tomcat:$ktor_version"
|
||||
implementation "io.ktor:ktor-server-netty:$ktor_version"
|
||||
implementation "ch.qos.logback:logback-classic:$logback_version"
|
||||
implementation "io.ktor:ktor-server-core:$ktor_version"
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
|
12
k8s/configmap.yml
Normal file
12
k8s/configmap.yml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: benchmark-service-config
|
||||
labels:
|
||||
app: benchmark-service
|
||||
namespace: birbnetes
|
||||
data:
|
||||
PORT: "8080"
|
||||
BROKER: "mqtt.k8s.kmlabz.com"
|
||||
USERNAME: birbnetes
|
||||
PASSWORD: lofasz
|
30
k8s/deployment.yml
Normal file
30
k8s/deployment.yml
Normal file
@ -0,0 +1,30 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: benchmark-service
|
||||
namespace: birbnetes
|
||||
labels:
|
||||
app: benchmark-service
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: benchmark-service
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: benchmark-service
|
||||
spec:
|
||||
containers:
|
||||
- image: registry.kmlabz.com/birbnetes/benchmark-service
|
||||
imagePullPolicy: Always
|
||||
name: benchmark-service
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: benchmark-service-config
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
16
k8s/service.yml
Normal file
16
k8s/service.yml
Normal file
@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: benchmark-service
|
||||
namespace: birbnetes
|
||||
labels:
|
||||
app: benchmark-service
|
||||
spec:
|
||||
ports:
|
||||
- name: benchmark-service
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: benchmark-service
|
||||
type: ClusterIP
|
@ -14,7 +14,7 @@ import org.eclipse.paho.client.mqttv3.MqttMessage
|
||||
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence
|
||||
|
||||
|
||||
fun main(args: Array<String>): Unit = io.ktor.server.tomcat.EngineMain.main(args)
|
||||
fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)
|
||||
|
||||
@KtorExperimentalAPI
|
||||
@Suppress("unused") // Referenced in application.conf
|
||||
|
Loading…
Reference in New Issue
Block a user