mirror of https://github.com/helm/helm
parent
d4323c1da8
commit
67b8cea50f
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"helm.sh/helm/cmd/helm/require"
|
||||||
|
"helm.sh/helm/pkg/action"
|
||||||
|
)
|
||||||
|
|
||||||
|
const chartLoginDesc = `
|
||||||
|
Authenticate against a remote registry.
|
||||||
|
`
|
||||||
|
|
||||||
|
func newChartLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "login [host]",
|
||||||
|
Short: "login to a registry",
|
||||||
|
Long: chartLoginDesc,
|
||||||
|
Args: require.MinimumNArgs(1),
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
host := args[0]
|
||||||
|
return action.NewChartLogin(cfg).Run(out, host, "myuser", "mypass")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"helm.sh/helm/cmd/helm/require"
|
||||||
|
"helm.sh/helm/pkg/action"
|
||||||
|
)
|
||||||
|
|
||||||
|
const chartLogoutDesc = `
|
||||||
|
Remove credentials stored for a remote registry.
|
||||||
|
`
|
||||||
|
|
||||||
|
func newChartLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Command {
|
||||||
|
return &cobra.Command{
|
||||||
|
Use: "logout [host]",
|
||||||
|
Short: "logout from a registry",
|
||||||
|
Long: chartLogoutDesc,
|
||||||
|
Args: require.MinimumNArgs(1),
|
||||||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
|
host := args[0]
|
||||||
|
return action.NewChartLogout(cfg).Run(out, host)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package action
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ChartLogin performs a chart login operation.
|
||||||
|
type ChartLogin struct {
|
||||||
|
cfg *Configuration
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewChartLogin creates a new ChartLogin object with the given configuration.
|
||||||
|
func NewChartLogin(cfg *Configuration) *ChartLogin {
|
||||||
|
return &ChartLogin{
|
||||||
|
cfg: cfg,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run executes the chart login operation
|
||||||
|
func (a *ChartLogin) Run(out io.Writer, host string, username string, password string) error {
|
||||||
|
return nil
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright The Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package action
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ChartLogin performs a chart login operation.
|
||||||
|
type ChartLogout struct {
|
||||||
|
cfg *Configuration
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewChartLogin creates a new ChartLogin object with the given configuration.
|
||||||
|
func NewChartLogout(cfg *Configuration) *ChartLogout {
|
||||||
|
return &ChartLogout{
|
||||||
|
cfg: cfg,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run executes the chart login operation
|
||||||
|
func (a *ChartLogout) Run(out io.Writer, host string) error {
|
||||||
|
return nil
|
||||||
|
}
|
Loading…
Reference in new issue