Skip to content

Commit 60f07a4

Browse files
Shiva Kumarshivakunv
authored andcommitted
Tag git commit sha with bundle image
Signed-off-by: Shiva Kumar (SW-CLOUD) <[email protected]> Tag git commit sha with bundle image Signed-off-by: Shiva Kumar (SW-CLOUD) <[email protected]>
1 parent 2f41baa commit 60f07a4

File tree

4 files changed

+78
-54
lines changed

4 files changed

+78
-54
lines changed

.github/renovate.json

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,40 @@
2727
"recreateWhen": "always",
2828
"separateMultipleMajor": false,
2929
"separateMinorPatch": false,
30+
"pruneStaleBranches": true,
31+
"rebaseWhen": "always",
32+
"force": {
33+
"createPr": true,
34+
"createPrEvenIfClosed": true
35+
},
36+
3037
"customManagers": [
3138
{
3239
"customType": "regex",
3340
"managerFilePatterns": [
34-
"bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml"
41+
"deployments/gpu-operator/values.yaml"
3542
],
3643
"matchStrings": [
37-
"[-\\s]*value:\\s*\"?(?<depName>[^:\"]+)(?::(?<currentValue>[^@\"]+))?@(?<currentDigest>sha256:[a-f0-9]{64})\"?",
38-
"[-\\s]*image: (?<depName>.*?)(?::(?<currentValue>.*?))?@(?<currentDigest>sha256:[a-f0-9]{64})",
39-
"- name: (?<suffix>[\\w-]+)[-\\s]*image: (?<depName>.*?)(?::(?<currentValue>.*?))?@(?<currentDigest>sha256:[a-f0-9]{64})"
44+
"[-\\s]*repository:\\s*(?<repo>\\S+)\\s*\\n(?:\\s*#.*\\n|\\s*\\n)*[-\\s]*image:\\s*(?<image>\\S+)\\s*\\n(?:\\s*#.*\\n|\\s*\\n)*[-\\s]*version:\\s*(?<currentValue>\\S+)"
4045
],
41-
"versioningTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
42-
"datasourceTemplate": "docker"
46+
"depNameTemplate": "{{repo}}/{{image}}",
47+
"datasourceTemplate": "docker",
48+
"versioningTemplate": "loose"
4349
},
4450
{
4551
"customType": "regex",
4652
"managerFilePatterns": [
47-
"deployments/gpu-operator/values.yaml"
53+
"bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml"
4854
],
4955
"matchStrings": [
50-
"[-\\s]*repository:\\s*(?<repo>\\S+)\\s*\\n(?:\\s*#.*\\n|\\s*\\n)*[-\\s]*image:\\s*(?<image>\\S+)\\s*\\n(?:\\s*#.*\\n|\\s*\\n)*[-\\s]*version:\\s*(?<currentValue>\\S+)"
56+
"(?<depName>[^:\"]+):(?<currentValue>[^@\"]+)@(?<currentDigest>sha256:[a-f0-9]{64})"
5157
],
52-
"depNameTemplate": "{{repo}}/{{image}}",
53-
"datasourceTemplate": "docker",
54-
"versioningTemplate": "loose"
58+
"datasourceTemplate": "docker"
5559
}
5660
],
61+
5762
"packageRules": [
5863
{
59-
"matchPaths": ["deployments/gpu-operator/values.yaml"],
6064
"matchPackageNames": [
6165
"nvcr.io/nvidia/cloud-native/k8s-driver-manager",
6266
"nvcr.io/nvidia/cloud-native/k8s-kata-manager",
@@ -69,37 +73,41 @@
6973
"separateMajorMinor": false
7074
},
7175
{
72-
"matchPaths": ["deployments/gpu-operator/values.yaml"],
7376
"matchPackageNames": [
74-
"nvcr.io/nvidia/k8s/container-toolkit",
75-
"nvcr.io/nvidia/cloud-native/k8s-mig-manager"
77+
"nvcr.io/nvidia/cloud-native/k8s-mig-manager"
7678
],
77-
"versioning": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-ubuntu(?<ubuntu>\\d+\\.\\d+)$",
79+
"versioning": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:-ubuntu(?<ubuntu>\\d+\\.\\d+))?$",
7880
"separateMajorMinor": false
7981
},
8082
{
81-
"matchPaths": ["deployments/gpu-operator/values.yaml"],
82-
"matchPackageNames": [
83-
"nvcr.io/nvidia/k8s/dcgm-exporter"
84-
],
85-
"versioning": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-distroless$",
83+
"matchPackageNames": ["nvcr.io/nvidia/cuda"],
84+
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-base-ubi9$",
8685
"separateMajorMinor": false
8786
},
8887
{
89-
"matchPaths": ["deployments/gpu-operator/values.yaml"],
90-
"matchPackageNames": [
91-
"nvcr.io/nvidia/cuda"
92-
],
93-
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-base-ubi9$",
88+
"matchPackageNames": ["nvcr.io/nvidia/k8s/dcgm-exporter"],
89+
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-\\d+\\.\\d+\\.\\d+-(?:ubuntu\\d+\\.\\d+|distroless)$",
90+
"separateMajorMinor": false
91+
},
92+
{
93+
"matchPackageNames": ["nvcr.io/nvidia/cloud-native/dcgm"],
94+
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-ubuntu(?<ubuntu>\\d+\\.\\d+)$",
95+
"separateMajorMinor": false
96+
},
97+
{
98+
"matchPackageNames": ["nvcr.io/nvidia/k8s/container-toolkit"],
99+
"versioning": "regex:^v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)(?:-rc\\.(?<build>\\d+))?$",
94100
"separateMajorMinor": false
95101
},
96102
{
97103
"matchPackageNames": ["nvcr.io/nvidia/driver"],
98104
"enabled": false
99105
},
100106
{
101-
"matchDatasources": ["*"],
102-
"groupName": "{{depName}}"
107+
"matchDatasources": ["docker"],
108+
"groupName": "{{depName}}",
109+
"branchTopic": "{{depName}}",
110+
"commitMessageTopic": "{{depName}}"
103111
}
104112
]
105113
}

