Add complex application
This commit is contained in:
parent
4776de345f
commit
6c8e6ca4f6
90
complex-application/consumer.yaml
Normal file
90
complex-application/consumer.yaml
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: data-consumer
|
||||||
|
application: amm-techlab
|
||||||
|
name: data-consumer
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
deployment: data-consumer
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
deployment: data-consumer
|
||||||
|
app: data-consumer
|
||||||
|
application: amm-techlab
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/puzzle/quarkus-techlab-data-consumer:jaegerkafka
|
||||||
|
imagePullPolicy: Always
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 15
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /health
|
||||||
|
port: 8080
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 20
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 15
|
||||||
|
name: data-consumer
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: '1'
|
||||||
|
memory: 500Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
app: data-consumer
|
||||||
|
name: data-consumer
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
deployment: data-consumer
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
||||||
|
---
|
||||||
|
apiVersion: route.openshift.io/v1
|
||||||
|
kind: Route
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
app: data-consumer
|
||||||
|
name: data-consumer
|
||||||
|
spec:
|
||||||
|
path: /
|
||||||
|
tls:
|
||||||
|
insecureEdgeTerminationPolicy: Allow
|
||||||
|
termination: edge
|
||||||
|
to:
|
||||||
|
kind: Service
|
||||||
|
name: data-consumer
|
15
complex-application/consumerConfigMap.yaml
Normal file
15
complex-application/consumerConfigMap.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: consumer-config
|
||||||
|
data:
|
||||||
|
# Configure the SmallRye Kafka connector
|
||||||
|
kafka.bootstrap.servers: 'amm-techlab-kafka-bootstrap:9092'
|
||||||
|
|
||||||
|
#Toggle jaeger trace feature
|
||||||
|
consumer.jaeger.enabled: 'true'
|
||||||
|
|
||||||
|
# Configure the Kafka sink
|
||||||
|
mp.messaging.incoming.data.connector: smallrye-kafka
|
||||||
|
mp.messaging.incoming.data.topic: manual
|
||||||
|
mp.messaging.incoming.data.value.deserializer: ch.puzzle.quarkustechlab.reactiveconsumer.control.SensorMeasurementDeserializer
|
4
complex-application/jaeger.yaml
Normal file
4
complex-application/jaeger.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: jaegertracing.io/v1
|
||||||
|
kind: Jaeger
|
||||||
|
metadata:
|
||||||
|
name: jaeger-all-in-one-inmemory
|
49
complex-application/kafka-cluster.yaml
Normal file
49
complex-application/kafka-cluster.yaml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: kafka.strimzi.io/v1beta1
|
||||||
|
kind: Kafka
|
||||||
|
metadata:
|
||||||
|
name: amm-techlab
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
spec:
|
||||||
|
kafka:
|
||||||
|
version: 2.6.0
|
||||||
|
replicas: 1
|
||||||
|
listeners:
|
||||||
|
plain: {}
|
||||||
|
tls: {}
|
||||||
|
config:
|
||||||
|
auto.create.topics.enable: false
|
||||||
|
offsets.topic.replication.factor: 1
|
||||||
|
transaction.state.log.replication.factor: 1
|
||||||
|
transaction.state.log.min.isr: 1
|
||||||
|
log.message.format.version: "2.6"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 128Mi
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: 4Gi
|
||||||
|
cpu: "2"
|
||||||
|
storage:
|
||||||
|
type: jbod
|
||||||
|
volumes:
|
||||||
|
- id: 0
|
||||||
|
type: persistent-claim
|
||||||
|
size: 10Gi
|
||||||
|
deleteClaim: false
|
||||||
|
zookeeper:
|
||||||
|
replicas: 1
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: 128Mi
|
||||||
|
cpu: "50m"
|
||||||
|
limits:
|
||||||
|
memory: 4Gi
|
||||||
|
cpu: "2"
|
||||||
|
storage:
|
||||||
|
type: persistent-claim
|
||||||
|
size: 10Gi
|
||||||
|
deleteClaim: false
|
||||||
|
entityOperator:
|
||||||
|
topicOperator: {}
|
||||||
|
userOperator: {}
|
13
complex-application/manual-topic.yaml
Normal file
13
complex-application/manual-topic.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: kafka.strimzi.io/v1beta1
|
||||||
|
kind: KafkaTopic
|
||||||
|
metadata:
|
||||||
|
name: manual
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
strimzi.io/cluster: amm-techlab
|
||||||
|
spec:
|
||||||
|
partitions: 1
|
||||||
|
replicas: 1
|
||||||
|
config:
|
||||||
|
retention.ms: 7200000
|
||||||
|
segment.bytes: 1073741824
|
57
complex-application/producer.yaml
Normal file
57
complex-application/producer.yaml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: data-producer
|
||||||
|
application: amm-techlab
|
||||||
|
name: data-producer
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
deployment: data-producer
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
deployment: data-producer
|
||||||
|
app: data-producer
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: quay.io/puzzle/quarkus-techlab-data-producer:jaegerkafka
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: PRODUCER_JAEGER_ENABLED
|
||||||
|
value: 'true'
|
||||||
|
livenessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /health/live
|
||||||
|
port: 8080
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 20
|
||||||
|
timeoutSeconds: 15
|
||||||
|
readinessProbe:
|
||||||
|
failureThreshold: 5
|
||||||
|
httpGet:
|
||||||
|
path: /health/ready
|
||||||
|
port: 8080
|
||||||
|
scheme: HTTP
|
||||||
|
initialDelaySeconds: 3
|
||||||
|
periodSeconds: 20
|
||||||
|
timeoutSeconds: 15
|
||||||
|
name: data-producer
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: '1'
|
||||||
|
memory: 500Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
16
complex-application/route.yaml
Normal file
16
complex-application/route.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: route.openshift.io/v1
|
||||||
|
kind: Route
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
name: data-producer
|
||||||
|
spec:
|
||||||
|
port:
|
||||||
|
targetPort: http
|
||||||
|
to:
|
||||||
|
kind: Service
|
||||||
|
name: data-producer
|
||||||
|
weight: 100
|
||||||
|
tls:
|
||||||
|
termination: edge
|
||||||
|
wildcardPolicy: None
|
17
complex-application/svc.yaml
Normal file
17
complex-application/svc.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: data-producer
|
||||||
|
labels:
|
||||||
|
application: amm-techlab
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 8080
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
selector:
|
||||||
|
app: data-producer
|
||||||
|
deployment: data-producer
|
||||||
|
sessionAffinity: None
|
||||||
|
type: ClusterIP
|
Loading…
x
Reference in New Issue
Block a user