Puppet+Kubernetes: How can i validate if the kubernetes module's syntax, code and other metadata is correct?

0 votes
Is there a way out to validate and check if the puppetlabs/kubernetes module is adhering to syntax and code correctness?
Aug 21, 2019 in Puppet by Simran
79 views

1 answer to this question.

0 votes

This module is compliant with the Puppet Development Kit (PDK), which provides tools to help run unit tests on the module and validate the modules's metadata, syntax, and style.

To validate the metadata.json file, run the following command:

pdk validate metadata --puppet-version='5.3.6'

To validate the Puppet code and syntax, run the following command:

pdk validate puppet --puppet-version='5.3.6'

To validate the Ruby code style and syntax you must specify the directory the code exists in.

In the following example we validate the Ruby code contained in the lib directory:

pdk validate ruby lib --puppet-version='5.3.6'

To unit test the module, run the following command:

pdk test unit --puppet-version='5.3.6'
answered Aug 21, 2019 by Sirajul
• 50,340 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer

How do i start using the kubernetes module if i'm using r10k for code management?

Add this declaration to your Puppetfile: mod 'puppetlabs-kubernetes', ...READ MORE

answered Aug 23, 2019 in Puppet by Sirajul
• 50,340 points
52 views
0 votes
1 answer

How can i check the requests of certificates from puppet agent to puppet master?

You could do this by executing the ...READ MORE

answered Jul 24, 2019 in Puppet by Sirajul
• 50,340 points
256 views
0 votes
1 answer

How can i avoid the "environment leakage" in puppet?

Environment leakage is one of the limitations ...READ MORE

answered Jul 25, 2019 in Puppet by Sirajul
• 50,340 points
66 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
5,513 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 11, 2019 in Kubernetes by Kalgi
• 51,830 points

reshown Apr 12, 2019 by Kalgi 1,507 views
0 votes
1 answer

Puppet: How can i check for syntax errors on my puppet code? Is there any tool to do this?

At the lowest level of checking, you ...READ MORE

answered Aug 7, 2019 in Puppet by Sirajul
• 50,340 points
743 views
0 votes
1 answer

Can i install puppet master and puppet agent on the same centos machine? How will that work?

Yes, It's now possible to install both ...READ MORE

answered Aug 6, 2019 in Puppet by Sirajul
• 50,340 points
91 views