Skip to content

Commit

Permalink
fixed the bad branch merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinHartwell committed Jun 1, 2018
1 parent 7322f7f commit 28b5587
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
7 changes: 1 addition & 6 deletions cluster/juju/layers/kubernetes-master/config.yaml
Expand Up @@ -23,7 +23,7 @@ options:
description: CIDR to user for Kubernetes services. Cannot be changed after deployment.
allow-privileged:
type: string
default: "true"
default: "auto"
description: |
Allow kube-apiserver to run in privileged mode. Supported values are
"true", "false", and "auto". If "true", kube-apiserver will run in
Expand Down Expand Up @@ -82,11 +82,6 @@ options:
description: |
Comma separated authorization modes. Allowed values are
"RBAC", "Node", "Webhook", "ABAC", "AlwaysDeny" and "AlwaysAllow".
cluster-context:
type: string
default: ""
description: |
When specified, the juju model name will be overridden in the kube config.
require-manual-upgrade:
type: boolean
default: true
Expand Down
Expand Up @@ -1000,16 +1000,10 @@ def build_kubeconfig(server):
if ca_exists and client_pass:
# Create an absolute path for the kubeconfig file.
kubeconfig_path = os.path.join(os.sep, 'home', 'ubuntu', 'config')
# set context_name based on combination of modelname and userinput
context_name = hookenv.config('cluster-context')
if not context_name:
context_name = 'cdk-'+os.environ['JUJU_MODEL_NAME']
else:
context_name = 'cdk-'+context_name
# Create the kubeconfig on this system so users can access the cluster.
create_kubeconfig(kubeconfig_path, server, ca, user=context_name+'-admin',
context=context_name+'-context',
cluster=context_name,password=client_pass)

create_kubeconfig(kubeconfig_path, server, ca,
user='admin', password=client_pass)
# Make the config file readable by the ubuntu users so juju scp works.
cmd = ['chown', 'ubuntu:ubuntu', kubeconfig_path]
check_call(cmd)
Expand Down Expand Up @@ -1597,4 +1591,4 @@ def _write_gcp_snap_config(component):
if gcp_creds_env_key not in daemon_env:
daemon_env += '{}={}\n'.format(gcp_creds_env_key, creds_path)
daemon_env_path.parent.mkdir(parents=True, exist_ok=True)
daemon_env_path.write_text(daemon_env)
daemon_env_path.write_text(daemon_env)

0 comments on commit 28b5587

Please sign in to comment.