Skip to content

Commit

Permalink
chore: clean up old config formats from examples and tests
Browse files Browse the repository at this point in the history
edvald committed Sep 3, 2019
1 parent 31ecce6 commit 304211b
Showing 124 changed files with 1,351 additions and 1,397 deletions.
5 changes: 2 additions & 3 deletions docs/using-garden/configuration-files.md
Original file line number Diff line number Diff line change
@@ -27,14 +27,13 @@ We'll start by looking at the top-level [project configuration file](https://git
# examples/openfaas/garden.yml
kind: Project
name: openfaas
environmentDefaults:
variables:
my-variable: hello-variable
environments:
- name: local
providers:
- name: local-kubernetes
- name: openfaas
variables:
my-variable: hello-variable
```
The project-wide `garden.yml` defines the project's name, the default configuration used for each
86 changes: 43 additions & 43 deletions examples/ambassador/README.md
Original file line number Diff line number Diff line change
@@ -49,13 +49,13 @@ Hello from Node service!
If you've looked at our other examples, the project configuration should look familiar with the exception of the `setupIngressController` key:

```yaml
project:
name: custom-ingress-controller
environments:
- name: local
providers:
- name: local-kubernetes
setupIngressController: false
kind: Project
name: custom-ingress-controller
environments:
- name: local
providers:
- name: local-kubernetes
setupIngressController: false
```
The `setupIngressController` key is specific to the `local-kubernetes` plugin. Setting it to `false` disables the default Nginx ingress controller.
@@ -65,49 +65,49 @@ The `setupIngressController` key is specific to the `local-kubernetes` plugin. S
We've configured the Ambassador service to listen on port `8080` since the default Nginx ingress controller might occupy the default port (`80`) if we're running other Garden projects. Here's the relevant configuration from `ambassador/garden.yml`:

```yaml
module:
description: Ambassador API Gateway
type: helm
name: ambassador
chart: stable/ambassador
values:
service:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config:
service_port: 8080 # Set port since the default ingress already occupies the default port
http:
port: 8080 # Set port since the default ingress already occupies the default port
kind: Module
description: Ambassador API Gateway
type: helm
name: ambassador
chart: stable/ambassador
values:
service:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config:
service_port: 8080 # Set port since the default ingress already occupies the default port
http:
port: 8080 # Set port since the default ingress already occupies the default port
```

### Module configuration

The module configuration is the same as for the `simple-project` example with the exception of annotations. Below is the configuration for our `go-service`:

```yaml
module:
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 8080
# Maps service:80 -> container:8080
servicePort: 80
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: go-service_mapping
prefix: /go-service/
service: go-service:80
kind: Module
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 8080
# Maps service:80 -> container:8080
servicePort: 80
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: go-service_mapping
prefix: /go-service/
service: go-service:80
```

Please refer to the [official Ambassador docs](https://www.getambassador.io/reference/mappings/) for more information on how to configure route mappings.
34 changes: 17 additions & 17 deletions examples/ambassador/ambassador/garden.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module:
description: Ambassador API Gateway
type: helm
name: ambassador
chart: stable/ambassador
values:
service:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config:
service_port: 8080 # Set port since the default ingress already occupies the default port
http:
port: 8080 # Set port since the default ingress already occupies the default port
kind: Module
description: Ambassador API Gateway
type: helm
name: ambassador
chart: stable/ambassador
values:
service:
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Module
name: ambassador
config:
service_port: 8080 # Set port since the default ingress already occupies the default port
http:
port: 8080 # Set port since the default ingress already occupies the default port
14 changes: 7 additions & 7 deletions examples/ambassador/garden.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project:
name: ambassador
environments:
- name: local
providers:
- name: local-kubernetes
setupIngressController: false
kind: Project
name: ambassador
environments:
- name: local
providers:
- name: local-kubernetes
setupIngressController: false
38 changes: 19 additions & 19 deletions examples/ambassador/go-service/garden.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
module:
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 8080
# Maps service:80 -> container:8080
servicePort: 80
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: go-service_mapping
prefix: /go-service/
service: go-service:80
kind: Module
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 8080
# Maps service:80 -> container:8080
servicePort: 80
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: go-service_mapping
prefix: /go-service/
service: go-service:80
52 changes: 26 additions & 26 deletions examples/ambassador/node-service/garden.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
module:
name: node-service
description: Node service container
type: container
services:
- name: node-service
ports:
- name: http
containerPort: 8080
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: node-service_mapping
prefix: /node-service/
service: node-service:8080
dependencies:
- go-service
tests:
- name: unit
args: [npm, test]
- name: integ
args: [npm, run, integ]
dependencies:
- go-service
kind: Module
name: node-service
description: Node service container
type: container
services:
- name: node-service
ports:
- name: http
containerPort: 8080
annotations:
getambassador.io/config: |
---
apiVersion: ambassador/v1
kind: Mapping
name: node-service_mapping
prefix: /node-service/
service: node-service:8080
dependencies:
- go-service
tests:
- name: unit
args: [npm, test]
- name: integ
args: [npm, run, integ]
dependencies:
- go-service
3 changes: 0 additions & 3 deletions examples/hot-reload/garden.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
kind: Project
name: hot-reload
environmentDefaults:
providers:
- name: container
environments:
- name: local
providers:
24 changes: 12 additions & 12 deletions examples/local-tls/garden.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
project:
name: local-tls
environments:
- name: local
providers:
- name: local-kubernetes
defaultHostname: garden.dev
tlsCertificates:
- name: garden-dev
secretRef:
name: tls-garden-dev
namespace: default
kind: Project
name: local-tls
environments:
- name: local
providers:
- name: local-kubernetes
defaultHostname: garden.dev
tlsCertificates:
- name: garden-dev
secretRef:
name: tls-garden-dev
namespace: default
24 changes: 12 additions & 12 deletions examples/local-tls/services/go-service/garden.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module:
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 80
ingresses:
- path: /
port: http
kind: Module
name: go-service
description: Go service container
type: container
services:
- name: go-service
ports:
- name: http
containerPort: 80
ingresses:
- path: /
port: http
48 changes: 24 additions & 24 deletions examples/local-tls/services/node-service/garden.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
module:
name: node-service
description: Node service container
type: container
services:
- name: node-service
args: [npm, start]
ports:
- name: http
containerPort: 8080
ingresses:
- path: /hello
port: http
- path: /call-go-service
port: http
dependencies:
- go-service
tests:
- name: unit
args: [npm, test]
- name: integ
args: [npm, run, integ]
dependencies:
- go-service
kind: Module
name: node-service
description: Node service container
type: container
services:
- name: node-service
args: [npm, start]
ports:
- name: http
containerPort: 8080
ingresses:
- path: /hello
port: http
- path: /call-go-service
port: http
dependencies:
- go-service
tests:
- name: unit
args: [npm, test]
- name: integ
args: [npm, run, integ]
dependencies:
- go-service
Loading

0 comments on commit 304211b

Please sign in to comment.