Skip to content

Commit

Permalink
Mexregsecret aks fix (#27)
Browse files Browse the repository at this point in the history
* fix mexregsecret for aks/gcp.  Also add Fairview to vault and change hawkins key

* add fairview openrc

* fix return for error if secret create fails
  • Loading branch information
jlmorris3827 authored Jan 17, 2019
1 parent 6ee1fcb commit 9ac0330
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mexos/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ func azureCreateAKS(mf *Manifest) error {
return fmt.Errorf("can't copy %s, %v", defaultKubeconfig(), err)
}
log.DebugLog(log.DebugLevelMexos, "created aks", "name", mf.Spec.Key)
return nil
return CreateDockerRegistrySecret(mf)
}
5 changes: 2 additions & 3 deletions mexos/gcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func gcloudCreateGKE(mf *Manifest) error {
if err = copyFile(defaultKubeconfig(), kconf); err != nil {
return fmt.Errorf("can't copy %s, %v", defaultKubeconfig(), err)
}
log.DebugLog(log.
DebugLevelMexos, "created gke", "name", mf.Spec.Key)
return nil
log.DebugLog(log.DebugLevelMexos, "created gke", "name", mf.Spec.Key)
return CreateDockerRegistrySecret(mf)
}
5 changes: 3 additions & 2 deletions mexos/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ func CreateDockerRegistrySecret(mf *Manifest) error {

var out string
log.DebugLog(log.DebugLevelMexos, "CreateDockerRegistrySecret", "mf", mf)
if IsLocalDIND(mf) {
log.DebugLog(log.DebugLevelMexos, "CreateDockerRegistrySecret locally for DIND")

if IsLocalDIND(mf) || mf.Metadata.Operator == "gcp" || mf.Metadata.Operator == "azure" {
log.DebugLog(log.DebugLevelMexos, "CreateDockerRegistrySecret locally non OpenStack case")
var o []byte
o, err = sh.Command("kubectl", "create", "secret", "docker-registry", "mexregistrysecret", "--docker-server="+mf.Values.Registry.Docker, "--docker-username=mobiledgex", "--docker-password="+mexEnv(mf, "MEX_DOCKER_REG_PASS"), "[email protected]").CombinedOutput()
out = string(o)
Expand Down

0 comments on commit 9ac0330

Please sign in to comment.