1
0
mirror of synced 2026-03-01 19:26:55 +00:00

Compare commits

...

48 Commits

Author SHA1 Message Date
Stefan Prodan
23912e4091 Merge pull request #452 from fluxcd/terraform-provider
Add the Terraform provider to install docs
2020-11-11 17:26:18 +02:00
Stefan Prodan
17468cb5f5 Add the Terraform provider to install docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-11 17:16:14 +02:00
Stefan Prodan
5ea7aa0a75 Merge pull request #450 from fluxcd/ssh-host-github
Add token authentication option to bootstrap
2020-11-11 16:49:43 +02:00
Stefan Prodan
7792cd6a10 Add token authentication option to bootstrap
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-11 16:41:18 +02:00
Stefan Prodan
237d186207 Merge pull request #444 from arodus/patch-1
Fix create tenant command export
2020-11-11 14:27:59 +02:00
Sebastian Karasek
c41487598e Fix create tenant command export
Signed-off-by: Sebastian Karasek <sebastian@karasek.io>
2020-11-11 13:15:17 +01:00
Stefan Prodan
2c0aa3c3af Merge pull request #446 from fluxcd/helm-values-file
Add values file example to Helm docs
2020-11-11 11:46:45 +02:00
Stefan Prodan
cedb33b2b9 Add values file example to Helm docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-11 10:26:03 +02:00
Stefan Prodan
06a3aa2c60 Merge pull request #442 from fluxcd/helm-upgrade-guide-typo
docs: fix typo
2020-11-11 09:08:36 +02:00
Hidde Beydals
3fadc94711 docs: include releaseName in HelmRelease example
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-10 18:27:06 +01:00
Hidde Beydals
61d02bf5e4 docs: fix typo
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-10 18:20:05 +01:00
Stefan Prodan
a62976461e Merge pull request #439 from fluxcd/update-components
Update notification-controller to v0.2.1
2020-11-09 17:46:07 +02:00
fluxcdbot
d7a893acf9 Update toolkit components 2020-11-09 15:37:09 +00:00
Stefan Prodan
0c67e75fb6 Merge pull request #438 from fluxcd/check-print-images
List component images in check cmd
2020-11-09 17:12:13 +02:00
Stefan Prodan
e6b84c4cfc List components images in check cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-09 16:10:06 +02:00
Stefan Prodan
5d2e793386 Merge pull request #437 from nguyenductoan/docs-fix-typo
docs: fix typo
2020-11-09 14:31:43 +02:00
nguyenductoan
f0517906b7 docs: fix typo
Signed-off-by: nguyenductoan <ductoan593@gmail.com>
2020-11-09 18:43:24 +07:00
Stefan Prodan
16fa167931 Merge pull request #435 from phillebaba/sops-azure-auth
Update authentication hint for Azure
2020-11-08 09:47:16 +02:00
Philip Laine
b036999b8c Update authentication hint for Azure
Signed-off-by: Philip Laine <philip.laine@xenit.se>
2020-11-07 16:05:18 +01:00
Stefan Prodan
1911766b7b Merge pull request #434 from fluxcd/target-namespace-ks
Add target namespace to create ks cmd
2020-11-07 14:14:57 +02:00
Stefan Prodan
9f7835d818 Add target namespace to create ks cmd
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-07 14:01:40 +02:00
Stefan Prodan
1df45e4857 Merge pull request #433 from fluxcd/customize-flux-manifests
Add customize Flux manifests section to install docs
2020-11-07 13:58:40 +02:00
Stefan Prodan
47a1743965 Add customize Flux manifests section to install docs
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-07 13:44:47 +02:00
Hidde Beydals
d5844bbdaa Merge pull request #430 from fluxcd/migration-title-fix
Rename migration menu items
2020-11-06 13:08:57 +01:00
Hidde Beydals
128c87ab33 Rename migration menu items
As they are used in the metadata, instead of the title from the
document.

Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-06 12:58:51 +01:00
Hidde Beydals
f4adcae79a Merge pull request #425 from plod/main
docs: fixing command for expected output
2020-11-05 13:09:18 +01:00
Daniel Morgan
ba4df070cf fixing command for expected output
The \ before the comment here means the subsequent lines end up getting commented out (and then not exported), see: https://stackoverflow.com/questions/9522631/how-to-put-a-line-comment-for-a-multi-line-command

Signed-off-by: Daniel Morgan <daniel@morgan.cymru>
2020-11-05 11:53:57 +00:00
Hidde Beydals
ce4ecfb388 Merge pull request #421 from fluxcd/update-roadmap
Update Helm v3 feature parity roadmap
2020-11-04 21:35:10 +01:00
Hidde Beydals
e6006e0833 Update Helm v3 feature parity roadmap
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-04 21:21:58 +01:00
Michael Bridgen
d500cc0bd1 Merge pull request #422 from fluxcd/flux2-www-intro
Rework Flux2 website intro
2020-11-04 15:56:01 +00:00
Michael Bridgen
71995b4f83 Refine description of Sources
Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-04 15:38:23 +00:00
Michael Bridgen
932c91d022 Move gitops toolkit index under components/
Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-04 15:37:07 +00:00
Michael Bridgen
107e7424d1 Explain more up-front in website homepage
This commit

 - adds a brief explanation of what Flux does
 - makes the target features a little more self-explanatory
 - gives GitOps Toolkit its own index page

Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-04 15:37:02 +00:00
Michael Bridgen
c93181c0ad Add section on target users
Signed-off-by: Michael Bridgen <michael@weave.works>
2020-11-04 15:29:12 +00:00
Stefan Prodan
050fca6767 Merge pull request #423 from fluxcd/update-components
Update kustomize-controller to v0.2.1
2020-11-04 17:22:53 +02:00
fluxcdbot
71827b4a1a Update toolkit components 2020-11-04 15:11:46 +00:00
Stefan Prodan
1d0315bf5e Merge pull request #420 from fluxcd/tagline
Update tag line and featured talks
2020-11-04 15:35:45 +02:00
Stefan Prodan
b2b64e7283 Update tag line and featured talks
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-04 15:26:13 +02:00
Hidde Beydals
fe0e2edd37 Merge pull request #419 from fluxcd/helm-operator-guide
Add Helm Operator migration guide
2020-11-04 13:25:34 +01:00
Hidde Beydals
e5bb3d5645 Add Helm Operator migration guide
Signed-off-by: Hidde Beydals <hello@hidde.co>
2020-11-04 12:37:09 +01:00
Stefan Prodan
b88a99347b Merge pull request #416 from L3o-pold/main
Fix datasource for cluster Grafana dashboard
2020-11-03 19:30:51 +02:00
Léopold Jacquot
344a909d19 Fix datasource for cluster Grafana dashboard
Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
2020-11-03 17:50:29 +01:00
Stefan Prodan
3cbe3aab25 Merge pull request #405 from relu/k8s-v1.19
Update k8s to 1.19 + kustomize 0.6.4
2020-11-03 13:06:19 +02:00
Aurel Canciu
9e3a4b1810 Update pkg components & k8s 1.19, kustomize 0.6.4
Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
2020-11-02 23:56:20 +02:00
Stefan Prodan
e855bbaa29 Merge pull request #412 from sylr/kube-context
Add Kubernetes context option to CLI commands
2020-11-02 23:53:34 +02:00
Sylvain Rabot
78d7dca985 Add a --context option
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2020-11-02 21:32:55 +01:00
Stefan Prodan
9da7ded976 Merge pull request #406 from fluxcd/docs-release-procedure
Add release procedure documentation
2020-11-02 10:53:44 +02:00
Stefan Prodan
427b107d0e Add release procedure documentation
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2020-11-01 09:33:36 +02:00
145 changed files with 1625 additions and 262 deletions

View File

