Skip to content

Commit

Permalink
Merge pull request #610 from Praqma/chart_urls
Browse files Browse the repository at this point in the history
Chart urls and repos
  • Loading branch information
luisdavim authored May 13, 2021
2 parents 95ef414 + 66b5071 commit 60282a7
Show file tree
Hide file tree
Showing 17 changed files with 115 additions and 131 deletions.
6 changes: 3 additions & 3 deletions docs/deployment_strategies.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You can test 3rd party charts in designated namespaces (e.g, staging) within the
description = "production artifactory"
namespace = "production"
enabled = true
chart = "center/jfrog/artifactory"
chart = "jfrog/artifactory"
version = "11.4.2" # chart version
valuesFile = "../my-artificatory-production-values.yaml"

Expand Down Expand Up @@ -79,7 +79,7 @@ namespaces:

helmRepos:
jenkins: https://charts.jenkins.io
center: https://repo.chartcenter.io
jfrog: https://charts.jfrog.io

apps:
jenkins:
Expand All @@ -96,7 +96,7 @@ apps:
description: "production artifactory"
namespace: "production"
enabled: true
chart: "center/jfrog/artifactory"
chart: "jfrog/artifactory"
version: "11.4.2" # chart version
valuesFile: "../my-artifactory-production-values.yaml"

Expand Down
2 changes: 1 addition & 1 deletion docs/how_to/apps/order.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ center = https://repo.chartcenter.io
description = "artifactory"
namespace = "staging" # maps to the namespace as defined in environments above
enabled = true # change to false if you want to delete this app release [empty = false]
chart = "center/jfrog/artifactory" # changing the chart name means delete and recreate this chart
chart = "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version = "11.4.2" # chart version
valuesFile = "" # leaving it empty uses the default chart values
priority= -2
Expand Down
6 changes: 3 additions & 3 deletions docs/how_to/apps/override_namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ center = https://repo.chartcenter.io
description = "artifactory"
namespace = "staging" # maps to the namespace as defined in environments above
enabled = true # change to false if you want to delete this app release [empty = false]
chart = "center/jfrog/artifactory" # changing the chart name means delete and recreate this chart
chart = "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version = "11.4.2" # chart version
valuesFile = "" # leaving it empty uses the default chart values
```
Expand All @@ -69,7 +69,7 @@ namespaces:

helmRepos:
jenkins: https://charts.jenkins.io
center: https://repo.chartcenter.io
jfrog: https://charts.jfrog.io

apps:

Expand All @@ -85,7 +85,7 @@ apps:
description: "artifactory"
namespace: "staging" # maps to the namespace as defined in environments above
enabled: true # change to false if you want to delete this app release [empty: false]
chart: "center/jfrog/artifactory" # changing the chart name means delete and recreate this chart
chart: "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version: "11.4.2" # chart version
valuesFile: "" # leaving it empty uses the default chart values
```
Expand Down
2 changes: 1 addition & 1 deletion docs/how_to/misc/limit-deployment-to-specific-apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apps:
artifactory:
namespace: "production" # maps to the namespace as defined in namespaces above
enabled: true # change to false if you want to delete this app release empty: false:
chart: "center/jfrog/artifactory" # changing the chart name means delete and recreate this chart
chart: "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version: "11.4.2" # chart version
# ...
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apps:
namespace: "production" # maps to the namespace as defined in namespaces above
group: "sidecar" # group name
enabled: true # change to false if you want to delete this app release empty: false:
chart: "center/jfrog/artifactory" # changing the chart name means delete and recreate this chart
chart: "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version: "11.4.2" # chart version
# ...
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
puppetserver:
puppeturl: 'https://github.com/puppetlabs/control-repo.git'
puppeturl: "https://github.com/puppetlabs/control-repo.git"
36 changes: 12 additions & 24 deletions examples/appsTemplates/config/helmsman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ metadata:
maintainer: "devops"

settings:
kubeContext: "kind-kind-1" # the name of the context to be created
kubeContext: "kind-kind-1" # the name of the context to be created
slackWebhook: "$MY_SLACK_WEBHOOK"

namespaces:
Expand Down Expand Up @@ -38,7 +38,7 @@ namespaces:

helmRepos:
jenkins: "https://charts.jenkins.io"
center: "https://repo.chartcenter.io"
jfrog: "https://charts.jfrog.io"
bitnami: "https://charts.bitnami.com/bitnami"
puppet: "https://puppetlabs.github.io/puppetserver-helm-chart"