.github/workflows/ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,15 @@ jobs:
438438
registry: ghcr.io
439439
username: ${{ github.actor }}
440440
password: ${{ secrets.GITHUB_TOKEN }}
441+
- name: Set environment variables
442+
id: vars
443+
run: |
444+
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
441445
- name: Build bundle-image
442446
env:
443447
BUNDLE_IMAGE: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle:${{ github.ref_name }}-latest"
448+
BUNDLE_IMAGE_TAG: "ghcr.io/nvidia/gpu-operator/gpu-operator-bundle:${{ env.COMMIT_SHORT_SHA }}"
449+
OPERATOR_IMAGE_TAG: "ghcr.io/nvidia/gpu-operator:${{ env.COMMIT_SHORT_SHA }}"
444450
VERSION: ""
445451
DEFAULT_CHANNEL: "stable"
446452
CHANNELS: "stable"

Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
6060
# BUNDLE_IMAGE defines the image:tag used for the bundle.
6161
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMAGE=<some-registry>/<project-name-bundle>:<tag>)
6262
BUNDLE_IMAGE ?= gpu-operator-bundle:$(VERSION)
63+
BUNDLE_IMAGE_TAG ?= gpu-operator-bundle:$(VERSION)
64+
BUNDLE_CSV_FILE ?= bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml
65+
OPERATOR_IMAGE_TAG ?= gpu-operator:$(VERSION)
6366

6467
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
6568
ifeq (,$(shell go env GOBIN))
@@ -126,16 +129,23 @@ bundle: manifests install-tools
126129
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
127130
operator-sdk bundle validate ./bundle
128131

