Skip to content

Commit 81ceef6

Browse files
committed
local deploy without secrets
1 parent aac0366 commit 81ceef6

18 files changed

Lines changed: 239 additions & 6 deletions

File tree

DEPLOYMENT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ Use the environment variable `TEST_MODE` to disable certain infra service behavi
116116

117117
This is used in the infra PR clusters to set the login referer and disable telemetry.
118118

119+
#### Deployments for testing only (no secrets)
120+
121+
For test clusters (such as a local KinD/Colima), you can use the deploy-local make target to skip loading secrets. The flavor provisioning actions that require secrets will no be accessible, and integrations such as with Slack will be disabled.
122+
123+
`make deploy-local`
124+
119125
### Rollback
120126

121127
Use `helm rollback infra-server <REVISION>`.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ helm-deploy: pre-check helm-dependency-update create-namespaces
253253
helm-diff: pre-check helm-dependency-update create-namespaces
254254
@./scripts/deploy/helm.sh diff $(VERSION) $(ENVIRONMENT) $(SECRET_VERSION)
255255

256+
## Deploy to local cluster (e.g., Colima) without GCP Secret Manager
257+
.PHONY: deploy-local
258+
deploy-local: helm-dependency-update create-namespaces
259+
TEST_MODE=true ./scripts/deploy/helm.sh deploy-local $(shell make tag) local
256260
## Bounce pods
257261
.PHONY: bounce-infra-pods
258262
bounce-infra-pods:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
environment: local
2+
3+
# Disable Auth0 for local development - allow anonymous access
4+
auth0:
5+
clientID: ""
6+
tenant: ""
7+
8+
# Set local deploy mode to true for local development
9+
localDeploy: true
10+
11+
# Enable test mode for faster cluster resume intervals
12+
testMode: true
13+
14+
# Use local Docker images instead of pulling from registry
15+
imagePullPolicy: Never
16+
17+
# Pull secrets for container registries - dummy values for local development
18+
pullSecrets:
19+
docker:
20+
registry: "docker.io"
21+
username: "dummy"
22+
password: "dummy"
23+
quay:
24+
registry: "quay.io"
25+
username: "dummy"
26+
password: "dummy"
27+
stackrox:
28+
registry: "stackrox.io"
29+
username: "dummy"
30+
password: "dummy"
31+
32+
# Alertmanager configuration
33+
alertmanagerSlackTeam: "dummy-team"

chart/infra-server/templates/argo/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12
---
23
apiVersion: v1
34
kind: Secret
@@ -7,3 +8,4 @@ metadata:
78
data:
89
credentials.json: |-
910
{{ required ".Values.google_credentials_json is undefined" .Values.google_credentials_json }}
11+
{{- end }}

chart/infra-server/templates/aro/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12
---
23
apiVersion: v1
34
kind: Secret
@@ -16,3 +17,4 @@ data:
1617
{{ .Values.aroClusterManager.azureSPSecretVal | b64enc }}
1718
REDHAT_PULL_SECRET_BASE64: |-
1819
{{ .Values.aroClusterManager.redHatPullSecretBase64 | b64enc }}
20+
{{- end }}

chart/infra-server/templates/aws/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12
---
23
apiVersion: v1
34
kind: Secret
@@ -10,3 +11,4 @@ data:
1011
{{ .Values.aws.accessKeyId | b64enc }}
1112
AWS_SECRET_ACCESS_KEY: |-
1213
{{ .Values.aws.secretAccessKey | b64enc }}
14+
{{- end }}

chart/infra-server/templates/azure/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12

23
---
34

@@ -18,3 +19,4 @@ data:
1819
{{ .Values.azure.sp_tenant | b64enc }}
1920
ACR_TO_ATTACH: |-
2021
{{ .Values.azure.aks_attached_acr | b64enc }}
22+
{{- end }}

chart/infra-server/templates/demo/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12
---
23

34
apiVersion: v1
@@ -90,3 +91,4 @@ data:
9091
.dockerconfigjson: {{ template "pull-secret" .Values.pullSecrets.quay }}
9192

9293
---
94+
{{- end }}

chart/infra-server/templates/deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ spec:
2727
- name: infra-server
2828
image: quay.io/rhacs-eng/infra-server:{{ required "A valid .Values.tag entry is required!" .Values.tag }}
2929
env:
30+
{{- if not .Values.localDeploy }}
3031
- name: GOOGLE_APPLICATION_CREDENTIALS
3132
value: /configuration/google-credentials.json
33+
{{- end }}
34+
- name: LOCAL_DEPLOY
35+
value: "{{ .Values.localDeploy }}"
3236
- name: TEST_MODE
3337
value: "{{ .Values.testMode }}"
3438
readinessProbe:
@@ -47,7 +51,7 @@ spec:
4751
containerPort: 8443
4852
- name: metrics
4953
containerPort: 9101
50-
imagePullPolicy: Always
54+
imagePullPolicy: {{ .Values.imagePullPolicy | default "Always" }}
5155
volumeMounts:
5256
- mountPath: /configuration
5357
name: configuration

chart/infra-server/templates/gke/secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.localDeploy }}
12
---
23

34
apiVersion: v1
@@ -13,3 +14,4 @@ data:
1314
{{ required ".Values.gke__gke_provisioner_json is undefined" .Values.gke__gke_provisioner_json }}
1415
1516
---
17+
{{- end }}

0 commit comments

Comments
 (0)