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: 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 - Share your own applications as Helm Charts
- Create reproducible builds of your Kubernetes applications - Create reproducible builds of your Kubernetes applications
- Intelligently manage your Kubernetes manifest files - Intelligently manage your Kubernetes manifest files

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

@ -30,15 +30,23 @@ import (
) )
const searchHubDesc = ` const searchHubDesc = `
Search the Helm Hub or an instance of Monocular for Helm charts. Search for Helm charts in the Artifact Hub or your own hub instance.
The Helm Hub provides a centralized search for publicly available distributed Artifact Hub is a web-based application that enables finding, installing, and
charts. It is maintained by the Helm project. It can be visited at publishing packages and configurations for CNCF projects, including publicly
https://hub.helm.sh available distributed charts Helm charts. It is a Cloud Native Computing
Foundation sandbox project. You can browse the hub at https://artifacthub.io/
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 The [KEYWORD] argument accepts either a keyword string, or quoted string of rich
Helm Hub. You can find it at https://github.com/helm/monocular 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 { type searchHubOptions struct {
@ -51,8 +59,8 @@ func newSearchHubCmd(out io.Writer) *cobra.Command {
o := &searchHubOptions{} o := &searchHubOptions{}
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "hub [keyword]", Use: "hub [KEYWORD]",
Short: "search for charts in the Helm Hub or an instance of Monocular", Short: "search for charts in the Artifact Hub or your own hub instance",
Long: searchHubDesc, Long: searchHubDesc,
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
return o.run(out, args) return o.run(out, args)
@ -60,7 +68,7 @@ func newSearchHubCmd(out io.Writer) *cobra.Command {
} }
f := cmd.Flags() 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") f.UintVar(&o.maxColWidth, "max-col-width", 50, "maximum column width for output table")
bindOutputFlag(cmd, &o.outputFormat) bindOutputFlag(cmd, &o.outputFormat)

@ -21,11 +21,11 @@ import (
) )
func TestNew(t *testing.T) { func TestNew(t *testing.T) {
c, err := New("https://hub.helm.sh") c, err := New("https://artifacthub.io")
if err != nil { if err != nil {
t.Errorf("error creating client: %s", err) t.Errorf("error creating client: %s", err)
} }
if c.BaseURL != "https://hub.helm.sh" { if c.BaseURL != "https://artifacthub.io" {
t.Errorf("incorrect BaseURL. Expected \"https://hub.helm.sh\" but got %q", c.BaseURL) 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. limitations under the License.
*/ */
// Package monocular contains the logic for interacting with monocular instances // Package monocular contains the logic for interacting with a Monocular
// like the Helm Hub. // 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 package monocular

Loading…
Cancel
Save