Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move --dangerous-disable-gk-scoping flag to kapp deploy #752

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/kapp/cmd/app/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (o *DeployOptions) Run() error {
}

func (o *DeployOptions) newAndUsedGKs(newGKs []schema.GroupKind, app ctlapp.App) ([]schema.GroupKind, error) {
if o.ResourceTypesFlags.DisableGKScoping {
if o.DeployFlags.DisableGKScoping {
return []schema.GroupKind{}, nil
}

Expand Down
5 changes: 5 additions & 0 deletions pkg/kapp/cmd/app/deploy_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ type DeployFlags struct {
Logs bool
LogsAll bool
AppMetadataFile string

DisableGKScoping bool
}

func (s *DeployFlags) Set(cmd *cobra.Command) {
Expand Down Expand Up @@ -55,4 +57,7 @@ func (s *DeployFlags) Set(cmd *cobra.Command) {
cmd.Flags().BoolVar(&s.Logs, "logs", true, fmt.Sprintf("Show logs from Pods annotated as '%s'", deployLogsAnnKey))
cmd.Flags().BoolVar(&s.LogsAll, "logs-all", false, "Show logs from all Pods")
cmd.Flags().StringVar(&s.AppMetadataFile, "app-metadata-file-output", "", "Set filename to write app metadata")

cmd.Flags().BoolVar(&s.DisableGKScoping, "dangerous-disable-gk-scoping",
false, "Disable scoping of resource searching to used GroupKinds")
}
5 changes: 0 additions & 5 deletions pkg/kapp/cmd/app/resource_types_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ type ResourceTypesFlags struct {
CanIgnoreFailingAPIService func(schema.GroupVersion) bool

ScopeToFallbackAllowedNamespaces bool

DisableGKScoping bool
}

func (s *ResourceTypesFlags) Set(cmd *cobra.Command) {
Expand All @@ -23,9 +21,6 @@ func (s *ResourceTypesFlags) Set(cmd *cobra.Command) {

cmd.Flags().BoolVar(&s.ScopeToFallbackAllowedNamespaces, "dangerous-scope-to-fallback-allowed-namespaces",
false, "Scope resource searching to fallback allowed namespaces")

cmd.Flags().BoolVar(&s.DisableGKScoping, "dangerous-disable-gk-scoping",
false, "Disable scoping of resource searching to used GroupKinds")
}

func (s *ResourceTypesFlags) FailingAPIServicePolicy() *FailingAPIServicesPolicy {
Expand Down