Skip to content

Commit

Permalink
fix: broken tls in jx preview
Browse files Browse the repository at this point in the history
fixes #2196

- the `omitempty` json tag was missing from the ExposeControllerConfig struct, which resulted in empty values being present in the extraValues.yaml file - thus overriding valid values from the values.yaml file
- the cmdline flags passed through `jx preview` for the ExposeControllerConfig struct were not used to generate the extraValues.yaml file
  • Loading branch information
vbehar committed Nov 7, 2018
1 parent bf89951 commit c0d28cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/config/helm_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

type ExposeControllerConfig struct {
Domain string `yaml:"domain,omitempty"`
Exposer string `yaml:"exposer"`
HTTP string `yaml:"http"`
TLSAcme string `yaml:"tlsacme"`
PathMode string `yaml:"pathMode"`
Exposer string `yaml:"exposer,omitempty"`
HTTP string `yaml:"http,omitempty"`
TLSAcme string `yaml:"tlsacme,omitempty"`
PathMode string `yaml:"pathMode,omitempty"`
}
type ExposeController struct {
Config ExposeControllerConfig `yaml:"config,omitempty"`
Expand Down
10 changes: 5 additions & 5 deletions pkg/jx/cmd/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ func (o *PreviewOptions) Run() error {
return err
}

if o.HelmValuesConfig.ExposeController == nil {
o.HelmValuesConfig.ExposeController = &config.ExposeController{}
}
o.HelmValuesConfig.ExposeController.Config.Domain = domain
values := config.PreviewValuesConfig{
ExposeController: &config.ExposeController{
Config: config.ExposeControllerConfig{
Domain: domain,
},
},
ExposeController: o.HelmValuesConfig.ExposeController,
Preview: &config.Preview{
Image: &config.Image{
Repository: repository,
Expand Down

0 comments on commit c0d28cc

Please sign in to comment.