Expand All @@ -48,61 +48,49 @@ appsTemplates:

testing: &testing
namespace: "testing"
protected: false # defining all "testing" releases to be protected.
protected: false # defining all "testing" releases to be protected.
wait: true

development: &development
namespace: "development"
protected: true # defining all "development" releases to be protected.
protected: true # defining all "development" releases to be protected.
wait: false

puppetserver: &puppetserver
enabled: true
priority: -1
chart: "puppet/puppetserver-helm-chart"
version: "3.0.2" # chart version
valuesFiles: [
"../apps/puppetserver/common-values.yaml",
]
version: "3.0.2" # chart version
valuesFiles: ["../apps/puppetserver/common-values.yaml"]

tomcat: &tomcat
enabled: true
priority: -2
chart: "bitnami/tomcat"
version: "6.5.3" # chart version
valuesFiles: [
"../apps/tomcat/common-values.yaml",
]
version: "6.5.3" # chart version
valuesFiles: ["../apps/tomcat/common-values.yaml"]

apps:
testing-puppetserver:
<<: *common
<<: *testing
<<: *puppetserver
valuesFiles: [
"../apps/puppetserver/testing-values.yaml",
]
valuesFiles: ["../apps/puppetserver/testing-values.yaml"]

testing-tomcat:
<<: *common
<<: *testing
<<: *tomcat
valuesFiles: [
"../apps/tomcat/testing-values.yaml",
]
valuesFiles: ["../apps/tomcat/testing-values.yaml"]

development-puppetserver:
<<: *common
<<: *development
<<: *puppetserver
valuesFiles: [
"../apps/puppetserver/development-values.yaml",
]
valuesFiles: ["../apps/puppetserver/development-values.yaml"]

development-tomcat:
<<: *common
<<: *development
<<: *tomcat
valuesFiles: [
"../apps/tomcat/development-values.yaml",
]
valuesFiles: ["../apps/tomcat/development-values.yaml"]
4 changes: 2 additions & 2 deletions examples/example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ context= "test-infra" # defaults to "default" if not provided
[[namespaces.production.limits]]
type = "Pod"
[namespaces.production.limits.max]
memory = "300Mi"
memory = "300Mi"
[namespaces.staging]
protected = false
[namespaces.staging.labels]
Expand Down Expand Up @@ -135,6 +135,6 @@ context= "test-infra" # defaults to "default" if not provided
# additional helm flags for this release
helmFlags= [
"--devel",
]
]

# See https://github.com/Praqma/helmsman/blob/master/docs/desired_state_specification.md#apps for more apps options
95 changes: 46 additions & 49 deletions examples/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# context defines the context of this Desired State File.
# It is used to allow Helmsman identify which releases are managed by which DSF.
# Therefore, it is important that each DSF uses a unique context.
context: test-infra # defaults to "default" if not provided
context: test-infra # defaults to "default" if not provided

# metadata -- add as many key/value pairs as you want
metadata:
Expand All @@ -16,9 +16,9 @@ metadata:
# You can skip this if you use Helmsman on a machine with kubectl already connected to your k8s cluster.
# you have to use exact key names here : 'caCrt' for certificate and 'caKey' for the key and caClient for the client certificate
# certificates:
#caClient: "gs://mybucket/client.crt" # GCS bucket path
#caCrt: "s3://mybucket/ca.crt" # S3 bucket path
#caKey: "../ca.key" # valid local file relative path
#caClient: "gs://mybucket/client.crt" # GCS bucket path
#caCrt: "s3://mybucket/ca.crt" # S3 bucket path
#caKey: "../ca.key" # valid local file relative path

settings:
kubeContext: "minikube" # will try connect to this context first, if it does not exist, it will be created using the details below
Expand Down Expand Up @@ -64,10 +64,8 @@ namespaces:
requests.cpu: "10"
requests.memory: "30Gi"
customQuotas:
- name: "requests.nvidia.com/gpu"
value: "2"


- name: "requests.nvidia.com/gpu"
value: "2"

# define any private/public helm charts repos you would like to get charts from
# syntax: repo_name: "repo_url"
Expand All @@ -83,46 +81,45 @@ helmRepos:
# each contains the following:

