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 in Puppet by Simran
14 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 by Sirajul
• 25,260 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 in Puppet by Sirajul
• 25,260 points
20 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 in Puppet by Sirajul
• 25,260 points
53 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 in Puppet by Sirajul
• 25,260 points
26 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 in Others by anonymous
2,103 views
+3 votes
1 answer
0 votes
1 answer
0 votes
1 answer