Skip to content

Commit

Permalink
Create only one runtime list command for all resources (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiola authored Oct 5, 2023
1 parent 2f05650 commit 707536b
Show file tree
Hide file tree
Showing 23 changed files with 654 additions and 1,484 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
schedule:
- cron: 0 5 * * 1 # Run every monday at 5 UTC

env:
GO_VERSION: 1.21.1
GORELEASER_VERSION: v1.21.2

jobs:
codeql:
runs-on: ubuntu-latest
Expand All @@ -25,6 +29,16 @@ jobs:
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
show-progress: false
- name: Setup Golang
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Setup Goreleaser
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0
with:
version: ${{ env.GORELEASER_VERSION }}
install-only: true
- name: Initialize CodeQL
uses: github/codeql-action/init@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9
with:
Expand Down
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- marketplace list command
- marketplace get command
- environment list command
- pod list command
- cronjob list command
- job list command
- deployment list command
- service list command
- runtime list resources command
- events command
- version command

Expand Down
88 changes: 4 additions & 84 deletions docs/30_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,95 +211,15 @@ Available flags for the command:
- `--company-id`, to set the ID of the desired Company
- `--project-id`, to set the ID of the desired Project

### pod list
### list RESOURCE-TYPE

The `runtime pod list` subcommand allows you to see all pods that are running for the environment associated to a
given project.
The `runtime list` subcommand allows you to list all resources of a specific type that are running for the
environment associated to a given Project.

Usage:

```sh
miactl runtime pod list ENVIRONMENT [flags]
```

Available flags for the command:

- `--endpoint`, to set the Console endpoint (default is `https://console.cloud.mia-platform.eu`)
- `--certificate-authority`, to provide the path to a custom CA certificate
- `--insecure-skip-tls-verify`, to disallow the check the validity of the certificate of the remote endpoint
- `--context`, to specify a different context from the currently selected one
- `--company-id`, to set the ID of the desired Company
- `--project-id`, to set the ID of the desired Project

### cronjob list

The `runtime cronjob list` subcommand allows you to see all cronjobs that are running for the environment associated
to a given Project.

Usage:

```sh
miactl runtime cronjob list ENVIRONMENT [flags]
```

Available flags for the command:

- `--endpoint`, to set the Console endpoint (default is `https://console.cloud.mia-platform.eu`)
- `--certificate-authority`, to provide the path to a custom CA certificate
- `--insecure-skip-tls-verify`, to disallow the check the validity of the certificate of the remote endpoint
- `--context`, to specify a different context from the currently selected one
- `--company-id`, to set the ID of the desired Company
- `--project-id`, to set the ID of the desired Project

### job list

The `runtime job list` subcommand allows you to see all jobs that are running for the environment associated
to a given project.

Usage:

```sh
miactl runtime job list ENVIRONMENT [flags]
```

Available flags for the command:

- `--endpoint`, to set the Console endpoint (default is `https://console.cloud.mia-platform.eu`)
- `--certificate-authority`, to provide the path to a custom CA certificate
- `--insecure-skip-tls-verify`, to disallow the check the validity of the certificate of the remote endpoint
- `--context`, to specify a different context from the currently selected one
- `--company-id`, to set the ID of the desired Company
- `--project-id`, to set the ID of the desired Project

### deployment list

The `runtime deployment list` subcommand allows you to see all deployments that are running for the environment
associated to a given Project.

Usage:

```sh
miactl runtime deployment list ENVIRONMENT [flags]
```

Available flags for the command:

- `--endpoint`, to set the Console endpoint (default is `https://console.cloud.mia-platform.eu`)
- `--certificate-authority`, to provide the path to a custom CA certificate
- `--insecure-skip-tls-verify`, to disallow the check the validity of the certificate of the remote endpoint
- `--context`, to specify a different context from the currently selected one
- `--company-id`, to set the ID of the desired Company
- `--project-id`, to set the ID of the desired Project

### service list

The `runtime service list` subcommand allows you to see all services that are running for the environment associated
to a given Project.

Usage:

```sh
miactl runtime service list ENVIRONMENT [flags]
miactl runtime list RESOURCE-TYPE ENVIRONMENT [flags]
```

Available flags for the command:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/mia-platform/miactl

go 1.21
go 1.21.1

require (
dario.cat/mergo v1.0.0
Expand Down
131 changes: 0 additions & 131 deletions internal/cmd/cronjobs/cronjobs.go

This file was deleted.

Loading

0 comments on commit 707536b

Please sign in to comment.