Skip to content

Commit

Permalink
GCP key sercret created
Browse files Browse the repository at this point in the history
  • Loading branch information
abidknashtech committed Nov 17, 2023
1 parent 07d377f commit 9801ef2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/car-demo-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
- uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ env.GKE_PROJECT }}
service_account_key: ${{env.GKE_KEY}}
export_default_credentials: true

# Configure Docker to use the gcloud command-line tool as a credential
# helper for authentication
Expand All @@ -42,4 +40,3 @@ jobs:
. apps-deployment-script.sh "us-east1"
env:
GITHUB_TOKEN: ${{ github.token }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GKE_KEY }}
14 changes: 12 additions & 2 deletions inventory-service/gcp-deploy-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
labels:
app: inventoryservice
spec:
volumes:
- name: google-cloud-keys
secret:
secretName: gac-key
containers:
- name: inventoryservice
image: gcr.io/PROJECT_ID/IMAGE:TAG
Expand All @@ -22,7 +26,13 @@ spec:
- name: http
containerPort: 9091
protocol: TCP
volumeMounts:
- name: google-cloud-keys
mountPath: /var/secrets/google
readOnly: true
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/key.json
- name: MYSQL_DB_USERNAME
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -106,8 +116,8 @@ metadata:
name: inventory-configmap
data:
# Configuration values can be set as key-value properties
MYSQL_HOST: 35.237.167.102
AXON_HOST: 34.74.201.108:8124
MYSQL_HOST: 104.196.43.152
AXON_HOST: 35.190.149.67:8124
SERVICE_NAME: InventoryService
GCP_PROJECT_ID: datamesh-2
PRODUCT_SUBSCRIPTION: inventory_subscription

0 comments on commit 9801ef2

Please sign in to comment.