Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit76a0ef9

Browse files
committed
Trying again
1 parent40d33fa commit76a0ef9

File tree

1 file changed

+73
-96
lines changed

1 file changed

+73
-96
lines changed

‎_docs/kb/articles/upgrade-deprecated-docker-images.md‎

Lines changed: 73 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,45 @@ categories: [Pipelines]
1111
support-reviewed:2025-07-14 AA
1212
---
1313

14-
As part of our ongoing platform upgrades, Codefresh is moving to a newer Classic Runner version based onDocker27. This change deprecates older Docker image formats such as Docker Image Format v1 and Docker manifest version 2, schema 1.
14+
#How to: Upgrade DeprecatedDockerImages in Classic Pipelines
1515

16-
This guide walks you through:
17-
- Identifying deprecated Docker images in your Classic Pipelines.
18-
- Upgrading those images to a modern supported format (OCI or Docker manifest v2, schema 2).
16+
As part of our ongoing platform upgrades, Codefresh is moving to a newer Classic runner version based on Docker v27. This version**deprecates Docker image format v1 and Docker manifest schema 1**, which may impact Classic Pipelines using these legacy image types.
1917

20-
##Step 1: Find Deprecated Docker Images
18+
This guide will help you:
2119

22-
You can identify deprecated images using one of the following methods:
20+
- Identify deprecated Docker images in your Classic Pipelines
21+
- Upgrade those images to a supported format
2322

24-
###Option A: Analyze Build Logs (Manual Method)
23+
---
24+
25+
##Step 1: Identify Deprecated Docker Images
2526

26-
The latest`dind` versions output a deprecation warning in the build log each time a deprecated image is pulled.
27+
There are two recommended approaches:
2728

28-
**Pros**
29-
- No setup required
30-
- Works retroactively on historical builds
29+
###Option 1: Analyze Build Logs
3130

32-
**Cons**
33-
- Time-consuming for large accounts
34-
- Requires script execution and manual review
31+
This method scans historical build logs for deprecation warnings. The latest versions of`dind` log a warning each time the Docker daemon pulls a deprecated image.
3532

36-
Examplewarning in logs:
33+
**Examplelog output:**
3734

3835
```
3936
[DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default...
4037
```
4138

