Merge "Move topology-manager configuration to kubespray"
[multicloud/k8s.git] / kud / hosting_providers / containerized / inventory / group_vars / k8s-cluster.yml
1 # SPDX-license-identifier: Apache-2.0
2 ##############################################################################
3 # Copyright (c) 2018
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 # Kubernetes configuration dirs and system namespace.
11 # Those are where all the additional config stuff goes
12 # kubernetes normally puts in /srv/kubernetes.
13 # This puts them in a sane location and namespace.
14 # Editing those values will almost surely break something.
15 system_namespace: kube-system
16
17 # Logging directory (sysvinit systems)
18 kube_log_dir: "/var/log/kubernetes"
19
20 kube_api_anonymous_auth: true
21
22 # Users to create for basic auth in Kubernetes API via HTTP
23 # Optionally add groups for user
24 kube_api_pwd: "secret"
25 kube_users:
26   kube:
27     pass: "{{kube_api_pwd}}"
28     role: admin
29     groups:
30       - system:masters
31
32 ## It is possible to activate / deactivate selected authentication methods (basic auth, static token auth)
33 #kube_oidc_auth: false
34 kube_basic_auth: true
35 kube_token_auth: true
36
37 # Choose network plugin (calico, contiv, weave or flannel)
38 # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing
39 kube_network_plugin: flannel
40
41 # Make a copy of kubeconfig (admin.conf) on the host that runs Ansible to inventory/artifacts
42 kubeconfig_localhost: true
43 # Copy kubectl binary on the host that runs Ansible to inventory/artifacts
44 kubectl_localhost: true
45
46 # Enable MountPropagation gate feature
47 local_volumes_enabled: true
48 local_volume_provisioner_enabled: true
49
50 # Helm deployment
51 helm_enabled: true
52 helm_stable_repo_url: "https://charts.helm.sh/stable"
53
54 # Kube-proxy proxyMode configuration.
55 # NOTE: Ipvs is based on netfilter hook function, but uses hash table as the underlying data structure and
56 # works in the kernel space
57 # https://kubernetes.io/docs/concepts/services-networking/service/#proxy-mode-ipvs
58 #kube_proxy_mode: ipvs
59
60 # Download container images only once then push to cluster nodes in batches
61 download_run_once: false
62
63 # Where the binaries will be downloaded.
64 # Note: ensure that you've enough disk space (about 1G)
65 local_release_dir: "/tmp/releases"
66
67 # Makes the installer node a delegate for pushing images while running
68 # the deployment with ansible. This maybe the case if cluster nodes
69 # cannot access each over via ssh or you want to use local docker
70 # images as a cache for multiple clusters.
71 download_localhost: false
72
73 # Subnet for cluster IPs
74 kube_service_addresses: 10.244.0.0/18
75
76 # Subnet for Pod IPs
77 kube_pods_subnet: 10.244.64.0/18
78
79 # disable localdns cache
80 enable_nodelocaldns: false
81
82 # pod security policy (RBAC must be enabled either by having 'RBAC' in authorization_modes or kubeadm enabled)
83 podsecuritypolicy_enabled: true
84 # The restricted spec is identical to the kubespray podsecuritypolicy_privileged_spec, with the replacement of
85 #   allowedCapabilities:
86 #     - '*'
87 # by
88 #  allowedCapabilities:
89 #    - NET_ADMIN
90 #    - SYS_ADMIN
91 #    - SYS_NICE
92 #    - SYS_PTRACE
93 #   requiredDropCapabilities:
94 #    - NET_RAW
95 podsecuritypolicy_restricted_spec:
96   privileged: true
97   allowedCapabilities:
98     - NET_ADMIN
99     - SYS_ADMIN
100     - SYS_NICE
101     - SYS_PTRACE
102   allowPrivilegeEscalation: true
103   volumes:
104     - '*'
105   hostNetwork: true
106   hostPorts:
107     - min: 0
108       max: 65535
109   hostIPC: true
110   hostPID: true
111   requiredDropCapabilities:
112     - NET_RAW
113   runAsUser:
114     rule: 'RunAsAny'
115   seLinux:
116     rule: 'RunAsAny'
117   supplementalGroups:
118     rule: 'RunAsAny'
119   fsGroup:
120     rule: 'RunAsAny'
121   readOnlyRootFilesystem: false
122   # This will fail if allowed-unsafe-sysctls is not set accordingly in kubelet flags
123   allowedUnsafeSysctls:
124     - '*'
125
126 # Customize kubelet config of CPU and topology manager
127 kubelet_node_config_extra_args:
128   cpuManagerPolicy: "static" # Options: none (disabled), static (default)
129   topologyManagerPolicy: "best-effort" # Options: none (disabled), best-effort (default), restricted, single-numa-node