Gate: place role default vars within the role
This PS places the role default vars within the appropriate role, in addition it exposes kubeadm's selfhosted param and deploys the kubeadm binary to master nodes. This PS exposes the selfhosted param, and deploys kubeadm to master nodes. Change-Id: I5ad1b593a711ffe353b012394d54044dede0691d
This commit is contained in:
parent
12965b1615
commit
be3f300623
@ -12,53 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version:
|
||||
kubernetes: v1.10.2
|
||||
helm: v2.8.2
|
||||
cni: v0.6.0
|
||||
|
||||
proxy:
|
||||
http: null
|
||||
https: null
|
||||
noproxy: null
|
||||
|
||||
images:
|
||||
kubernetes:
|
||||
kubeadm_aio: openstackhelm/kubeadm-aio:dev
|
||||
|
||||
|
||||
kubernetes:
|
||||
network:
|
||||
default_device: null
|
||||
cluster:
|
||||
cni: calico
|
||||
pod_subnet: 192.168.0.0/16
|
||||
domain: cluster.local
|
||||
|
||||
nodes:
|
||||
labels:
|
||||
primary:
|
||||
- name: openstack-helm-node-class
|
||||
value: primary
|
||||
nodes:
|
||||
- name: openstack-helm-node-class
|
||||
value: general
|
||||
all:
|
||||
- name: openstack-control-plane
|
||||
value: enabled
|
||||
- name: openstack-compute-node
|
||||
value: enabled
|
||||
- name: openvswitch
|
||||
value: enabled
|
||||
- name: linuxbridge
|
||||
value: enabled
|
||||
- name: ceph-mon
|
||||
value: enabled
|
||||
- name: ceph-osd
|
||||
value: enabled
|
||||
- name: ceph-mds
|
||||
value: enabled
|
||||
- name: ceph-rgw
|
||||
value: enabled
|
||||
- name: ceph-mgr
|
||||
value: enabled
|
||||
null: null
|
||||
|
16
roles/build-helm-packages/defaults/main.yml
Normal file
16
roles/build-helm-packages/defaults/main.yml
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version:
|
||||
helm: v2.8.2
|
27
roles/build-images/defaults/main.yml
Normal file
27
roles/build-images/defaults/main.yml
Normal file
@ -0,0 +1,27 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
version:
|
||||
kubernetes: v1.10.2
|
||||
helm: v2.8.2
|
||||
cni: v0.6.0
|
||||
|
||||
proxy:
|
||||
http: null
|
||||
https: null
|
||||
noproxy: null
|
||||
|
||||
images:
|
||||
kubernetes:
|
||||
kubeadm_aio: openstackhelm/kubeadm-aio:dev
|
18
roles/deploy-docker/defaults/main.yml
Normal file
18
roles/deploy-docker/defaults/main.yml
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
proxy:
|
||||
http: null
|
||||
https: null
|
||||
noproxy: null
|
51
roles/deploy-kubeadm-aio-common/defaults/main.yml
Normal file
51
roles/deploy-kubeadm-aio-common/defaults/main.yml
Normal file
@ -0,0 +1,51 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kubernetes_cluster_cni: calico
|
||||
kubernetes_cluster_pod_subnet: 192.168.0.0/16
|
||||
kubernetes_cluster_domain: cluster.local
|
||||
kubernetes_network_default_device: null
|
||||
kubernetes_selfhosted: false
|
||||
|
||||
images:
|
||||
kubernetes:
|
||||
kubeadm_aio: openstackhelm/kubeadm-aio:dev
|
||||
|
||||
nodes:
|
||||
labels:
|
||||
primary:
|
||||
- name: openstack-helm-node-class
|
||||
value: primary
|
||||
nodes:
|
||||
- name: openstack-helm-node-class
|
||||
value: general
|
||||
all:
|
||||
- name: openstack-control-plane
|
||||
value: enabled
|
||||
- name: openstack-compute-node
|
||||
value: enabled
|
||||
- name: openvswitch
|
||||
value: enabled
|
||||
- name: linuxbridge
|
||||
value: enabled
|
||||
- name: ceph-mon
|
||||
value: enabled
|
||||
- name: ceph-osd
|
||||
value: enabled
|
||||
- name: ceph-mds
|
||||
value: enabled
|
||||
- name: ceph-rgw
|
||||
value: enabled
|
||||
- name: ceph-mgr
|
||||
value: enabled
|
@ -40,12 +40,12 @@
|
||||
USER_UID="{{ playbook_user_id }}"
|
||||
USER_GID="{{ playbook_group_id }}"
|
||||
USER_HOME="{{ playbook_user_dir }}"
|
||||
CNI_ENABLED="{{ kubernetes.cluster.cni }}"
|
||||
CNI_ENABLED="{{ kubernetes_cluster_cni }}"
|
||||
PVC_SUPPORT_CEPH=true
|
||||
PVC_SUPPORT_NFS=true
|
||||
NET_SUPPORT_LINUXBRIDGE=true
|
||||
KUBE_NET_POD_SUBNET="{{ kubernetes.cluster.pod_subnet }}"
|
||||
KUBE_NET_DNS_DOMAIN="{{ kubernetes.cluster.domain }}"
|
||||
KUBE_NET_POD_SUBNET="{{ kubernetes_cluster_pod_subnet }}"
|
||||
KUBE_NET_DNS_DOMAIN="{{ kubernetes_cluster_domain }}"
|
||||
CONTAINER_RUNTIME=docker
|
||||
register: kubeadm_master_deploy
|
||||
ignore_errors: True
|
||||
|
@ -21,9 +21,9 @@
|
||||
kubernetes_default_address: null
|
||||
|
||||
- name: if we have defined a custom interface for kubernetes use that
|
||||
when: kubernetes.network.default_device is defined and kubernetes.network.default_device
|
||||
when: kubernetes_network_default_device is defined and kubernetes_network_default_device
|
||||
set_fact:
|
||||
kubernetes_default_device: "{{ kubernetes.network.default_device }}"
|
||||
kubernetes_default_device: "{{ kubernetes_network_default_device }}"
|
||||
|
||||
- name: if we are in openstack infra use the private IP for kubernetes
|
||||
when: (nodepool is defined) and (nodepool.private_ipv4 is defined)
|
||||
|
@ -42,14 +42,15 @@
|
||||
USER_UID="{{ playbook_user_id }}"
|
||||
USER_GID="{{ playbook_group_id }}"
|
||||
USER_HOME="{{ playbook_user_dir }}"
|
||||
CNI_ENABLED="{{ kubernetes.cluster.cni }}"
|
||||
CNI_ENABLED="{{ kubernetes_cluster_cni }}"
|
||||
PVC_SUPPORT_CEPH=true
|
||||
PVC_SUPPORT_NFS=true
|
||||
NET_SUPPORT_LINUXBRIDGE=true
|
||||
KUBE_NET_POD_SUBNET="{{ kubernetes.cluster.pod_subnet }}"
|
||||
KUBE_NET_DNS_DOMAIN="{{ kubernetes.cluster.domain }}"
|
||||
KUBE_NET_POD_SUBNET="{{ kubernetes_cluster_pod_subnet }}"
|
||||
KUBE_NET_DNS_DOMAIN="{{ kubernetes_cluster_domain }}"
|
||||
CONTAINER_RUNTIME=docker
|
||||
KUBELET_NODE_LABELS="{{ kubeadm_kubelet_labels }}"
|
||||
KUBE_SELF_HOSTED="{{ kubernetes_selfhosted }}"
|
||||
register: kubeadm_master_deploy
|
||||
rescue:
|
||||
- name: "getting logs for {{ kubeadm_aio_action }} action"
|
||||
|
17
roles/deploy-kubeadm-aio-node/defaults/main.yml
Normal file
17
roles/deploy-kubeadm-aio-node/defaults/main.yml
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
images:
|
||||
kubernetes:
|
||||
kubeadm_aio: openstackhelm/kubeadm-aio:dev
|
18
roles/deploy-package/defaults/main.yml
Normal file
18
roles/deploy-package/defaults/main.yml
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
proxy:
|
||||
http: null
|
||||
https: null
|
||||
noproxy: null
|
18
roles/deploy-python-pip/defaults/main.yml
Normal file
18
roles/deploy-python-pip/defaults/main.yml
Normal file
@ -0,0 +1,18 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
proxy:
|
||||
http: null
|
||||
https: null
|
||||
noproxy: null
|
@ -12,10 +12,4 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
kubernetes:
|
||||
network:
|
||||
default_device: docker0
|
||||
cluster:
|
||||
cni: calico
|
||||
pod_subnet: 192.168.0.0/16
|
||||
domain: cluster.local
|
||||
kubernetes_network_default_device: docker0
|
||||
|
@ -215,15 +215,18 @@
|
||||
delegate_to: 127.0.0.1
|
||||
command: kubeadm alpha phase selfhosting convert-from-staticpods --kubeconfig /mnt/rootfs/etc/kubernetes/admin.conf --config /mnt/rootfs/etc/kubernetes/kubeadm-conf.yaml
|
||||
|
||||
- name: setting up kubectl client on host
|
||||
- name: setting up kubectl client and kubeadm on host
|
||||
block:
|
||||
- name: kubectl | copying kubectl binary to host
|
||||
copy:
|
||||
src: /usr/bin/kubectl
|
||||
dest: /usr/bin/kubectl
|
||||
src: "/usr/bin/{{ item }}"
|
||||
dest: "/usr/bin/{{ item }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0555
|
||||
with_items:
|
||||
- kubectl
|
||||
- kubeadm
|
||||
- name: kubectl | master | ensure kube config directory exists for user
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
Loading…
Reference in New Issue
Block a user