airshipctl/roles/airshipctl-cluster-init-ephemeral/tasks/main.yaml
Dmitry Ukov a301de202b Add CAPI initialization steps to gating
This change enables execute 'airshipctl cluster init' command
as a part of zuul pipeline

Co-Authored-By: Kostyantyn Kalynovskyi <kkalynovskyi@mirantis.com>
Change-Id: I9d499ae66f8d847759c2e61e5d4415f2c9f3c860
2020-05-20 15:17:20 +04:00

56 lines
2.2 KiB
YAML

# 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.
- name: initialize CAPI components
command: >-
airshipctl --debug cluster init
- name: verify CAPI deployments are created
command: >-
timeout 20 kubectl \
--kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \
get deploy -n {{ item.namespace }} {{ item.name }}
register: deploy_status
until: item.name in deploy_status.stdout
with_items:
- namespace: capi-kubeadm-bootstrap-system
name: capi-kubeadm-bootstrap-controller-manager
- namespace: capi-kubeadm-control-plane-system
name: capi-kubeadm-control-plane-controller-manager
- namespace: capi-system
name: capi-controller-manager
- namespace: capi-webhook-system
name: capi-controller-manager
- namespace: capi-webhook-system
name: capi-kubeadm-bootstrap-controller-manager
- namespace: capi-webhook-system
name: capi-kubeadm-control-plane-controller-manager
- namespace: capi-webhook-system
name: capm3-controller-manager
- namespace: capm3-system
name: capm3-controller-manager
- namespace: cert-manager
name: cert-manager
- namespace: cert-manager
name: cert-manager-cainjector
- namespace: cert-manager
name: cert-manager-webhook
retries: 50
delay: 20
# TODO: As soon as issue #127 is complete, this check for deployments
# should be removed and initinfra command should check for resource status.
- name: verify all deployments are up
command: >-
kubectl --kubeconfig {{ airshipctl_config_dir_default | default(ansible_env.HOME) }}/.airship/kubeconfig \
wait --for=condition=available deploy --all --timeout=1000s -A