Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5fb4a3e
cluster.go, projectwindow.go
surajyadav1108 Oct 26, 2023
5156ae5
updateMerge branch 'master' of https://github.com/argoproj/argo-cd
surajyadav1108 Oct 29, 2023
c7d4386
updated-examples
surajyadav1108 Oct 29, 2023
cc3385d
Merge branch 'master' of https://github.com/argoproj/argo-cd
surajyadav1108 Nov 1, 2023
875c161
Merge branch 'master' into master
surajyadav1108 Nov 1, 2023
659ff0b
Merge branch 'master' into master
surajyadav1108 Nov 2, 2023
8504e14
Merge branch 'master' of https://github.com/argoproj/argo-cd
surajyadav1108 Nov 2, 2023
63f8e95
format-corrected
surajyadav1108 Nov 2, 2023
7a3241d
Merge branch 'master' of https://github.com/surajyadav1108/argo-cd
surajyadav1108 Nov 2, 2023
bb5e62f
Merge branch 'master' into master
surajyadav1108 Nov 2, 2023
4fe14f6
spell-mistake
surajyadav1108 Nov 2, 2023
12778a1
Merge branch 'master' into master
surajyadav1108 Nov 4, 2023
4d86d5d
format-correction
surajyadav1108 Nov 4, 2023
10299ad
retrigger
surajyadav1108 Nov 4, 2023
9197899
retrigger-2
surajyadav1108 Nov 4, 2023
dea5373
retirgger-3
surajyadav1108 Nov 4, 2023
df01be2
Merge branch 'master' into master
surajyadav1108 Nov 6, 2023
321bb81
Merge branch 'master' into master
surajyadav1108 Nov 8, 2023
7edffa9
Merge branch 'master' into master
ishitasequeira Nov 9, 2023
a8dc75e
update
surajyadav1108 Nov 9, 2023
d4cc3e7
Merge branch 'master' into master
surajyadav1108 Nov 10, 2023
e215937
Merge branch 'master' into master
surajyadav1108 Nov 17, 2023
48be1b2
Merge branch 'master' into master
surajyadav1108 Nov 18, 2023
8f4f67c
Merge branch 'master' into master
surajyadav1108 Nov 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions cmd/argocd/commands/admin/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ func NewClusterCommand(clientOpts *argocdclient.ClientOptions, pathOpts *clientc
var command = &cobra.Command{
Use: "cluster",
Short: "Manage clusters configuration",
Example: `
# Authenticate with a Token
argocd admin cluster --auth-token YOUR_AUTH_TOKEN

# Use a Custom Client Certificate and Key
argocd admin cluster --client-crt /path/to/client.crt --client-crt-key /path/to/client.key

# Set Logging Format and Level
argocd admin cluster --logformat json --loglevel debug`,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
},
Expand Down Expand Up @@ -448,6 +457,21 @@ func NewClusterStatsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Comma
var command = cobra.Command{
Use: "stats",
Short: "Prints information cluster statistics and inferred shard number",
Example: `
#Display Cluster Statistics for the Default Cluster
argocd admin cluster stats

#Display Cluster Statistics for a Specific Cluster Context
argocd admin cluster stats --context=my-cluster-context

#Display Cluster Statistics for a Cluster with Custom Configuration (Kubeconfig Path)
argocd admin cluster stats --kubeconfig=/path/to/custom/kubeconfig.yaml

#Display Cluster Statistics with a Custom Request Timeout
argocd admin cluster stats --request-timeout=5s

#Display Cluster Statistics for a Specific Shard
argocd admin cluster stats --shard=1`,
Run: func(cmd *cobra.Command, args []string) {
ctx := cmd.Context()

Expand Down Expand Up @@ -492,6 +516,18 @@ func NewClusterConfig() *cobra.Command {
Use: "kubeconfig CLUSTER_URL OUTPUT_PATH",
Short: "Generates kubeconfig for the specified cluster",
DisableAutoGenTag: true,
Example: `
#Generate a Kubeconfig for a Cluster and Save it to a File
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml

#Generate a Kubeconfig with a Custom Cluster Name:
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --cluster=my-cluster

#Generate a Kubeconfig for a Cluster with TLS Verification Disabled
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --insecure-skip-tls-verify

#Generate a Kubeconfig with a Custom Namespace Scope
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml -n my-namespace`,
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down
75 changes: 74 additions & 1 deletion cmd/argocd/commands/projectwindows.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,23 @@ func NewProjectWindowsCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com
roleCommand := &cobra.Command{
Use: "windows",
Short: "Manage a project's sync windows",
Example: `
#Creating "MyApp" Project in Argo CD with Custom Configuration and gRPC-Web Authentication
argocd proj windows --auth-token "your-auth-token" \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--config "/path/to/custom/config.yaml" \
--grpc-web \
--grpc-web-root-path "/custom/root/path" \
--server "argocd-server.example.com" \
"MyApp"

#Configuring "Development" Project in Argo CD with HTTP, Custom kube-context, and Debug Logging.
argocd proj windows --plaintext \
--kube-context "my-kube-context" \
--loglevel "debug" \
--server "argocd-server.internal.local" \
"Development"`,
Run: func(c *cobra.Command, args []string) {
c.HelpFunc()(c, args)
os.Exit(1)
Expand All @@ -42,6 +59,22 @@ func NewProjectWindowsDisableManualSyncCommand(clientOpts *argocdclient.ClientOp
Use: "disable-manual-sync PROJECT ID",
Short: "Disable manual sync for a sync window",
Long: "Disable manual sync for a sync window. Requires ID which can be found by running \"argocd proj windows list PROJECT\"",
Example: `
#Disabling Manual Synchronization for Project "my-project-id" in Argo CD with Custom Configuration
argocd proj windows disable-manual-sync my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug" \
--server "argocd-server.example.com"


#Disabling Manual Synchronization for Project "another-project-id" in Argo CD with Client Certificates and gRPC-Web Configuration
aargocd proj windows disable-manual-sync another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--grpc-web \
--grpc-web-root-path "/custom/root/path" \
--server "argocd-server.internal.local"`,
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down Expand Up @@ -79,6 +112,21 @@ func NewProjectWindowsEnableManualSyncCommand(clientOpts *argocdclient.ClientOpt
Use: "enable-manual-sync PROJECT ID",
Short: "Enable manual sync for a sync window",
Long: "Enable manual sync for a sync window. Requires ID which can be found by running \"argocd proj windows list PROJECT\"",
Example: `
#Enabling Manual Synchronization for Project 'my-project-id' in Argo CD with Custom Configuration:
argocd proj windows enable-manual-sync my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--grpc-web \
--loglevel "debug"


#Enabling Manual Synchronization for Project 'another-project-id' in Argo CD with Client Certificates and Port Forwarding
argocd proj windows enable-manual-sync another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--port-forward \
--port-forward-namespace "my-namespace"`,
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down Expand Up @@ -180,6 +228,19 @@ func NewProjectWindowsDeleteCommand(clientOpts *argocdclient.ClientOptions) *cob
var command = &cobra.Command{
Use: "delete PROJECT ID",
Short: "Delete a sync window from a project. Requires ID which can be found by running \"argocd proj windows list PROJECT\"",
Example: `
#Deleting Project 'my-project-id' in Argo CD with Custom Configuration
argocd proj windows delete my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug"

#Deleting Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip
argocd proj windows delete another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--insecure \
--server-crt "/path/to/server.crt"`,
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down Expand Up @@ -279,7 +340,19 @@ argocd proj windows list PROJECT

# List project windows in yaml format
argocd proj windows list PROJECT -o yaml
`,

#Listing Windows for Project 'my-project-id' in Argo CD with Custom Configuration
argocd proj windows list my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug"

#Listing Windows for Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip
argocd proj windows list another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--insecure \
--server-crt "/path/to/server.crt"`,
Run: func(c *cobra.Command, args []string) {
ctx := c.Context()

Expand Down
14 changes: 14 additions & 0 deletions docs/user-guide/commands/argocd_admin_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ Manage clusters configuration
argocd admin cluster [flags]
```

### Examples

```

# Authenticate with a Token
argocd admin cluster --auth-token YOUR_AUTH_TOKEN

# Use a Custom Client Certificate and Key
argocd admin cluster --client-crt /path/to/client.crt --client-crt-key /path/to/client.key

# Set Logging Format and Level
argocd admin cluster --logformat json --loglevel debug
```

### Options

```
Expand Down
17 changes: 17 additions & 0 deletions docs/user-guide/commands/argocd_admin_cluster_kubeconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ Generates kubeconfig for the specified cluster
argocd admin cluster kubeconfig CLUSTER_URL OUTPUT_PATH [flags]
```

### Examples

```

#Generate a Kubeconfig for a Cluster and Save it to a File
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml

#Generate a Kubeconfig with a Custom Cluster Name:
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --cluster=my-cluster

#Generate a Kubeconfig for a Cluster with TLS Verification Disabled
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml --insecure-skip-tls-verify

#Generate a Kubeconfig with a Custom Namespace Scope
argocd admin cluster kubeconfig https://cluster-api-url:6443 /path/to/output/kubeconfig.yaml -n my-namespace
```

### Options

```
Expand Down
20 changes: 20 additions & 0 deletions docs/user-guide/commands/argocd_admin_cluster_stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ Prints information cluster statistics and inferred shard number
argocd admin cluster stats [flags]
```

### Examples

```

#Display Cluster Statistics for the Default Cluster
argocd admin cluster stats

#Display Cluster Statistics for a Specific Cluster Context
argocd admin cluster stats --context=my-cluster-context

#Display Cluster Statistics for a Cluster with Custom Configuration (Kubeconfig Path)
argocd admin cluster stats --kubeconfig=/path/to/custom/kubeconfig.yaml

#Display Cluster Statistics with a Custom Request Timeout
argocd admin cluster stats --request-timeout=5s

#Display Cluster Statistics for a Specific Shard
argocd admin cluster stats --shard=1
```

### Options

```
Expand Down
22 changes: 22 additions & 0 deletions docs/user-guide/commands/argocd_proj_windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ Manage a project's sync windows
argocd proj windows [flags]
```

### Examples

```

#Creating "MyApp" Project in Argo CD with Custom Configuration and gRPC-Web Authentication
argocd proj windows --auth-token "your-auth-token" \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--config "/path/to/custom/config.yaml" \
--grpc-web \
--grpc-web-root-path "/custom/root/path" \
--server "argocd-server.example.com" \
"MyApp"

#Configuring "Development" Project in Argo CD with HTTP, Custom kube-context, and Debug Logging.
argocd proj windows --plaintext \
--kube-context "my-kube-context" \
--loglevel "debug" \
--server "argocd-server.internal.local" \
"Development"
```

### Options

```
Expand Down
18 changes: 18 additions & 0 deletions docs/user-guide/commands/argocd_proj_windows_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ Delete a sync window from a project. Requires ID which can be found by running "
argocd proj windows delete PROJECT ID [flags]
```

### Examples

```

#Deleting Project 'my-project-id' in Argo CD with Custom Configuration
argocd proj windows delete my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug"

#Deleting Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip
argocd proj windows delete another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--insecure \
--server-crt "/path/to/server.crt"
```

### Options

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,27 @@ Disable manual sync for a sync window. Requires ID which can be found by running
argocd proj windows disable-manual-sync PROJECT ID [flags]
```

### Examples

```

#Disabling Manual Synchronization for Project "my-project-id" in Argo CD with Custom Configuration
argocd proj windows disable-manual-sync my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug" \
--server "argocd-server.example.com"


#Disabling Manual Synchronization for Project "another-project-id" in Argo CD with Client Certificates and gRPC-Web Configuration
aargocd proj windows disable-manual-sync another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--grpc-web \
--grpc-web-root-path "/custom/root/path" \
--server "argocd-server.internal.local"
```

### Options

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ Enable manual sync for a sync window. Requires ID which can be found by running
argocd proj windows enable-manual-sync PROJECT ID [flags]
```

### Examples

```

#Enabling Manual Synchronization for Project 'my-project-id' in Argo CD with Custom Configuration:
argocd proj windows enable-manual-sync my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--grpc-web \
--loglevel "debug"


#Enabling Manual Synchronization for Project 'another-project-id' in Argo CD with Client Certificates and Port Forwarding
argocd proj windows enable-manual-sync another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--port-forward \
--port-forward-namespace "my-namespace"
```

### Options

```
Expand Down
12 changes: 12 additions & 0 deletions docs/user-guide/commands/argocd_proj_windows_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ argocd proj windows list PROJECT
# List project windows in yaml format
argocd proj windows list PROJECT -o yaml

#Listing Windows for Project 'my-project-id' in Argo CD with Custom Configuration
argocd proj windows list my-project-id \
--auth-token "your-auth-token" \
--kube-context "my-kube-context" \
--loglevel "debug"

#Listing Windows for Project 'another-project-id' in Argo CD with Client Certificates and TLS Verification Skip
argocd proj windows list another-project-id \
--client-crt "/path/to/client.crt" \
--client-crt-key "/path/to/client.key" \
--insecure \
--server-crt "/path/to/server.crt"
```

### Options
Expand Down