Skip to content

Commit

Permalink
Merge branch 'main' into update-
Browse files Browse the repository at this point in the history
  • Loading branch information
observability-noctua-bot authored Dec 13, 2024
2 parents d78846f + 508457c commit 55b2f23
Show file tree
Hide file tree
Showing 18 changed files with 467 additions and 34 deletions.
1 change: 0 additions & 1 deletion .github/workflows/_Test-OCI-Factory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ jobs:
# test-oci-compliance: true
# test-vulnerabilities: true


# # Test workflow used in continuous testing
# test-vulnerability-scan:
# name: Test vulnerability scan workflow
Expand Down
16 changes: 14 additions & 2 deletions oci/identity-platform-admin-ui/_releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
}
},
"1-22.04": {
"end-of-life": "2025-05-12T00:00:00Z",
"end-of-life": "2025-06-12T00:00:00Z",
"stable": {
"target": "4"
"target": "9"
},
"candidate": {
"target": "1-22.04_stable"
Expand All @@ -40,5 +40,17 @@
"edge": {
"target": "6"
}
},
"1.22-22.04": {
"end-of-life": "2024-12-26T00:00:00Z",
"candidate": {
"target": "10"
},
"edge": {
"target": "10"
},
"beta": {
"target": "1.22-22.04_candidate"
}
}
}
12 changes: 12 additions & 0 deletions oci/identity-platform-login-ui/_releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,17 @@
"edge": {
"target": "0-22.04_beta"
}
},
"0.18-22.04": {
"end-of-life": "2024-12-19T00:00:00Z",
"candidate": {
"target": "9"
},
"edge": {
"target": "9"
},
"beta": {
"target": "0.18-22.04_candidate"
}
}
}
4 changes: 2 additions & 2 deletions oci/kratos/_releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
}
},
"1-22.04": {
"end-of-life": "2025-02-13T00:00:00Z",
"end-of-life": "2025-03-03T00:00:00Z",
"stable": {
"target": "3"
"target": "10"
},
"candidate": {
"target": "1-22.04_stable"
Expand Down
47 changes: 47 additions & 0 deletions oci/metrics-proxy/_releases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"0.1.1-22.04": {
"end-of-life": "2025-11-27T00:00:00Z",
"stable": {
"target": "1"
},
"candidate": {
"target": "0.1.1-22.04_stable"
},
"beta": {
"target": "0.1.1-22.04_candidate"
},
"edge": {
"target": "0.1.1-22.04_beta"
}
},
"0.1-22.04": {
"end-of-life": "2025-11-27T00:00:00Z",
"stable": {
"target": "1"
},
"candidate": {
"target": "0.1-22.04_stable"
},
"beta": {
"target": "0.1-22.04_candidate"
},
"edge": {
"target": "0.1-22.04_beta"
}
},
"0-22.04": {
"end-of-life": "2025-11-27T00:00:00Z",
"stable": {
"target": "1"
},
"candidate": {
"target": "0-22.04_stable"
},
"beta": {
"target": "0-22.04_candidate"
},
"edge": {
"target": "0-22.04_beta"
}
}
}
5 changes: 5 additions & 0 deletions oci/metrics-proxy/contacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
notify:
emails:
- [email protected]
mattermost-channels:
- 1ayd5kim67bbing34i3h1x9uac
43 changes: 43 additions & 0 deletions oci/metrics-proxy/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 1
# --- OVERVIEW INFORMATION ---
application: metrics-proxy
description: >
Metrics Proxy is a lightweight proxy designed to expose a unified metrics endpoint for multiple Kubernetes pods.
The proxy watches for pods in a Kubernetes cluster and listens on a configurable port,
where it exposes aggregated metrics on a configurable endpoint.
Read more on the [project repo](https://github.com/canonical/metrics-k8s-proxy).
# --- USAGE INFORMATION ---
docker:
parameters:
- -p 15090:15090
access: Access aggregated metrics at `http://localhost:15090`.

parameters:
- type: -e
value: 'TZ=UTC'
description: Timezone setting for the container.
- type: -p
value: '15090:15090'
description: Port mapping for accessing the metrics-proxy aggregated metrics endpoint.
- type: -e
value: 'POD_LABEL_SELECTOR="foo=bar"'
description: Specify labels to filter Kubernetes pods for metrics aggregation.
- type: -e
value: 'PORT="15090"'
description: The port on which the metrics-proxy listens for scrape requests.
- type: -e
value: 'SCRAPE_TIMEOUT="9s"'
description: Configures the timeout duration for scraping metrics from the pods.

debug:
text: |
### Debugging
To debug the container:
```bash
docker exec -it metrics-proxy-container pebble logs -f metrics-proxy
```
To get an interactive shell:
```bash
docker exec -it metrics-proxy-container /bin/bash
```
18 changes: 18 additions & 0 deletions oci/metrics-proxy/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 1
upload:
- source: canonical/metrics-proxy-rock
commit: 66763a5703df2e3175b87c0da69b29103da47169
directory: "0.1.1"
release:
0.1.1-22.04:
end-of-life: "2025-11-27T00:00:00Z"
risks:
- stable
0.1-22.04:
end-of-life: "2025-11-27T00:00:00Z"
risks:
- stable
0-22.04:
end-of-life: "2025-11-27T00:00:00Z"
risks:
- stable
14 changes: 7 additions & 7 deletions oci/mock-rock/_releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,31 @@
"1.1-22.04": {
"end-of-life": "2030-05-01T00:00:00Z",
"candidate": {
"target": "966"
"target": "987"
},
"beta": {
"target": "966"
"target": "987"
},
"edge": {
"target": "966"
"target": "987"
}
},
"1-22.04": {
"end-of-life": "2030-05-01T00:00:00Z",
"candidate": {
"target": "966"
"target": "987"
},
"beta": {
"target": "966"
"target": "987"
},
"edge": {
"target": "966"
"target": "987"
}
},
"1.2-22.04": {
"end-of-life": "2030-05-01T00:00:00Z",
"beta": {
"target": "967"
"target": "988"
},
"edge": {
"target": "1.2-22.04_beta"
Expand Down
24 changes: 12 additions & 12 deletions oci/python/_releases.json
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{
"3.8-20.04": {
"edge": {
"target": "43"
"target": "54"
},
"end-of-life": "2025-03-31T00:00:00Z",
"stable": {
"target": "43"
"target": "54"
},
"candidate": {
"target": "43"
"target": "54"
},
"beta": {
"target": "43"
"target": "54"
}
},
"3.12-24.04": {
"end-of-life": "2029-03-31T00:00:00Z",
"edge": {
"target": "48"
"target": "56"
},
"stable": {
"target": "48"
"target": "56"
},
"candidate": {
"target": "48"
"target": "56"
},
"beta": {
"target": "48"
"target": "56"
}
},
"3.10-22.04": {
"end-of-life": "2027-03-31T00:00:00Z",
"stable": {
"target": "38"
"target": "55"
},
"candidate": {
"target": "38"
"target": "55"
},
"beta": {
"target": "38"
"target": "55"
},
"edge": {
"target": "38"
"target": "55"
}
}
}
34 changes: 24 additions & 10 deletions src/image/prepare_single_image_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,20 @@ def filter_eol_tracks(build: dict[str, Any]) -> dict[str, Any]:


def filter_eol_builds(builds: list[dict[str, Any]]) -> list[dict[str, Any]]:
"""Remove any builds with no tracks specified."""
# remove any end of life tracks
builds = [filter_eol_tracks(build) for build in builds]
"""Remove any builds with eol tracks."""

return [build for build in builds if len(build["release"])]
# if no release exists and therefore no eol is specified, do nothing
non_release_builds = [build for build in builds if "release" not in build]

# if we have release info, then filter based on eol
release_builds = [
filtered_build
for build in builds
if "release" in build
and (filtered_build := filter_eol_tracks(build))["release"]
]

return non_release_builds + release_builds


def write_revision_data(data_dir: Path, build: dict[str, Any]):
Expand Down Expand Up @@ -157,7 +166,7 @@ def write_github_output(
"""Write script result to GITHUB_OUTPUT."""
outputs = {
"build-matrix": {"include": builds},
"release-to": release_to,
"release-to": "true" if release_to else "",
"revision-data-dir": str(revision_data_dir),
}
with GithubOutput() as github_output:
Expand Down Expand Up @@ -221,16 +230,21 @@ def main():
f"Generating matrix for following builds: \n {json.dumps(builds, indent=4)}"
)

# trigger a release if specified in the image_trigger root
release = "release" in image_trigger

for build in builds:
write_revision_data(args.revision_data_dir, build)

# the workflow GH matrix has a problem parsing nested JSON dicts
# so let's remove this field since we don't need it for the builds
del build["release"]
if "release" in build:
# trigger a release if specified in any of the builds
release = True

release_to = "true" if "release" in image_trigger else ""
# the workflow GH matrix has a problem parsing nested JSON dicts
# so let's remove this field since we don't need it for the builds themselves
del build["release"]

write_github_output(release_to, builds, args.revision_data_dir)
write_github_output(release, builds, args.revision_data_dir)


if __name__ == "__main__":
Expand Down
37 changes: 37 additions & 0 deletions tests/data/image_all_eol_tracks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 1

upload:
- source: "canonical/rocks-toolbox"
commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f
directory: mock_rock/1.0
release:
1.0-22.04:
end-of-life: "2020-05-01T00:00:00Z"
risks:
- candidate
- edge
- beta
- source: "canonical/rocks-toolbox"
commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f
directory: mock_rock/1.1
release:
1.1-22.04:
end-of-life: "2000-05-01T00:00:00Z"
risks:
- candidate
- edge
- beta
1-22.04:
end-of-life: "2000-05-01T00:00:00Z"
risks:
- candidate
- edge
- beta
- source: "canonical/rocks-toolbox"
commit: 17916dd5de270e61a6a3fd3f4661a6413a50fd6f
directory: mock_rock/1.2
release:
1.2-22.04:
end-of-life: "2000-05-01T00:00:00Z"
risks:
- beta
Loading

0 comments on commit 55b2f23

Please sign in to comment.