code review

pull/6151/head
Medya Gh 2020-01-07 13:59:41 -08:00
parent 07c0e32954
commit f80572bb4c
7 changed files with 26 additions and 48 deletions

View File

@ -103,8 +103,8 @@ var addonsConfigureCmd = &cobra.Command{
"aws-assume-role": awsRole,
},
map[string]string{
"app": "registry-creds",
"cloud": "ecr",
"app": "registry-creds",
"cloud": "ecr",
"kubernetes.io/minikube-addons": "registry-creds",
})
@ -118,11 +118,11 @@ var addonsConfigureCmd = &cobra.Command{
"registry-creds-gcr",
map[string]string{
"application_default_credentials.json": gcrApplicationDefaultCredentials,
"gcrurl": gcrURL,
"gcrurl": gcrURL,
},
map[string]string{
"app": "registry-creds",
"cloud": "gcr",
"app": "registry-creds",
"cloud": "gcr",
"kubernetes.io/minikube-addons": "registry-creds",
})
@ -140,8 +140,8 @@ var addonsConfigureCmd = &cobra.Command{
"DOCKER_PRIVATE_REGISTRY_PASSWORD": dockerPass,
},
map[string]string{
"app": "registry-creds",
"cloud": "dpr",
"app": "registry-creds",
"cloud": "dpr",
"kubernetes.io/minikube-addons": "registry-creds",
})

View File

@ -261,6 +261,5 @@ func (d *Driver) nodeID(nameOrID string) (string, error) {
// BaseImage returns the image used to spin up containers. in the future might pin down nodes per version
func BaseImage() (string, error) {
return "medyagh/kicbase:v0.0.1-snapshot", nil
// return "medyagh/kicbase:v0.0.1-snapshot@sha256:fdd103eae33f92673fb13da81104b67576b43ab2affc7855deda596878215a61", nil
return "medyagh/kicbase:v0.0.1-snapshot@sha256:fdd103eae33f92673fb13da81104b67576b43ab2affc7855deda596878215a61", nil
}

View File

@ -115,6 +115,7 @@ func (k *Bootstrapper) UpdateCluster(cfg config.MachineConfig) error {
files := bsutil.ConfigFileAssets(cfg.KubernetesConfig, kubeadmCfg, kubeletCfg, kubeletService, cniFile)
// TODO: add addons for kic later
// if err := bsutil.AddAddons(&files, assets.GenerateTemplateData(cfg.KubernetesConfig)); err != nil {
// return errors.Wrap(err, "adding addons")
// }
@ -209,25 +210,8 @@ func (k *Bootstrapper) StartCluster(k8s config.KubernetesConfig) error {
return errors.Wrap(err, "applying kic overlay network")
}
// glog.Infof("removing master taint")
// if err := k.removeMasterTaint(); err != nil {
// return errors.Wrap(err, "remove master taint")
// }
glog.Infof("Skipping Configuring cluster permissions for kic...")
// elevate := func() error {
// client, err := k.client(k8s)
// if err != nil {
// return err
// }
// return bsutil.ElevateKubeSystemPrivileges(client)
// }
// if err := retry.Expo(elevate, time.Millisecond*500, 120*time.Second); err != nil {
// return errors.Wrap(err, "timed out waiting to elevate kube-system RBAC privileges")
// }
if err := k.adjustResourceLimits(); err != nil {
glog.Warningf("unable to adjust resource limits: %v", err)
}

View File

@ -49,10 +49,10 @@ var configTestCases = []configTestCase{
"vm-driver": "test-driver"
}`,
config: map[string]interface{}{
"vm-driver": "test-driver",
"cpus": 4,
"disk-size": "20g",
"v": 5,
"vm-driver": "test-driver",
"cpus": 4,
"disk-size": "20g",
"v": 5,
"show-libmachine-logs": true,
"log_dir": "/etc/hosts",
"ReminderWaitPeriodInHours": 99,

View File

@ -64,13 +64,8 @@ type MachineConfig struct {
KubernetesConfig KubernetesConfig
HostOnlyNicType string // Only used by virtualbox
NatNicType string // Only used by virtualbox
<<<<<<< HEAD
Addons map[string]bool
NodeBindPort int32 // Only used by kic
||||||| constructed merge base
NodeBindPort int32 // Only used by kic
=======
>>>>>>> add flag for kic host binding port
}
// KubernetesConfig contains the parameters used to configure the VM Kubernetes.

View File

@ -364,30 +364,30 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
expectedIsHTTPSchemedURL bool
}{
{
description: "no https for http schemed with no https option",
bareURLString: "http://192.168.99.100:30563",
https: false,
description: "no https for http schemed with no https option",
bareURLString: "http://192.168.99.100:30563",
https: false,
expectedHTTPSFormattedURLString: "http://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true,
},
{
description: "no https for non-http schemed with no https option",
bareURLString: "xyz.http.myservice:30563",
https: false,
description: "no https for non-http schemed with no https option",
bareURLString: "xyz.http.myservice:30563",
https: false,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false,
},
{
description: "https for http schemed with https option",
bareURLString: "http://192.168.99.100:30563",
https: true,
description: "https for http schemed with https option",
bareURLString: "http://192.168.99.100:30563",
https: true,
expectedHTTPSFormattedURLString: "https://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true,
},
{
description: "no https for non-http schemed with https option and http substring",
bareURLString: "xyz.http.myservice:30563",
https: true,
description: "no https for non-http schemed with https option and http substring",
bareURLString: "xyz.http.myservice:30563",
https: true,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false,
},

View File

@ -53,7 +53,7 @@ func GenerateCACert(certPath, keyPath string, name string) error {
KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true,
IsCA: true,
IsCA: true,
}
return writeCertsAndKeys(&template, certPath, priv, keyPath, &template, priv)