Skip to content

Commit 49a7eb9

Browse files
dvaldiviaAdam Stafford
authored andcommitted
Pod Events
1 parent e328190 commit 49a7eb9

39 files changed

+146603
-416
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ The API handlers are created using a YAML definition located in `swagger.YAML`.
77
To add new api, the YAML file needs to be updated with all the desired apis using the [Swagger Basic Structure](https://swagger.io/docs/specification/2-0/basic-structure/), this includes paths, parameters, definitions, tags, etc.
88

99
## Generate server from YAML
10+
1011
Once the YAML file is ready we can autogenerate the code needed for the new api by just running:
1112

1213
Validate it:
14+
1315
```
1416
swagger validate ./swagger.yml
1517
```
18+
1619
Update server code:
20+
1721
```
1822
make swagger-gen
1923
```
@@ -23,37 +27,48 @@ This will update all the necessary code.
2327
`./restapi/configure_console.go` is a file that contains the handlers to be used by the application, here is the only place where we need to update our code to support the new apis. This file is not affected when running the swagger generator and it is safe to edit.
2428

2529
## Unit Tests
30+
2631
`./restapi/handlers_test.go` needs to be updated with the proper tests for the new api.
2732

2833
To run tests:
34+
2935
```
3036
go test ./restapi
3137
```
3238

3339
## Commit changes
40+
3441
After verification, commit your changes. This is a [great post](https://chris.beams.io/posts/git-commit/) on how to write useful commit messages
3542

3643
```
3744
$ git commit -am 'Add some feature'
3845
```
3946

4047
### Push to the branch
48+
4149
Push your locally committed changes to the remote origin (your fork)
50+
4251
```
4352
$ git push origin my-new-feature
4453
```
4554

4655
### Create a Pull Request
56+
4757
Pull requests can be created via GitHub. Refer to [this document](https://help.github.com/articles/creating-a-pull-request/) for detailed steps on how to create a pull request. After a Pull Request gets peer reviewed and approved, it will be merged.
4858

4959
## FAQs
50-
### How does ``console`` manages dependencies?
51-
``MinIO`` uses `go mod` to manage its dependencies.
60+
61+
### How does `console` manages dependencies?
62+
63+
`MinIO` uses `go mod` to manage its dependencies.
64+
5265
- Run `go get foo/bar` in the source folder to add the dependency to `go.mod` file.
5366

5467
To remove a dependency
68+
5569
- Edit your code and remove the import reference.
5670
- Run `go mod tidy` in the source folder to remove dependency from `go.mod` file.
5771

5872
### What are the coding guidelines for console?
59-
``console`` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).
73+
74+
`console` is fully conformant with Golang style. Refer: [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project. If you observe offending code, please feel free to send a pull request or ping us on [Slack](https://slack.min.io).

DEVELOPMENT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ docker cp console/docs/ldap/billy.ldif my-openldap-container:/container/servic
1515
$ docker exec my-openldap-container ldapadd -x -D "cn=admin,dc=example,dc=org" -w admin -f /container/service/slapd/assets/test/billy.ldif -H ldap://localhost
1616
```
1717

18-
Query the ldap server to check the user billy was created correctly and got assigned to the consoleAdmin group, you should get a list
18+
Query the ldap server to check the user billy was created correctly and got assigned to the consoleAdmin group, you should get a list
1919
containing ldap users and groups.
2020

2121
```
@@ -30,7 +30,7 @@ $ docker exec my-openldap-container ldapsearch -x -H ldap://localhost -b uid=bil
3030

3131
### Change the password for user billy
3232

33-
Set the new password for `billy` to `minio123` and enter `admin` as the default `LDAP Password`
33+
Set the new password for `billy` to `minio123` and enter `admin` as the default `LDAP Password`
3434

3535
```
3636
$ docker exec -it my-openldap-container /bin/bash
@@ -41,6 +41,7 @@ Enter LDAP Password:
4141
```
4242

4343
### Add the consoleAdmin policy to user billy on MinIO
44+
4445
```
4546
$ cat > consoleAdmin.json << EOF
4647
{

README.md

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@
55
A graphical user interface for [MinIO](https://github.com/minio/minio)
66

77
| Dashboard | Creating a bucket |
8-
| ------------- | ------------- |
8+
| ----------------------------- | ----------------------------- |
99
| ![Dashboard](images/pic1.png) | ![Dashboard](images/pic2.png) |
1010

1111
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
12+
1213
**Table of Contents**
1314

1415
- [MinIO Console](#minio-console)
15-
- [Install](#install)
16-
- [Binary Releases](#binary-releases)
17-
- [Docker](#docker)
18-
- [Build from source](#build-from-source)
19-
- [Setup](#setup)
20-
- [1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
21-
- [2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
22-
- [3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
23-
- [Start Console service:](#start-console-service)
24-
- [Start Console service with TLS:](#start-console-service-with-tls)
25-
- [Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
16+
- [Install](#install)
17+
- [Binary Releases](#binary-releases)
18+
- [Docker](#docker)
19+
- [Build from source](#build-from-source)
20+
- [Setup](#setup)
21+
- [1. Create a user `console` using `mc`](#1-create-a-user-console-using-mc)
22+
- [2. Create a policy for `console` with admin access to all resources (for testing)](#2-create-a-policy-for-console-with-admin-access-to-all-resources-for-testing)
23+
- [3. Set the policy for the new `console` user](#3-set-the-policy-for-the-new-console-user)
24+
- [Start Console service:](#start-console-service)
25+
- [Start Console service with TLS:](#start-console-service-with-tls)
26+
- [Connect Console to a Minio using TLS and a self-signed certificate](#connect-console-to-a-minio-using-tls-and-a-self-signed-certificate)
2627
- [Contribute to console Project](#contribute-to-console-project)
2728

2829
<!-- markdown-toc end -->
@@ -31,23 +32,25 @@ A graphical user interface for [MinIO](https://github.com/minio/minio)
3132

3233
### Binary Releases
3334

34-
| OS | ARCH | Binary |
35-
|:-------:|:-------:|:----------------------------------------------------------------------------------------------------:|
36-
| Linux | amd64 | [linux-amd64](https://github.com/minio/console/releases/latest/download/console-linux-amd64) |
37-
| Linux | arm64 | [linux-arm64](https://github.com/minio/console/releases/latest/download/console-linux-arm64) |
38-
| Linux | ppc64le | [linux-ppc64le](https://github.com/minio/console/releases/latest/download/console-linux-ppc64le) |
39-
| Linux | s390x | [linux-s390x](https://github.com/minio/console/releases/latest/download/console-linux-s390x) |
40-
| Apple | amd64 | [darwin-amd64](https://github.com/minio/console/releases/latest/download/console-darwin-amd64) |
41-
| Windows | amd64 | [windows-amd64](https://github.com/minio/console/releases/latest/download/console-windows-amd64.exe) |
35+
| OS | ARCH | Binary |
36+
| :-----: | :-----: | :--------------------------------------------------------------------------------------------------: |
37+
| Linux | amd64 | [linux-amd64](https://github.com/minio/console/releases/latest/download/console-linux-amd64) |
38+
| Linux | arm64 | [linux-arm64](https://github.com/minio/console/releases/latest/download/console-linux-arm64) |
39+
| Linux | ppc64le | [linux-ppc64le](https://github.com/minio/console/releases/latest/download/console-linux-ppc64le) |
40+
| Linux | s390x | [linux-s390x](https://github.com/minio/console/releases/latest/download/console-linux-s390x) |
41+
| Apple | amd64 | [darwin-amd64](https://github.com/minio/console/releases/latest/download/console-darwin-amd64) |
42+
| Windows | amd64 | [windows-amd64](https://github.com/minio/console/releases/latest/download/console-windows-amd64.exe) |
4243

4344
You can also verify the binary with [minisign](https://jedisct1.github.io/minisign/) by downloading the corresponding [`.minisig`](https://github.com/minio/console/releases/latest) signature file. Then run:
45+
4446
```
4547
minisign -Vm console-<OS>-<ARCH> -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
4648
```
4749

4850
### Docker
4951

5052
Pull the latest release via:
53+
5154
```
5255
docker pull minio/console
5356
```
@@ -57,6 +60,7 @@ docker pull minio/console
5760
```
5861
GO111MODULE=on go install github.com/minio/console/cmd/console@latest
5962
```
63+
6064
> You will need a working Go environment. Therefore, please follow [How to install Go](https://golang.org/doc/install).
6165
> Minimum version required is go1.16
6266
@@ -116,47 +120,45 @@ mc admin policy set myminio consoleAdmin user=console
116120
117121
```json
118122
{
119-
"Version": "2012-10-17",
120-
"Statement": [{
121-
"Action": [
122-
"admin:ServerInfo"
123-
],
124-
"Effect": "Allow",
125-
"Sid": ""
126-
},
127-
{
128-
"Action": [
129-
"s3:ListenBucketNotification",
130-
"s3:PutBucketNotification",
131-
"s3:GetBucketNotification",
132-
"s3:ListMultipartUploadParts",
133-
"s3:ListBucketMultipartUploads",
134-
"s3:ListBucket",
135-
"s3:HeadBucket",
136-
"s3:GetObject",
137-
"s3:GetBucketLocation",
138-
"s3:AbortMultipartUpload",
139-
"s3:CreateBucket",
140-
"s3:PutObject",
141-
"s3:DeleteObject",
142-
"s3:DeleteBucket",
143-
"s3:PutBucketPolicy",
144-
"s3:DeleteBucketPolicy",
145-
"s3:GetBucketPolicy"
146-
],
147-
"Effect": "Allow",
148-
"Resource": [
149-
"arn:aws:s3:::*"
150-
],
151-
"Sid": ""
152-
}
153-
]
123+
"Version": "2012-10-17",
124+
"Statement": [
125+
{
126+
"Action": ["admin:ServerInfo"],
127+
"Effect": "Allow",
128+
"Sid": ""
129+
},
130+
{
131+
"Action": [
132+
"s3:ListenBucketNotification",
133+
"s3:PutBucketNotification",
134+
"s3:GetBucketNotification",
135+
"s3:ListMultipartUploadParts",
136+
"s3:ListBucketMultipartUploads",
137+
"s3:ListBucket",
138+
"s3:HeadBucket",
139+
"s3:GetObject",
140+
"s3:GetBucketLocation",
141+
"s3:AbortMultipartUpload",
142+
"s3:CreateBucket",
143+
"s3:PutObject",
144+
"s3:DeleteObject",
145+
"s3:DeleteBucket",
146+
"s3:PutBucketPolicy",
147+
"s3:DeleteBucketPolicy",
148+
"s3:GetBucketPolicy"
149+
],
150+
"Effect": "Allow",
151+
"Resource": ["arn:aws:s3:::*"],
152+
"Sid": ""
153+
}
154+
]
154155
}
155156
```
156157

157158
## Start Console service:
158159

159160
Before running console service, following environment settings must be supplied
161+
160162
```sh
161163
# Salt to encrypt JWT payload
162164
export CONSOLE_PBKDF_PASSPHRASE=SECRET
@@ -169,6 +171,7 @@ export CONSOLE_MINIO_SERVER=http://localhost:9000
169171
```
170172

171173
Now start the console service.
174+
172175
```
173176
./console server
174177
2021-01-19 02:36:08.893735 I | 2021/01/19 02:36:08 server.go:129: Serving console at http://localhost:9090
@@ -188,6 +191,7 @@ Copy your `public.crt` and `private.key` to `~/.console/certs`, then:
188191
For advanced users, `console` has support for multiple certificates to service clients through multiple domains.
189192

190193
Following tree structure is expected for supporting multiple domains:
194+
191195
```sh
192196
certs/
193197
@@ -218,4 +222,5 @@ export CONSOLE_MINIO_SERVER=https://localhost:9000
218222
You can verify that the apis work by doing the request on `localhost:9090/api/v1/...`
219223

220224
# Contribute to console Project
225+
221226
Please follow console [Contributor's Guide](https://github.com/minio/console/blob/master/CONTRIBUTING.md)

SECURITY.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Whenever there is a security update you just need to upgrade to the latest versi
77

88
## Reporting a Vulnerability
99

10-
All security bugs in [minio/console](https://github.com/minio/console) (or other minio/* repositories)
10+
All security bugs in [minio/console](https://github.com/minio/console) (or other minio/\* repositories)
1111
should be reported by email to [email protected]. Your email will be acknowledged within 48 hours,
1212
and you'll receive a more detailed response to your email within 72 hours indicating the next steps
1313
in handling your report.
@@ -18,9 +18,10 @@ you need access credentials for a successful exploit).
1818

1919
If you have not received a reply to your email within 48 hours or you have not heard from the security team
2020
for the past five days please contact the security team directly:
21-
- Primary security coordinator: [email protected]
22-
- Secondary coordinator: [email protected]
23-
- If you receive no response: [email protected]
21+
22+
- Primary security coordinator: [email protected]
23+
- Secondary coordinator: [email protected]
24+
- If you receive no response: [email protected]
2425

2526
### Disclosure Process
2627

VULNERABILITY_REPORT.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ resolve and fix a reported vulnerability.
1919
The vulnerability management process requires that the vulnerability report
2020
contains the following information:
2121

22-
- The project / component that contains the reported vulnerability.
23-
- A description of the vulnerability. In particular, the type of the
24-
reported vulnerability and how it might be exploited. Alternatively,
25-
a well-established vulnerability identifier, e.g. CVE number, can be
26-
used instead.
22+
- The project / component that contains the reported vulnerability.
23+
- A description of the vulnerability. In particular, the type of the
24+
reported vulnerability and how it might be exploited. Alternatively,
25+
a well-established vulnerability identifier, e.g. CVE number, can be
26+
used instead.
2727

2828
Based on the description mentioned above, a MinIO Console engineer or security team
2929
member investigates:
3030

31-
- Whether the reported vulnerability exists.
32-
- The conditions that are required such that the vulnerability can be exploited.
33-
- The steps required to fix the vulnerability.
31+
- Whether the reported vulnerability exists.
32+
- The conditions that are required such that the vulnerability can be exploited.
33+
- The steps required to fix the vulnerability.
3434

3535
In general, if the vulnerability exists in one of the MinIO Console code bases
3636
itself - not in a code dependency - then MinIO Console will, if possible, fix

code_of_conduct.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
2626
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
3030
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
31+
- Other conduct which could reasonably be considered inappropriate in a
3232
professional setting
3333

3434
## Our Responsibilities

compose/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Console Docker Compose
32

43
This compose file allows users to quickly deploy MinIO Console, LogSearch & Prometheus in a baremetal (non Kubernetes) environment.

compose/docker-compose.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3.4'
1+
version: "3.4"
22
services:
33
pg_database:
44
image: ${POSTGRES_IMAGE}
@@ -24,7 +24,13 @@ services:
2424
- LOGSEARCH_PG_CONN_STR=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/minio_logs?sslmode=disable
2525
ports:
2626
- ${LOGSEARCH_PORT}:${LOGSEARCH_PORT}
27-
command: ["/usr/bin/wait-for-it.sh", "localhost:${POSTGRES_PORT}", "--", "/logsearchapi"]
27+
command:
28+
[
29+
"/usr/bin/wait-for-it.sh",
30+
"localhost:${POSTGRES_PORT}",
31+
"--",
32+
"/logsearchapi",
33+
]
2834
volumes:
2935
- ./wait-for-it.sh:/usr/bin/wait-for-it.sh
3036
depends_on:
@@ -53,7 +59,7 @@ services:
5359
ports:
5460
- ${PROMETHEUS_PORT}:${PROMETHEUS_PORT}
5561
command:
56-
- --config.file=/etc/prometheus/prometheus.yml
62+
- --config.file=/etc/prometheus/prometheus.yml
5763
- --web.listen-address=:${PROMETHEUS_PORT}
5864
volumes:
5965
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro

0 commit comments

Comments
 (0)