Skip to content

Commit 1e9fc5d

Browse files
committed
Add imagePullSecrets to deployment templates and define sensitive GHCR authentication variables
1 parent efc229c commit 1e9fc5d

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

helm/order-service/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
labels:
1515
app: {{ .Chart.Name }}
1616
spec:
17+
imagePullSecrets:
18+
- name: ghcr-secret
1719
containers:
1820
- name: {{ .Chart.Name }}
1921
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

helm/product-service/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
labels:
1515
app: {{ .Chart.Name }}
1616
spec:
17+
imagePullSecrets:
18+
- name: ghcr-secret
1719
containers:
1820
- name: {{ .Chart.Name }}
1921
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

helm/user-service/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
labels:
1515
app: {{ .Chart.Name }}
1616
spec:
17+
imagePullSecrets:
18+
- name: ghcr-secret
1719
containers:
1820
- name: {{ .Chart.Name }}
1921
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

terraform/environments/qa/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ module "aks" {
3333
resource_group_name = var.resource_group_name
3434
location = var.location
3535
cluster_name = var.cluster_name
36+
37+
ghcr_username = var.ghcr_username
38+
ghcr_pat = var.ghcr_pat
3639
}
3740

3841
module "key_vault" {

terraform/environments/qa/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,16 @@ variable "container_name" {
1414
variable "tags" {
1515
type = map(string)
1616
default = {}
17+
}
18+
19+
variable "ghcr_username" {
20+
description = "GitHub username for GHCR authentication"
21+
type = string
22+
sensitive = true
23+
}
24+
25+
variable "ghcr_pat" {
26+
description = "GitHub PAT for GHCR authentication"
27+
type = string
28+
sensitive = true
1729
}

0 commit comments

Comments
 (0)