bookingcom / shipper

Kubernetes native multi-cluster canary or blue-green rollouts using Helm
Apache License 2.0
734 stars 38 forks source link

shipperctl: introduce `shipperctl chart render` #374

Closed hihilla closed 3 years ago

hihilla commented 3 years ago

Continuing @juliogreff 's work on shipperctl chart render from pr #215

It's useful to know what kind of objects shipper is rendering before they reach the api server. For debugging issues with YAML serializing/deserializing, for instance.

For that, you can now run shipperctl chart render app --filename application.yaml or shipperctl chart render app --appName foobar or shipperctl chart render relelase foobar-deadbeef-0

and shipperctl will print a whole bundle of YAML to stdout, with each object separatedby a ---.

$ shipperctl chart render
render Helm Charts for an Application or Release

Usage:
  shipperctl chart render [command]

Available Commands:
  app         render Shipper Charts for an Application
  release     render Shipper Charts for a Release

Flags:
  -h, --help   help for render

Global Flags:
      --kubeconfig string                   the path to the Kubernetes configuration file (default "~/.kube/config")
      --management-cluster-context string   The name of the context to use to communicate with the management cluster. defaults to the current one
  -n, --namespace string                    The namespace where the app lives

Use "shipperctl chart render [command] --help" for more information about a command.

$ shipperctl chart render release -h
render Shipper Charts for a Release

Usage:
  shipperctl chart render release bikerental-7abf46d4-0 [flags]

Flags:
  -h, --help   help for release

Global Flags:
      --kubeconfig string                   the path to the Kubernetes configuration file (default "~/.kube/config")
      --management-cluster-context string   The name of the context to use to communicate with the management cluster. defaults to the current one
  -n, --namespace string                    The namespace where the app lives

$ shipperctl chart render app -h
render Shipper Charts for an Application

Usage:
  shipperctl chart render app [flags]

Flags:
      --appName string               The name of an existing application to render chart for
      --filename applicastion.yaml   An application manifest in the current context to render chart for (e.g. applicastion.yaml)
  -h, --help                         help for app

Global Flags:
      --kubeconfig string                   the path to the Kubernetes configuration file (default "~/.kube/config")
      --management-cluster-context string   The name of the context to use to communicate with the management cluster. defaults to the current one
  -n, --namespace string                    The namespace where the app lives