TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Testing of K8s resources using Raku and Sparrow

5 点作者 melezhik超过 3 年前
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

暂无评论

暂无评论