Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes version v1.2X is not supported by kubernetes-validate #768

Open
gr33npr opened this issue Jul 31, 2024 · 1 comment
Open

Kubernetes version v1.2X is not supported by kubernetes-validate #768

gr33npr opened this issue Jul 31, 2024 · 1 comment
Labels
needs_info Needs additional information from original reporter

Comments

@gr33npr
Copy link

gr33npr commented Jul 31, 2024

SUMMARY

we have OpenShift Server Version: 4.15.19 with Kubernetes Version v1.28.10+a2c84a5. Running an ansible task with validate-option, the following error appears:

Kubernetes version v1.28.10+a2c84a5 is not supported by kubernetes-validate"

Its possible to set the version manually. 1.27 works, but 1.28 and higher not.

kubernetes.core.k8s: validate: fail_on_error: true version: 1.27

ISSUE TYPE
  • Bug Report
COMPONENT NAME

Option/parameter "validate" of module kubernetes.core.k8s

ANSIBLE VERSION
ansible [core 2.14.14]
  config file = /home/gruens/.ansible.cfg
  configured module search path = ['/home/gruens/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/gruens/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.18 (main, May 16 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3.0.1)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection      Version
--------------- -------
kubernetes.core 5.0.0
CONFIGURATION
CONFIG_FILE() = /home/user/.ansible.cfg
DEFAULT_VAULT_PASSWORD_FILE(/home/user/.ansible.cfg) = /home/user/.vaultpw
OS / ENVIRONMENT

Local:
Red Hat Enterprise Linux release 9.4 (Plow)

Remote:
Red Hat Enterprise Linux release 8.10 (Ootpa)

STEPS TO REPRODUCE
  1. Install OpenShift > 4.15 (probably K8s > 1.28 also works)
  2. Create Ansible-Task (collection kubernetes.core must be present)
    e.g.: Create Secret in default namespace
kubernetes.core.k8s:
    validate:
      fail_on_error: true
    wait: true
    wait_timeout: 60
    definition:
      apiVersion: v1
      kind: Secret
      metadata:
        name: test
        namespace: "default"
      type: Opaque
      data:
        bindPassword: "{{ oleole | b64encode }}"
EXPECTED RESULTS

successful task

ACTUAL RESULTS

Kubernetes version v1.28.10+a2c84a5 is not supported by kubernetes-validate"


@gravesm
Copy link
Member

gravesm commented Oct 31, 2024

You will need to update your version of kubernetes-validate to a version that is at least as high as the version of kubernetes you are validating against.

@gravesm gravesm added the needs_info Needs additional information from original reporter label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_info Needs additional information from original reporter
Projects
None yet
Development

No branches or pull requests

2 participants