Merge pull request #114 from fluxcd/fix-kustomize-cmd

Rename kustomization arg from validate to validation
pull/116/head v0.0.8
Stefan Prodan 5 years ago committed by GitHub
commit 4e3dee15ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -65,7 +65,7 @@ jobs:
--path="./deploy/overlays/dev" \ --path="./deploy/overlays/dev" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client \ --validation=client \
--health-check="Deployment/frontend.dev" \ --health-check="Deployment/frontend.dev" \
--health-check="Deployment/backend.dev" \ --health-check="Deployment/backend.dev" \
--health-check-timeout=3m --health-check-timeout=3m

@ -45,7 +45,7 @@ var createKsCmd = &cobra.Command{
--path="./examples/contour/" \ --path="./examples/contour/" \
--prune=true \ --prune=true \
--interval=10m \ --interval=10m \
--validate=client \ --validation=client \
--health-check="Deployment/contour.projectcontour" \ --health-check="Deployment/contour.projectcontour" \
--health-check="DaemonSet/envoy.projectcontour" \ --health-check="DaemonSet/envoy.projectcontour" \
--health-check-timeout=3m --health-check-timeout=3m
@ -57,7 +57,7 @@ var createKsCmd = &cobra.Command{
--path="./deploy/overlays/dev" \ --path="./deploy/overlays/dev" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client --validation=client
# Create a Kustomization resource that runs under a service account # Create a Kustomization resource that runs under a service account
create kustomization webapp \ create kustomization webapp \
@ -65,7 +65,7 @@ var createKsCmd = &cobra.Command{
--path="./deploy/overlays/staging" \ --path="./deploy/overlays/staging" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client \ --validation=client \
--sa-name=reconclier \ --sa-name=reconclier \
--sa-namespace=staging --sa-namespace=staging
`, `,
@ -77,7 +77,7 @@ var (
ksPath string ksPath string
ksPrune bool ksPrune bool
ksDependsOn []string ksDependsOn []string
ksValidate string ksValidation string
ksHealthCheck []string ksHealthCheck []string
ksHealthTimeout time.Duration ksHealthTimeout time.Duration
ksSAName string ksSAName string
@ -90,7 +90,7 @@ func init() {
createKsCmd.Flags().BoolVar(&ksPrune, "prune", false, "enable garbage collection") createKsCmd.Flags().BoolVar(&ksPrune, "prune", false, "enable garbage collection")
createKsCmd.Flags().StringArrayVar(&ksHealthCheck, "health-check", nil, "workload to be included in the health assessment, in the format '<kind>/<name>.<namespace>'") createKsCmd.Flags().StringArrayVar(&ksHealthCheck, "health-check", nil, "workload to be included in the health assessment, in the format '<kind>/<name>.<namespace>'")
createKsCmd.Flags().DurationVar(&ksHealthTimeout, "health-check-timeout", 2*time.Minute, "timeout of health checking operations") createKsCmd.Flags().DurationVar(&ksHealthTimeout, "health-check-timeout", 2*time.Minute, "timeout of health checking operations")
createKsCmd.Flags().StringVar(&ksValidate, "validate", "", "validate the manifests before applying them on the cluster, can be 'client' or 'server'") createKsCmd.Flags().StringVar(&ksValidation, "validation", "", "validate the manifests before applying them on the cluster, can be 'client' or 'server'")
createKsCmd.Flags().StringArrayVar(&ksDependsOn, "depends-on", nil, "Kustomization that must be ready before this Kustomization can be applied") createKsCmd.Flags().StringArrayVar(&ksDependsOn, "depends-on", nil, "Kustomization that must be ready before this Kustomization can be applied")
createKsCmd.Flags().StringVar(&ksSAName, "sa-name", "", "service account name") createKsCmd.Flags().StringVar(&ksSAName, "sa-name", "", "service account name")
createKsCmd.Flags().StringVar(&ksSANamespace, "sa-namespace", "", "service account namespace") createKsCmd.Flags().StringVar(&ksSANamespace, "sa-namespace", "", "service account namespace")
@ -142,7 +142,7 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
Name: ksSource, Name: ksSource,
}, },
Suspend: false, Suspend: false,
Validation: ksValidate, Validation: ksValidation,
}, },
} }

