Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Added install to fluxctl output #2489

Merged
merged 1 commit into from
Oct 1, 2019

Conversation

domgoodwin
Copy link
Contributor

This closes #2476

@dholbach
Copy link
Member

dholbach commented Oct 1, 2019

Thanks a lot @domgoodwin for working on this!

You might want to apply the following diff, as it's current output of fluxctl:

diff --git a/docs/references/fluxctl.md b/docs/references/fluxctl.md
index 3042a4cd..08c26244 100644
--- a/docs/references/fluxctl.md
+++ b/docs/references/fluxctl.md
@@ -196,6 +196,9 @@ Connecting:
   # To a fluxd running in namespace "weave" in your current kubectl context
   fluxctl --k8s-fwd-ns=weave list-workloads
 
+  # To a Weave Cloud instance, with your instance token in $TOKEN
+  fluxctl --token $TOKEN list-workloads
+
 Workflow:
   fluxctl list-workloads                                                   # Which workloads are running?
   fluxctl list-images --workload=default:deployment/foo                    # Which images are running/available?
@@ -205,25 +208,26 @@ Usage:
   fluxctl [command]
 
 Available Commands:
-  automate         Turn on automatic deployment for a workload.
-  deautomate       Turn off automatic deployment for a workload.
-  help             Help about any command
-  identity         Display SSH public key
-  install          Print and tweak Kubernetes manifests needed to install Flux in a Cluster
-  list-workloads   List workloads currently running in the cluster.
-  list-images      Show the deployed and available images.
-  lock             Lock a workload, so it cannot be deployed.
-  policy           Manage policies for a workload.
-  release          Release a new version of a workload.
-  save             save workload definitions to local files in cluster-native format
-  sync             synchronize the cluster with the git repository, now
-  unlock           Unlock a workload, so it can be deployed.
-  version          Output the version of fluxctl
+  automate       Turn on automatic deployment for a workload.
+  deautomate     Turn off automatic deployment for a workload.
+  help           Help about any command
+  identity       Display SSH public key
+  install        Print and tweak Kubernetes manifests needed to install Flux in a Cluster
+  list-images    Show deployed and available images.
+  list-workloads List workloads currently running in the cluster.
+  lock           Lock a workload, so it cannot be deployed.
+  policy         Manage policies for a workload.
+  release        Release a new version of a workload.
+  save           save workload definitions to local files in cluster-native format
+  sync           synchronize the cluster with the git repository, now
+  unlock         Unlock a workload, so it can be deployed.
+  version        Output the version of fluxctl
 
 Flags:
   -h, --help                            help for fluxctl
       --k8s-fwd-labels stringToString   Labels used to select the fluxd pod a port forward should be created for. You can also set the environment variable FLUX_FORWARD_LABELS (default [app=flux])
       --k8s-fwd-ns string               Namespace in which fluxd is running, for creating a port forward to access the API. No port forward will be created if a URL or token is given. You can also set the environment variable FLUX_FORWARD_NAMESPACE (default "default")
+      --timeout duration                Global command timeout; you can also set the environment variable FLUX_TIMEOUT (default 1m0s)
   -t, --token string                    Weave Cloud authentication token; you can also set the environment variable WEAVE_CLOUD_TOKEN or FLUX_SERVICE_TOKEN
   -u, --url string                      Base URL of the Flux API (defaults to "https://cloud.weave.works/api/flux" if a token is provided); you can also set the environment variable FLUX_URL
 

In addition to that I would at least mention the call to fluxctl install somewhere in the text. At least what it does and maybe one example of how to run it:

Print and tweak Kubernetes manifests needed to install Flux in a Cluster

Usage:
  fluxctl install [flags]

Examples:
# Install Flux and make it use Git repository git@github.com:<your username>/flux-get-started
fluxctl install --git-url 'git@github.com:<your username>/flux-get-started' | kubectl -f -

Flags:
      --git-branch string   Git branch to be used by Flux (default "master")
      --git-email string    Email to use as git committer
      --git-label string    Git label to keep track of Flux's sync progress; overrides both --git-sync-tag and --git-notes-ref (default "flux")
      --git-path strings    Relative paths within the Git repo for Flux to locate Kubernetes manifests
      --git-url string      URL of the Git repository to be used by Flux, e.g. git@github.com:<your username>/flux-get-started
      --git-user string     Username to use as git committer (default "Flux")
  -h, --help                help for install
      --namespace string    Cluster namespace where to install flux (default "default")

Global Flags:
      --k8s-fwd-labels stringToString   Labels used to select the fluxd pod a port forward should be created for. You can also set the environment variable FLUX_FORWARD_LABELS (default [app=flux])
      --k8s-fwd-ns string               Namespace in which fluxd is running, for creating a port forward to access the API. No port forward will be created if a URL or token is given. You can also set the environment variable FLUX_FORWARD_NAMESPACE (default "default")
      --timeout duration                Global command timeout; you can also set the environment variable FLUX_TIMEOUT (default 1m0s)
  -t, --token string                    Weave Cloud authentication token; you can also set the environment variable WEAVE_CLOUD_TOKEN or FLUX_SERVICE_TOKEN
  -u, --url string                      Base URL of the Flux API (defaults to "https://cloud.weave.works/api/flux" if a token is provided); you can also set the environment variable FLUX_URL

As @stefanprodan pointed out in #2476 (comment) it'd be good to point to the other article for a more detailed discussion of fluxctl install.

@domgoodwin
Copy link
Contributor Author

Thanks @dholbach for the feedback, I've added in a "Install into a cluster" section with the install --help output and updated the fluxctl --help output with the current one.

docs/references/fluxctl.md Outdated Show resolved Hide resolved
docs/references/fluxctl.md Outdated Show resolved Hide resolved
@dholbach
Copy link
Member

dholbach commented Oct 1, 2019

Almost there, @domgoodwin - this is already looking a lot better!

@domgoodwin
Copy link
Contributor Author

@dholbach I've updated with your feedback and fixed a build issue with the relative path

docs/references/fluxctl.md Outdated Show resolved Hide resolved
docs/references/fluxctl.md Outdated Show resolved Hide resolved
Copy link
Member

@dholbach dholbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @domgoodwin! 🥇

@hiddeco
Copy link
Member

hiddeco commented Oct 1, 2019

@domgoodwin the number of commits is quite high for such a small change. Would you be able to smash the commits together so that master stays clean? Thanks 🌷

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content wise looking good, thanks @domgoodwin 💯

@domgoodwin
Copy link
Contributor Author

@hiddeco thanks! That's done now

@hiddeco hiddeco merged commit 68d1647 into fluxcd:master Oct 1, 2019
@hiddeco hiddeco added this to the 1.15.0 milestone Oct 1, 2019
@dholbach
Copy link
Member

dholbach commented Oct 1, 2019

Excellent work! <3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document 'fluxctl install' in fluxctl reference
3 participants