-
Notifications
You must be signed in to change notification settings - Fork 0
/
setenv.sh
28 lines (22 loc) · 797 Bytes
/
setenv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
cd k8s
kubectl apply -f ./
cd ..
# Load the .env file
export $(grep -v '^#' .env | xargs)
# Set Kubernetes environment variables dynamically
kubectl set env deployment/consumer-deployment SECURITY_PROTOCOL=$SECURITY_PROTOCOL \
SASL_MECHANISM=$SASL_MECHANISM \
JWT_TOKEN=$JWT_TOKEN \
BOOTSTRAP_SERVERS=$BOOTSTRAP_SERVERS \
NAMESPACE=$NAMESPACE \
TOPIC_NAME=$TOPIC_NAME \
CONSUMER_GROUP_ID=$CONSUMER_GROUP_ID
kubectl set env deployment/producer-deployment SECURITY_PROTOCOL=$SECURITY_PROTOCOL \
SASL_MECHANISM=$SASL_MECHANISM \
JWT_TOKEN=$JWT_TOKEN \
BOOTSTRAP_SERVERS=$BOOTSTRAP_SERVERS \
NAMESPACE=$NAMESPACE \
TOPIC_NAME=$TOPIC_NAME \
CONSUMER_GROUP_ID=$CONSUMER_GROUP_ID
minikube service nginx-service -n default