sassoftware / viya4-iac-k8s

This project contains Terraform scripts to provision cloud infrastructure resources, when using vSphere or bare-metal, and Ansible to apply the needed elements of a Kubernetes cluster that are required to deploy SAS Viya platform product offerings.
Apache License 2.0
26 stars 14 forks source link

fix: (IAC-1247) OS Specific variables created without guardrails or OS validation #80

Closed thpang closed 9 months ago

thpang commented 1 year ago

Found this variable: kubernetes_cri_deb_rev located here and being used here.

The code should have an OS guard for Ubuntu and the variable used for revisions should be just tagged as such and not identified as deb anything.

Here is the mocked up task. The when statement is written so both must be true

- name: set containerd.io package debian revision if not specified
  set_fact:
    kubernetes_cri_deb_rev: "-*"
  when:
     - kubernetes_cri_version | regex_search("^(\d+\.)(\d+\.)(\d+)$")
     - ansible_distribution == "Ubuntu" and (ansible_distribution_version == "20.04" or ansible_distribution_version == "22.04")
  tags:
    - install
    - update
jarpat commented 10 months ago

Internal ticket created

jarpat commented 9 months ago

PR Merged to staging, this fix will be included in the next release.