@@ -4,7 +4,6 @@
[![report](https://goreportcard.com/badge/github.com/fluxcd/flux2)](https://goreportcard.com/report/github.com/fluxcd/flux2) [![report](https://goreportcard.com/badge/github.com/fluxcd/flux2)](https://goreportcard.com/report/github.com/fluxcd/flux2)
[![license](https://img.shields.io/github/license/fluxcd/flux2.svg)](https://github.com/fluxcd/flux2/blob/main/LICENSE) [![license](https://img.shields.io/github/license/fluxcd/flux2.svg)](https://github.com/fluxcd/flux2/blob/main/LICENSE)
[![release](https://img.shields.io/github/release/fluxcd/flux2/all.svg)](https://github.com/fluxcd/flux2/releases) [![release](https://img.shields.io/github/release/fluxcd/flux2/all.svg)](https://github.com/fluxcd/flux2/releases)
![overview](docs/diagrams/gitops-toolkit.png)
Flux is a tool for keeping Kubernetes clusters in sync with sources of Flux is a tool for keeping Kubernetes clusters in sync with sources of
configuration (like Git repositories), and automating updates to configuration (like Git repositories), and automating updates to
@@ -65,6 +64,8 @@ runtime for Flux v2. The APIs comprise Kubernetes custom resources,
which can be created and updated by a cluster user, or by other which can be created and updated by a cluster user, or by other
automation tooling. automation tooling.
![overview](docs/diagrams/gitops-toolkit.png)
You can use the toolkit to extend Flux, or to build your own systems You can use the toolkit to extend Flux, or to build your own systems
for continuous delivery -- see [the developer for continuous delivery -- see [the developer
guides](https://toolkit.fluxcd.io/dev-guides/source-watcher/). guides](https://toolkit.fluxcd.io/dev-guides/source-watcher/).

View File

@@ -57,6 +57,7 @@ var (
bootstrapArch = flags.Arch(defaults.Arch) bootstrapArch = flags.Arch(defaults.Arch)
bootstrapLogLevel = flags.LogLevel(defaults.LogLevel) bootstrapLogLevel = flags.LogLevel(defaults.LogLevel)
bootstrapRequiredComponents = []string{"source-controller", "kustomize-controller"} bootstrapRequiredComponents = []string{"source-controller", "kustomize-controller"}
bootstrapTokenAuth bool
) )
const ( const (
@@ -75,14 +76,16 @@ func init() {
bootstrapCmd.PersistentFlags().Var(&bootstrapArch, "arch", bootstrapArch.Description()) bootstrapCmd.PersistentFlags().Var(&bootstrapArch, "arch", bootstrapArch.Description())
bootstrapCmd.PersistentFlags().StringVar(&bootstrapBranch, "branch", bootstrapDefaultBranch, bootstrapCmd.PersistentFlags().StringVar(&bootstrapBranch, "branch", bootstrapDefaultBranch,
"default branch (for GitHub this must match the default branch setting for the organization)") "default branch (for GitHub this must match the default branch setting for the organization)")
rootCmd.AddCommand(bootstrapCmd)
bootstrapCmd.PersistentFlags().BoolVar(&bootstrapWatchAllNamespaces, "watch-all-namespaces", true, bootstrapCmd.PersistentFlags().BoolVar(&bootstrapWatchAllNamespaces, "watch-all-namespaces", true,
"watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed") "watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed")
bootstrapCmd.PersistentFlags().BoolVar(&bootstrapNetworkPolicy, "network-policy", true, bootstrapCmd.PersistentFlags().BoolVar(&bootstrapNetworkPolicy, "network-policy", true,
"deny ingress access to the toolkit controllers from other namespaces using network policies") "deny ingress access to the toolkit controllers from other namespaces using network policies")
bootstrapCmd.PersistentFlags().BoolVar(&bootstrapTokenAuth, "token-auth", false,
"when enabled, the personal access token will be used instead of SSH deploy key")
bootstrapCmd.PersistentFlags().Var(&bootstrapLogLevel, "log-level", bootstrapLogLevel.Description()) bootstrapCmd.PersistentFlags().Var(&bootstrapLogLevel, "log-level", bootstrapLogLevel.Description())
bootstrapCmd.PersistentFlags().StringVar(&bootstrapManifestsPath, "manifests", "", "path to the manifest directory") bootstrapCmd.PersistentFlags().StringVar(&bootstrapManifestsPath, "manifests", "", "path to the manifest directory")
bootstrapCmd.PersistentFlags().MarkHidden("manifests") bootstrapCmd.PersistentFlags().MarkHidden("manifests")
rootCmd.AddCommand(bootstrapCmd)
} }
func bootstrapValidate() error { func bootstrapValidate() error {

View File

@@ -26,6 +26,8 @@ import (
"time" "time"
"github.com/spf13/cobra" "github.com/spf13/cobra"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fluxcd/flux2/internal/utils" "github.com/fluxcd/flux2/internal/utils"
"github.com/fluxcd/pkg/git" "github.com/fluxcd/pkg/git"
@@ -35,7 +37,7 @@ var bootstrapGitHubCmd = &cobra.Command{
Use: "github", Use: "github",
Short: "Bootstrap toolkit components in a GitHub repository", Short: "Bootstrap toolkit components in a GitHub repository",
Long: `The bootstrap github command creates the GitHub repository if it doesn't exists and Long: `The bootstrap github command creates the GitHub repository if it doesn't exists and
commits the toolkit components manifests to the master branch. commits the toolkit components manifests to the main branch.
Then it configures the target cluster to synchronize with the repository. Then it configures the target cluster to synchronize with the repository.
If the toolkit components are present on the cluster, If the toolkit components are present on the cluster,
the bootstrap command will perform an upgrade if needed.`, the bootstrap command will perform an upgrade if needed.`,
@@ -54,8 +56,11 @@ the bootstrap command will perform an upgrade if needed.`,
# Run bootstrap for a public repository on a personal account # Run bootstrap for a public repository on a personal account
flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
# Run bootstrap for a private repo hosted on GitHub Enterprise # Run bootstrap for a private repo hosted on GitHub Enterprise using SSH auth
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> --ssh-hostname=<domain>
# Run bootstrap for a private repo hosted on GitHub Enterprise using HTTPS auth
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> --token-auth
# Run bootstrap for a an existing repository with a branch named main # Run bootstrap for a an existing repository with a branch named main
flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main
@@ -64,15 +69,16 @@ the bootstrap command will perform an upgrade if needed.`,
} }
var ( var (
ghOwner string ghOwner string
ghRepository string ghRepository string
ghInterval time.Duration ghInterval time.Duration
ghPersonal bool ghPersonal bool
ghPrivate bool ghPrivate bool
ghHostname string ghHostname string
ghPath string ghPath string
ghTeams []string ghTeams []string
ghDelete bool ghDelete bool
ghSSHHostname string
) )
const ( const (
@@ -87,6 +93,7 @@ func init() {
bootstrapGitHubCmd.Flags().BoolVar(&ghPrivate, "private", true, "is private repository") bootstrapGitHubCmd.Flags().BoolVar(&ghPrivate, "private", true, "is private repository")
bootstrapGitHubCmd.Flags().DurationVar(&ghInterval, "interval", time.Minute, "sync interval") bootstrapGitHubCmd.Flags().DurationVar(&ghInterval, "interval", time.Minute, "sync interval")
bootstrapGitHubCmd.Flags().StringVar(&ghHostname, "hostname", git.GitHubDefaultHostname, "GitHub hostname") bootstrapGitHubCmd.Flags().StringVar(&ghHostname, "hostname", git.GitHubDefaultHostname, "GitHub hostname")
bootstrapGitHubCmd.Flags().StringVar(&ghSSHHostname, "ssh-hostname", "", "GitHub SSH hostname, to be used when the SSH host differs from the HTTPS one")
bootstrapGitHubCmd.Flags().StringVar(&ghPath, "path", "", "repository path, when specified the cluster sync will be scoped to this path") bootstrapGitHubCmd.Flags().StringVar(&ghPath, "path", "", "repository path, when specified the cluster sync will be scoped to this path")
bootstrapGitHubCmd.Flags().BoolVar(&ghDelete, "delete", false, "delete repository (used for testing only)") bootstrapGitHubCmd.Flags().BoolVar(&ghDelete, "delete", false, "delete repository (used for testing only)")
@@ -110,6 +117,10 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
return err return err
} }
if ghSSHHostname != "" {
repository.SSHHost = ghSSHHostname
}
provider := &git.GithubProvider{ provider := &git.GithubProvider{
IsPrivate: ghPrivate, IsPrivate: ghPrivate,
IsPersonal: ghPersonal, IsPersonal: ghPersonal,
@@ -155,7 +166,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
} }
} }
// clone repository and checkout the master branch // clone repository and checkout the main branch
if err := repository.Checkout(ctx, bootstrapBranch, tmpDir); err != nil { if err := repository.Checkout(ctx, bootstrapBranch, tmpDir); err != nil {
return err return err
} }
@@ -184,7 +195,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
logger.Successf("components are up to date") logger.Successf("components are up to date")
} }
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }
@@ -201,28 +212,45 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error {
logger.Successf("install completed") logger.Successf("install completed")
} }
// setup SSH deploy key if bootstrapTokenAuth {
if shouldCreateDeployKey(ctx, kubeClient, namespace) { // setup HTTPS token auth
logger.Actionf("configuring deploy key") secret := corev1.Secret{
u, err := url.Parse(repository.GetSSH()) ObjectMeta: metav1.ObjectMeta{
if err != nil { Name: namespace,
return fmt.Errorf("git URL parse failed: %w", err) Namespace: namespace,
},
StringData: map[string]string{
"username": "git",
"password": ghToken,
},
} }
if err := upsertSecret(ctx, kubeClient, secret); err != nil {
key, err := generateDeployKey(ctx, kubeClient, u, namespace)
if err != nil {
return fmt.Errorf("generating deploy key failed: %w", err)
}
keyName := "flux"
if ghPath != "" {
keyName = fmt.Sprintf("flux-%s", ghPath)
}
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
return err return err
} else if changed { }
logger.Successf("deploy key configured") } else {
// setup SSH deploy key
if shouldCreateDeployKey(ctx, kubeClient, namespace) {
logger.Actionf("configuring deploy key")
u, err := url.Parse(repository.GetSSH())
if err != nil {
return fmt.Errorf("git URL parse failed: %w", err)
}
key, err := generateDeployKey(ctx, kubeClient, u, namespace)
if err != nil {
return fmt.Errorf("generating deploy key failed: %w", err)
}
keyName := "flux"
if ghPath != "" {
keyName = fmt.Sprintf("flux-%s", ghPath)
}
if changed, err := provider.AddDeployKey(ctx, repository, key, keyName); err != nil {
return err
} else if changed {
logger.Successf("deploy key configured")
}
} }
} }

View File

@@ -45,22 +45,22 @@ the bootstrap command will perform an upgrade if needed.`,
export GITLAB_TOKEN=<my-token> export GITLAB_TOKEN=<my-token>
# Run bootstrap for a private repo using HTTPS token authentication # Run bootstrap for a private repo using HTTPS token authentication
flux bootstrap gitlab --owner=<group> --repository=<repo name> flux bootstrap gitlab --owner=<group> --repository=<repo name> --token-auth
# Run bootstrap for a private repo using SSH authentication # Run bootstrap for a private repo using SSH authentication
flux bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com flux bootstrap gitlab --owner=<group> --repository=<repo name>
# Run bootstrap for a repository path # Run bootstrap for a repository path
flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
# Run bootstrap for a public repository on a personal account # Run bootstrap for a public repository on a personal account
flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal --token-auth
# Run bootstrap for a private repo hosted on a GitLab server # Run bootstrap for a private repo hosted on a GitLab server
flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> --token-auth
# Run bootstrap for a an existing repository with a branch named main # Run bootstrap for a an existing repository with a branch named main
flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main --token-auth
`, `,
RunE: bootstrapGitLabCmdRun, RunE: bootstrapGitLabCmdRun,
} }
@@ -83,7 +83,7 @@ func init() {
bootstrapGitLabCmd.Flags().BoolVar(&glPrivate, "private", true, "is private repository") bootstrapGitLabCmd.Flags().BoolVar(&glPrivate, "private", true, "is private repository")
bootstrapGitLabCmd.Flags().DurationVar(&glInterval, "interval", time.Minute, "sync interval") bootstrapGitLabCmd.Flags().DurationVar(&glInterval, "interval", time.Minute, "sync interval")
bootstrapGitLabCmd.Flags().StringVar(&glHostname, "hostname", git.GitLabDefaultHostname, "GitLab hostname") bootstrapGitLabCmd.Flags().StringVar(&glHostname, "hostname", git.GitLabDefaultHostname, "GitLab hostname")
bootstrapGitLabCmd.Flags().StringVar(&glSSHHostname, "ssh-hostname", "", "GitLab SSH hostname, when specified a deploy key will be added to the repository") bootstrapGitLabCmd.Flags().StringVar(&glSSHHostname, "ssh-hostname", "", "GitLab SSH hostname, to be used when the SSH host differs from the HTTPS one")
bootstrapGitLabCmd.Flags().StringVar(&glPath, "path", "", "repository path, when specified the cluster sync will be scoped to this path") bootstrapGitLabCmd.Flags().StringVar(&glPath, "path", "", "repository path, when specified the cluster sync will be scoped to this path")
bootstrapCmd.AddCommand(bootstrapGitLabCmd) bootstrapCmd.AddCommand(bootstrapGitLabCmd)
@@ -113,7 +113,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
IsPersonal: glPersonal, IsPersonal: glPersonal,
} }
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }
@@ -180,7 +180,22 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
repoURL := repository.GetURL() repoURL := repository.GetURL()
if glSSHHostname != "" { if bootstrapTokenAuth {
// setup HTTPS token auth
secret := corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: namespace,
Namespace: namespace,
},
StringData: map[string]string{
"username": "git",
"password": glToken,
},
}
if err := upsertSecret(ctx, kubeClient, secret); err != nil {
return err
}
} else {
// setup SSH deploy key // setup SSH deploy key
repoURL = repository.GetSSH() repoURL = repository.GetSSH()
if shouldCreateDeployKey(ctx, kubeClient, namespace) { if shouldCreateDeployKey(ctx, kubeClient, namespace) {
@@ -206,21 +221,6 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error {
logger.Successf("deploy key configured") logger.Successf("deploy key configured")
} }
} }
} else {
// setup HTTPS token auth
secret := corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: namespace,
Namespace: namespace,
},
StringData: map[string]string{
"username": "git",
"password": glToken,
},
}
if err := upsertSecret(ctx, kubeClient, secret); err != nil {
return err
}
} }
// configure repo synchronization // configure repo synchronization

View File

@@ -180,6 +180,10 @@ func componentsCheck() bool {
} else { } else {
logger.Successf("%s is healthy", deployment) logger.Successf("%s is healthy", deployment)
} }
kubectlArgs = []string{"-n", namespace, "get", "deployment", deployment, "-o", "jsonpath=\"{..image}\""}
if output, err := utils.ExecKubectlCommand(ctx, utils.ModeCapture, kubectlArgs...); err == nil {
logger.Actionf(strings.TrimPrefix(strings.TrimSuffix(output, "\""), "\""))
}
} }
return ok return ok
} }

View File

@@ -120,7 +120,7 @@ func createAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -116,7 +116,7 @@ func createAlertProviderCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -177,7 +177,7 @@ func createHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -83,6 +83,7 @@ var (
ksSANamespace string ksSANamespace string
ksDecryptionProvider flags.DecryptionProvider ksDecryptionProvider flags.DecryptionProvider
ksDecryptionSecret string ksDecryptionSecret string
ksTargetNamespace string
) )
func init() { func init() {
@@ -97,6 +98,7 @@ func init() {
createKsCmd.Flags().StringVar(&ksSANamespace, "sa-namespace", "", "service account namespace") createKsCmd.Flags().StringVar(&ksSANamespace, "sa-namespace", "", "service account namespace")
createKsCmd.Flags().Var(&ksDecryptionProvider, "decryption-provider", ksDecryptionProvider.Description()) createKsCmd.Flags().Var(&ksDecryptionProvider, "decryption-provider", ksDecryptionProvider.Description())
createKsCmd.Flags().StringVar(&ksDecryptionSecret, "decryption-secret", "", "set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption") createKsCmd.Flags().StringVar(&ksDecryptionSecret, "decryption-secret", "", "set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption")
createKsCmd.Flags().StringVar(&ksTargetNamespace, "target-namespace", "", "overrides the namespace of all Kustomization objects reconciled by this Kustomization")
createCmd.AddCommand(createKsCmd) createCmd.AddCommand(createKsCmd)
} }
@@ -139,8 +141,9 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
Kind: ksSource.Kind, Kind: ksSource.Kind,
Name: ksSource.Name, Name: ksSource.Name,
}, },
Suspend: false, Suspend: false,
Validation: ksValidation, Validation: ksValidation,
TargetNamespace: ksTargetNamespace,
}, },
} }
@@ -209,7 +212,7 @@ func createKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -128,7 +128,7 @@ func createReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -140,7 +140,7 @@ func createSourceBucketCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -176,7 +176,7 @@ func createSourceGitCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -136,7 +136,7 @@ func createSourceHelmCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -135,7 +135,7 @@ func createTenantCmdRun(cmd *cobra.Command, args []string) error {
if export { if export {
for i, _ := range tenantNamespaces { for i, _ := range tenantNamespaces {
if err := exportTenant(namespaces[i], roleBindings[1]); err != nil { if err := exportTenant(namespaces[i], roleBindings[i]); err != nil {
return err return err
} }
} }
@@ -145,7 +145,7 @@ func createTenantCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func deleteAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func deleteAlertProviderCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -52,7 +52,7 @@ func deleteHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func deleteKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func deleteReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func deleteSourceBucketCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func deleteSourceGitCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func deleteSourceHelmCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -55,7 +55,7 @@ func exportAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -55,7 +55,7 @@ func exportAlertProviderCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func exportHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func exportKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -55,7 +55,7 @@ func exportReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func exportSourceBucketCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func exportSourceGitCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func exportSourceHelmCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -49,7 +49,7 @@ func getAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -47,7 +47,7 @@ func getAlertProviderCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func getHelmReleaseCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func getKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -49,7 +49,7 @@ func getReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -47,7 +47,7 @@ func getSourceBucketCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -47,7 +47,7 @@ func getSourceGitCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -47,7 +47,7 @@ func getSourceHelmCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -96,6 +96,7 @@ var rootCmd = &cobra.Command{
var ( var (
kubeconfig string kubeconfig string
kubecontext string
namespace string namespace string
timeout time.Duration timeout time.Duration
verbose bool verbose bool
@@ -108,6 +109,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", defaults.Namespace, "the namespace scope for this operation") rootCmd.PersistentFlags().StringVarP(&namespace, "namespace", "n", defaults.Namespace, "the namespace scope for this operation")
rootCmd.PersistentFlags().DurationVar(&timeout, "timeout", 5*time.Minute, "timeout for this operation") rootCmd.PersistentFlags().DurationVar(&timeout, "timeout", 5*time.Minute, "timeout for this operation")
rootCmd.PersistentFlags().BoolVar(&verbose, "verbose", false, "print generated objects") rootCmd.PersistentFlags().BoolVar(&verbose, "verbose", false, "print generated objects")
rootCmd.PersistentFlags().StringVarP(&kubecontext, "context", "", "", "kubernetes context to use")
} }
func main() { func main() {

View File

@@ -54,7 +54,7 @@ func reconcileAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -54,7 +54,7 @@ func reconcileAlertProviderCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -69,7 +69,7 @@ func reconcileHrCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -69,7 +69,7 @@ func reconcileKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -54,7 +54,7 @@ func reconcileReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func reconcileSourceBucketCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -54,7 +54,7 @@ func reconcileSourceGitCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func reconcileSourceHelmCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func resumeAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -57,7 +57,7 @@ func resumeHrCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func resumeKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -56,7 +56,7 @@ func resumeReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func suspendAlertCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -51,7 +51,7 @@ func suspendHrCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func suspendKsCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -50,7 +50,7 @@ func suspendReceiverCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -69,7 +69,7 @@ func uninstallCmdRun(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout) ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel() defer cancel()
kubeClient, err := utils.KubeClient(kubeconfig) kubeClient, err := utils.KubeClient(kubeconfig, kubecontext)
if err != nil { if err != nil {
return err return err
} }

View File

@@ -67,6 +67,7 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way.
### Options ### Options
``` ```
--context string kubernetes context to use
-h, --help help for flux -h, --help help for flux
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")

View File

@@ -17,6 +17,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git
--log-level logLevel log level, available options are: (debug, info, error) (default info) --log-level logLevel log level, available options are: (debug, info, error) (default info)
--network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true) --network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true)
--registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd") --registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd")
--token-auth when enabled, the personal access token will be used instead of SSH deploy key
-v, --version string toolkit version (default "latest") -v, --version string toolkit version (default "latest")
--watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true) --watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true)
``` ```
@@ -24,6 +25,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -5,7 +5,7 @@ Bootstrap toolkit components in a GitHub repository
### Synopsis ### Synopsis
The bootstrap github command creates the GitHub repository if it doesn't exists and The bootstrap github command creates the GitHub repository if it doesn't exists and
commits the toolkit components manifests to the master branch. commits the toolkit components manifests to the main branch.
Then it configures the target cluster to synchronize with the repository. Then it configures the target cluster to synchronize with the repository.
If the toolkit components are present on the cluster, If the toolkit components are present on the cluster,
the bootstrap command will perform an upgrade if needed. the bootstrap command will perform an upgrade if needed.
@@ -32,8 +32,11 @@ flux bootstrap github [flags]
# Run bootstrap for a public repository on a personal account # Run bootstrap for a public repository on a personal account
flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true flux bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true
# Run bootstrap for a private repo hosted on GitHub Enterprise # Run bootstrap for a private repo hosted on GitHub Enterprise using SSH auth
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> --ssh-hostname=<domain>
# Run bootstrap for a private repo hosted on GitHub Enterprise using HTTPS auth
flux bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> --token-auth
# Run bootstrap for a an existing repository with a branch named main # Run bootstrap for a an existing repository with a branch named main
flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main flux bootstrap github --owner=<organization> --repository=<repo name> --branch=main
@@ -43,15 +46,16 @@ flux bootstrap github [flags]
### Options ### Options
``` ```
-h, --help help for github -h, --help help for github
--hostname string GitHub hostname (default "github.com") --hostname string GitHub hostname (default "github.com")
--interval duration sync interval (default 1m0s) --interval duration sync interval (default 1m0s)
--owner string GitHub user or organization name --owner string GitHub user or organization name
--path string repository path, when specified the cluster sync will be scoped to this path --path string repository path, when specified the cluster sync will be scoped to this path
--personal is personal repository --personal is personal repository
--private is private repository (default true) --private is private repository (default true)
--repository string GitHub repository name --repository string GitHub repository name
--team stringArray GitHub team to be given maintainer access --ssh-hostname string GitHub SSH hostname, to be used when the SSH host differs from the HTTPS one
--team stringArray GitHub team to be given maintainer access
``` ```
### Options inherited from parent commands ### Options inherited from parent commands
@@ -60,6 +64,7 @@ flux bootstrap github [flags]
--arch arch cluster architecture, available options are: (amd64, arm, arm64) (default amd64) --arch arch cluster architecture, available options are: (amd64, arm, arm64) (default amd64)
--branch string default branch (for GitHub this must match the default branch setting for the organization) (default "main") --branch string default branch (for GitHub this must match the default branch setting for the organization) (default "main")
--components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller])
--context string kubernetes context to use
--image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
--log-level logLevel log level, available options are: (debug, info, error) (default info) --log-level logLevel log level, available options are: (debug, info, error) (default info)
@@ -67,6 +72,7 @@ flux bootstrap github [flags]
--network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true) --network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true)
--registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd") --registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)
--token-auth when enabled, the personal access token will be used instead of SSH deploy key
--verbose print generated objects --verbose print generated objects
-v, --version string toolkit version (default "latest") -v, --version string toolkit version (default "latest")
--watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true) --watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true)

View File

@@ -21,22 +21,22 @@ flux bootstrap gitlab [flags]
export GITLAB_TOKEN=<my-token> export GITLAB_TOKEN=<my-token>
# Run bootstrap for a private repo using HTTPS token authentication # Run bootstrap for a private repo using HTTPS token authentication
flux bootstrap gitlab --owner=<group> --repository=<repo name> flux bootstrap gitlab --owner=<group> --repository=<repo name> --token-auth
# Run bootstrap for a private repo using SSH authentication # Run bootstrap for a private repo using SSH authentication
flux bootstrap gitlab --owner=<group> --repository=<repo name> --ssh-hostname=gitlab.com flux bootstrap gitlab --owner=<group> --repository=<repo name>
# Run bootstrap for a repository path # Run bootstrap for a repository path
flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster flux bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster
# Run bootstrap for a public repository on a personal account # Run bootstrap for a public repository on a personal account
flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true flux bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal --token-auth
# Run bootstrap for a private repo hosted on a GitLab server # Run bootstrap for a private repo hosted on a GitLab server
flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> flux bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> --token-auth
# Run bootstrap for a an existing repository with a branch named main # Run bootstrap for a an existing repository with a branch named main
flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main flux bootstrap gitlab --owner=<organization> --repository=<repo name> --branch=main --token-auth
``` ```
@@ -51,7 +51,7 @@ flux bootstrap gitlab [flags]
--personal is personal repository --personal is personal repository
--private is private repository (default true) --private is private repository (default true)
--repository string GitLab repository name --repository string GitLab repository name
--ssh-hostname string GitLab SSH hostname, when specified a deploy key will be added to the repository --ssh-hostname string GitLab SSH hostname, to be used when the SSH host differs from the HTTPS one
``` ```
### Options inherited from parent commands ### Options inherited from parent commands
@@ -60,6 +60,7 @@ flux bootstrap gitlab [flags]
--arch arch cluster architecture, available options are: (amd64, arm, arm64) (default amd64) --arch arch cluster architecture, available options are: (amd64, arm, arm64) (default amd64)
--branch string default branch (for GitHub this must match the default branch setting for the organization) (default "main") --branch string default branch (for GitHub this must match the default branch setting for the organization) (default "main")
--components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller])
--context string kubernetes context to use
--image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry --image-pull-secret string Kubernetes secret name used for pulling the toolkit images from a private registry
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
--log-level logLevel log level, available options are: (debug, info, error) (default info) --log-level logLevel log level, available options are: (debug, info, error) (default info)
@@ -67,6 +68,7 @@ flux bootstrap gitlab [flags]
--network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true) --network-policy deny ingress access to the toolkit controllers from other namespaces using network policies (default true)
--registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd") --registry string container registry where the toolkit images are published (default "ghcr.io/fluxcd")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)
--token-auth when enabled, the personal access token will be used instead of SSH deploy key
--verbose print generated objects --verbose print generated objects
-v, --version string toolkit version (default "latest") -v, --version string toolkit version (default "latest")
--watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true) --watch-all-namespaces watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed (default true)

View File

@@ -33,6 +33,7 @@ flux check [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -15,6 +15,7 @@ The completion sub-command generates completion scripts for various shells
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -33,6 +33,7 @@ command -v flux >/dev/null && . <(flux completion bash)
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -34,6 +34,7 @@ See http://fishshell.com/docs/current/index.html#completion-own for more details
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -40,6 +40,7 @@ flux completion >> flux-completions.ps1
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -41,6 +41,7 @@ mv _flux ~/.zprezto/modules/completion/external/src/ # zprezto
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -18,6 +18,7 @@ The create sub-commands generate sources and resources.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -42,6 +42,7 @@ flux create alert-provider [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -34,6 +34,7 @@ flux create alert [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -75,6 +75,7 @@ flux create helmrelease [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -55,12 +55,14 @@ flux 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 kustomizationSource source that contains the Kubernetes manifests in the format '[<kind>/]<name>',where kind can be one of: (GitRepository, Bucket), if kind is not specified it defaults to GitRepository --source kustomizationSource source that contains the Kubernetes manifests in the format '[<kind>/]<name>',where kind can be one of: (GitRepository, Bucket), if kind is not specified it defaults to GitRepository
--target-namespace string overrides the namespace of all Kustomization objects reconciled by this Kustomization
--validation 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
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -37,6 +37,7 @@ flux create receiver [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -15,6 +15,7 @@ The create source sub-commands generate sources.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -51,6 +51,7 @@ flux create source bucket [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -71,6 +71,7 @@ flux create source git [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -51,6 +51,7 @@ flux create source helm [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--export export in YAML format to stdout --export export in YAML format to stdout
--interval duration source sync interval (default 1m0s) --interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")

View File

@@ -16,6 +16,7 @@ The delete sub-commands delete sources and resources.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -27,6 +27,7 @@ flux delete alert-provider [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete alert [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete helmrelease [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete kustomization [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete receiver [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -15,6 +15,7 @@ The delete source sub-commands delete sources.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete source bucket [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete source git [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -27,6 +27,7 @@ flux delete source helm [name] [flags]
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
-s, --silent delete resource without asking for confirmation -s, --silent delete resource without asking for confirmation

View File

@@ -16,6 +16,7 @@ The export sub-commands export resources in YAML format.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export alert-provider [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export alert [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export helmrelease [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export kustomization [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export receiver [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -17,6 +17,7 @@ The export source sub-commands export sources in YAML format.
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export source bucket [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export source git [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -31,6 +31,7 @@ flux export source helm [name] [flags]
``` ```
--all select all resources --all select all resources
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -16,6 +16,7 @@ The get sub-commands print the statuses of sources and resources.
### Options inherited from parent commands ### Options inherited from parent commands
``` ```
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -28,6 +28,7 @@ flux get alert-providers [flags]
``` ```
-A, --all-namespaces list the requested object(s) across all namespaces -A, --all-namespaces list the requested object(s) across all namespaces
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -28,6 +28,7 @@ flux get alerts [flags]
``` ```
-A, --all-namespaces list the requested object(s) across all namespaces -A, --all-namespaces list the requested object(s) across all namespaces
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

View File

@@ -28,6 +28,7 @@ flux get helmreleases [flags]
``` ```
-A, --all-namespaces list the requested object(s) across all namespaces -A, --all-namespaces list the requested object(s) across all namespaces
--context string kubernetes context to use
--kubeconfig string path to the kubeconfig file (default "~/.kube/config") --kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "flux-system") -n, --namespace string the namespace scope for this operation (default "flux-system")
--timeout duration timeout for this operation (default 5m0s) --timeout duration timeout for this operation (default 5m0s)

Some files were not shown because too many files have changed in this diff Show More