@ -65,7 +65,7 @@ var rootCmd = &cobra.Command{
--path="./deploy/webapp/" \ --path="./deploy/webapp/" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client \ --validation=client \
--health-check="Deployment/backend.webapp" \ --health-check="Deployment/backend.webapp" \
--health-check="Deployment/frontend.webapp" \ --health-check="Deployment/frontend.webapp" \
--health-check-timeout=2m --health-check-timeout=2m

@ -36,7 +36,7 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
--path="./deploy/webapp/" \ --path="./deploy/webapp/" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client \ --validation=client \
--health-check="Deployment/backend.webapp" \ --health-check="Deployment/backend.webapp" \
--health-check="Deployment/frontend.webapp" \ --health-check="Deployment/frontend.webapp" \
--health-check-timeout=2m --health-check-timeout=2m

@ -19,7 +19,7 @@ tk create kustomization [name] [flags]
--path="./examples/contour/" \ --path="./examples/contour/" \
--prune=true \ --prune=true \
--interval=10m \ --interval=10m \
--validate=client \ --validation=client \
--health-check="Deployment/contour.projectcontour" \ --health-check="Deployment/contour.projectcontour" \
--health-check="DaemonSet/envoy.projectcontour" \ --health-check="DaemonSet/envoy.projectcontour" \
--health-check-timeout=3m --health-check-timeout=3m
@ -31,7 +31,7 @@ tk create kustomization [name] [flags]
--path="./deploy/overlays/dev" \ --path="./deploy/overlays/dev" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client --validation=client
# Create a Kustomization resource that runs under a service account # Create a Kustomization resource that runs under a service account
create kustomization webapp \ create kustomization webapp \
@ -39,7 +39,7 @@ tk create kustomization [name] [flags]
--path="./deploy/overlays/staging" \ --path="./deploy/overlays/staging" \
--prune=true \ --prune=true \
--interval=5m \ --interval=5m \
--validate=client \ --validation=client \
--sa-name=reconclier \ --sa-name=reconclier \
--sa-namespace=staging --sa-namespace=staging
@ -57,7 +57,7 @@ tk create kustomization [name] [flags]
--sa-name string service account name --sa-name string service account name
--sa-namespace string service account namespace --sa-namespace string service account namespace
--source string GitRepository name --source string GitRepository name
--validate string validate the manifests before applying them on the cluster, can be 'client' or 'server' --validation string validate the manifests before applying them on the cluster, can be 'client' or 'server'
``` ```
### Options inherited from parent commands ### Options inherited from parent commands

@ -2,7 +2,7 @@
## Prerequisites ## Prerequisites
You will need two Kubernetes clusters version 1.14 or newer and kubectl version 1.18. You will need two Kubernetes clusters version 1.16 or newer and kubectl version 1.18.
For a quick local test, you can use [Kubernetes kind](https://kind.sigs.k8s.io/docs/user/quick-start/). For a quick local test, you can use [Kubernetes kind](https://kind.sigs.k8s.io/docs/user/quick-start/).
Any other Kubernetes setup will work as well though. Any other Kubernetes setup will work as well though.
@ -63,7 +63,7 @@ $ tk check --pre
► checking prerequisites ► checking prerequisites
✔ kubectl 1.18.3 >=1.18.0 ✔ kubectl 1.18.3 >=1.18.0
✔ kubernetes 1.18.2 >=1.14.0 ✔ kubernetes 1.18.2 >=1.16.0
✔ prerequisites checks passed ✔ prerequisites checks passed
``` ```
@ -152,7 +152,7 @@ tk create kustomization webapp-common \
--source=webapp \ --source=webapp \
--path="./deploy/webapp/common" \ --path="./deploy/webapp/common" \
--prune=true \ --prune=true \
--validate=client \ --validation=client \
--interval=1h \ --interval=1h \
--export > ./staging-cluster/webapp-common.yaml --export > ./staging-cluster/webapp-common.yaml
``` ```
@ -165,7 +165,7 @@ tk create kustomization webapp-backend \
--source=webapp \ --source=webapp \
--path="./deploy/webapp/backend" \ --path="./deploy/webapp/backend" \
--prune=true \ --prune=true \
--validate=client \ --validation=client \
--interval=10m \ --interval=10m \
--health-check="Deployment/backend.webapp" \ --health-check="Deployment/backend.webapp" \
--health-check-timeout=2m \ --health-check-timeout=2m \
@ -180,7 +180,7 @@ tk create kustomization webapp-frontend \
--source=webapp \ --source=webapp \
--path="./deploy/webapp/frontend" \ --path="./deploy/webapp/frontend" \
--prune=true \ --prune=true \
--validate=client \ --validation=client \
--interval=10m \ --interval=10m \
--health-check="Deployment/frontend.webapp" \ --health-check="Deployment/frontend.webapp" \
--health-check-timeout=2m \ --health-check-timeout=2m \
@ -278,7 +278,7 @@ tk create kustomization webapp \
--source=webapp \ --source=webapp \
--path="./deploy/overlays/production" \ --path="./deploy/overlays/production" \
--prune=true \ --prune=true \
--validate=client \ --validation=client \
--interval=10m \ --interval=10m \
--health-check="Deployment/frontend.production" \ --health-check="Deployment/frontend.production" \
--health-check="Deployment/backend.production" \ --health-check="Deployment/backend.production" \

Loading…
Cancel
Save