Skip to content
Snippets Groups Projects
uc1-beam-samza-deployment.yaml 2.09 KiB
Newer Older
apiVersion: apps/v1
kind: Deployment
metadata:
  name: titan-ccp-aggregation
spec:
  selector:
    matchLabels:
      app: titan-ccp-aggregation
  replicas: 1
  template:
    metadata:
      labels:
        app: titan-ccp-aggregation
    spec:
      terminationGracePeriodSeconds: 0
      containers:
        - name: uc-application
          image: uc1-beam-samza:latest
          imagePullPolicy: Never # for local testing 
          ports:
            - containerPort: 5555
              name: jmx
          env:
            - name: SAMZA_JOB_COORDINATOR_ZK_CONNECT
              value: "HelloThere"
            - name: SAMZA_SYSTEMS_KAFKA_CONSUMER_ZOOKEEPER_CONNECT
              value: "HelloThere"
            - name: MAX_SOURCE_PARALLELISM
              value: "1024"
            - name: KAFKA_BOOTSTRAP_SERVERS
              value: "theodolite-cp-kafka:9092"
            - name: SCHEMA_REGISTRY_URL
              value: "http://theodolite-cp-schema-registry:8081"
            - name: JAVA_OPTS
              value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555"
            - name: COMMIT_INTERVAL_MS # Set as default for the applications
              value: "100"
          resources:
            limits:
              memory: 4Gi
              cpu: 1000m
        - name: prometheus-jmx-exporter
          image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143"
          command:
            - java
            - -XX:+UnlockExperimentalVMOptions
            - -XX:+UseCGroupMemoryLimitForHeap
            - -XX:MaxRAMFraction=1
            - -XshowSettings:vm
            - -jar
            - jmx_prometheus_httpserver.jar
            - "5556"
            - /etc/jmx-aggregation/jmx-kafka-prometheus.yml
          ports:
            - containerPort: 5556
          volumeMounts:
            - name: jmx-config
              mountPath: /etc/jmx-aggregation
      volumes:
        - name: jmx-config
          configMap:
            name: uc1-jmx-configmap