Skip to content

Commit

Permalink
feat(k8s): add ACLs (#4006)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jul 25, 2024
1 parent 8908f8f commit 41eb47b
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmd/scw/testdata/test-all-usage-k8s-acl-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Network Access Control Lists (ACLs) allow you to manage inbound network traffic by setting up ACL rules.

USAGE:
scw k8s acl

FLAGS:
-h, --help help for acl

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-k8s-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ USAGE:
scw k8s <command>

AVAILABLE COMMANDS:
acl Access Control List (ACL) management commands
cluster Kapsule cluster management commands
cluster-type Cluster type management commands
kubeconfig Manage your Kubernetes Kapsule cluster's kubeconfig files
Expand Down
15 changes: 15 additions & 0 deletions docs/commands/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Documentation for `scw k8s`
This API allows you to manage Kubernetes Kapsule and Kosmos clusters.

- [Access Control List (ACL) management commands](#access-control-list-(acl)-management-commands)
- [Kapsule cluster management commands](#kapsule-cluster-management-commands)
- [Create a new Cluster](#create-a-new-cluster)
- [Delete a Cluster](#delete-a-cluster)
Expand Down Expand Up @@ -40,6 +41,20 @@ This API allows you to manage Kubernetes Kapsule and Kosmos clusters.
- [List all available Versions](#list-all-available-versions)


## Access Control List (ACL) management commands

Network Access Control Lists (ACLs) allow you to manage inbound network traffic by setting up ACL rules.

Network Access Control Lists (ACLs) allow you to manage inbound network traffic by setting up ACL rules.

**Usage:**

```
scw k8s acl
```



## Kapsule cluster management commands

A cluster is a fully managed Kubernetes cluster
Expand Down
10 changes: 10 additions & 0 deletions internal/namespaces/k8s/v1/k8s_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func GetGeneratedCommands() *core.Commands {
k8sNode(),
k8sVersion(),
k8sClusterType(),
k8sACL(),
k8sClusterList(),
k8sClusterCreate(),
k8sClusterGet(),
Expand Down Expand Up @@ -109,6 +110,15 @@ A cluster type represents the different commercial types of clusters offered by
}
}

func k8sACL() *core.Command {
return &core.Command{
Short: `Access Control List (ACL) management commands`,
Long: `Network Access Control Lists (ACLs) allow you to manage inbound network traffic by setting up ACL rules.`,
Namespace: "k8s",
Resource: "acl",
}
}

func k8sClusterList() *core.Command {
return &core.Command{
Short: `List Clusters`,
Expand Down

0 comments on commit 41eb47b

Please sign in to comment.