Format commands examples
This commit is contained in:
@@ -24,25 +24,25 @@ var createKsCmd = &cobra.Command{
|
||||
The kustomization source command generates a kustomization.kustomize.fluxcd.io resource for a given GitRepository source.
|
||||
API spec: https://github.com/fluxcd/kustomize-controller/tree/master/docs/spec/v1alpha1`,
|
||||
Example: ` # Create a kustomization from a source at a given path
|
||||
create kustomization backend \
|
||||
--source=webapp \
|
||||
--path="./overlays/backend/" \
|
||||
--prune="app=backend" \
|
||||
create kustomization contour \
|
||||
--source=contour \
|
||||
--path="./examples/contour/" \
|
||||
--prune="instance=contour" \
|
||||
--generate=true \
|
||||
--interval=10m \
|
||||
--validate=client \
|
||||
--health-check="StatefulSet/backend.test" \
|
||||
--health-check="Deployment/contour.projectcontour" \
|
||||
--health-check="DaemonSet/envoy.projectcontour" \
|
||||
--health-check-timeout=3m
|
||||
|
||||
# Create a kustomization that depends on another
|
||||
create kustomization frontend \
|
||||
--depends-on=backend \
|
||||
# Create a kustomization that depends on the previous one
|
||||
create kustomization webapp \
|
||||
--depends-on=contour \
|
||||
--source=webapp \
|
||||
--path="./overlays/frontend/" \
|
||||
--prune="app=frontend" \
|
||||
--path="./deploy/overlays/dev" \
|
||||
--prune="env=dev,instance=webapp" \
|
||||
--interval=5m \
|
||||
--validate=client \
|
||||
--health-check="Deployment/frontend.test" \
|
||||
--health-check-timeout=2m
|
||||
--validate=client
|
||||
`,
|
||||
RunE: createKsCmdRun,
|
||||
}
|
||||
|
||||
@@ -16,11 +16,35 @@ var VERSION = "0.0.1"
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "tk",
|
||||
Short: "Command line utility for assembling Kubernetes CD pipelines",
|
||||
Long: `Command line utility for assembling Kubernetes CD pipelines.`,
|
||||
Version: VERSION,
|
||||
SilenceUsage: true,
|
||||
SilenceErrors: true,
|
||||
Short: "Command line utility for assembling Kubernetes CD pipelines",
|
||||
Long: `Command line utility for assembling Kubernetes CD pipelines.`,
|
||||
Example: ` # Check prerequisites
|
||||
tk check --pre
|
||||
|
||||
# Install the latest version of the toolkit
|
||||
tk install --version=master
|
||||
|
||||
# Create a source from a public Git repository
|
||||
tk create source webapp \
|
||||
--git-url=https://github.com/stefanprodan/podinfo \
|
||||
--git-branch=master \
|
||||
--interval=5m
|
||||
|
||||
# Create a kustomization for deploying a series of microservices
|
||||
tk create kustomization webapp \
|
||||
--source=webapp \
|
||||
--path="./deploy/webapp/" \
|
||||
--prune="instance=webapp" \
|
||||
--generate=true \
|
||||
--interval=5m \
|
||||
--validate=client \
|
||||
--health-check="Deployment/backend.webapp" \
|
||||
--health-check="Deployment/frontend.webapp" \
|
||||
--health-check-timeout=2m
|
||||
`,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user