You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-27Lines changed: 40 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -5,44 +5,50 @@
5
5
Go Clouddriver is a rewrite of Spinnaker's [Clouddriver](https://github.com/spinnaker/clouddriver) microservice. It has an observed 95%+ decrease in CPU and memory load for Kubernetes operations.
6
6
7
7
Go Clouddriver brings many features to the table which allow it to perform better than Clouddriver OSS for production loads:
8
+
8
9
- it does not rely on `kubectl` and instead interfaces directly with the Kubernetes API for all operations
9
10
- it utilizes an in-memory cache store for Kubernetes API discovery
10
11
- it stores Kubernetes providers in a database, fronted by a simple CRUD API
11
12
- it removes over-complicated strategies such as [Cache All The Stuff](https://github.com/spinnaker/clouddriver/tree/master/cats), instead making live calls for all operations
12
13
13
-
Go Clouddriver is *not* an API complete implementation of Clouddriver OSS and only handles Kubernetes providers and operations. It is meant to be run in tandem with Clouddriver OSS. Visit [the wiki](https://github.com/homedepot/go-clouddriver/wiki) for feature support and intallation instructions.
14
+
Go Clouddriver is _not_ an API complete implementation of Clouddriver OSS and only handles Kubernetes providers and operations. It is meant to be run in tandem with Clouddriver OSS. Visit [the wiki](https://github.com/homedepot/go-clouddriver/wiki) for feature support and intallation instructions.
14
15
15
16
## Getting Started
16
17
17
18
### Testing
18
19
19
20
Run from the root directory
21
+
20
22
```bash
21
23
make tools test
22
24
```
23
25
24
26
### Building
25
27
26
28
Run from the root directory
29
+
27
30
```bash
28
31
make build
29
32
```
30
33
31
34
### Running Locally
32
35
33
-
1) Go Clouddriver generates its access tokens using [Arcade](https://github.com/homedepot/arcade) as a sidecar, so a working instance of Arcade will need to be running locally in order for Go Clouddriver to talk to Kubernetes clusters.
36
+
1. Go Clouddriver generates its access tokens using [Arcade](https://github.com/homedepot/arcade) as a sidecar, so a working instance of Arcade will need to be running locally in order for Go Clouddriver to talk to Kubernetes clusters.
37
+
38
+
2. Export the Arcade API key (the same one you set up in step 1).
34
39
35
-
2) Export the Arcade API key (the same one you set up in step 1).
36
40
```bash
37
41
export ARCADE_API_KEY=test
38
42
```
39
43
40
-
3) Run Go Clouddriver.
44
+
3. Run Go Clouddriver.
45
+
41
46
```bash
42
47
make run
43
48
```
44
49
45
-
4) Create your first Kubernetes provider! Go Clouddriver runs on port 7002, so you'll make a POST to `localhost:7002/v1/kubernetes/providers`.
50
+
4. Create your first Kubernetes provider! Go Clouddriver runs on port 7002, so you'll make a POST to `localhost:7002/v1/kubernetes/providers`.
|`ARCADE_API_KEY`| Needed to talk to [Arcade](https://github.com/billiford/arcade). | Required for most operations. ||
89
-
|`ARTIFACTS_CREDENTIALS_CONFIG_DIR`| Sets the directory for artifacts configuration. | Optional. Leave unset to use OSS Clouddriver's Artifacts API. ||
90
-
|`KUBERNETES_USE_DISK_CACHE`|Stores Kubernetes API discovery on disk instead of in-memory. ||`false`|
91
-
|`DB_HOST`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
92
-
|`DB_NAME`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
93
-
|`DB_PASS`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
94
-
|`DB_USER`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
95
-
|`VERBOSE_REQUEST_LOGGING`|Logs all incoming request information. |Should only be used in non-production for testing. |`false`|
92
+
| Environment Variable |Description | Notes | Default Value |
|`ARCADE_API_KEY`| Needed to talk to [Arcade](https://github.com/billiford/arcade). |Required for most operations. ||
95
+
|`ARTIFACTS_CREDENTIALS_CONFIG_DIR`|Sets the directory for artifacts configuration. | Optional. Leave unset to use OSS Clouddriver's Artifacts API. ||
96
+
|`KUBERNETES_USE_DISK_CACHE`|Stores Kubernetes API discovery on disk instead of in-memory. ||`false`|
97
+
|`DB_HOST`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
98
+
|`DB_NAME`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
99
+
|`DB_PASS`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
100
+
|`DB_USER`|Used to connect to MySQL database. |If not set will default to local SQLite database. ||
101
+
|`VERBOSE_REQUEST_LOGGING`|Logs all incoming request information. |Should only be used in non-production for testing. |`false`|
96
102
97
103
### MySQL Indexes and Cleanup
98
104
99
105
Go Clouddriver stores all deployed resource requests in its `kubernetes_resources` table, which needs to be cleaned up periodically. It also requires a few indexes
100
-
to work efficiently and properly for continued deployments over long periods of time.
106
+
to work efficiently and properly for continued deployments over long periods of time. These are defined by default when
107
+
starting the application.
101
108
102
109
#### Indexes
103
110
104
111
First, an index to help the Applications API remain efficient.
Finally, a couple of indexes on the provider read/write permissions tables to help the Credentials API and any queries to select providers from the database.
0 commit comments