apiVersion: v1
kind: Pod
metadata:
  labels:
    run: cloudtopic
  name: cloudtopic
spec:
  containers:
  - image: confluentinc/cp-kafka:latest
    name: cloudtopic
    command:
    - /bin/sh
    - -c
    - |
      kafka-topics --bootstrap-server <ccloud-endpoint:9092> \
        --command-config  /mnt/kafka.properties \
        --create \
        --partitions 3 \
        --replication-factor 3 \
        --topic topic-in-source \
        --if-not-exists
    volumeMounts:
    - name: kafka-properties
      mountPath: /mnt
  volumes:
    - name: kafka-properties # Create secret with name `kafka-client-config` with client configurations
      secret:
        secretName: kafka-client-config-secure
  dnsPolicy: ClusterFirst
  restartPolicy: Never

