-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #425 from Xtigyro/feature/add-full-dried-example
Add DRY-ed Example
- Loading branch information
Showing
9 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: v3.0.0 | ||
--- | ||
|
||
# Use DRY-ed code in YAML | ||
|
||
If you want to use as a baseline or deploy the DRY-ed example, please refer to the provided [app templates](../../../examples/appsTemplates) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# DRY-ed Example | ||
|
||
## Execution Plan | ||
|
||
To deploy the DRY-ed example, the app templates placed in [config](config) and [apps](apps) need to be used. To do so - please run: | ||
|
||
```bash | ||
helmsman -apply -f config/helmsman.yaml | ||
``` | ||
|
||
> **Tip**: That kind of DRY-ed code can be achieved only using YAML desired state files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
puppetserver: | ||
puppeturl: 'https://github.com/puppetlabs/control-repo.git' |
4 changes: 4 additions & 0 deletions
4
examples/appsTemplates/apps/puppetserver/development-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
r10k: | ||
code: | ||
cronJob: | ||
schedule: "*/2 * * * *" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
r10k: | ||
code: | ||
cronJob: | ||
schedule: "*/1 * * * *" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 256Mi | ||
requests: | ||
cpu: 100m | ||
memory: 256Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hostPort: 8009 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
hostPort: 8010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
metadata: | ||
scope: "K8s Cluster kind-1" | ||
maintainer: "devops" | ||
|
||
settings: | ||
kubeContext: "kind-kind-1" # the name of the context to be created | ||
slackWebhook: "$MY_SLACK_WEBHOOK" | ||
|
||
namespaces: | ||
testing: | ||
labels: | ||
env: "testing" | ||
limits: | ||
- type: Container | ||
default: | ||
cpu: "200m" | ||
memory: "250Mi" | ||
defaultRequest: | ||
cpu: "100m" | ||
memory: "150Mi" | ||
- type: Pod | ||
max: | ||
memory: "300Mi" | ||
development: | ||
labels: | ||
env: "development" | ||
limits: | ||
- type: Container | ||
default: | ||
cpu: "300m" | ||
memory: "300Mi" | ||
defaultRequest: | ||
cpu: "200m" | ||
memory: "200Mi" | ||
- type: Pod | ||
max: | ||
memory: "400Mi" | ||
|
||
helmRepos: | ||
stable: "https://kubernetes-charts.storage.googleapis.com" | ||
|
||
appsTemplates: | ||
common: &common | ||
test: true | ||
|
||
testing: &testing | ||
namespace: "testing" | ||
protected: false # defining all "testing" releases to be protected. | ||
wait: true | ||
|
||
development: &development | ||
namespace: "development" | ||
protected: true # defining all "development" releases to be protected. | ||
wait: false | ||
|
||
puppetserver: &puppetserver | ||
enabled: true | ||
priority: -1 | ||
chart: "../../../../puppetserver-helm-chart-1.8.2.tgz" # https://github.com/puppetlabs/pupperware/tree/master/k8s | ||
version: "1.8.2" # chart version | ||
valuesFiles: [ | ||
"../apps/puppetserver/common-values.yaml", | ||
] | ||
|
||
tomcat: &tomcat | ||
enabled: true | ||
priority: -2 | ||
chart: "stable/tomcat" | ||
version: "0.4.0" # chart version | ||
valuesFiles: [ | ||
"../apps/tomcat/common-values.yaml", | ||
] | ||
|
||
apps: | ||
testing-puppetserver: | ||
<<: *common | ||
<<: *testing | ||
<<: *puppetserver | ||
valuesFiles: [ | ||
"../apps/puppetserver/testing-values.yaml", | ||
] | ||
|
||
testing-tomcat: | ||
<<: *common | ||
<<: *testing | ||
<<: *tomcat | ||
valuesFiles: [ | ||
"../apps/tomcat/testing-values.yaml", | ||
] | ||
|
||
development-puppetserver: | ||
<<: *common | ||
<<: *development | ||
<<: *puppetserver | ||
valuesFiles: [ | ||
"../apps/puppetserver/development-values.yaml", | ||
] | ||
|
||
development-tomcat: | ||
<<: *common | ||
<<: *development | ||
<<: *tomcat | ||
valuesFiles: [ | ||
"../apps/tomcat/development-values.yaml", | ||
] |