-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Headlamp plugins (#3594)
Signed-off-by: Sergio Castaño Arteaga <[email protected]> Signed-off-by: Cintia Sanchez Garcia <[email protected]> Co-authored-by: Sergio Castaño Arteaga <[email protected]> Co-authored-by: Cintia Sanchez Garcia <[email protected]>
- Loading branch information
1 parent
38071dc
commit 7a2e090
Showing
54 changed files
with
676 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
name: artifact-hub | ||
description: Artifact Hub is a web-based application that enables finding, installing, and publishing Kubernetes packages. | ||
type: application | ||
version: 1.16.1-4 | ||
version: 1.16.1-5 | ||
appVersion: 1.16.0 | ||
kubeVersion: ">= 1.19.0-0" | ||
home: https://artifacthub.io | ||
|
@@ -28,6 +28,7 @@ keywords: | |
- argo | ||
- kubearmor | ||
- kcl | ||
- headlamp | ||
maintainers: | ||
- name: Sergio | ||
email: [email protected] | ||
|
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
insert into repository_kind values (21, 'Headlamp plugins'); | ||
|
||
---- create above / drop below ---- | ||
|
||
delete from repository_kind where repository_kind_id = 21; |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Headlamp annotations | ||
|
||
You can provide some extra information about your Headlamp plugins by using the `annotations` field in the [Artifact Hub package metadata file](https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml). | ||
|
||
## Supported annotations | ||
|
||
- **headlamp/plugin/archive-url** *(string, required)* | ||
|
||
Plugin archive tarball URL (e.g. "https://.../my-archive.tar.gz"). | ||
|
||
- **headlamp/plugin/archive-checksum** *(string, required)* | ||
|
||
Plugin archive tarball checksum (e.g. "sha256:MY_CHECKSUM"). | ||
|
||
- **headlamp/plugin/version-compat** *(string, optional)* | ||
|
||
Headlamp versions this plugin is compatible with (e.g. ">=1.2.3"). | ||
|
||
- **headlamp/plugin/distro-compat** *(string, optional)* | ||
|
||
Headlamp flavor this plugin is compatible with (e.g. one or more of app, in-cluster, web, docker-desktop, linux, windows, mac). | ||
|
||
## Example | ||
|
||
```yaml | ||
... | ||
annotations: | ||
headlamp/plugin/archive-url: "https://.../my-archive.tar.gz" | ||
headlamp/plugin/archive-checksum: "sha256:MY_CHECKSUM" | ||
headlamp/plugin/version-compat: ">=1.2.3" | ||
headlamp/plugin/distro-compat: "in-cluster,web,docker-desktop" | ||
``` |
This file contains 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
## Headlamp plugins repositories | ||
|
||
Headlamp plugins repositories are expected to be hosted in GitHub, GitLab or Bitbucket repos. When adding your repository to Artifact Hub, the url used **must** follow the following format: | ||
|
||
- `https://github.com/user/repo[/path/to/packages]` | ||
- `https://gitlab.com/user/repo[/path/to/packages]` | ||
- `https://bitbucket.org/user/repo[/path/to/packages]` | ||
|
||
By default the `master` branch is used, but it's possible to specify a different one from the UI. | ||
|
||
*Please NOTE that the repository URL used when adding the repository to Artifact Hub **must NOT** contain the git hosting platform specific parts, like **tree/branch**, just the path to your packages like it would show in the filesystem.* | ||
|
||
The *path/to/packages* provided can contain metadata for one or more packages. Each package version **must** be on a separate folder, and it's up to you to decide if you want to publish one or multiple versions of your package. | ||
|
||
The structure of a repository with multiple plugins packages and versions could look something like this: | ||
|
||
```sh | ||
$ tree path/to/packages | ||
path/to/packages | ||
├── artifacthub-repo.yml | ||
├── package1 | ||
│ ├── 1.0.0 | ||
│ │ ├── README.md | ||
│ │ └── artifacthub-pkg.yml | ||
│ └── 2.0.0 | ||
│ ├── README.md | ||
│ └── artifacthub-pkg.yml | ||
└── package2 | ||
└── 1.0.0 | ||
├── README.md | ||
└── artifacthub-pkg.yml | ||
``` | ||
|
||
This structure is flexible, and in some cases where you only have a package and a version it can be greatly simplified. In the case of a single package with a single version available at a time (the publisher doesn't want to make previous ones available, for example), the structure could look like this: | ||
|
||
```sh | ||
$ tree path/to/packages | ||
path/to/packages | ||
├── artifacthub-repo.yml | ||
└── package1 | ||
├── README.md | ||
└── artifacthub-pkg.yml | ||
``` | ||
|
||
In the previous case, even the `package1` directory could be omitted. The reason is that both packages names and versions are read from the `artifacthub-pkg.yml` metadata file, so directories names are not used at all. | ||
|
||
Each package version **needs** an `artifacthub-pkg.yml` metadata file. Please see the file [spec](https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml) and the [Headlamp annotations documentation](https://github.com/artifacthub/hub/blob/master/docs/headlamp_annotations.md) for more details. The [artifacthub-repo.yml](https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-repo.yml) repository metadata file shown above can be used to setup features like [Verified publisher](https://github.com/artifacthub/hub/blob/master/docs/repositories.md#verified-publisher) or [Ownership claim](https://github.com/artifacthub/hub/blob/master/docs/repositories.md#ownership-claim). This file must be located at `/path/to/packages`. | ||
|
||
Once you have added your repository, you are all set up. As you add new versions of your plugins packages or new packages to your git repository, they'll be automatically indexed and listed in Artifact Hub. |
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "Headlamp" | ||
aliases: [ | ||
"/headlamp_annotations", | ||
] | ||
--- |
This file contains 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: "Headlamp plugins" | ||
aliases: [ | ||
"/headlamp_plugins_repositories", | ||
] | ||
--- |
This file contains 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
This file contains 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
Oops, something went wrong.