Skip to content

Code from example simple_setup fails to compile #99

Open
@GMZwinge

Description

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet Bolt: 3.27.4
  • Module version: Latest

How to reproduce (e.g Puppet code you use)

Run bolt plan run test_voxpupuli_puppet_k8s::myplan --target <host> --user <user> --password <password> type=<type> in this repo, where <type> can be either controller or worker.

Once I get this working, I will provide a PR to fix the example.

What are you seeing

With type=controller, the error is:

  Apply failed to compile for <host>: Class[Profile::K8s::Controller]: parameter 'container_manager' expects a match for K8s::Container_runtimes = Enum['containerd', 'crio'], got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 6, column: 5)  

With type=worker, the error is:

  Apply failed to compile for <host>: Class[Profile::K8s::Worker]:
    parameter 'control_plane_url' expects a match for Stdlib::HTTPUrl = Pattern[/(?i:\Ahttps?:\/\/.*\z)/], got Undef
    parameter 'k8s_version' expects a String value, got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 8, column: 5)    

What behaviour did you expect instead

There is no failure.

Output log

With type=controller, the output is:

Starting: plan test_voxpupuli_puppet_k8s::myplan
Start test_voxpupuli_puppet_k8s::myplan.
Starting: install puppet and gather facts on <host>
Finished: install puppet and gather facts with 0 failures in 7.42 sec
Starting: apply catalog on <host>
Failed on <host>:
  Apply failed to compile for <host>: Class[Profile::K8s::Controller]: parameter 'container_manager' expects a match for K8s::Container_runtimes = Enum['containerd', 'crio'], got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 6, column: 5)  
Finished: apply catalog with 1 failure in 5.02 sec
Finished: plan test_voxpupuli_puppet_k8s::myplan in 12.44 sec
Failed on <host>:
  Apply failed to compile for <host>: Class[Profile::K8s::Controller]: parameter 'container_manager' expects a match for K8s::Container_runtimes = Enum['containerd', 'crio'], got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 6, column: 5)  
Failed on 1 target: <host>
Ran on 1 target

With type=worker, the output is:

Starting: plan test_voxpupuli_puppet_k8s::myplan
Start test_voxpupuli_puppet_k8s::myplan.
Starting: install puppet and gather facts on <host>
Finished: install puppet and gather facts with 0 failures in 7.63 sec
Starting: apply catalog on <host>
Failed on <host>:
  Apply failed to compile for <host>: Class[Profile::K8s::Controller]: parameter 'container_manager' expects a match for K8s::Container_runtimes = Enum['containerd', 'crio'], got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 6, column: 5)  
Finished: apply catalog with 1 failure in 4.8 sec
Finished: plan test_voxpupuli_puppet_k8s::myplan in 12.44 sec
Failed on <host>:
  Apply failed to compile for <host>: Class[Profile::K8s::Controller]: parameter 'container_manager' expects a match for K8s::Container_runtimes = Enum['containerd', 'crio'], got Undef (file: /test_voxpupuli_puppet_k8s/manifests/my_manifest.pp, line: 6, column: 5)  
Failed on 1 target: <host>
Ran on 1 target

Any additional information you'd like to impart

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions