Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: knative/client-contrib
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7cd9c182b3e09645120fd8d0b314582425669f21
Choose a base ref
..
head repository: knative/client-contrib
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2f2cda279eae46fb8fb9e5b4856dbebd454d19eb
Choose a head ref
4 changes: 1 addition & 3 deletions plugins/admin/pkg/command/autoscaling/autoscaling.go
Original file line number Diff line number Diff line change
@@ -24,9 +24,7 @@ func NewAutoscalingCmd(p *pkg.AdminParams) *cobra.Command {
var AutoscalingCmd = &cobra.Command{
Use: "autoscaling",
Short: "Manage autoscaling config",
Long: `Manage autoscaling provided by Knative Pod Autoscaler (KPA). For example:
kn admin autoscaling update - to manage autoscaling config`,
Long: `Manage autoscaling provided by Knative Pod Autoscaler (KPA).`,
}
AutoscalingCmd.AddCommand(NewAutoscalingUpdateCommand(p))
AutoscalingCmd.InitDefaultHelpFlag()
14 changes: 6 additions & 8 deletions plugins/admin/pkg/command/autoscaling/update.go
Original file line number Diff line number Diff line change
@@ -41,14 +41,12 @@ func NewAutoscalingUpdateCommand(p *pkg.AdminParams) *cobra.Command {
AutoscalingUpdateCommand := &cobra.Command{
Use: "update",
Short: "Update autoscaling config",
Long: `Update autoscaling config provided by Knative Pod Autoscaler (KPA)
For example:
# To enable scale-to-zero
kn admin autoscaling update --scale-to-zero
# To disable scale-to-zero
kn admin autoscaling update --no-scale-to-zero
`,
Long: `Update autoscaling config provided by Knative Pod Autoscaler (KPA)`,
Example: `
# To enable scale-to-zero
kn admin autoscaling update --scale-to-zero
# To disable scale-to-zero
kn admin autoscaling update --no-scale-to-zero`,
PreRunE: func(cmd *cobra.Command, args []string) error {
if cmd.Flags().NFlag() == 0 {
return errors.New("'autoscaling update' requires flag(s)")
6 changes: 1 addition & 5 deletions plugins/admin/pkg/command/domain/domain.go
Original file line number Diff line number Diff line change
@@ -24,11 +24,7 @@ func NewDomainCmd(p *pkg.AdminParams) *cobra.Command {
var domainCmd = &cobra.Command{
Use: "domain",
Short: "Manage route domain",
Long: `Manage default route domain or custom route domain for Service with selectors. For example:
kn admin domain set - to set Knative route domain
kn admin domain unset - to unset Knative route domain`,
Long: `Manage default route domain or custom route domain for Service with selectors.`,
}
domainCmd.AddCommand(NewDomainSetCommand(p))
domainCmd.AddCommand(NewDomainUnSetCommand(p))
15 changes: 7 additions & 8 deletions plugins/admin/pkg/command/domain/set.go
Original file line number Diff line number Diff line change
@@ -40,14 +40,13 @@ func NewDomainSetCommand(p *pkg.AdminParams) *cobra.Command {
domainSetCommand := &cobra.Command{
Use: "set",
Short: "Set route domain",
Long: `Set Knative route domain for service
For example:
# To set a default route domain
kn admin domain set --custom-domain mydomain.com
# To set a route domain for service having label app=v1
kn admin domain set --custom-domain mydomain.com --selector app=v1
`,
Long: `Set Knative route domain for service`,
Example:`
# To set a default route domain
kn admin domain set --custom-domain mydomain.com
# To set a route domain for service having label app=v1
kn admin domain set --custom-domain mydomain.com --selector app=v1`,
PreRunE: func(cmd *cobra.Command, args []string) error {
domain = strings.TrimSpace(domain)
if domain == "" {
12 changes: 5 additions & 7 deletions plugins/admin/pkg/command/domain/unset.go
Original file line number Diff line number Diff line change
@@ -31,13 +31,11 @@ import (
func NewDomainUnSetCommand(p *pkg.AdminParams) *cobra.Command {
domainUnSetCommand := &cobra.Command{
Use: "unset",
Short: "unset route domain",
Long: `unset Knative route domain for service
For example:
# To unset a route domain
kn admin domain unset --custom-domain mydomain.com
`,
Short: "Unset route domain",
Long: `Unset Knative route domain for service`,
Example: `
# To unset a route domain
kn admin domain unset --custom-domain mydomain.com`,
PreRunE: func(cmd *cobra.Command, args []string) error {
if domain == "" {
return errors.New("'domain unset' requires the route name to run provided with the --custom-domain option")
20 changes: 10 additions & 10 deletions plugins/admin/pkg/command/registry/add.go
Original file line number Diff line number Diff line change
@@ -56,16 +56,16 @@ var prflags prcmdFlags
func NewPrAddCommand(p *pkg.AdminParams) *cobra.Command {
var prAddCmd = &cobra.Command{
Use: "add",
Short: "add registry with credentials",
Long: `add registry with credentials to enable Service deployment from it
For example:
kn admin registry add \
--secret-name=[SECRET_NAME]
--server=[REGISTRY_SERVER_URL] \
--email=[REGISTRY_EMAIL] \
--username=[REGISTRY_USER] \
--password=[REGISTRY_PASSWORD]`,
Short: "Add registry with credentials",
Long: `Add registry with credentials to enable Service deployment from it`,
Example: `
# add registry with credentials
kn admin registry add \
--secret-name=[SECRET_NAME]
--server=[REGISTRY_SERVER_URL] \
--email=[REGISTRY_EMAIL] \
--username=[REGISTRY_USER] \
--password=[REGISTRY_PASSWORD]`,
PreRunE: func(cmd *cobra.Command, args []string) error {
if prflags.Username == "" {
return errors.New("'registry add' requires the registry username to run provided with the --username option")
10 changes: 1 addition & 9 deletions plugins/admin/pkg/command/registry/registry.go
Original file line number Diff line number Diff line change
@@ -24,15 +24,7 @@ func NewPrivateRegistryCmd(p *pkg.AdminParams) *cobra.Command {
var privateRegistryCmd = &cobra.Command{
Use: "registry",
Short: "Manage registry",
Long: `Manage Service deployment from a registry with credentials
For example:
kn admin registry add \
--secret-name=[SECRET_NAME]
--server=[REGISTRY_SERVER_URL] \
--email=[REGISTRY_EMAIL] \
--username=[REGISTRY_USER] \
--password=[REGISTRY_PASSWORD]`,
Long: `Manage Service deployment from a registry with credentials`,
}
privateRegistryCmd.AddCommand(NewPrAddCommand(p))
privateRegistryCmd.InitDefaultHelpCmd()