<commit_before>apiVersion: v1
kind: Template
metadata:
  name: kafkanetes-deploy-kafka-2
  annotations:
    description: 2-pod Kafka
    tags: messaging,kafka

parameters:
- name: VOLUME_CAPACITY
  description: Persistent volume capacity per pod, e.g. 512Mi, 2Gi
  required: true
  value: 512Mi
- name: OBJECT_NAME_PREFIX
  description: Name prefix for each object created
  required: true
  value: kafkanetes-kafka
- name: ZOOKEEPER_SERVICE
  description: DNS name of ZooKeeper service
  required: true
  value: kafkanetes-zk
- name: IMAGESTREAM
  description: Kafkanetes imagestream name
  required: true
  value: kafkanetes

objects:
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: ${VOLUME_CAPACITY}

- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: ${OBJECT_NAME_PREFIX}-2
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: ${VOLUME_CAPACITY}

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    replicas: 1
    selector:
      deploymentconfig: ${OBJECT_NAME_PREFIX}-1
    template:
      metadata:
        labels:
          app: ${OBJECT_NAME_PREFIX}
          deploymentconfig: ${OBJECT_NAME_PREFIX}-1
      spec:
        containers:
        - name: kafkanetes
          image: ${IMAGESTREAM}
          command:
          - bin/kafka-server-start.sh
          args:
          - config/server.properties
          - --override
          - zookeeper.connect=${ZOOKEEPER_SERVICE}
          - --override
          - advertised.host.name=${OBJECT_NAME_PREFIX}-1
          - --override
          - broker.id=0
          volumeMounts:
          - mountPath: /tmp/kafka-logs
            name: kafka-logs
          ports:
          - containerPort: 9092
        volumes:
        - name: kafka-logs
          persistentVolumeClaim:
            claimName: ${OBJECT_NAME_PREFIX}-1
    triggers:
    - type: ConfigChange
    - type: ImageChange
      imageChangeParams:
        automatic: false
        containerNames:
        - kafkanetes
        from:
          kind: ImageStream
          name: ${IMAGESTREAM}

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: ${OBJECT_NAME_PREFIX}-2
  spec:
    replicas: 1
    selector:
      deploymentconfig: ${OBJECT_NAME_PREFIX}-2
    template:
      metadata:
        labels:
          app: ${OBJECT_NAME_PREFIX}
          deploymentconfig: ${OBJECT_NAME_PREFIX}-2
      spec:
        containers:
        - name: kafkanetes
          image: ${IMAGESTREAM}
          command:
          - bin/kafka-server-start.sh
          args:
          - config/server.properties
          - --override
          - zookeeper.connect=${ZOOKEEPER_SERVICE}
          - --override
          - advertised.host.name=${OBJECT_NAME_PREFIX}-2
          - --override
          - broker.id=1
          volumeMounts:
          - mountPath: /tmp/kafka-logs
            name: kafka-logs
          ports:
          - containerPort: 9092
        volumes:
        - name: kafka-logs
          persistentVolumeClaim:
            claimName: ${OBJECT_NAME_PREFIX}-2
    triggers:
    - type: ConfigChange
    - type: ImageChange
      imageChangeParams:
        automatic: false
        containerNames:
        - kafkanetes
        from:
          kind: ImageStream
          name: ${IMAGESTREAM}

- apiVersion: v1
  kind: Service
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    ports:<commit_msg>Added advertised hostname<commit_after>apiVersion: v1
kind: Template
metadata:
  name: kafkanetes-deploy-kafka-2
  annotations:
    description: 2-pod Kafka
    tags: messaging,kafka

parameters:
- name: VOLUME_CAPACITY
  description: Persistent volume capacity per pod, e.g. 512Mi, 2Gi
  required: true
  value: 512Mi
- name: OBJECT_NAME_PREFIX
  description: Name prefix for each object created
  required: true
  value: kafkanetes-kafka
- name: ZOOKEEPER_SERVICE
  description: DNS name of ZooKeeper service
  required: true
  value: kafkanetes-zk
- name: IMAGESTREAM
  description: Kafkanetes imagestream name
  required: true
  value: kafkanetes

objects:
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: ${VOLUME_CAPACITY}

- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: ${OBJECT_NAME_PREFIX}-2
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: ${VOLUME_CAPACITY}

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    replicas: 1
    selector:
      deploymentconfig: ${OBJECT_NAME_PREFIX}-1
    template:
      metadata:
        labels:
          app: ${OBJECT_NAME_PREFIX}
          deploymentconfig: ${OBJECT_NAME_PREFIX}-1
      spec:
        containers:
        - name: kafkanetes
          image: ${IMAGESTREAM}
          command:
          - bin/kafka-server-start.sh
          args:
          - config/server.properties
          - --override
          - zookeeper.connect=${ZOOKEEPER_SERVICE}
          - --override
          - advertised.host.name=${OBJECT_NAME_PREFIX}-1-hep.apps.ota.ose.rabobank.nl
          - --override
          - broker.id=0
          volumeMounts:
          - mountPath: /tmp/kafka-logs
            name: kafka-logs
          ports:
          - containerPort: 9092
        volumes:
        - name: kafka-logs
          persistentVolumeClaim:
            claimName: ${OBJECT_NAME_PREFIX}-1
    triggers:
    - type: ConfigChange
    - type: ImageChange
      imageChangeParams:
        automatic: false
        containerNames:
        - kafkanetes
        from:
          kind: ImageStream
          name: ${IMAGESTREAM}

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: ${OBJECT_NAME_PREFIX}-2
  spec:
    replicas: 1
    selector:
      deploymentconfig: ${OBJECT_NAME_PREFIX}-2
    template:
      metadata:
        labels:
          app: ${OBJECT_NAME_PREFIX}
          deploymentconfig: ${OBJECT_NAME_PREFIX}-2
      spec:
        containers:
        - name: kafkanetes
          image: ${IMAGESTREAM}
          command:
          - bin/kafka-server-start.sh
          args:
          - config/server.properties
          - --override
          - zookeeper.connect=${ZOOKEEPER_SERVICE}
          - --override
          - advertised.host.name=${OBJECT_NAME_PREFIX}-2-hep.apps.ota.ose.rabobank.nl
          - --override
          - broker.id=1
          volumeMounts:
          - mountPath: /tmp/kafka-logs
            name: kafka-logs
          ports:
          - containerPort: 9092
        volumes:
        - name: kafka-logs
          persistentVolumeClaim:
            claimName: ${OBJECT_NAME_PREFIX}-2
    triggers:
    - type: ConfigChange
    - type: ImageChange
      imageChangeParams:
        automatic: false
        containerNames:
        - kafkanetes
        from:
          kind: ImageStream
          name: ${IMAGESTREAM}

- apiVersion: v1
  kind: Service
  metadata:
    name: ${OBJECT_NAME_PREFIX}-1
  spec:
    ports:
{'fraction_non_alphanumeric': 0.08700471044610696, 'fraction_numerical': 0.011083402604599613, 'mean_word_length': 1.959819598195982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5778222', 'n_tokens_mistral': 2205, 'n_tokens_neox': 2167, 'n_words': 465}