132+
# update the bundle image tag in csv file
133+
update-bundle-csv:
134+
@echo "Updating GPU operator image in $(BUNDLE_CSV_FILE) to $(OPERATOR_IMAGE_TAG)"
135+
@sed -i -e 's|gpu-operator:[^ " ]*|$(OPERATOR_IMAGE_TAG)|g' $(BUNDLE_CSV_FILE)
136+
@echo "Bundle CSV updated successfully"
137+
129138
# Build the bundle image.
130-
build-bundle-image:
139+
build-bundle-image: update-bundle-csv
131140
$(DOCKER) build \
132141
--build-arg DEFAULT_CHANNEL=$(DEFAULT_CHANNEL) \
133142
--build-arg GIT_COMMIT=$(GIT_COMMIT) \
134-
-f docker/bundle.Dockerfile -t $(BUNDLE_IMAGE) .
143+
-f docker/bundle.Dockerfile -t $(BUNDLE_IMAGE) -t $(BUNDLE_IMAGE_TAG) .
135144

136145
# Push the bundle image.
137146
push-bundle-image: build-bundle-image
138147
$(DOCKER) push $(BUNDLE_IMAGE)
148+
$(DOCKER) push $(BUNDLE_IMAGE_TAG)
139149

140150
# Define local and dockerized golang targets
141151

bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -201,37 +201,37 @@ spec:
201201
- name: gpu-operator-image
202202
image: ghcr.io/nvidia/gpu-operator:main-latest
203203
- name: dcgm-exporter-image
204-
image: nvcr.io/nvidia/k8s/dcgm-exporter@sha256:7c0ac4430bb0a5868b7404a0e06c47e02b0375b61aadd614385ad0bc2d43815a
204+
image: nvcr.io/nvidia/k8s/dcgm-exporter:4.4.1-4.6.0-distroless@sha256:ed2dfcb708949de649ab8e1b23521cfd1eba89774dbbe662b6835f1ffcaadb1a
205205
- name: dcgm-image
206-
image: nvcr.io/nvidia/cloud-native/dcgm@sha256:99187d6b023689f50cf065c77b96ba5aacfa26a618854608a1e31da5e826b765
206+
image: nvcr.io/nvidia/cloud-native/dcgm:4.4.1-2-ubuntu22.04@sha256:d42cd2afe032d9bfcb101cc2f739683b123a6c744f2732f221362a3cac776806
207207
- name: container-toolkit-image
208-
image: nvcr.io/nvidia/k8s/container-toolkit@sha256:c0d14372bc5d74e882eb60c5c5580459675bf08a2e4c627422cc949af6e9717d
208+
image: nvcr.io/nvidia/k8s/container-toolkit:v1.18.0@sha256:c0d14372bc5d74e882eb60c5c5580459675bf08a2e4c627422cc949af6e9717d
209209
- name: driver-image
210210
image: nvcr.io/nvidia/driver@sha256:838f50e304e8880851bae205edc6b781a251b5912267a2eed21661211db8e087
211211
- name: driver-image-570
212212
image: nvcr.io/nvidia/driver@sha256:ef9856ae8491b376364df1f0cad388bcf9983bd2b6c78000523c13536cf828c3
213213
- name: driver-image-535
214214
image: nvcr.io/nvidia/driver@sha256:35359117c5cdf786694d2fdba2ba038e7f673c5d0243c9ed4dc6cdaf6e675e4a
215215
- name: device-plugin-image
216-
image: nvcr.io/nvidia/k8s-device-plugin@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c
216+
image: nvcr.io/nvidia/k8s-device-plugin:v0.18.0@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c
217217
- name: gpu-feature-discovery-image
218-
image: nvcr.io/nvidia/k8s-device-plugin@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c
218+
image: nvcr.io/nvidia/k8s-device-plugin:v0.18.0@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c
219219
- name: mig-manager-image
220-
image: nvcr.io/nvidia/cloud-native/k8s-mig-manager@sha256:9194a84d3ff2d99886653add3867ec8ee03755442a6d75844932812a12a968de
220+
image: nvcr.io/nvidia/cloud-native/k8s-mig-manager:v0.13.0@sha256:9194a84d3ff2d99886653add3867ec8ee03755442a6d75844932812a12a968de
221221
- name: init-container-image
222-
image: nvcr.io/nvidia/cuda@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade
222+
image: nvcr.io/nvidia/cuda:13.0.1-base-ubi9@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade
223223
- name: gpu-operator-validator-image
224224
image: ghcr.io/nvidia/gpu-operator:main-latest
225225
- name: k8s-driver-manager-image
226-
image: nvcr.io/nvidia/cloud-native/k8s-driver-manager@sha256:a6c12abacc9c4f51d3653c90fcad32f19799069889338601407eba05fea4ba18
226+
image: nvcr.io/nvidia/cloud-native/k8s-driver-manager:v0.9.0@sha256:a6c12abacc9c4f51d3653c90fcad32f19799069889338601407eba05fea4ba18
227227
- name: vfio-manager-image
228-
image: nvcr.io/nvidia/cuda@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade
228+
image: nvcr.io/nvidia/cuda:13.0.1-base-ubi9@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade
229229
- name: sandbox-device-plugin-image
230-
image: nvcr.io/nvidia/kubevirt-gpu-device-plugin@sha256:119de9a331a47203858b99901f44d0c4a8052961b4e60327f4b100d0ab8c9df0
230+
image: nvcr.io/nvidia/kubevirt-gpu-device-plugin:v1.4.0@sha256:119de9a331a47203858b99901f44d0c4a8052961b4e60327f4b100d0ab8c9df0
231231
- name: vgpu-device-manager-image
232-
image: nvcr.io/nvidia/cloud-native/vgpu-device-manager@sha256:098c01e11589e08ede9ffb3002d1c3dff424f0f0c5d1bfcbfd54a359073f16dd
232+
image: nvcr.io/nvidia/cloud-native/vgpu-device-manager:v0.4.1@sha256:098c01e11589e08ede9ffb3002d1c3dff424f0f0c5d1bfcbfd54a359073f16dd
233233
- name: gdrcopy-image
234-
image: nvcr.io/nvidia/cloud-native/gdrdrv@sha256:5c4e61f7ba83d7a64ff2523d447c209ce5bde1ddc79acaf1f32f19620b4912d6
234+
image: nvcr.io/nvidia/cloud-native/gdrdrv:v2.5.1@sha256:5c4e61f7ba83d7a64ff2523d447c209ce5bde1ddc79acaf1f32f19620b4912d6
235235
customresourcedefinitions:
236236
owned:
237237
- name: nvidiadrivers.nvidia.com
@@ -919,35 +919,35 @@ spec:
919919
- name: "VALIDATOR_IMAGE"
920920
value: "ghcr.io/nvidia/gpu-operator:main-latest"
921921
- name: "GFD_IMAGE"
922-
value: "nvcr.io/nvidia/k8s-device-plugin@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c"
922+
value: "nvcr.io/nvidia/k8s-device-plugin:v0.18.0@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c"
923923
- name: "CONTAINER_TOOLKIT_IMAGE"
924-
value: "nvcr.io/nvidia/k8s/container-toolkit@sha256:c0d14372bc5d74e882eb60c5c5580459675bf08a2e4c627422cc949af6e9717d"
924+
value: "nvcr.io/nvidia/k8s/container-toolkit:v1.18.0@sha256:c0d14372bc5d74e882eb60c5c5580459675bf08a2e4c627422cc949af6e9717d"
925925
- name: "DCGM_IMAGE"
926-
value: "nvcr.io/nvidia/cloud-native/dcgm@sha256:99187d6b023689f50cf065c77b96ba5aacfa26a618854608a1e31da5e826b765"
926+
value: "nvcr.io/nvidia/cloud-native/dcgm:4.4.1-2-ubuntu22.04@sha256:d42cd2afe032d9bfcb101cc2f739683b123a6c744f2732f221362a3cac776806"
927927
- name: "DCGM_EXPORTER_IMAGE"
928-
value: "nvcr.io/nvidia/k8s/dcgm-exporter@sha256:7c0ac4430bb0a5868b7404a0e06c47e02b0375b61aadd614385ad0bc2d43815a"
928+
value: "nvcr.io/nvidia/k8s/dcgm-exporter:4.4.1-4.6.0-distroless@sha256:ed2dfcb708949de649ab8e1b23521cfd1eba89774dbbe662b6835f1ffcaadb1a"
929929
- name: "DEVICE_PLUGIN_IMAGE"
930-
value: "nvcr.io/nvidia/k8s-device-plugin@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c"
930+
value: "nvcr.io/nvidia/k8s-device-plugin:v0.18.0@sha256:2d16df5f3f12081b4bd6b317cf697e5c7a195c53cec7e0bab756db02a06b985c"
931931
- name: "DRIVER_IMAGE"
932932
value: "nvcr.io/nvidia/driver@sha256:838f50e304e8880851bae205edc6b781a251b5912267a2eed21661211db8e087"
933933
- name: "DRIVER_IMAGE-570"
934934
value: "nvcr.io/nvidia/driver@sha256:ef9856ae8491b376364df1f0cad388bcf9983bd2b6c78000523c13536cf828c3"
935935
- name: "DRIVER_IMAGE-535"
936936
value: "nvcr.io/nvidia/driver@sha256:35359117c5cdf786694d2fdba2ba038e7f673c5d0243c9ed4dc6cdaf6e675e4a"
937937
- name: "DRIVER_MANAGER_IMAGE"
938-
value: "nvcr.io/nvidia/cloud-native/k8s-driver-manager@sha256:a6c12abacc9c4f51d3653c90fcad32f19799069889338601407eba05fea4ba18"
938+
value: "nvcr.io/nvidia/cloud-native/k8s-driver-manager:v0.9.0@sha256:a6c12abacc9c4f51d3653c90fcad32f19799069889338601407eba05fea4ba18"
939939
- name: "MIG_MANAGER_IMAGE"
940-
value: "nvcr.io/nvidia/cloud-native/k8s-mig-manager@sha256:9194a84d3ff2d99886653add3867ec8ee03755442a6d75844932812a12a968de"
940+
value: "nvcr.io/nvidia/cloud-native/k8s-mig-manager:v0.13.0@sha256:9194a84d3ff2d99886653add3867ec8ee03755442a6d75844932812a12a968de"
941941
- name: "CUDA_BASE_IMAGE"
942-
value: "nvcr.io/nvidia/cuda@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade"
942+
value: "nvcr.io/nvidia/cuda:13.0.1-base-ubi9@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade"
943943
- name: "VFIO_MANAGER_IMAGE"
944-
value: "nvcr.io/nvidia/cuda@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade"
944+
value: "nvcr.io/nvidia/cuda:13.0.1-base-ubi9@sha256:d19fe621624c4eb6ac931b8558daa3ecc0c3f07f1e2a52e0267e083d22dceade"
945945
- name: "SANDBOX_DEVICE_PLUGIN_IMAGE"
946-
value: "nvcr.io/nvidia/kubevirt-gpu-device-plugin@sha256:119de9a331a47203858b99901f44d0c4a8052961b4e60327f4b100d0ab8c9df0"
946+
value: "nvcr.io/nvidia/kubevirt-gpu-device-plugin:v1.4.0@sha256:119de9a331a47203858b99901f44d0c4a8052961b4e60327f4b100d0ab8c9df0"
947947
- name: "VGPU_DEVICE_MANAGER_IMAGE"
948-
value: "nvcr.io/nvidia/cloud-native/vgpu-device-manager@sha256:098c01e11589e08ede9ffb3002d1c3dff424f0f0c5d1bfcbfd54a359073f16dd"
948+
value: "nvcr.io/nvidia/cloud-native/vgpu-device-manager:v0.4.1@sha256:098c01e11589e08ede9ffb3002d1c3dff424f0f0c5d1bfcbfd54a359073f16dd"
949949
- name: "GDRCOPY_IMAGE"
950-
value: "nvcr.io/nvidia/cloud-native/gdrdrv@sha256:5c4e61f7ba83d7a64ff2523d447c209ce5bde1ddc79acaf1f32f19620b4912d6"
950+
value: "nvcr.io/nvidia/cloud-native/gdrdrv:v2.5.1@sha256:5c4e61f7ba83d7a64ff2523d447c209ce5bde1ddc79acaf1f32f19620b4912d6"
951951
terminationGracePeriodSeconds: 10
952952
volumes:
953953
- hostPath:

0 commit comments

Comments
 (0)