42-
Use the following script toscanyour buildlogs and extract deprecatedimages:
43-
👉[Find deprecated images used in previous builds](https://gist.github.com/francisco-cocozza/6046028184cc12b5ee4513bdcb4217c5)
39+
Toscan logs and extract deprecatedimage names, use the provided script:
40+
➡️**Find deprecated images used in previous builds**
4441

45-
>💡 For large-scale environments withthousands ofbuilds,we offer a morescalable, metrics-baseddetectionmethod.See[Appendix I](#appendix-i-monitor-engine-metrics) for details.
42+
>💡 For large-scale environments withmanybuilds,ascalable, metrics-based method is available.[See Appendix I](#appendix-i-monitor-engine-metrics) for details.
4643
4744
---
4845

4946
##Step 2: Upgrade Deprecated Docker Images
5047

51-
Once you’ve identified deprecated imagesusing enginemetrics, the next step is toupgradethose imagesto a modern format (OCI or Docker manifest v2, schema 2). Thisis required to ensurecompatibility with docker-27 and futurereleases.
48+
Once you’ve identified deprecated images(via logs ormetrics),upgradethemto a modern format (OCI or Docker manifest v2, schema 2). Thisensurescompatibility with docker-27 and futurerunner versions.
5249

53-
###HowIt Works
50+
###Howit works
5451

55-
Re-pushing an image using a modern Docker clientwillautomaticallyconvert its manifest to a supported version.
52+
Re-pushing an image using a modern Docker client automaticallyupdates its manifest to a supported version.
5653

5754
###Sample Codefresh Pipeline to Upgrade an Image
5855

@@ -69,40 +66,41 @@ steps:
6966
image_name:<target-image-name>
7067
```
7168
69+
**Example:**
70+
7271
```yaml
73-
# Example:
74-
# push:
75-
# title: "Re-pushing deprecated image"
76-
# type: push
77-
# candidate: docker/whalesay:latest
78-
# registry: docker
79-
# tag: new-manifest
80-
# image_name: codefresh/whalesay
72+
push:
73+
title:"Re-pushing deprecated image"
74+
type:push
75+
candidate:docker/whalesay:latest
76+
registry:docker
77+
tag:new-manifest
78+
image_name:codefresh/whalesay
8179
```
8280
83-
This pulls the deprecated image and re-pushes it under a new name/tag with a compliant manifest format.
81+
This pulls the deprecated image and re-pushes it under a new name ortag with a compliant manifest format.
8482
85-
>💡You can repeatthis process for each deprecated image discovered via metrics or logs.
83+
> 💡Repeatthis process for each deprecated image discovered.
8684
8785
---
8886
8987
## Appendix I: Monitor Engine Metrics
9088
91-
This method enables scalable detection of deprecated imagesbyusing real-time enginemetrics. Recommended for high-volume or automated environments.
89+
For large environments, use real-time metrics emittedbythe Codefresh engineto detect deprecated image usage.
9290
93-
###Monitor engine metrics
91+
###About the Metric
9492
95-
Starting from Runtime v7.5.0,engine emits:
93+
Starting from Runtime`v7.5.0`, theengine emits the following Prometheus metric:
9694

9795
```
98-
codefresh_engine_deprecated_images_pulled_total{account_name, pipeline_id, workflow, image_name}
96+
codefresh_engine_deprecated_images_pulled_total{account_name, pipeline_id, workflow, image_name}
9997
```
10098
101-
Thismetric is acounterincreased by 1 each timeDocker daemon pullsa deprecated image.
99+
This counterincreases by 1 each time a deprecated image is pulled.
102100
103-
###How toenable
101+
### How toEnable Metrics
104102
105-
Set the following valuesfor the Hybrid RuntimeChart:
103+
Set the following valuesin your Hybrid Runtimechart:
106104
107105
```yaml
108106
runtime:
@@ -114,24 +112,30 @@ podMonitor:
114112
enabled: true
115113
```
116114

117-
Toensure that the Prometheus operator will scrape the latestmetricvalues before the engine exits, set:
115+
Toavoidmetricloss during shutdown, also configure:
118116

119117
```yaml
120118
runtime:
121119
engine:
122120
env:
123-
METRICS_PROMETHEUS_SCRAPE_TIMEOUT:'120000'#Timeout in ms
121+
METRICS_PROMETHEUS_SCRAPE_TIMEOUT:'120000'#120 seconds
124122
```
125123
126-
###How to monitor
124+
###Install Monitoring Stack (Optional)
127125
128-
Installation of themonitoringstack is up to the customer and not covered by our support. The following is a basic setup example:
126+
If nomonitoringsolution exists in your cluster, install the [kube-prometheus-stack](https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack) chart:
129127
130-
#### kube-prom-storage-class.yaml
128+
```bash
129+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
130+
helm repo update
131+
helm install kube-prom prometheus-community/kube-prometheus-stack --create-namespace --namespace kube-prom -f ./kube-prom-values.yaml
132+
```
131133

132-
```yaml
133-
# kube-prom-storage-class.yaml
134+
**Example storage configuration:**
135+
136+
`kube-prom-storage-class.yaml`
134137

138+
```yaml
135139
apiVersion:storage.k8s.io/v1
136140
kind:StorageClass
137141
metadata:
@@ -141,11 +145,9 @@ parameters:
141145
type:gp3
142146
```
143147
144-
####kube-prom-values.yaml
148+
`kube-prom-values.yaml`
145149

146150
```yaml
147-
# kube-prom-values.yaml
148-
149151
prometheus:
150152
prometheusSpec:
151153
podMonitorSelectorNilUsesHelmValues: false
@@ -175,73 +177,48 @@ grafana:
175177
- marcusolsson-json-datasource
176178
```
177179

178-
### Helm installation
179-
180-
```bash
181-
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
182-
helm repo update
183-
helm install kube-prom prometheus-community/kube-prometheus-stack --create-namespace --namespace kube-prom -f ./kube-prom-values.yaml
184-
```
185-
186-
###Grafana access and verification
180+
### Access Grafana
187181

188182
```bash
189183
kubectl --namespace kube-prom get pods -l "release=kube-prom"
190-
191184
kubectl --namespace kube-prom get secrets kube-prom-grafana -o jsonpath="{.data.admin-password}" | base64 -d ; echo
192-
193185
export POD_NAME=$(kubectl --namespace kube-prom get pod -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=kube-prom" -oname)
194-
195186
kubectl --namespace kube-prom port-forward $POD_NAME 3000
196187
```
197188

198-
Open[http://localhost:3000](http://localhost:3000) and log in using the admin password retrieved above.
199-
200-
###Verifying metrics
189+
Then access Grafana at `http://localhost:3000`.
201190

202-
To ensure that engine metrics are collected correctly, run a build on the monitored Runtime. InGrafana:
191+
### Verify Metrics inGrafana
203192

204-
-Go to**Explore → Metrics**
193+
-Navigate to **Explore → Metrics**
205194
-Search for `codefresh_`
206-
- Make sure the time range includes a running build
207-
208-
---
209-
210-
##Appendix II: Grafana dashboard
211-
212-
###How to use/understand metrics
213-
214-
The metric`codefresh_engine_deprecated_images_pulled_total` is a counter increased by 1 each time Docker daemon pulls a deprecated image. Labels`{account_name, pipeline_id, workflow, image_name}` allow grouping results.
215-
216-
###Dashboard setup
195+
-Run a build to generate metric events
217196

218-
1. Download Dashboard JSON in APPENDIX II
219-
2. Log in to Grafana
220-
3. Go to**Dashboards → New → Import**
221-
4. Upload the JSON
222-
5. Select`Mimir API` as data source → Click**Import**
197+
### Query Prometheus Directly
223198

224-
###Dashboard overview
199+
Example query:
225200

226-
- Filter by account name
227-
- Adjust time range
228-
- View builds and deprecated image names
229-
- Clickable links to Admin Panel
230-
231-
###Query Prometheus metric
232-
233-
You can query the metric directly:
234-
235-
```promql
201+
```text
236202
sum(
237203
rate(
238204
codefresh_engine_deprecated_images_pulled_total[$__rate_interval]
239205
)
240206
) by (account_name, pipeline_id, workflow, image_name)
241207
```
242208

243-
Example deprecated images:
244-
-`docker.io/tutum/dnsutils:latest`
245-
-`docker.io/docker/whalesay:latest`
209+
This returns the pull rate of deprecated images by account and pipeline.
210+
211+
### Grafana Dashboard (Optional)
212+
213+
-Download the provided dashboard JSON
214+
-Go to **Dashboards → New → Import**
215+
-Upload the file and select `Mimir API` as the data source
216+
217+
Done! 🎉 You can now monitor deprecated image usage at scale.
218+
219+
---
220+
221+
**Examples from monitoring:**
246222

247-
Pulled in Pipeline:`#67867cfe8307bd8f9b7b034e`
223+
-`docker.io/tutum/dnsutils:latest`pulled in pipeline `#67867cfe8307bd8f9b7b034e`
224+
-`docker.io/docker/whalesay:latest`pulled in the same pipeline

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp