1
0
mirror of synced 2026-02-06 10:55:56 +00:00

Implement bucket CRUD commands

This commit is contained in:
stefanprodan
2020-09-23 12:04:28 +03:00
parent a8f72564f4
commit a02452ccb9
16 changed files with 929 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ The create source sub-commands generate sources.
### SEE ALSO
* [gotk create](gotk_create.md) - Create or update sources and resources
* [gotk create source bucket](gotk_create_source_bucket.md) - Create or update a Bucket source
* [gotk create source git](gotk_create_source_git.md) - Create or update a GitRepository source
* [gotk create source helm](gotk_create_source_helm.md) - Create or update a HelmRepository source

View File

@@ -0,0 +1,65 @@
## gotk create source bucket
Create or update a Bucket source
### Synopsis
The create source bucket command generates a Bucket resource and waits for it to be downloaded.
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.
```
gotk create source bucket [name] [flags]
```
### Examples
```
# Create a source from a Buckets using static authentication
gotk create source bucket podinfo \
--bucket-name=podinfo \
--endpoint=minio.minio.svc.cluster.local:9000 \
--insecure=true \
--access-key=myaccesskey \
--secret-key=mysecretkey \
--interval=10m
# Create a source from an Amazon S3 Bucket using IAM authentication
gotk create source bucket podinfo \
--bucket-name=podinfo \
--provider=aws \
--endpoint=s3.amazonaws.com \
--region=us-east-1 \
--interval=10m
```
### Options
```
--access-key string the bucket access key
--bucket-name string the bucket name
--endpoint string the bucket endpoint address
-h, --help help for bucket
--insecure for when connecting to a non-TLS S3 HTTP endpoint
--provider string the S3 compatible storage provider name, can be 'generic' or 'aws' (default "generic")
--region string the bucket region
--secret-key string the bucket secret key
```
### Options inherited from parent commands
```
--export export in YAML format to stdout
--interval duration source sync interval (default 1m0s)
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
--label strings set labels on the resource (can specify multiple labels with commas: label1=value1,label2=value2)
-n, --namespace string the namespace scope for this operation (default "gitops-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [gotk create source](gotk_create_source.md) - Create or update sources

View File

@@ -25,6 +25,7 @@ The delete source sub-commands delete sources.
### SEE ALSO
* [gotk delete](gotk_delete.md) - Delete sources and resources
* [gotk delete source bucket](gotk_delete_source_bucket.md) - Delete a Bucket source
* [gotk delete source git](gotk_delete_source_git.md) - Delete a GitRepository source
* [gotk delete source helm](gotk_delete_source_helm.md) - Delete a HelmRepository source

View File

@@ -0,0 +1,40 @@
## gotk delete source bucket
Delete a Bucket source
### Synopsis
The delete source bucket command deletes the given Bucket from the cluster.
```
gotk delete source bucket [name] [flags]
```
### Examples
```
# Delete a Bucket source
gotk delete source bucket podinfo
```
### Options
```
-h, --help help for bucket
```
### Options inherited from parent commands
```
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "gitops-system")
-s, --silent delete resource without asking for confirmation
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [gotk delete source](gotk_delete_source.md) - Delete sources

View File

@@ -26,6 +26,7 @@ The export source sub-commands export sources in YAML format.
### SEE ALSO
* [gotk export](gotk_export.md) - Export resources in YAML format
* [gotk export source bucket](gotk_export_source_bucket.md) - Export Bucket sources in YAML format
* [gotk export source git](gotk_export_source_git.md) - Export GitRepository sources in YAML format
* [gotk export source helm](gotk_export_source_helm.md) - Export HelmRepository sources in YAML format

View File

@@ -0,0 +1,44 @@
## gotk export source bucket
Export Bucket sources in YAML format
### Synopsis
The export source git command exports on or all Bucket sources in YAML format.
```
gotk export source bucket [name] [flags]
```
### Examples
```
# Export all Bucket sources
gotk export source bucket --all > sources.yaml
# Export a Bucket source including the static credentials
gotk export source bucket my-bucket --with-credentials > source.yaml
```
### Options
```
-h, --help help for bucket
```
### Options inherited from parent commands
```
--all select all resources
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "gitops-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
--with-credentials include credential secrets
```
### SEE ALSO
* [gotk export source](gotk_export_source.md) - Export sources

View File

@@ -24,6 +24,7 @@ The get source sub-commands print the statuses of the sources.
### SEE ALSO
* [gotk get](gotk_get.md) - Get sources and resources
* [gotk get sources bucket](gotk_get_sources_bucket.md) - Get Bucket source statuses
* [gotk get sources git](gotk_get_sources_git.md) - Get GitRepository source statuses
* [gotk get sources helm](gotk_get_sources_helm.md) - Get HelmRepository source statuses

View File

@@ -0,0 +1,39 @@
## gotk get sources bucket
Get Bucket source statuses
### Synopsis
The get sources bucket command prints the status of the Bucket sources.
```
gotk get sources bucket [flags]
```
### Examples
```
# List all Buckets and their status
gotk get sources bucket
```
### Options
```
-h, --help help for bucket
```
### Options inherited from parent commands
```
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "gitops-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [gotk get sources](gotk_get_sources.md) - Get source statuses

View File

@@ -24,6 +24,7 @@ The reconcile source sub-commands trigger a reconciliation of sources.
### SEE ALSO
* [gotk reconcile](gotk_reconcile.md) - Reconcile sources and resources
* [gotk reconcile source bucket](gotk_reconcile_source_bucket.md) - Reconcile a Bucket source
* [gotk reconcile source git](gotk_reconcile_source_git.md) - Reconcile a GitRepository source
* [gotk reconcile source helm](gotk_reconcile_source_helm.md) - Reconcile a HelmRepository source

View File

@@ -0,0 +1,39 @@
## gotk reconcile source bucket
Reconcile a Bucket source
### Synopsis
The reconcile source command triggers a reconciliation of a Bucket resource and waits for it to finish.
```
gotk reconcile source bucket [name] [flags]
```
### Examples
```
# Trigger a reconciliation for an existing source
gotk reconcile source bucket podinfo
```
### Options
```
-h, --help help for bucket
```
### Options inherited from parent commands
```
--kubeconfig string path to the kubeconfig file (default "~/.kube/config")
-n, --namespace string the namespace scope for this operation (default "gitops-system")
--timeout duration timeout for this operation (default 5m0s)
--verbose print generated objects
```
### SEE ALSO
* [gotk reconcile source](gotk_reconcile_source.md) - Reconcile sources