Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

27 changes: 27 additions & 0 deletions order-service/order-service-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1 # Specifies the API version being used (apps/v1 in this case).
kind: Deployment # Defines the Kubernetes resource type as a Deployment.
metadata:
name: order-service-deploy # Name of the Deployment resource
spec:
replicas: 1 # Specifies the desired number of replicas for the Deployment
selector:
matchLabels:
app: order-service # Selects Pods based on the app label with the value order-service
template:
metadata:
labels:
app: order-service # Labels the Pods created by this template with the app label and value order-service
spec:
containers:
- name: order-service # Name of the container within the Pod
image: ghcr.io/irvanfebri/order-service:latest # Docker image used for the container
ports:
- containerPort: 3000 # Port on which the container listens for incoming traffic
env:
- name: AMQP_PASSWORD # Environmental variable name for the RabbitMQ password
valueFrom:
secretKeyRef:
name: my-rabbitmq # Name of the Secret containing the RabbitMQ password
key: rabbitmq-password # Key within the Secret to retrieve the RabbitMQ password
- name: AMQP_URL # Environmental variable name for the RabbitMQ URL
value: "amqp://user:$(AMQP_PASSWORD)@my-rabbitmq:5672" # Value for the RabbitMQ URL, including the username, password, and host
14 changes: 14 additions & 0 deletions order-service/order-service-gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: networking.istio.io/v1alpha3 # Specifies the API version being used (networking.istio.io/v1alpha3 in this case).
kind: Gateway # Defines the Kubernetes resource type as a Gateway.
metadata:
name: order-service-gw # Name of the Istio Gateway for the order service.
spec:
selector:
istio: ingressgateway # Selector for the ingress gateway.
servers:
- port:
number: 80 # Port number for HTTP traffic.
name: http # Name of the HTTP protocol.
protocol: HTTP # Protocol used for this port (HTTP).
hosts:
- "*" # Accepting requests from all hosts.
9 changes: 9 additions & 0 deletions order-service/order-service-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1 # Specifies the API version being used (v1 in this case).
kind: Service # Defines the Kubernetes resource type as a Service.
metadata:
name: order-service-svc # Name assigned to this Service resource.
spec:
selector:
app: order-service # Selects pods labeled with 'app: order-service'.
ports:
- port: 3000 # Exposes the Service on port 3000 using TCP protocol.
18 changes: 18 additions & 0 deletions order-service/order-service-virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.istio.io/v1alpha3 # Specifies the API version being used (networking.istio.io/v1alpha3 in this case).
kind: VirtualService # Defines that this YAML describes a VirtualService Service.
metadata:
name: order-service-vs # Name of the VirtualService
spec:
hosts:
- "*" # Match all hosts
gateways:
- order-service-gw # Use the order-service-gw gateway
http:
- match:
- uri:
exact: "/order" # Match exact URI "/order"
route:
- destination:
host: order-service-svc # Send traffic to order-service-svc
port:
number: 3000 # Use port 3000
27 changes: 27 additions & 0 deletions shipping-service/shipping-service-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: apps/v1 # Specifies the API version being used (apps/v1 in this case).
kind: Deployment # Defines that this YAML describes a Kubernetes Deployment.
metadata:
name: shipping-service-deploy # Deployment name for the shipping service
spec:
replicas: 1 # Desired number of replicas for the shipping service
selector:
matchLabels:
app: shipping-service # Selector label for the shipping service app
template:
metadata:
labels:
app: shipping-service # Label for the shipping service app
spec:
containers:
- name: shipping-service # Container name for the shipping service
image: ghcr.io/irvanfebri/shipping-service:latest # Container image for the shipping service
ports:
- containerPort: 3001 # Port on which the shipping service container listens
env:
- name: AMQP_PASSWORD # Environment variable for AMQP password
valueFrom:
secretKeyRef:
name: my-rabbitmq # Secret name for RabbitMQ credentials
key: rabbitmq-password # Secret key for RabbitMQ password
- name: AMQP_URL # Environment variable for AMQP URL
value: "amqp://user:$(AMQP_PASSWORD)@my-rabbitmq:5672" # Value for the AMQP URL
9 changes: 9 additions & 0 deletions shipping-service/shipping-service-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1 # Specifies the API version being used (v1 in this case).
kind: Service # Defines that this YAML describes a Kubernetes Service.
metadata:
name: shipping-service-svc # Specifies the name of the Service.
spec:
selector:
app: shipping-service # Defines the selector to identify the pods targeted by this service.
ports:
- port: 3001 # Specifies the port number (3001 in this case).