Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into k8s-update
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Mar 18, 2019
2 parents ed34606 + d2c36aa commit 5506549
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
template:
metadata:
labels:
chart: consul-3.5.3
chart: consul-3.6.0
component: ship-consul
heritage: Tiller
release: ship
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
template:
metadata:
labels:
chart: consul-3.5.3
chart: consul-3.6.0
component: ship-consul
heritage: Tiller
release: ship
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: consul
home: https://github.com/hashicorp/consul
version: 3.5.3
version: 3.6.0
appVersion: 1.0.0
description: Highly available and distributed service discovery and key-value store
designed with support for the modern data center to make distributed systems and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
{{- range .Values.ConsulConfig }}
-config-dir /etc/consul/userconfig/{{ .name }} \
{{- end}}
{{- if .Values.uiService.enabled }}
{{- if .Values.ui.enabled }}
-ui \
{{- end }}
{{- if .Values.DisableHostNodeId }}
Expand Down
6 changes: 5 additions & 1 deletion pkg/lifecycle/render/docker/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@ func (p *DefaultStep) Execute(

// first try with registry secret
// TODO remove this once registry is updated to read installation ID
userName := meta.CustomerID
if userName == "" {
userName = meta.LicenseID
}
registrySecretSaveOpts := images.SaveOpts{
PullURL: pullURL,
SaveURL: asset.Image,
IsPrivate: asset.Source != "public" && asset.Source != "",
Username: meta.CustomerID,
Username: userName,
Password: meta.RegistrySecret,
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/specs/replicatedapp/graphql.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (c *GraphQLClient) GetRelease(selector *Selector) (*ShipRelease, error) {
}

ci := callInfo{
username: selector.CustomerID,
username: selector.GetBasicAuthUsername(),
password: selector.InstallationID,
request: requestObj,
upstream: selector.Upstream,
Expand Down Expand Up @@ -278,6 +278,8 @@ func (c *GraphQLClient) GetSlugRelease(selector *Selector) (*ShipRelease, error)
}

ci := callInfo{
username: selector.GetBasicAuthUsername(),
password: selector.InstallationID,
request: requestObj,
upstream: selector.Upstream,
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/specs/replicatedapp/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (r *resolver) RegisterInstall(ctx context.Context, selector Selector, relea

debug.Log("phase", "register", "with", "gql", "addr", r.Client.GQLServer.String())

err := r.Client.RegisterInstall(selector.CustomerID, "", release.Metadata.ChannelID, release.Metadata.ReleaseID)
err := r.Client.RegisterInstall(selector.GetBasicAuthUsername(), "", release.Metadata.ChannelID, release.Metadata.ReleaseID)
if err != nil {
return err
}
Expand Down
7 changes: 7 additions & 0 deletions pkg/specs/replicatedapp/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ func (s *Selector) UnmarshalFrom(url *url.URL) *Selector {
}
return s
}

func (s *Selector) GetBasicAuthUsername() string {
if s.CustomerID != "" {
return s.CustomerID
}
return s.LicenseID
}

0 comments on commit 5506549

Please sign in to comment.