Skip to content

Commit 86989b8

Browse files
authored
Merge pull request #2320 from vprashar2929/k8s-sushy
chore: add sushy-static deployment support on k8s
2 parents 99d8431 + 3388593 commit 86989b8

File tree

89 files changed

+196
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+196
-9
lines changed

.github/k8s/action.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,32 @@ runs:
8787
IMG_BASE: localhost:5001
8888
VERSION: dev
8989

90+
- name: Build sushy-static image
91+
shell: bash
92+
run: |
93+
docker build -t localhost:5001/kepler-sushy-static:latest -f hack/Dockerfile.sushy-static .
94+
95+
- name: Push sushy-static image
96+
shell: bash
97+
run: |
98+
docker push localhost:5001/kepler-sushy-static:latest
99+
90100
- name: Enable fake cpu meter
91101
shell: bash
92102
run: |
93103
sed -i '/fake-cpu-meter:/{n;s/enabled: false/enabled: true/}' manifests/k8s/configmap.yaml
94104
105+
- name: Enable redfish
106+
shell: bash
107+
run: |
108+
sed -i \
109+
-e 's/^ # - redfish-secret.yaml/ - redfish-secret.yaml/' \
110+
-e 's/^ # - sushy-deployment.yaml/ - sushy-deployment.yaml/' \
111+
-e 's/^ # - sushy-service.yaml/ - sushy-service.yaml/' \
112+
-e 's/^# patches:/patches:/' \
113+
-e 's/^# - path: patches\/enable-redfish.yaml/ - path: patches\/enable-redfish.yaml/' \
114+
manifests/k8s/kustomization.yaml
115+
95116
- name: Deploy Kepler
96117
shell: bash
97118
run: |
@@ -130,7 +151,8 @@ runs:
130151
kepler_container_cpu_joules_total \
131152
kepler_container_cpu_watts \
132153
kepler_pod_cpu_joules_total \
133-
kepler_pod_cpu_watts; do
154+
kepler_pod_cpu_watts \
155+
kepler_platform_watts; do
134156
echo "Checking metric: $metric"
135157
if ! grep -q "$metric" /tmp/metrics.txt; then
136158
echo "Metric $metric not found"
@@ -139,6 +161,7 @@ runs:
139161
done
140162
141163
- name: Run must gather
164+
if: always()
142165
shell: bash
143166
run: |
144167
echo "::group::Get pods in kepler namespace"
@@ -199,6 +222,7 @@ runs:
199222
echo "::endgroup::"
200223
201224
- name: Run must gather for Helm deployment
225+
if: always()
202226
shell: bash
203227
run: |
204228
echo "::group::Get pods in kepler namespace"

compose/dev/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ services:
110110
- 28001:8001
111111
volumes:
112112
- type: bind
113-
source: ./mockups
113+
source: ../../hack/mockups
114114
target: /mockups
115115
command:
116116
- sushy-static

hack/Dockerfile.sushy-static

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Dockerfile for sushy-static with built-in mockups for Kepler Redfish testing
2+
# This image extends the official sushy-tools image with Kepler's mockup data
3+
4+
FROM quay.io/metal3-io/sushy-tools:latest
5+
6+
# Set environment variables
7+
ENV MOCKUPS_DIR=/mockups
8+
ENV MOCKUPS_PATH=/mockups/public-rackmount
9+
10+
# Create directory for mockups
11+
RUN mkdir -p ${MOCKUPS_DIR}
12+
13+
# Copy Kepler's mockup data
14+
# This assumes the Dockerfile is built from the Kepler repository root
15+
COPY hack/mockups/public-rackmount/ ${MOCKUPS_PATH}/
16+
17+
# Expose the default Redfish port
18+
EXPOSE 8001
19+
20+
# Set default command to run sushy-static with mockups
21+
CMD ["sushy-static", \
22+
"-m", \
23+
"/mockups/public-rackmount", \
24+
"-i", \
25+
"0.0.0.0", \
26+
"-p", \
27+
"8001"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)