Skip to content
Merged
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
5 changes: 4 additions & 1 deletion helm/bytebite/templates/api-gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.apiGateway.image.pullPolicy }}
resources:
limits:
cpu: "500m"
cpu: "300m"
memory: "512Mi"
requests:
cpu: "200m"
Expand All @@ -31,6 +31,9 @@ spec:
value: "http://grocery-service:{{ .Values.groceryService.service.port }}"
- name: USER_SERVICE_BASE_URL
value: "http://user-service:{{ .Values.userService.service.port }}"
# Only used to proxy gen-ai's OpenAPI spec into the gateway's Swagger UI.
- name: GENAI_SERVICE_BASE_URL
value: "http://genai-service:{{ .Values.genai.service.port }}"
{{- if .Values.jwt.secret }}
# Shared JWT secret (verifies tokens). Must match user-service. Only
# injected when set; otherwise the app's built-in default applies.
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/client-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.client.image.pullPolicy }}
resources:
limits:
cpu: "500m"
cpu: "100m"
memory: "256Mi"
requests:
cpu: "50m"
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/genai-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.genai.image.pullPolicy }}
resources:
limits:
cpu: "500m"
cpu: "250m"
memory: "512Mi"
requests:
cpu: "100m"
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/grocery-db-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
imagePullPolicy: {{ .Values.groceryDb.image.pullPolicy }}
resources:
limits:
cpu: "250m"
cpu: "200m"
memory: "256Mi"
requests:
cpu: "100m"
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/grocery-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.groceryService.image.pullPolicy }}
resources:
limits:
cpu: "500m"
cpu: "300m"
memory: "512Mi"
requests:
cpu: "200m"
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/user-db-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
imagePullPolicy: {{ .Values.userDb.image.pullPolicy }}
resources:
limits:
cpu: "250m"
cpu: "200m"
memory: "256Mi"
requests:
cpu: "100m"
Expand Down
2 changes: 1 addition & 1 deletion helm/bytebite/templates/user-service-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
imagePullPolicy: {{ .Values.userService.image.pullPolicy }}
resources:
limits:
cpu: "500m"
cpu: "300m"
memory: "512Mi"
requests:
cpu: "200m"
Expand Down
4 changes: 2 additions & 2 deletions helm/bytebite/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ monitoring:
pullPolicy: IfNotPresent
resources:
limits:
cpu: "300m"
cpu: "200m"
memory: "512Mi"
requests:
cpu: "100m"
Expand All @@ -121,7 +121,7 @@ monitoring:
pullPolicy: IfNotPresent
resources:
limits:
cpu: "300m"
cpu: "150m"
memory: "256Mi"
requests:
cpu: "100m"
Expand Down
3 changes: 3 additions & 0 deletions infra/terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion infra/terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let Ansible connect. cloud-init is therefore minimal (it just ensures Python 3 i
`../ansible/` folder (`inventory.ini`, `ssh_key.pem`) on `apply`. Both are gitignored.

State is stored **remotely** in Azure Storage (`azurerm` backend in `versions.tf`:
`teamstatebytebite` / `tfstate` container), so CI and team members share one locked state.
`bytebitetim` / `tfstate` container), so CI and team members share one locked state.

## Prerequisites

Expand Down
4 changes: 2 additions & 2 deletions infra/terraform/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ terraform {
}

backend "azurerm" {
resource_group_name = "terraform_bitebyte"
storage_account_name = "teamstatebytebite"
resource_group_name = "terraform_bytebite"
storage_account_name = "bytebitetim"
Comment on lines +20 to +21

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
rg -n -C 3 'terraform init|resource_group_name|storage_account_name|container_name' \
  .github/workflows infra/terraform

Repository: AET-DevOps26/team-bytebite

Length of output: 5223


Migrate the Terraform state before switching backend coordinates. terraform init -input=false will point CI at a new state location; if that backend is empty, apply can run against fresh state and recreate existing infrastructure. Use -migrate-state for an intentional move, or -reconfigure only if a separate state is intended, and make sure the first plan is a no-op.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@infra/terraform/versions.tf` around lines 20 - 21, Update the Terraform
backend initialization workflow associated with resource_group_name and
storage_account_name to explicitly migrate existing state when switching backend
coordinates, using -migrate-state rather than silently adopting the new
location. Verify the first plan is a no-op; use -reconfigure only when a
separate state is intentionally required.

container_name = "tfstate"
key = "terraform.tfstate"
}
Expand Down
Loading