diff --git a/.github/workflows/ghcr-push.yml b/.github/workflows/ghcr-push.yml index 6549481..c37bc2d 100644 --- a/.github/workflows/ghcr-push.yml +++ b/.github/workflows/ghcr-push.yml @@ -20,20 +20,11 @@ jobs: contents: read steps: - uses: actions/checkout@v4 - # need to repeat the build for following directories: - # - csp1_producer - # - csp1_consumer - # - csp1_transformer - # - csp2_producer - # - csp2_transformer - # - dashboard - - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - name: Build and push csp1_producer + - name: Build and push everything run: | cd csp1_producer - # todo: for DIR in csp2_transformer csp1_producer csp1_consumer csp1_transformer csp2_producer dashboard ;do IMAGE_NAME=$PROJECT/$DIR IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME diff --git a/kubernetes/csp1_consumer.yaml b/kubernetes/csp1_consumer.yaml new file mode 100644 index 0000000..bc8b521 --- /dev/null +++ b/kubernetes/csp1_consumer.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csp1-consumer + labels: + app: csp1-consumer +spec: + replicas: 1 + selector: + matchLabels: + app: csp1-consumer + template: + metadata: + labels: + app: csp1-consumer + spec: + containers: + - name: csp1-consumer + image: ghcr.io/kafka-trainings/example-project/csp1_consumer:latest + ports: + - containerPort: 8080 + volumeMounts: + - name: config + mountPath: /app/app.properties + volumes: + - name: config + configMap: + name: csp1-consumer-config +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: csp1-consumer-config +data: + app.properties: | + bootstrap.servers=broker:9092 + topic=csp1_transactions + group.id=csp1_consumer + app.log.infos=true + client.id=csp1_consumer \ No newline at end of file diff --git a/kubernetes/csp1_producer.yaml b/kubernetes/csp1_producer.yaml new file mode 100644 index 0000000..ad338dc --- /dev/null +++ b/kubernetes/csp1_producer.yaml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: csp1-producer + labels: + app: csp1-producer +spec: + replicas: 1 + selector: + matchLabels: + app: csp1-producer + template: + metadata: + labels: + app: csp1-producer + spec: + containers: + - name: csp1-producer + image: ghcr.io/kafka-trainings/example-project/csp1_producer:latest + ports: + - containerPort: 8080 + volumeMounts: + - name: config + mountPath: /app/app.properties + volumes: + - name: config + configMap: + name: csp1-producer-config +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: csp1-producer-config +data: + app.properties: | + bootstrap.servers=broker:9092 + topic=csp1_transactions + producer.msgs.per.sec=1 + app.log.infos=true + client.id=csp1_producer \ No newline at end of file