Skip to content

Commit a8cd18b

Browse files
authored
ITEP-72660: [Kubernetes] Build and Deploy Automation critically broken (#213)
This PR restores the previously broken Kubernetes deployment and introduces proxy configuration support, enabling the platform to run reliably behind corporate proxies. ### Summary of Changes #### Dockerfile Updates - Updated Dockerfile paths and improved dependency installation for secrets and models images. #### Jobs & Scripts: - Improved error handling in Kubernetes job templates. - Minor corrections to paths in init jobs #### Proxy Support - Added proxy configuration to Helm charts (values.yaml) and deployment templates. - All containers now have proxy environment variables set (HTTP_PROXY, HTTPS_PROXY, NO_PROXY and lowercase variants) if enabled at the chart level. - Kubernetes Makefile detects and automatically passes proxy env vars to Helm. #### Deployment Options - Added CHART_DEBUG environment variable for enabling Helm chart debug mode. - Documented new environment variable and deployment scenarios in README.md files. #### Helm Chart & App Version - Bumped Helm chart version to 1.2.1 and appVersion to 1.4.0-alpha. ### Testing https://github.com/intel-innersource/frameworks.ai.scenescape-ci-open-edge-platform/actions/runs/16568408291/job/46854011149 <img width="442" height="94" alt="image" src="https://github.com/user-attachments/assets/a6b9e2fe-df78-4a3f-9a3f-70f1be8e8a74" /> Manually tested **happy path only** described in [the docs](https://github.com/open-edge-platform/scenescape/tree/main/kubernetes). ```sh $ SKIP_BRINGUP=1 REQUIRED_FPS=0 ./deploy.sh $ make -C kubernetes ... NAME: scenescape-release-1 LAST DEPLOYED: Fri Jul 25 15:55:59 2025 NAMESPACE: scenescape STATUS: deployed REVISION: 1 TEST SUITE: None make: Leaving directory '/home/jdanieck/repos/scenescape/kubernetes' jdanieck@jdanieck-dev:~/repos/scenescape$ kubectl get pods -n scenescape NAME READY STATUS RESTARTS AGE scenescape-release-1-atag-qcam1-atag-qcam1-de57f5c8-video-wl8xb 1/1 Running 0 78s scenescape-release-1-atag-qcam2-atag-qcam2-d41a19c2-video-f4p7v 1/1 Running 0 78s scenescape-release-1-broker-dep-599b987cf7-gdf6z 1/1 Running 0 4m22s scenescape-release-1-camcalibration-dep-8667f5f9dd-282dv 1/1 Running 0 4m22s scenescape-release-1-camera1-camera1-858d3192-video-dep-659hgnq 1/1 Running 0 78s scenescape-release-1-camera2-camera2-f4b78bdb-video-dep-57p7s2h 1/1 Running 0 78s scenescape-release-1-kubeclient-dep-7f99f85b65-gffzd 1/1 Running 0 4m22s scenescape-release-1-ntp-dep-7fc76bdb75-7hvrc 1/1 Running 0 4m22s scenescape-release-1-pgserver-dep-77b5ddd7f4-8r67w 1/1 Running 0 4m22s scenescape-release-1-scene-dep-b59678668-fm8wp 1/1 Running 0 4m22s scenescape-release-1-vdms-dep-5cfbd88dfb-mww8p 1/1 Running 0 4m22s scenescape-release-1-web-dep-c7877f6f4-nvbmx 1/1 Running 0 4m22s ``` <img width="1224" height="879" alt="image" src="https://github.com/user-attachments/assets/ebc60b3c-c683-41ba-8c68-cc517551aab8" /> <img width="1179" height="717" alt="image" src="https://github.com/user-attachments/assets/50af44fc-2364-44ac-8175-85c2e6dd9a0c" />
1 parent 4053a9c commit a8cd18b

25 files changed

+374
-47
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endif
3636

3737
# Secrets building variables
3838
SECRETSDIR ?= $(PWD)/manager/secrets
39-
CERTDOMAIN := scenescape.intel.com
39+
CERTDOMAIN ?= scenescape.intel.com
4040

4141
# Demo variables
4242
DLSTREAMER_SAMPLE_VIDEOS := $(addprefix sample_data/,apriltag-cam1.ts apriltag-cam2.ts apriltag-cam3.ts qcam1.ts qcam2.ts)

kubernetes/Makefile

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ REGISTRY=localhost:$(KINDREGPORT)
2727

2828
RELEASE=scenescape-release-1
2929
FORCE_VAAPI?=0
30+
CHART_DEBUG?=0
31+
32+
# Proxy settings: if http_proxy, https_proxy, or no_proxy environment variables are set,
33+
# they will be automatically passed to the Helm chart during installation
34+
# Chart debug: set CHART_DEBUG=1 to enable chartdebug=true in Helm deployment
3035

3136
# ITEP constants
3237
# REGISTRY=registry.test-public-maestro.edgeorch.net/scenescape
@@ -200,7 +205,30 @@ list-registry:
200205
# helm template -s templates/ingress.yaml kubernetes/scenescape-chart/
201206
# helm install scenescape-release-1 kubernetes/scenescape-chart/ --dry-run --debug
202207
install:
203-
helm install $(RELEASE) scenescape-chart/ -n $(NAMESPACE) --create-namespace $(VALIDATION_FLAG)
208+
@VALUES_FILE=""; \
209+
if [ -n "$(http_proxy)" ] || [ -n "$(https_proxy)" ]; then \
210+
VALUES_FILE="/tmp/scenescape-proxy-values.yaml"; \
211+
echo "proxy:" > $$VALUES_FILE; \
212+
echo " enabled: true" >> $$VALUES_FILE; \
213+
if [ -n "$(http_proxy)" ]; then \
214+
echo " httpProxy: \"$(http_proxy)\"" >> $$VALUES_FILE; \
215+
fi; \
216+
if [ -n "$(https_proxy)" ]; then \
217+
echo " httpsProxy: \"$(https_proxy)\"" >> $$VALUES_FILE; \
218+
fi; \
219+
if [ -n "$(no_proxy)" ]; then \
220+
echo " noProxy: \"$(no_proxy)\"" >> $$VALUES_FILE; \
221+
fi; \
222+
VALUES_FILE="-f $$VALUES_FILE"; \
223+
fi; \
224+
DEBUG_ARGS=""; \
225+
if [ "$(CHART_DEBUG)" = "1" ]; then \
226+
DEBUG_ARGS="--set chartdebug=true"; \
227+
fi; \
228+
helm install $(RELEASE) scenescape-chart/ -n $(NAMESPACE) --create-namespace $(VALIDATION_FLAG) $$DEBUG_ARGS $$VALUES_FILE; \
229+
if [ -f "/tmp/scenescape-proxy-values.yaml" ]; then \
230+
rm -f /tmp/scenescape-proxy-values.yaml; \
231+
fi
204232

205233
uninstall:
206234
helm uninstall $(RELEASE) -n $(NAMESPACE) || true

kubernetes/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,54 @@ $ make -C kubernetes
4343
$ make -C kubernetes clean-all
4444
```
4545

46+
## Environment Variables
47+
48+
### Proxy Configuration
49+
50+
If you're deploying SceneScape in an environment that requires proxy access, set these environment variables before running make commands:
51+
52+
```console
53+
export http_proxy=http://your-proxy-server:port
54+
export https_proxy=https://your-proxy-server:port
55+
export no_proxy=localhost,127.0.0.1,.local,.svc,.svc.cluster.local,10.96.0.0/12,10.244.0.0/16,172.17.0.0/16
56+
make -C kubernetes install
57+
```
58+
59+
**What to put in `no_proxy` and why:**
60+
61+
- `localhost,127.0.0.1`: Ensures local traffic is not sent through the proxy.
62+
- `.local`: Excludes local network hostnames.
63+
- `.svc,.svc.cluster.local`: Excludes all Kubernetes service DNS names, so internal service-to-service traffic stays inside the cluster.
64+
- `10.96.0.0/12`: Default Kubernetes service CIDR (adjust if your cluster uses a different range).
65+
- `10.244.0.0/16`: Default pod CIDR for many CNI plugins (adjust if your cluster uses a different range).
66+
- `172.17.0.0/16`: Typical Docker bridge network used by kind (Kubernetes IN Docker). Adjust if your Docker network uses a different subnet.
67+
68+
These values ensure that all internal cluster communication, including between pods and services, is not routed through the proxy. This is critical for correct operation of Kubernetes workloads, especially in kind clusters or any environment where internal networking must remain direct. Adjust the CIDRs if your cluster uses custom networking.
69+
70+
The proxy settings will be automatically detected and passed to all SceneScape containers as environment variables.
71+
72+
### Chart Debug Mode
73+
74+
To enable Helm chart debugging (useful for troubleshooting deployment issues):
75+
76+
```console
77+
export CHART_DEBUG=1
78+
make -C kubernetes install
79+
```
80+
81+
This enables the `chartdebug=true` setting in the Helm chart, which keeps debugging resources after installation.
82+
83+
### Validation Mode
84+
85+
To deploy SceneScape in validation/testing mode:
86+
87+
```console
88+
export VALIDATION=1
89+
make -C kubernetes install
90+
```
91+
92+
This enables additional testing components and configurations.
93+
4694
## Detailed steps and explanation
4795

4896
Run from the project directory (e.g. ~/scenescape)

kubernetes/init-images/Dockerfile-models

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
FROM busybox
77

8-
COPY models /root/models
8+
COPY model_installer/models /root/models
99

1010
COPY sample_data /root/sample_data
1111
COPY controller/config/tracker-config.json /root/controller/tracker-config.json

kubernetes/init-images/Dockerfile-secrets

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55

66
FROM ubuntu:22.04
77

8-
COPY Makefile /root/Makefile
8+
COPY Makefile common.mk version.txt /root/
99
COPY manager/config/user_access_config.json /root/docker/user_access_config.json
10-
COPY tools/certificates/Makefile /root/tools/certificates/Makefile
11-
COPY tools/certificates/openssl.cnf /root/tools/certificates/openssl.cnf
12-
COPY version.txt /root/sscape/version.txt
10+
COPY manager/Makefile /root/manager/
11+
COPY tools/certificates/ /root/tools/certificates/
12+
COPY tools/authsecrets/Makefile /root/tools/authsecrets/
1313

14-
RUN apt-get update && apt-get install -y curl make python3
15-
16-
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
17-
RUN chmod +x ./kubectl
18-
RUN mv ./kubectl /usr/local/bin/kubectl
14+
RUN apt-get update && apt-get install -y curl make python3 openssl \
15+
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
16+
&& chmod +x ./kubectl \
17+
&& mv ./kubectl /usr/local/bin/kubectl \
18+
&& apt-get clean \
19+
&& rm -rf /var/lib/apt/lists/*
1920

2021
CMD ["/bin/bash"]

kubernetes/scenescape-chart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ apiVersion: v2
55
name: scenescape-chart
66
description: A Helm chart for SceneScape
77
type: application
8-
version: 1.2.0
9-
appVersion: "1.3.0"
8+
version: 1.2.1
9+
appVersion: "1.4.0-alpha"

kubernetes/scenescape-chart/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,21 @@ Time server which maintains the reference clock and keeps clients, such as Perce
5555
### SQL database
5656

5757
PostgreSQL database server which stores static information used by the web UI and the scene controller. No video or object location data is stored by Intel® SceneScape.
58+
59+
## Configuration
60+
61+
### Proxy Settings
62+
63+
If you're deploying SceneScape in an environment that requires proxy access to external resources, use the following best-practice values for `noProxy`:
64+
65+
```yaml
66+
proxy:
67+
enabled: true
68+
httpProxy: "http://your-proxy-server:port"
69+
httpsProxy: "https://your-proxy-server:port"
70+
noProxy: "localhost,127.0.0.1,.local,.svc,.svc.cluster.local,10.96.0.0/12,10.244.0.0/16,172.17.0.0/16"
71+
```
72+
73+
For a detailed explanation of what to put in `no_proxy` and why, see the [Proxy Configuration section in the top-level README](../README.md#proxy-configuration).
74+
75+
These settings will be applied to all SceneScape containers as environment variables, enabling them to access external resources through your corporate proxy.

kubernetes/scenescape-chart/templates/broker-dep.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,21 @@ spec:
2323
name: {{ .Release.Name }}-broker
2424
env:
2525
- name: REST_SERVER
26-
value: web.{{ .Release.Namespace }}
26+
value: web.{{ .Release.Namespace }}.svc.cluster.local
27+
{{- if .Values.proxy.enabled }}
28+
- name: HTTP_PROXY
29+
value: {{ .Values.proxy.httpProxy }}
30+
- name: HTTPS_PROXY
31+
value: {{ .Values.proxy.httpsProxy }}
32+
- name: NO_PROXY
33+
value: {{ .Values.proxy.noProxy }}
34+
- name: http_proxy
35+
value: {{ .Values.proxy.httpProxy }}
36+
- name: https_proxy
37+
value: {{ .Values.proxy.httpsProxy }}
38+
- name: no_proxy
39+
value: {{ .Values.proxy.noProxy }}
40+
{{- end }}
2741
imagePullPolicy: Always
2842
readinessProbe:
2943
exec:

kubernetes/scenescape-chart/templates/camcalibration-dep.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,33 @@ spec:
2323
initContainers:
2424
- name: wait-for-web-initcontainer
2525
image: busybox
26-
command: ["/bin/sh", "-c", "until wget -q --spider http://web.{{ .Release.Namespace }}; do sleep 1; done"]
26+
command: ["/bin/sh", "-c", "until wget -q --spider http://web.{{ .Release.Namespace }}.svc.cluster.local; do sleep 1; done"]
2727
containers:
2828
- args:
2929
- camcalibration
3030
- --broker
31-
- broker.{{ .Release.Namespace }}
31+
- broker.{{ .Release.Namespace }}.svc.cluster.local
3232
- --resturl
33-
- https://web.{{ .Release.Namespace }}/api/v1
33+
- https://web.{{ .Release.Namespace }}.svc.cluster.local/api/v1
3434
image: {{ .Values.repository }}/{{ .Values.camcalibration.image }}:{{ .Chart.AppVersion }}
3535
name: {{ .Release.Name }}-camcalibration
3636
env:
3737
- name: EGL_PLATFORM
3838
value: surfaceless
39+
{{- if .Values.proxy.enabled }}
40+
- name: HTTP_PROXY
41+
value: {{ .Values.proxy.httpProxy }}
42+
- name: HTTPS_PROXY
43+
value: {{ .Values.proxy.httpsProxy }}
44+
- name: NO_PROXY
45+
value: {{ .Values.proxy.noProxy }}
46+
- name: http_proxy
47+
value: {{ .Values.proxy.httpProxy }}
48+
- name: https_proxy
49+
value: {{ .Values.proxy.httpsProxy }}
50+
- name: no_proxy
51+
value: {{ .Values.proxy.noProxy }}
52+
{{- end }}
3953
imagePullPolicy: Always
4054
securityContext:
4155
privileged: true

kubernetes/scenescape-chart/templates/kubeclient-dep.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ spec:
2121
initContainers:
2222
- name: wait-for-broker-initcontainer
2323
image: busybox
24-
command: ["/bin/sh", "-c", "until nc -vz broker.{{ .Release.Namespace }} 1883; do sleep 1; done"]
24+
command: ["/bin/sh", "-c", "until nc -vz broker.{{ .Release.Namespace }}.svc.cluster.local 1883; do sleep 1; done"]
2525
- name: wait-for-web-initcontainer
2626
image: busybox
27-
command: ["/bin/sh", "-c", "until wget -q --spider http://web.{{ .Release.Namespace }}; do sleep 1; done"]
27+
command: ["/bin/sh", "-c", "until wget -q --spider http://web.{{ .Release.Namespace }}.svc.cluster.local; do sleep 1; done"]
2828
containers:
2929
- args:
3030
- ./manage.py
3131
- kubecommand
3232
- --broker
33-
- broker.{{ .Release.Namespace }}
33+
- broker.{{ .Release.Namespace }}.svc.cluster.local
3434
- --resturl
35-
- https://web.{{ .Release.Namespace }}/api/v1
35+
- https://web.{{ .Release.Namespace }}.svc.cluster.local/api/v1
3636
- --ntp
37-
- ntpserv.{{ .Release.Namespace }}
37+
- ntpserv.{{ .Release.Namespace }}.svc.cluster.local
3838
- --auth
3939
- /run/secrets/percebro.auth
4040
image: {{ .Values.repository }}/{{ .Values.kubeclient.image }}:{{ .Chart.AppVersion }}
@@ -56,6 +56,20 @@ spec:
5656
value: {{ $pullSecret.name | quote }}
5757
{{- end }}
5858
{{- end }}
59+
{{- if .Values.proxy.enabled }}
60+
- name: HTTP_PROXY
61+
value: {{ .Values.proxy.httpProxy }}
62+
- name: HTTPS_PROXY
63+
value: {{ .Values.proxy.httpsProxy }}
64+
- name: NO_PROXY
65+
value: {{ .Values.proxy.noProxy }}
66+
- name: http_proxy
67+
value: {{ .Values.proxy.httpProxy }}
68+
- name: https_proxy
69+
value: {{ .Values.proxy.httpsProxy }}
70+
- name: no_proxy
71+
value: {{ .Values.proxy.noProxy }}
72+
{{- end }}
5973
imagePullPolicy: Always
6074
readinessProbe:
6175
exec:

0 commit comments

Comments
 (0)