mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 23:03:40 +00:00
fixed branch and changed values to true
This commit is contained in:
parent
ccb4acda6a
commit
7322f7f137
@ -23,14 +23,14 @@ options:
|
|||||||
description: CIDR to user for Kubernetes services. Cannot be changed after deployment.
|
description: CIDR to user for Kubernetes services. Cannot be changed after deployment.
|
||||||
allow-privileged:
|
allow-privileged:
|
||||||
type: string
|
type: string
|
||||||
default: "auto"
|
default: "true"
|
||||||
description: |
|
description: |
|
||||||
Allow kube-apiserver to run in privileged mode. Supported values are
|
Allow kube-apiserver to run in privileged mode. Supported values are
|
||||||
"true", "false", and "auto". If "true", kube-apiserver will run in
|
"true", "false", and "auto". If "true", kube-apiserver will run in
|
||||||
privileged mode by default. If "false", kube-apiserver will never run in
|
privileged mode by default. If "false", kube-apiserver will never run in
|
||||||
privileged mode. If "auto", kube-apiserver will not run in privileged
|
privileged mode. If "auto", kube-apiserver will not run in privileged
|
||||||
mode by default, but will switch to privileged mode if gpu hardware is
|
mode by default, but will switch to privileged mode if gpu hardware is
|
||||||
detected on a worker node.
|
detected on a worker node.
|
||||||
enable-nvidia-plugin:
|
enable-nvidia-plugin:
|
||||||
type: string
|
type: string
|
||||||
default: "auto"
|
default: "auto"
|
||||||
@ -82,6 +82,11 @@ options:
|
|||||||
description: |
|
description: |
|
||||||
Comma separated authorization modes. Allowed values are
|
Comma separated authorization modes. Allowed values are
|
||||||
"RBAC", "Node", "Webhook", "ABAC", "AlwaysDeny" and "AlwaysAllow".
|
"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:
|
require-manual-upgrade:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
@ -1000,10 +1000,16 @@ def build_kubeconfig(server):
|
|||||||
if ca_exists and client_pass:
|
if ca_exists and client_pass:
|
||||||
# Create an absolute path for the kubeconfig file.
|
# Create an absolute path for the kubeconfig file.
|
||||||
kubeconfig_path = os.path.join(os.sep, 'home', 'ubuntu', 'config')
|
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 the kubeconfig on this system so users can access the cluster.
|
||||||
|
create_kubeconfig(kubeconfig_path, server, ca, user=context_name+'-admin',
|
||||||
create_kubeconfig(kubeconfig_path, server, ca,
|
context=context_name+'-context',
|
||||||
user='admin', password=client_pass)
|
cluster=context_name,password=client_pass)
|
||||||
# Make the config file readable by the ubuntu users so juju scp works.
|
# Make the config file readable by the ubuntu users so juju scp works.
|
||||||
cmd = ['chown', 'ubuntu:ubuntu', kubeconfig_path]
|
cmd = ['chown', 'ubuntu:ubuntu', kubeconfig_path]
|
||||||
check_call(cmd)
|
check_call(cmd)
|
||||||
|
@ -13,13 +13,14 @@ options:
|
|||||||
cluster. Declare node labels in key=value format, separated by spaces.
|
cluster. Declare node labels in key=value format, separated by spaces.
|
||||||
allow-privileged:
|
allow-privileged:
|
||||||
type: string
|
type: string
|
||||||
default: true
|
default: "true"
|
||||||
description: |
|
description: |
|
||||||
Allow privileged containers to run on worker nodes. Supported values are
|
Allow privileged containers to run on worker nodes. Supported values are
|
||||||
"true", "false", and "auto". If "true", kubelet will run in privileged
|
"true", "false", and "auto". If "true", kubelet will run in privileged
|
||||||
mode by default. If "false", kubelet will never run in privileged mode.
|
mode by default. If "false", kubelet will never run in privileged mode.
|
||||||
If "auto", kubelet will not run in privileged mode by default, but will
|
If "auto", kubelet will not run in privileged mode by default, but will
|
||||||
switch to privileged mode if gpu hardware is detected.
|
switch to privileged mode if gpu hardware is detected. Pod security
|
||||||
|
policies (PSP) should be used to restrict container privileges.
|
||||||
channel:
|
channel:
|
||||||
type: string
|
type: string
|
||||||
default: "1.10/stable"
|
default: "1.10/stable"
|
||||||
|
Loading…
Reference in New Issue
Block a user