Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update kubernetes.core ansible collection to 3.2.0 (rackerlabs#334)
The kubernetes.core ansible collection needs to updated to 3.2.0 to utilize the enable_helm attribute of the kubernetes.core.kustomize.lookup which was added in 3.1.0 See: - https://github.com/ansible-collections/kubernetes.core/blob/main/CHANGELOG.rst#v3-1-0 - ansible-collections/kubernetes.core#568 Ansible task example: - name: Deply mariadb operator kubernetes.core.k8s: definition: "{{ lookup('kubernetes.core.kustomize', binary_path='/usr/local/bin/kubectl', dir='/opt/genestack/kustomize/mariadb-operator', enable_helm=True) }}" namespace: mariadb-system apply: true server_side_apply: field_manager: ansible force_conflicts: true state: present When the play is run with kubernetes .core 3.0.0 ``` (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ansible-galaxy collection list| grep kub kubernetes.core 3.0.0 kubernetes.core 2.4.0 (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ export SSH_AUTH_SOCK=/tmp/ssh-XXXXEaumni/agent.109689 (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ansible-playbook ~/genestack_post_deploy.yaml --tag mariadb [WARNING]: * Failed to parse /etc/genestack/inventory/inventory.yaml.example with ini plugin: Invalid host pattern 'all:' supplied, ending in ':' is not allowed, this character is reserved to provide a port. [WARNING]: Unable to parse /etc/genestack/inventory/inventory.yaml.example as an inventory source [WARNING]: Skipping 'apiVersion' as this is not a valid group definition [WARNING]: Skipping 'kind' as this is not a valid group definition [WARNING]: Skipping key (name) in group (metadata) as it is not a mapping, it is a <class 'ansible.parsing.yaml.objects.AnsibleUnicode'> [WARNING]: Skipping unexpected key (annotations) in group (metadata), only "vars", "children" and "hosts" are valid PLAY [Label stoage nodes] ****************************************************************************************************************************************************** PLAY [Label control plane nodes] *********************************************************************************************************************************************** PLAY [Label nova compute nodes] ************************************************************************************************************************************************ PLAY [Label openstack network nodes] ******************************************************************************************************************************************* [WARNING]: Could not match supplied host pattern, ignoring: openstack_worker_nodes PLAY [Label worker nodes] ****************************************************************************************************************************************************** PLAY [Remove taint from controllers] ******************************************************************************************************************************************* PLAY [Deploy k8s dashboard] **************************************************************************************************************************************************** PLAY [Deploy prometheus] ******************************************************************************************************************************************************* PLAY [Make helm charts] ******************************************************************************************************************************************************** PLAY [Ceph internal] *********************************************************************************************************************************************************** PLAY [OpenStack namespace] ***************************************************************************************************************************************************** PLAY [MariaDB] ***************************************************************************************************************************************************************** TASK [Gathering Facts] ********************************************************************************************************************************************************* ok: [localhost] TASK [Get secret if exists] **************************************************************************************************************************************************** ok: [localhost] TASK [Create secret if it does not exist] ************************************************************************************************************************************** skipping: [localhost] TASK [Set cluster name in kustomize file] ************************************************************************************************************************************** ok: [localhost] TASK [Deply mariadb operator] ************************************************************************************************************************************************** fatal: [localhost]: FAILED! => {"msg": "kustomize command failed with: error: trouble configuring builtin HelmChartInflationGenerator with config: `\nincludeCRDs: true\nname: m ariadb-operator\nnamespace: mariadb-system\nreleaseName: mariadb-operator\nrepo: https://mariadb-operator.github.io/mariadb-operator\nvaluesInline:\n affinity:\n nodeAffini ty:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: node-role.kubernetes.io/worker\n operator: In\n values:\n - worker\n clusterName: cluster.local\n metrics:\n enabled: true\n webhook:\n affinity:\n nodeAffinity:\n requiredDuringSchedulingIgnoredDuringExecution:\n nodeSelectorTerms:\n - matchExpressions:\n - key: node-role.kubernetes.io/worker\n o perator: In\n values:\n - worker\n cert:\n certManager:\n enabled: true\nversion: 0.28.1\n`: must specify --enable-helm\n"} PLAY RECAP ********************************************************************************************************************************************************************* localhost : ok=3 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0 (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ``` When the play is run with kubernetes.core 3.2.0 ``` (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ansible-galaxy collection list| grep kub kubernetes.core 3.2.0 kubernetes.core 2.4.0 (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ansible-playbook ~/genestack_post_deploy.yaml --tag mariadb [WARNING]: * Failed to parse /etc/genestack/inventory/inventory.yaml.example with ini plugin: Invalid host pattern 'all:' supplied, ending in ':' is not allowed, this character is reserved to provide a port. [WARNING]: Unable to parse /etc/genestack/inventory/inventory.yaml.example as an inventory source [WARNING]: Skipping 'apiVersion' as this is not a valid group definition [WARNING]: Skipping 'kind' as this is not a valid group definition [WARNING]: Skipping key (name) in group (metadata) as it is not a mapping, it is a <class 'ansible.parsing.yaml.objects.AnsibleUnicode'> [WARNING]: Skipping unexpected key (annotations) in group (metadata), only "vars", "children" and "hosts" are valid PLAY [Label stoage nodes] ****************************************************************************************************************************************************** PLAY [Label control plane nodes] *********************************************************************************************************************************************** PLAY [Label nova compute nodes] ************************************************************************************************************************************************ PLAY [Label openstack network nodes] ******************************************************************************************************************************************* [WARNING]: Could not match supplied host pattern, ignoring: openstack_worker_nodes PLAY [Label worker nodes] ****************************************************************************************************************************************************** PLAY [Remove taint from controllers] ******************************************************************************************************************************************* PLAY [Deploy k8s dashboard] **************************************************************************************************************************************************** PLAY [Deploy prometheus] ******************************************************************************************************************************************************* PLAY [Make helm charts] ******************************************************************************************************************************************************** PLAY [Ceph internal] *********************************************************************************************************************************************************** PLAY [OpenStack namespace] ***************************************************************************************************************************************************** PLAY [MariaDB] ***************************************************************************************************************************************************************** TASK [Gathering Facts] ********************************************************************************************************************************************************* ok: [localhost] TASK [Get secret if exists] **************************************************************************************************************************************************** ok: [localhost] TASK [Create secret if it does not exist] ************************************************************************************************************************************** skipping: [localhost] TASK [Set cluster name in kustomize file] ************************************************************************************************************************************** ok: [localhost] TASK [Deply mariadb operator] ************************************************************************************************************************************************** changed: [localhost] TASK [Wait for mariadb operator webhook pod conditions] ************************************************************************************************************************ ok: [localhost] => (item=Ready) ok: [localhost] => (item=ContainersReady) PLAY RECAP ********************************************************************************************************************************************************************* localhost : ok=5 changed=1 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0 (genestack) ubuntu@openstack-flex-launcher-cluster-local:/opt/genestack$ ``` And the playbook completes without error. Signed-off-by: Chris Blumentritt <[email protected]>
- Loading branch information