Skip to content

Commit

Permalink
Forward Profile if its set
Browse files Browse the repository at this point in the history
  • Loading branch information
deedubs committed Sep 22, 2018
1 parent ef6c5d4 commit e7cdb7b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ type CertificatePaths struct {
type CertificateDetails struct {
Group string `yaml:"group,omitempty"`
CommonName string `yaml:"commonName,omitempty"`
Profile string `yaml:"profile,omitempty"`
Hosts []string `yaml:"hosts,omitempty"`
Type string `yaml:"type,omitempty"`
Region string `yaml:"region,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/massiveco/headstart

require (
github.com/massiveco/serverlessl v0.1.1
github.com/massiveco/serverlessl v0.1.2
github.com/onsi/gomega v1.4.2 // indirect
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ github.com/massiveco/serverlessl v0.1.0 h1:nBYN52k66sgVRYqE43Zi6yVBFxSbxyN0zpD7s
github.com/massiveco/serverlessl v0.1.0/go.mod h1:QoPlVtn6KkF70+0cDzgZ78wqGGFMhaj2aW2bMjwjYMk=
github.com/massiveco/serverlessl v0.1.1 h1:Yb9s391G2g9HWfuK/cvXSQxH1oWPTxwkzGNhcJXI7Ds=
github.com/massiveco/serverlessl v0.1.1/go.mod h1:QoPlVtn6KkF70+0cDzgZ78wqGGFMhaj2aW2bMjwjYMk=
github.com/massiveco/serverlessl v0.1.2 h1:+Vod0dKjrTK1WZdd0Q/YvV2H380ltg56Yc5sfh/azjg=
github.com/massiveco/serverlessl v0.1.2/go.mod h1:QoPlVtn6KkF70+0cDzgZ78wqGGFMhaj2aW2bMjwjYMk=
github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
Expand Down
1 change: 1 addition & 0 deletions handlers/certificates/certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func Process(cfg config.Config) {
CommonName: certDetails.Details.CommonName,
Group: certDetails.Details.Group,
Hosts: certDetails.Details.Hosts,
Profile: certDetails.Details.Profile,
})
if err != nil {
fmt.Println("Unable to fetch certificate ", certDetails.Name)
Expand Down
14 changes: 7 additions & 7 deletions sample_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
# groups:
# admins:
# sudo: true

certificates:
- type: serverlessl
region: us-east-1
name: etcd-masters
region: us-east-2
name: default
details:
group: etcd
profile: server
commonName: system:etcd:{{.Hostname}}
hosts:
- "{{.Hostname}}"
- "etcd"
- "etcd.cluster.local"
paths:
cert: /home/deedubs/go/src/github.com/massiveco/headstart/certs/cert.pem
csr: /home/deedubs/go/src/github.com/massiveco/headstart/certs/csr.pem
key: /home/deedubs/go/src/github.com/massiveco/headstart/certs/key.pem
ca: /home/deedubs/go/src/github.com/massiveco/headstart/certs/ca.pem
cert: /home/deedubs/Workspaces/massiveco/headstart/certs/cert.pem
csr: /home/deedubs/Workspaces/massiveco/headstart/certs/csr.pem
key: /home/deedubs/Workspaces/massiveco/headstart/certs/key.pem
ca: /home/deedubs/Workspaces/massiveco/headstart/certs/ca.pem

# users:
# deedubs:
Expand Down

0 comments on commit e7cdb7b

Please sign in to comment.