TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Testing of K8s resources using Raku and Sparrow

5 pointsby melezhikover 3 years ago
Hi! I&#x27;ve recently added 2 new plugins to validate k8s resources:<p>deployments statefull sets config maps secrets They are written on Raku and have Raku API.<p>For example, to verify k8s deployment and access it&#x27;s entries:<p><pre><code> my %data = task-run &quot;dpl check&quot;, &quot;k8s-deployment-check&quot; %( name =&gt; &quot;animals&quot;, namespace =&gt; &quot;pets&quot;, cat =&gt; %( command =&gt; &quot;&#x2F;usr&#x2F;bin&#x2F;cat&quot;, args =&gt; [ &quot;eat&quot;, &quot;milk&quot;, &quot;fish&quot; ], env =&gt; [ &quot;ENABLE_LOGGING&quot; ] volume-mounts =&gt; { foo-bar =&gt; &quot;&#x2F;opt&#x2F;foo&#x2F;bar&quot;, } ) ); # Access k8s resource say %data.keys.perl; # (&quot;env&quot;, &quot;image&quot;, &quot;imagePullPolicy&quot;, &quot;command&quot;, # &quot;terminationMessagePolicy&quot;, &quot;name&quot;, &quot;envFrom&quot;, &quot;ports&quot;, # &quot;__data__&quot;, # &quot;args&quot;, # &quot;terminationMessagePath&quot;, &quot;livenessProbe&quot;, &quot;resources&quot;, &quot;volumeMounts&quot;).Seq say %data.command;</code></pre> Find more information here:<p>https:&#x2F;&#x2F;github.com&#x2F;melezhik&#x2F;sparrow-plugins&#x2F;tree&#x2F;master&#x2F;k8s-config-check<p>https:&#x2F;&#x2F;github.com&#x2F;melezhik&#x2F;sparrow-plugins&#x2F;tree&#x2F;master&#x2F;k8s-deployment-check<p>I&#x27;d like to hear if this useful for others.<p>Thanks

no comments

no comments