apps:
argo:
namespace: "staging" # maps to the namespace as defined in namespaces above
enabled: true # change to false if you want to delete this app release empty: false:
chart: "argo/argo" # changing the chart name means delete and recreate this chart
version: "0.8.5" # chart version
### Optional values below
valuesFile: "" # leaving it empty uses the default chart values
test: false
protected: true
priority: -3
wait: true
hooks:
successCondition: "Complete"
successTimeout: "90s"
deleteOnSuccess: true
preInstall: "job.yaml"
# preInstall: "https://github.com/jetstack/cert-manager/releases/download/v0.14.0/cert-manager.crds.yaml"
# postInstall: "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.14/deploy/manifests/00-crds.yaml"
# postInstall: "job.yaml"
# preUpgrade: "job.yaml"
# postUpgrade: "job.yaml"
# preDelete: "job.yaml"
# postDelete: "job.yaml"
set:
"images.tag": $$TAG # $$ is escaped and $TAG is passed literally to images.tag (no env variable expansion)

artifactory:
namespace: "production" # maps to the namespace as defined in namespaces above
enabled: true # change to false if you want to delete this app release empty: false:
chart: "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version: "8.3.2" # chart version
### Optional values below
valuesFile: ""
test: false
priority: -2
noHooks: false
timeout: 300
maxHistory: 4
# additional helm flags for this release
helmFlags:
- "--devel"
argo:
namespace: "staging" # maps to the namespace as defined in namespaces above
enabled: true # change to false if you want to delete this app release empty: false:
chart: "argo/argo" # changing the chart name means delete and recreate this chart
version: "0.8.5" # chart version
### Optional values below
valuesFile: "" # leaving it empty uses the default chart values
test: false
protected: true
priority: -3
wait: true
hooks:
successCondition: "Complete"
successTimeout: "90s"
deleteOnSuccess: true
preInstall: "job.yaml"
# preInstall: "https://github.com/jetstack/cert-manager/releases/download/v0.14.0/cert-manager.crds.yaml"
# postInstall: "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.14/deploy/manifests/00-crds.yaml"
# postInstall: "job.yaml"
# preUpgrade: "job.yaml"
# postUpgrade: "job.yaml"
# preDelete: "job.yaml"
# postDelete: "job.yaml"
set:
"images.tag": $$TAG # $$ is escaped and $TAG is passed literally to images.tag (no env variable expansion)

artifactory:
namespace: "production" # maps to the namespace as defined in namespaces above
enabled: true # change to false if you want to delete this app release empty: false:
chart: "jfrog/artifactory" # changing the chart name means delete and recreate this chart
version: "8.3.2" # chart version
### Optional values below
valuesFile: ""
test: false
priority: -2
noHooks: false
timeout: 300
maxHistory: 4
# additional helm flags for this release
helmFlags:
- "--devel"
# See https://github.com/Praqma/helmsman/blob/master/docs/desired_state_specification.md#apps for more apps options
7 changes: 3 additions & 4 deletions examples/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ spec:
template:
spec:
containers:
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
- name: pi
image: perl
command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
restartPolicy: Never
backoffLimit: 4

4 changes: 2 additions & 2 deletions examples/minimal-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[helmRepos]
jenkins = "https://charts.jenkins.io"
center = "https://repo.chartcenter.io"
jfrog = "https://charts.jfrog.io"

[namespaces]
[namespaces.staging]
Expand All @@ -19,5 +19,5 @@
[apps.artifactory]
namespace = "staging"
enabled = true
chart = "center/jfrog/artifactory"
chart = "jfrog/artifactory"
version = "11.4.2"
4 changes: 2 additions & 2 deletions examples/minimal-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## For the full config spec and options, check https://github.com/Praqma/helmsman/blob/master/docs/desired_state_specification.md
helmRepos:
jenkins: https://charts.jenkins.io
center: https://repo.chartcenter.io
jfrog: https://charts.jfrog.io

namespaces:
staging:
Expand All @@ -18,5 +18,5 @@ apps:
artifactory:
namespace: staging
enabled: true
chart: center/jfrog/artifactory
chart: jfrog/artifactory
version: 11.4.2
8 changes: 3 additions & 5 deletions internal/app/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,10 @@ func (c *cli) readState(s *state) error {
var fileState state
for _, f := range c.files {

result, msg := fileState.fromFile(f)
if result {
log.Info(msg)
} else {
return fmt.Errorf(msg)
if err := fileState.fromFile(f); err != nil {
return err
}
log.Infof("Parsed [[ %s ]] successfully and found [ %d ] apps", f, len(fileState.Apps))
// Merge Apps that already existed in the state
for appName, app := range fileState.Apps {
if _, ok := s.Apps[appName]; ok {
Expand Down
Loading

0 comments on commit 60282a7

Please sign in to comment.