-
Notifications
You must be signed in to change notification settings - Fork 110
Finish remaining renaming tasks #1177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
diogoasouza
wants to merge
3
commits into
rancher:master
Choose a base branch
from
diogoasouza:finish-remaining-renaming-tasks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| # Rancher Image Mirror | ||
| # Rancher Artifact Mirror | ||
|
|
||
| This repo is dedicated to mirroring images from other organizations to the | ||
| This repo is dedicated to mirroring artifacts from other organizations to the | ||
| places they need to be for Rancher and its associated projects to use them. | ||
|
|
||
| > [!NOTE] | ||
| > This repository used to be called `image-mirror`; It was renamed to better reflect its usecases, see [this](https://github.com/rancher/rancher/issues/52259) issue for more information | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: spelling/grammar:
|
||
|
|
||
| ## Overview | ||
|
|
||
| `regsync` is used for mirroring images from one repository to another. `regsync` | ||
| `regsync` is used for mirroring OCI artifacts from one repository to another. `regsync` | ||
| is configured via `regsync.yaml`. `regsync.yaml` is generated by running the | ||
| `generate-regsync` subcommand of the Go code in `tools/`, using `config.yaml` as | ||
| input. You can build the latest version of this code to `bin/artifact-mirror-tools` | ||
|
|
@@ -18,14 +21,14 @@ Once `regsync.yaml` has been updated, you may run `regsync` via the command | |
| ``` | ||
| regsync once --verbosity error --config regsync.yaml --missing | ||
| ``` | ||
| `autoupdate.yaml` is used to configure automatic updates for images. When | ||
| `autoupdate.yaml` is used to configure automatic updates for artifacts. When | ||
| an update is found, the automation creates a pull request that a human user | ||
| can then review and merge. See [`autoupdate.yaml`](#autoupdateyaml) for | ||
| more information. | ||
|
|
||
| ### Adding New Artifacts | ||
|
|
||
| When adding new artifacts to the repo, please indicate so in the pull request. | ||
| When adding new OCI artifacts to the repo, please indicate so in the pull request. | ||
| You will need to submit a request to EIO, who will create the repo in | ||
| DockerHub. If this is not done, mirroring the artifact will fail. Nothing | ||
| special needs to be done for mirroring a new artifact to the Rancher Prime | ||
|
|
@@ -78,7 +81,7 @@ This section roughly correlates to the `creds` section of `regsync.yaml`. | |
| | `Password` | yes | The password to use when authenticating against the registry. See [the regsync documentation](https://regclient.org/usage/regsync/) for more details. | ||
| | `Registry` | yes | The registry URL. See [the regsync documentation](https://regclient.org/usage/regsync/) for more details. | ||
| | `ReqConcurrent` | no | The number of concurrent requests that are made to this registry. See [the regsync documentation](https://regclient.org/usage/regsync/) for more details. | ||
| | `DefaultTarget` | no | Whether the Repository is used as a target repository for a given artifact when the `TargetRepositories` field of the artifact is not set. | ||
| | `DefaultTarget` | no | Whether the Repository is used as a target repository for a given artifact when the `TargetRepositories` field of the `Artifact` is not set. | ||
| | `Username` | yes | The username to use when authenticating against the registry. See [the regsync documentation](https://regclient.org/usage/regsync/) for more details. | ||
|
|
||
| #### `Artifacts` | ||
|
|
@@ -88,17 +91,17 @@ repository. | |
|
|
||
| | Field | Required | Description | | ||
| |----------------------| ------------- |------------- | | ||
| | `DoNotMirror` | no | Set to `true` to exclude the entire artifact from regsync.yaml. Alternatively, set to an array of strings to specify tags to exclude from regsync.yaml. | ||
| | `DoNotMirror` | no | Set to `true` to exclude the entire `Artifact` from regsync.yaml. Alternatively, set to an array of strings to specify tags to exclude from regsync.yaml. | ||
| | `SourceArtifact` | yes | The source artifact. If there is no host, the artifact is assumed to be from Docker Hub. | ||
| | `Tags` | yes | The tags to mirror. | ||
| | `TargetArtifactName` | no | By default, the target artifact name is derived from the source artifact, and is of the format `mirrored-<org>-<name>`. For example, `banzaicloud/logging-operator` becomes `mirrored-banzaicloud-logging-operator`. However, there are some artifacts that do not follow this convention - this field exists for these cases. New artifacts should not set this field. | ||
| | `TargetRepositories` | no | Repositories to mirror the artifact to. Repositories are specified via their `BaseUrl` field. If not specified, the artifact is mirrored to all Repositories that have `DefaultTarget` set to true. | ||
| | `TargetRepositories` | no | Repositories to mirror the artifact to. Repositories are specified via their `BaseUrl` field. If not specified, the `Artifact` is mirrored to all Repositories that have `DefaultTarget` set to true. | ||
|
|
||
| ### `autoupdate.yaml` | ||
|
|
||
| `autoupdate.yaml` defines configuration for automatically updating image tags | ||
| `autoupdate.yaml` defines configuration for automatically updating artifact tags | ||
| based on various update strategies that monitor sources for new tags. Each | ||
| entry specifies a strategy for finding tags of images to potentially add to | ||
| entry specifies a strategy for finding tags of artifacts to potentially add to | ||
| `config.yaml`, which are then submitted as pull requests. | ||
|
|
||
| | Field | Required | Description | | ||
|
|
@@ -112,44 +115,44 @@ entry specifies a strategy for finding tags of images to potentially add to | |
| #### `GithubRelease` | ||
|
|
||
| The `GithubRelease` strategy fetches all release tags that matches the VersionConstraint from a GitHub | ||
| repository and applies it to the specified images. | ||
| repository and applies it to the specified artifacts. | ||
| If LatestOnly is true, it only fetches from the latest release and does not consider the VersionConstraint. | ||
|
|
||
| | Field | Required | Description | | ||
| |---------------------|----------|------------- | | ||
| | `Owner` | yes | The GitHub repository owner/organization. | ||
| | `Repository` | yes | The GitHub repository name. | ||
| | `Images` | yes | See [`Images`](#images). | ||
| | `Artifacts` | yes | See [`Artifacts`](#Artifacts). | ||
| | `LatestOnly` | no | If true, get only the tag from the latest github release. | ||
| | `VersionConstraint` | no | A SemVer constraint used to filter the github releases. | ||
| | `VersionRegex` | no | If specified, only matching release tags will be considered. If a capture group is present, only its contents will be passed on. | ||
|
|
||
| ##### `Images` | ||
| ##### `Artifacts` | ||
|
|
||
| A list of images to be updated with the latest release tag. Each image will get the same tag as the GitHub release. | ||
| A list of artifacts to be updated with the latest release tag. Each artifact will get the same tag as the GitHub release. | ||
|
|
||
| | Field | Required | Description | | ||
| | ------------- | ------------- |------------- | | ||
| | `SourceImage` | yes | The GitHub repository name. | ||
| | `TargetImageName` | no | The TargetImageName of the image in `config.yaml` that you want to update. | ||
| | Field | Required | Description | | ||
| |----------------------| ------------- |------------- | | ||
| | `SourceArtifact` | yes | The GitHub repository name. | ||
| | `TargetArtifactName` | no | The TargetArtifactName of the artifact in `config.yaml` that you want to update. | ||
|
|
||
| #### `HelmLatest` | ||
|
|
||
| The `HelmLatest` strategy templates out the latest version of configured | ||
| Helm charts and extracts image references from the rendered manifests. It | ||
| Helm charts and extracts artifact references from the rendered manifests. It | ||
| recursively searches for fields with an "image" key in the templated YAML | ||
| output. | ||
|
|
||
| | Field | Required | Description | | ||
| | ------------- | ------------- |------------- | | ||
| | `HelmRepo` | yes | The URL of the Helm chart repository. | ||
| | `Charts` | yes | A map where keys are the charts to template, and values are another map from environment name to lists of helm values to `--set` in that environment. `helm template` is run once for each environment. | ||
| | `Images` | no | Used to map a given update image to an entry in `config.yaml`. There may be multiple entries that have the same `SourceImage`, but different `TargetImageName`s, so we need to choose which one receives the update image. | ||
| | Field | Required | Description | | ||
| |-----------------| ------------- |------------- | | ||
| | `HelmRepo` | yes | The URL of the Helm chart repository. | ||
| | `Charts` | yes | A map where keys are the charts to template, and values are another map from environment name to lists of helm values to `--set` in that environment. `helm template` is run once for each environment. | ||
| | `Artifacts` | no | Used to map a given update artifact to an entry in `config.yaml`. There may be multiple entries that have the same `SourceArtifact`, but different `TargetArtifactName`s, so we need to choose which one receives the update artifact. | ||
| | `ImageDenylist` | no | A list of images to exclude from the results. | ||
|
|
||
| #### `Registry` | ||
|
|
||
| The `Registry` strategy fetches all image tags that matches the `VersionFilter` from a registry defined in the Images provided. | ||
| The `Registry` strategy fetches all artifact tags that matches the `VersionFilter` from a registry defined in the `Artifacts` provided. | ||
| Supported registries are: | ||
| * Suse Container Registry (registry.suse.com) | ||
| * Docker Hub | ||
|
|
@@ -160,6 +163,6 @@ Supported registries are: | |
|
|
||
| | Field | Required | Description | | ||
| |-----------------|----------|------------- | | ||
| | `Images` | yes | Used to map a given update image to an entry in `config.yaml`. There may be multiple entries that have the same `SourceImage`, but different `TargetImageName`s, so we need to choose which one receives the update image. | ||
| | `Artifacts` | yes | Used to map a given update artifact to an entry in `config.yaml`. There may be multiple entries that have the same `SourceArtifact`, but different `TargetArtifactName`s, so we need to choose which one receives the update artifact. | ||
| | `Latest` | no | A flag to only use the latest tag. This only works if all tags are in semver format. | ||
| | `VersionFilter` | no | A regex to match against the image tags fetched from the registry. | ||
| | `VersionFilter` | no | A regex to match against the artifact tags fetched from the registry. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd definitely use the term "OCI artifacts" here, rather than only "artifacts", since this is the first thing that a user who is unfamiliar with this repo will see.