This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_kubernetes_cluster_node_pool" "main" { | |
| name = "main" | |
| kubernetes_cluster_id = azurerm_kubernetes_cluster.main_aks.id | |
| vm_size = "Standard_DS2_v2" | |
| node_count = 1 | |
| min_count = 1 | |
| max_count = 5 | |
| vnet_subnet_id = azurerm_subnet.aks_subnet.id | |
| orchestrator_version = azurerm_kubernetes_cluster.main_aks.kubernetes_version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_kubernetes_cluster" "main_aks" { | |
| name = local.aks_name | |
| location = azurerm_resource_group.rg_prod.location | |
| resource_group_name = azurerm_resource_group.rg_prod.name | |
| dns_prefix = "aksprod" | |
| sku_tier = "Standard" | |
| kubernetes_version = "1.27" | |
| automatic_channel_upgrade = "stable" | |
| node_resource_group = "${local.rg_name}-${local.aks_name}-prod" | |
| oidc_issuer_enabled = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_user_assigned_identity" "user_aid" { | |
| name = "aks-example-identity" | |
| resource_group_name = azurerm_resource_group.rg_prod.name | |
| location = azurerm_resource_group.rg_prod.location | |
| } | |
| resource "azurerm_role_assignment" "network_contributor" { | |
| scope = azurerm_resource_group.rg_prod.id | |
| role_definition_name = "Network Contributor" | |
| principal_id = azurerm_user_assigned_identity.user_aid.principal_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_virtual_network" "vn_prod" { | |
| name = local.vnet_name | |
| location = azurerm_resource_group.rg_prod.location | |
| resource_group_name = azurerm_resource_group.rg_prod.name | |
| address_space = ["10.8.0.0/16"] | |
| tags = { | |
| environment = local.environment | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "azurerm_resource_group" "rg_prod" { | |
| name = local.rg_name | |
| location = local.location | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| producer: | |
| build: producer | |
| environment: | |
| - SPRING_PROFILES_ACTIVE=docker,kafka | |
| depends_on: | |
| - kafka | |
| ports: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM openjdk:17.0.2-slim-buster as builder | |
| WORKDIR tmp | |
| ARG JAR_FILE=target/*.jar | |
| COPY ${JAR_FILE} application.jar | |
| RUN java -Djarmode=layertools -jar --enable-preview application.jar extract | |
| FROM openjdk:17.0.2-slim-buster | |
| RUN addgroup demo && useradd -g demo -ms /bin/bash app | |
| USER app | |
| WORKDIR /home/app/application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server: | |
| port: 9097 | |
| app: | |
| messaging.kafka.broker: 127.0.0.1 | |
| spring: | |
| application.name: consumer | |
| cloud: | |
| stream: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.consumer.integration; | |
| import com.example.core.Message; | |
| import com.example.event.Event; | |
| import lombok.extern.log4j.Log4j2; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.stereotype.Component; | |
| import java.util.function.Consumer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server: | |
| port: 9095 | |
| app: | |
| messaging.kafka.broker: 127.0.0.1 | |
| spring: | |
| application.name: producer | |
| cloud: | |
| stream: |