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
835 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
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Puppet+Kubernetes: How do I use kubetool and what is it's significance in using kubernetes with puppet?

The module puppetlabs/kubernetes has Kubetool, which is ...READ MORE

answered Aug 21, 2019 in Puppet by Sirajul
• 59,230 points
1,206 views
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
• 59,230 points
669 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
• 59,230 points
3,038 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
• 59,230 points
821 views
+1 vote
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
15,578 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,063 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
• 59,230 points
8,783 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
• 59,230 points
1,175 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP