Replace Helm Hub with Artifact Hub

Signed-off-by: Scott Rigby <scott@r6by.com>
pull/8626/head
Scott Rigby 5 years ago
parent 198f403688
commit 7d03b7bbb9
No known key found for this signature in database
GPG Key ID: C7C6FBB5B91C1155

@ -9,7 +9,7 @@ Helm is a tool for managing Charts. Charts are packages of pre-configured Kubern
Use Helm to:
- Find and use [popular software packaged as Helm Charts](https://hub.helm.sh) to run in Kubernetes
- Find and use [popular software packaged as Helm Charts](https://artifacthub.io/packages/search?kind=0) to run in Kubernetes
- Share your own applications as Helm Charts
- Create reproducible builds of your Kubernetes applications
- Intelligently manage your Kubernetes manifest files

@ -24,8 +24,8 @@ import (
const searchDesc = `
Search provides the ability to search for Helm charts in the various places
they can be stored including the Helm Hub and repositories you have added. Use
search subcommands to search different locations for charts.
they can be stored including the Artifact Hub and repositories you have added.
Use search subcommands to search different locations for charts.
`
func newSearchCmd(out io.Writer) *cobra.Command {

@ -30,15 +30,23 @@ import (
)
const searchHubDesc = `
Search the Helm Hub or an instance of Monocular for Helm charts.
The Helm Hub provides a centralized search for publicly available distributed
charts. It is maintained by the Helm project. It can be visited at
https://hub.helm.sh
Monocular is a web-based application that enables the search and discovery of
charts from multiple Helm Chart repositories. It is the codebase that powers the
Helm Hub. You can find it at https://github.com/helm/monocular
Search for Helm charts in the Artifact Hub or your own hub instance.
Artifact Hub is a web-based application that enables finding, installing, and
publishing packages and configurations for CNCF projects, including publicly
available distributed charts Helm charts. It is a Cloud Native Computing
Foundation sandbox project. You can browse the hub at https://artifacthub.io/
The [KEYWORD] argument accepts either a keyword string, or quoted string of rich
query options. For rich query options documentation, see
https://artifacthub.github.io/hub/api/#/Packages/get_packages_search
Previous versions of Helm used an instance of Monocular as the default
'endpoint', so for backwards compatibility Artifact Hub is compatible with the
Monocular search API. Similarly, when setting the 'endpoint' flag, the specified
endpoint must also be implement a Monocular compatible search API endpoint.
Note that when specifying a Monocular instance as the 'endpoint', rich queries
are not supported. For API details, see https://github.com/helm/monocular
`
type searchHubOptions struct {
@ -51,8 +59,8 @@ func newSearchHubCmd(out io.Writer) *cobra.Command {
o := &searchHubOptions{}
cmd := &cobra.Command{
Use: "hub [keyword]",
Short: "search for charts in the Helm Hub or an instance of Monocular",
Use: "hub [KEYWORD]",
Short: "search for charts in the Artifact Hub or your own hub instance",
Long: searchHubDesc,
RunE: func(cmd *cobra.Command, args []string) error {
return o.run(out, args)
@ -60,7 +68,7 @@ func newSearchHubCmd(out io.Writer) *cobra.Command {
}
f := cmd.Flags()
f.StringVar(&o.searchEndpoint, "endpoint", "https://hub.helm.sh", "monocular instance to query for charts")
f.StringVar(&o.searchEndpoint, "endpoint", "https://artifacthub.io", "Hub instance to query for charts")
f.UintVar(&o.maxColWidth, "max-col-width", 50, "maximum column width for output table")
bindOutputFlag(cmd, &o.outputFormat)

@ -21,11 +21,11 @@ import (
)
func TestNew(t *testing.T) {
c, err := New("https://hub.helm.sh")
c, err := New("https://artifacthub.io")
if err != nil {
t.Errorf("error creating client: %s", err)
}
if c.BaseURL != "https://hub.helm.sh" {
t.Errorf("incorrect BaseURL. Expected \"https://hub.helm.sh\" but got %q", c.BaseURL)
if c.BaseURL != "https://artifacthub.io" {
t.Errorf("incorrect BaseURL. Expected \"https://artifacthub.io\" but got %q", c.BaseURL)
}
}

@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package monocular contains the logic for interacting with monocular instances
// like the Helm Hub.
// Package monocular contains the logic for interacting with a Monocular
// compatible search API endpoint. For example, as implemented by the Artifact
// Hub.
//
// This is a library for interacting with monocular
// This is a library for interacting with a monocular compatible search API
package monocular

Loading…
Cancel
Save