<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
  <title></title>
  <description>cogitationes, labores, et gratiae (thoughts, works, and gratitudes)</description>
  <link>https://psaggu.com</link>
  <atom:link href="https://psaggu.com/feed.xml" rel="self" type="application/rss+xml" />
  
  <item>
    <title>I got elected to the Kubernetes Steering Committee (2026)</title>
    <description>&lt;p&gt;A small post, to celebrate and document a personal milestone. :)&lt;/p&gt;

&lt;p&gt;I am elected to the &lt;a href=&quot;https://github.com/kubernetes/community/blob/main/elections/steering/2026/results.md&quot;&gt;Kubernetes Steering Committee&lt;/a&gt; in the 2026 elections.&lt;/p&gt;

&lt;p&gt;I am extremely grateful for the incredible amount of support and encouragement, I received from the Kubernetes community and my friends during both the cycles I ran in.
(I ran in the last 2 cycles. My nominations from both times: &lt;a href=&quot;https://github.com/kubernetes/community/issues/8580&quot;&gt;2025&lt;/a&gt; and &lt;a href=&quot;https://github.com/kubernetes/community/issues/9092&quot;&gt;2026&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Both times, I learned an enormous amount.&lt;br /&gt;
Both times, I received a lot of community support, for which I am extremely grateful&lt;br /&gt;
(to &lt;strong&gt;&lt;em&gt;every single person&lt;/em&gt;&lt;/strong&gt; who took the time and interest to vote.)&lt;br /&gt;
I couldn’t have done it alone. It took the trust and support of the community.&lt;br /&gt;
(In fact, during the last election cycle too, I received net positive winning votes, and I lost a seat by a single vote.)&lt;/p&gt;

&lt;p&gt;Right now is just the beginning of a new role for me.&lt;br /&gt;
I am going to take some time to learn the behind-the-scenes of steering (while I continue everything else on my plate.)&lt;br /&gt;
I look forward to using this opportunity to make a meaningful impact. :)&lt;/p&gt;
</description>
    <pubDate>Sat, 10 Oct 2026 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2026/10/10/steering-committee-2026.html</link>
    <guid isPermaLink="true">https://psaggu.com/2026/10/10/steering-committee-2026.html</guid>
  </item>
  
  <item>
    <title>Is Kubernetes ServiceAccount a JWT token? And how to verify it?</title>
    <description>&lt;p&gt;&lt;em&gt;(More of my “notes for self”, as I continue reading the thesis paper, &lt;a href=&quot;https://github.com/luxas/research/blob/main/msc_thesis.pdf&quot;&gt;Usable Access Control in Cloud Management Systems&lt;/a&gt;, written by Lucas Käldström.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I ran another small experiment today.&lt;/p&gt;

&lt;p&gt;Today, I learnt that the Kubernetes Service Account tokens that I use very often to authenticate with the API server (using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Authorization: Bearer &amp;lt;token&amp;gt;&lt;/code&gt; header with the HTTP request) are JWT (JSON Web Token) tokens.&lt;/p&gt;

&lt;p&gt;I learnt this as a verbal fact first, so, I wanted to verify it in my mighty Kind cluster.&lt;/p&gt;

&lt;p&gt;So, let’s first create a Kind cluster.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ kind create cluster
Creating cluster &lt;span class=&quot;s2&quot;&gt;&quot;kind&quot;&lt;/span&gt; ...
 ✓ Ensuring node image &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;kindest/node:v1.34.0&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to &lt;span class=&quot;s2&quot;&gt;&quot;kind-kind&quot;&lt;/span&gt;
You can now use your cluster with:

kubectl cluster-info &lt;span class=&quot;nt&quot;&gt;--context&lt;/span&gt; kind-kind

Thanks &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;using kind! 😊
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Create a test pod and exec inside the container.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ kubectl run jwt-test &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;--image&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;busybox &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;--restart&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;Never &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sleep &lt;/span&gt;3600
pod/jwt-test created

❯ kubectl &lt;span class=&quot;nb&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; jwt-test &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; sh
/ &lt;span class=&quot;c&quot;&gt;# &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, I’m inside our container, let’s run some tests.&lt;/p&gt;

&lt;p&gt;First, print the contents of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/run/secrets/kubernetes.io/serviceaccount/token&lt;/code&gt; file.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ &lt;span class=&quot;c&quot;&gt;# cat /var/run/secrets/kubernetes.io/serviceaccount/token&lt;/span&gt;

eyJhbGciOiJSUzI1NiIsImtpZCI6IncwY3FpcXhvZGt1SFlGelNQa1FwenFMcmpoeEFkVi1McjFYcTZVTEh3X1kifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzk3Njg0MTc3LCJpYXQiOjE3NjYxNDgxNzcsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiMGQyMTFiNGEtNjVjMi00ODEyLWIwYjEtNGUzY2I2NzI5ZGMzIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkZWZhdWx0Iiwibm9kZSI6eyJuYW1lIjoia2luZC1jb250cm9sLXBsYW5lIiwidWlkIjoiNWU0MmM4M2YtMmI2NC00ZjU3LWEyZGMtMjI3M2ZmZjk3ZTBlIn0sInBvZCI6eyJuYW1lIjoiand0LXRlc3QiLCJ1aWQiOiJlNDdmMDVlZi00MWMzLTRmNDctYTdmNC01MDc1ZmIzZGQ2ZDMifSwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImRlZmF1bHQiLCJ1aWQiOiI4Y2ZhNWYxNS0wOWJhLTRmM2QtODE2Ny02OGFhNjE5ZjRmN2YifSwid2FybmFmdGVyIjoxNzY2MTUxNzg0fSwibmJmIjoxNzY2MTQ4MTc3LCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZWZhdWx0In0.PA010UKl5ldQCOAk5s-iNRHEsbxkyIscTUsNn1c3hE9TL-uTCTl7_7QnI8-NOmx5Qjj7GPvF2QaHCeynOXlLq-Nt5mcvnOb6IipTfcH0Mfa7OCBufgPo82ggUA7T09kwcs7pmxZoL_lHxBBElFOMl9cMyhYO7I46JZ_AmvmzO4ctD3_ojQ6cyciXx4YZt78IwbM9QdM24e64BjyI_rdCGk3Y8990zodydn447VP9V6UAVQJJV49eleUnWMnQHTc3Z8UGjmawLeSaDQTqxXQ_fr9YTpHwbA_MqmXggFAmVIVQo0hTjfZxtcxuJe-8mM69Lm9krNJ7PsEuQeUB_9WyxA
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base64&lt;/code&gt; decode the above token I got.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;eyJhbGciOiJSUzI1NiIsImtpZCI6IncwY3FpcXhvZGt1SFlGelNQa1FwenFMcmpoeEFkVi1McjFYcTZVTEh3X1kifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzk3Njg0MTc3LCJpYXQiOjE3NjYxNDgxNzcsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiMGQyMTFiNGEtNjVjMi00ODEyLWIwYjEtNGUzY2I2NzI5ZGMzIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkZWZhdWx0Iiwibm9kZSI6eyJuYW1lIjoia2luZC1jb250cm9sLXBsYW5lIiwidWlkIjoiNWU0MmM4M2YtMmI2NC00ZjU3LWEyZGMtMjI3M2ZmZjk3ZTBlIn0sInBvZCI6eyJuYW1lIjoiand0LXRlc3QiLCJ1aWQiOiJlNDdmMDVlZi00MWMzLTRmNDctYTdmNC01MDc1ZmIzZGQ2ZDMifSwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImRlZmF1bHQiLCJ1aWQiOiI4Y2ZhNWYxNS0wOWJhLTRmM2QtODE2Ny02OGFhNjE5ZjRmN2YifSwid2FybmFmdGVyIjoxNzY2MTUxNzg0fSwibmJmIjoxNzY2MTQ4MTc3LCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZWZhdWx0In0.PA010UKl5ldQCOAk5s-iNRHEsbxkyIscTUsNn1c3hE9TL-uTCTl7_7QnI8-NOmx5Qjj7GPvF2QaHCeynOXlLq-Nt5mcvnOb6IipTfcH0Mfa7OCBufgPo82ggUA7T09kwcs7pmxZoL_lHxBBElFOMl9cMyhYO7I46JZ_AmvmzO4ctD3_ojQ6cyciXx4YZt78IwbM9QdM24e64BjyI_rdCGk3Y8990zodydn447VP9V6UAVQJJV49eleUnWMnQHTc3Z8UGjmawLeSaDQTqxXQ_fr9YTpHwbA_MqmXggFAmVIVQo0hTjfZxtcxuJe-8mM69Lm9krNJ7PsEuQeUB_9WyxA&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;alg&quot;&lt;/span&gt;:&lt;span class=&quot;s2&quot;&gt;&quot;RS256&quot;&lt;/span&gt;,&lt;span class=&quot;s2&quot;&gt;&quot;kid&quot;&lt;/span&gt;:&lt;span class=&quot;s2&quot;&gt;&quot;w0cqiqxodkuHYFzSPkQpzqLrjhxAdV-Lr1Xq6ULHw_Y&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt;: invalid input
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ah, I got an invalid input.&lt;/p&gt;

&lt;p&gt;But what I learnt is that a JWT token is a three part thing.&lt;br /&gt;
Each part is a Base64 encoded blob, separated (or joined by a dot).&lt;br /&gt;
So, a full token will look something like:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;base64url(header)&amp;gt;.&amp;lt;base64url(payload)&amp;gt;.&amp;lt;base64url(signature)&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What happened in our first attempt at decoding the ServiceAccount token is -&lt;br /&gt;
it just decoded the first blob and then reached a dot, and failed there.&lt;/p&gt;

&lt;p&gt;So, if I divide the above token into 3 parts now, it will be:&lt;/p&gt;

&lt;p&gt;Part 1:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;eyJhbGciOiJSUzI1NiIsImtpZCI6IncwY3FpcXhvZGt1SFlGelNQa1FwenFMcmpoeEFkVi1McjFYcTZVTEh3X1kifQ
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Part 2:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzk3Njg0MTc3LCJpYXQiOjE3NjYxNDgxNzcsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiMGQyMTFiNGEtNjVjMi00ODEyLWIwYjEtNGUzY2I2NzI5ZGMzIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkZWZhdWx0Iiwibm9kZSI6eyJuYW1lIjoia2luZC1jb250cm9sLXBsYW5lIiwidWlkIjoiNWU0MmM4M2YtMmI2NC00ZjU3LWEyZGMtMjI3M2ZmZjk3ZTBlIn0sInBvZCI6eyJuYW1lIjoiand0LXRlc3QiLCJ1aWQiOiJlNDdmMDVlZi00MWMzLTRmNDctYTdmNC01MDc1ZmIzZGQ2ZDMifSwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImRlZmF1bHQiLCJ1aWQiOiI4Y2ZhNWYxNS0wOWJhLTRmM2QtODE2Ny02OGFhNjE5ZjRmN2YifSwid2FybmFmdGVyIjoxNzY2MTUxNzg0fSwibmJmIjoxNzY2MTQ4MTc3LCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZWZhdWx0In0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Part 3:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PA010UKl5ldQCOAk5s-iNRHEsbxkyIscTUsNn1c3hE9TL-uTCTl7_7QnI8-NOmx5Qjj7GPvF2QaHCeynOXlLq-Nt5mcvnOb6IipTfcH0Mfa7OCBufgPo82ggUA7T09kwcs7pmxZoL_lHxBBElFOMl9cMyhYO7I46JZ_AmvmzO4ctD3_ojQ6cyciXx4YZt78IwbM9QdM24e64BjyI_rdCGk3Y8990zodydn447VP9V6UAVQJJV49eleUnWMnQHTc3Z8UGjmawLeSaDQTqxXQ_fr9YTpHwbA_MqmXggFAmVIVQo0hTjfZxtcxuJe-8mM69Lm9krNJ7PsEuQeUB_9WyxA
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;ok-now-lets-decode-them-one-by-one-again&quot;&gt;Ok, now let’s decode them one by one again!&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Decode Part 1:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;eyJhbGciOiJSUzI1NiIsImtpZCI6IncwY3FpcXhvZGt1SFlGelNQa1FwenFMcmpoeEFkVi1McjFYcTZVTEh3X1kifQ&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; | jq &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;s2&quot;&gt;&quot;alg&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;RS256&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;kid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;w0cqiqxodkuHYFzSPkQpzqLrjhxAdV-Lr1Xq6ULHw_Y&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The first key-value pair &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;alg&quot;: &quot;RS256&quot;&lt;/code&gt; in the output tells us, that this JWT token (which I will get in the next Part 2 decoding) was signed using a RS256 (RSA + SHA-256) algorithm.&lt;br /&gt;
So, if I need to verify the token signature, I know what is the algorithm used to sign it.&lt;/p&gt;

&lt;p&gt;And the second key-value pair, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;kid&quot;: &quot;w0cqiqxodkuHYFzSPkQpzqLrjhxAdV-Lr1Xq6ULHw_Y&quot;&lt;/code&gt; part.&lt;br /&gt;
This is a hint to figure out which RS256 (RSA + SHA-256) private/pubic key pair was actually used to sign.&lt;br /&gt;
The value I see in front of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kid&lt;/code&gt; is going to help us to figure out the public key of this pair.&lt;/p&gt;

&lt;p&gt;But where to find the Public Key? That information, I will get in the next part.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Decode Part 2:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzk3Njg0MTc3LCJpYXQiOjE3NjYxNDgxNzcsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiMGQyMTFiNGEtNjVjMi00ODEyLWIwYjEtNGUzY2I2NzI5ZGMzIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkZWZhdWx0Iiwibm9kZSI6eyJuYW1lIjoia2luZC1jb250cm9sLXBsYW5lIiwidWlkIjoiNWU0MmM4M2YtMmI2NC00ZjU3LWEyZGMtMjI3M2ZmZjk3ZTBlIn0sInBvZCI6eyJuYW1lIjoiand0LXRlc3QiLCJ1aWQiOiJlNDdmMDVlZi00MWMzLTRmNDctYTdmNC01MDc1ZmIzZGQ2ZDMifSwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImRlZmF1bHQiLCJ1aWQiOiI4Y2ZhNWYxNS0wOWJhLTRmM2QtODE2Ny02OGFhNjE5ZjRmN2YifSwid2FybmFmdGVyIjoxNzY2MTUxNzg0fSwibmJmIjoxNzY2MTQ4MTc3LCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZWZhdWx0In0&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; | jq &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;s2&quot;&gt;&quot;aud&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;https://kubernetes.default.svc.cluster.local&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;exp&quot;&lt;/span&gt;: 1797684177,
  &lt;span class=&quot;s2&quot;&gt;&quot;iat&quot;&lt;/span&gt;: 1766148177,
  &lt;span class=&quot;s2&quot;&gt;&quot;iss&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;https://kubernetes.default.svc.cluster.local&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;jti&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;0d211b4a-65c2-4812-b0b1-4e3cb6729dc3&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;kubernetes.io&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;namespace&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;default&quot;&lt;/span&gt;,
    &lt;span class=&quot;s2&quot;&gt;&quot;node&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;kind-control-plane&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;5e42c83f-2b64-4f57-a2dc-2273fff97e0e&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
    &lt;span class=&quot;s2&quot;&gt;&quot;pod&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;jwt-test&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;e47f05ef-41c3-4f47-a7f4-5075fb3dd6d3&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
    &lt;span class=&quot;s2&quot;&gt;&quot;serviceaccount&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;default&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;8cfa5f15-09ba-4f3d-8167-68aa619f4f7f&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
    &lt;span class=&quot;s2&quot;&gt;&quot;warnafter&quot;&lt;/span&gt;: 1766151784
  &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;nbf&quot;&lt;/span&gt;: 1766148177,
  &lt;span class=&quot;s2&quot;&gt;&quot;sub&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;system:serviceaccount:default:default&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ok, this is the JWT token.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;iss&quot;: &quot;https://kubernetes.default.svc.cluster.local&quot;&lt;/code&gt; is what issued this JWT token. So, it’s the Issuer.&lt;/p&gt;

    &lt;p&gt;This is what I will use (later) to figure out the location of the public key.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;aud&quot;: [&quot;https://kubernetes.default.svc.cluster.local&quot;]&lt;/code&gt; tells us that who is the intended audience for this token.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;sub&quot;: &quot;system:serviceaccount:default:default&quot;&lt;/code&gt; tells us who is the subject of this token.&lt;/p&gt;

    &lt;p&gt;As in this token represents this service account (called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;default&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;default&lt;/code&gt; namespace).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;iat&quot;: 1766148177&lt;/code&gt; part stands for Issued-at, and so the value is a timestamp for when this token was issued (in unix format).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;nbf&quot;: 1766148177&lt;/code&gt; part stands for “not before” meaning this token can’t be used before this time.&lt;/p&gt;

    &lt;p&gt;In this example, it is matching the “Issued-at” time, but I’m assuming it can be configured (I don’t know how at this point).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;exp&quot;: 1797684177,&lt;/code&gt; part stands for “Expiration”, basically again it is a timestamp for when this token will expire.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;jti&quot;: &quot;0d211b4a-65c2-4812-b0b1-4e3cb6729dc3&quot;&lt;/code&gt; is a unique ID for this JWT token.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And then the following part is a Kubernetes-specific entity, not really a standard JWT token field.&lt;/p&gt;

    &lt;p&gt;In this case, it’s giving Kubernetes some metadata information, for which namespace, and which particular instances of node, pod, etc are tied to this ServiceAccount.&lt;/p&gt;

    &lt;p&gt;And the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;warnafter&lt;/code&gt; bit tells when to automatically rotate this token.&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    &lt;span class=&quot;s2&quot;&gt;&quot;kubernetes.io&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;namespace&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;default&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;node&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;kind-control-plane&quot;&lt;/span&gt;,
        &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;5e42c83f-2b64-4f57-a2dc-2273fff97e0e&quot;&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;pod&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;jwt-test&quot;&lt;/span&gt;,
        &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;e47f05ef-41c3-4f47-a7f4-5075fb3dd6d3&quot;&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;serviceaccount&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;s2&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;default&quot;&lt;/span&gt;,
        &lt;span class=&quot;s2&quot;&gt;&quot;uid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;8cfa5f15-09ba-4f3d-8167-68aa619f4f7f&quot;&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;warnafter&quot;&lt;/span&gt;: 1766151784
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;And finally, the Part 3 now:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;PA010UKl5ldQCOAk5s-iNRHEsbxkyIscTUsNn1c3hE9TL-uTCTl7_7QnI8-NOmx5Qjj7GPvF2QaHCeynOXlLq-Nt5mcvnOb6IipTfcH0Mfa7OCBufgPo82ggUA7T09kwcs7pmxZoL_lHxBBElFOMl9cMyhYO7I46JZ_AmvmzO4ctD3_ojQ6cyciXx4YZt78IwbM9QdM24e64BjyI_rdCGk3Y8990zodydn447VP9V6UAVQJJV49eleUnWMnQHTc3Z8UGjmawLeSaDQTqxXQ_fr9YTpHwbA_MqmXggFAmVIVQo0hTjfZxtcxuJe-8mM69Lm9krNJ7PsEuQeUB_9WyxA&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;
5�B��W�&lt;span class=&quot;nv&quot;&gt;$�&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt;: invalid input
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I got some some random binary code here.&lt;/p&gt;

&lt;p&gt;This I learnt is a raw RSA signature, that is used to sign the first 2 parts (Header and Payload) of the token.&lt;/p&gt;

&lt;p&gt;I learnt it’s something like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;RSA-SIGN(
  SHA256(
    base64url(header) + &quot;.&quot; + base64url(payload)
  )
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;where-to-find-the-public-key-used-to-sign-the-jwt-token&quot;&gt;where to find the Public key (used to sign the JWT token)?&lt;/h3&gt;

&lt;p&gt;I saw in Part 2 decoded output this entry about who issued the token.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&quot;iss&quot;: &quot;https://kubernetes.default.svc.cluster.local&quot;,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s see if I can find out some information from this Issuer url.&lt;/p&gt;

&lt;p&gt;But one thing to note, before I make any request.&lt;/p&gt;

&lt;p&gt;The Issuer of a JWT token stores the information that I am looking for at a path:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;https://&amp;lt;url-of-the-issuer&amp;gt;/.well-known/openid-configuration
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, back to our pod container.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ kubectl &lt;span class=&quot;nb&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; jwt-test &lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; sh
/ &lt;span class=&quot;c&quot;&gt;# wget https://kubernetes.default.svc.cluster.local&lt;/span&gt;
Connecting to kubernetes.default.svc.cluster.local &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;10.96.0.1:443&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
wget: note: TLS certificate validation not implemented
wget: server returned error: HTTP/1.1 403 Forbidden
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ok, when I tried to hit the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://kubernetes.default.svc.cluster.local&lt;/code&gt; url, I got &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;403 Forbidden&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So, I need some credentials.&lt;/p&gt;

&lt;p&gt;You know what, here is what the Service Account token is used for.&lt;/p&gt;

&lt;p&gt;I will pass the token as a Autherization header in our request.&lt;/p&gt;

&lt;p&gt;Let’s try again.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ &lt;span class=&quot;c&quot;&gt;# TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)&lt;/span&gt;

/ &lt;span class=&quot;c&quot;&gt;# wget --header=&quot;Authorization: Bearer $TOKEN&quot; https://kubernetes.default.svc.cluster.local/.well-known/openid-configuration --no-check-certificate&lt;/span&gt;

Connecting to kubernetes.default.svc.cluster.local &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;10.96.0.1:443&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
saving to &lt;span class=&quot;s1&quot;&gt;&apos;openid-configuration&apos;&lt;/span&gt;
openid-configuration 100% |&lt;span class=&quot;k&quot;&gt;********************************************************************************************&lt;/span&gt;|   236  0:00:00 ETA
&lt;span class=&quot;s1&quot;&gt;&apos;openid-configuration&apos;&lt;/span&gt; saved

/ &lt;span class=&quot;c&quot;&gt;# cat openid-configuration | jq .&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;s2&quot;&gt;&quot;issuer&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;https://kubernetes.default.svc.cluster.local&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;jwks_uri&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;https://172.20.0.2:6443/openid/v1/jwks&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;response_types_supported&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;id_token&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;subject_types_supported&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;public&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;id_token_signing_alg_values_supported&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;s2&quot;&gt;&quot;RS256&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Ok, look at this part - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;jwks_uri&quot;: &quot;https://172.20.0.2:6443/openid/v1/jwks&quot;&lt;/code&gt;.&lt;br /&gt;
The “jwks” in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jwks_url&lt;/code&gt; stands for “JSON Web Key Set”.&lt;br /&gt;
This is what holds a collection of cryptographic public keys, used primarily for verifying digital signatures on JWT tokens.&lt;/p&gt;

&lt;p&gt;So, I have almost gotten what I need.&lt;br /&gt;
Let’s hit this JWKS URL now.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/ &lt;span class=&quot;c&quot;&gt;# wget --header=&quot;Authorization: Bearer $TOKEN&quot; https://172.20.0.2:6443/openid/v1/jwks --no-check-certificate&lt;/span&gt;
Connecting to 172.20.0.2:6443 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;172.20.0.2:6443&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
saving to &lt;span class=&quot;s1&quot;&gt;&apos;jwks&apos;&lt;/span&gt;
jwks                 100% |&lt;span class=&quot;k&quot;&gt;********************************************************************************************&lt;/span&gt;|   462  0:00:00 ETA
&lt;span class=&quot;s1&quot;&gt;&apos;jwks&apos;&lt;/span&gt; saved

/# &lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;jwks | jq &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;s2&quot;&gt;&quot;keys&quot;&lt;/span&gt;: &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;s2&quot;&gt;&quot;use&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;sig&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;kty&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;RSA&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;kid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;w0cqiqxodkuHYFzSPkQpzqLrjhxAdV-Lr1Xq6ULHw_Y&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;alg&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;RS256&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;n&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;vKsQjvpHQWbez2dLiTb2aJp36SKpVWvk-egE1pRertMJmtq3eeDPskb8n_msAWY4GKIMx3RnmfKBMbs_WHAkVt681cH0AzF5CR_oUtJ0Unde1rInUls5nxQcQ7_cCjApyKQlY5x5Z_vASyh7fOvMKUWmfLJt7M20hDoEvlM0WF9kUeqAgexBXlFv106qc-3CoO2-HPN6mlOn8WqHd-Ky_jQaj5xm__A0o04H7JEu09n7_Z9Rws9TFqBHaGCXwio3cozh2Bjv6da7rmyZUSp7ztH_4UcfYQgt5iJnxUdsjD7vXnyWFwvefs-6Wn6vlRp4fVmCfNrkzDL7QPWsjJJoWQ&quot;&lt;/span&gt;,
      &lt;span class=&quot;s2&quot;&gt;&quot;e&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;AQAB&quot;&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Voila, I got it.&lt;/p&gt;

&lt;p&gt;See, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kid&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alg&lt;/code&gt; matches exactly what I got in the decoded output of Part 1 of the JWT token.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;s2&quot;&gt;&quot;alg&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;RS256&quot;&lt;/span&gt;,
  &lt;span class=&quot;s2&quot;&gt;&quot;kid&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;w0cqiqxodkuHYFzSPkQpzqLrjhxAdV-Lr1Xq6ULHw_Y&quot;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, I think the last part left for us now is to understand how can i use this to verify the signature now on the token?&lt;/p&gt;

&lt;h3 id=&quot;lets-verify-the-token&quot;&gt;let’s verify the token!&lt;/h3&gt;

&lt;p&gt;So, to verify the token. I will need the following bit I got from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jwks_uri&lt;/code&gt; output.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;s2&quot;&gt;&quot;n&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;vKsQjvpHQWbez2dLiTb2aJp36SKpVWvk-egE1pRertMJmtq3eeDPskb8n_msAWY4GKIMx3RnmfKBMbs_WHAkVt681cH0AzF5CR_oUtJ0Unde1rInUls5nxQcQ7_cCjApyKQlY5x5Z_vASyh7fOvMKUWmfLJt7M20hDoEvlM0WF9kUeqAgexBXlFv106qc-3CoO2-HPN6mlOn8WqHd-Ky_jQaj5xm__A0o04H7JEu09n7_Z9Rws9TFqBHaGCXwio3cozh2Bjv6da7rmyZUSp7ztH_4UcfYQgt5iJnxUdsjD7vXnyWFwvefs-6Wn6vlRp4fVmCfNrkzDL7QPWsjJJoWQ&quot;&lt;/span&gt;,
&lt;span class=&quot;s2&quot;&gt;&quot;e&quot;&lt;/span&gt;: &lt;span class=&quot;s2&quot;&gt;&quot;AQAB&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Note: all notes this point onwards is me copy/pasting instructions I got from docs or otherwise tinkering with AI.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e&lt;/code&gt; are respectively called the “modulus” and “public exponent” which is what I will use to contruct the RSA public key.&lt;/p&gt;

&lt;p&gt;Below mathematics is what is used to convert the “n” and “e” to a public key.&lt;/p&gt;

&lt;p&gt;What the following process does is 5 things for the “n” and “e” values I got:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;convert them from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base64url&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base64&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;binary&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;then interpret them as Integers&lt;/li&gt;
  &lt;li&gt;then wrap them into something called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ASN.1&lt;/code&gt; structure&lt;/li&gt;
  &lt;li&gt;then do something called DER (Distinguished Encoding Rules) encoding this above &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ASN.1&lt;/code&gt; structure&lt;/li&gt;
  &lt;li&gt;and finall wrap that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DER&lt;/code&gt; into a PEM.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once I got the PEM version, at that point, openssl will be able to use it.&lt;/p&gt;

&lt;p&gt;I’m doing the below steps on my host machine, because i need &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;openssl&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base64&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xxd&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jq&lt;/code&gt;, which are not present in the container.&lt;/p&gt;

&lt;p&gt;Ok, first step - we decode &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e&lt;/code&gt; to binary, replacing the following and adding padding (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;=&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nv&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;vKsQjvpHQWbez2dLiTb2aJp36SKpVWvk-egE1pRertMJmtq3eeDPskb8n_msAWY4GKIMx3RnmfKBMbs_WHAkVt681cH0AzF5CR_oUtJ0Unde1rInUls5nxQcQ7_cCjApyKQlY5x5Z_vASyh7fOvMKUWmfLJt7M20hDoEvlM0WF9kUeqAgexBXlFv106qc-3CoO2-HPN6mlOn8WqHd-Ky_jQaj5xm__A0o04H7JEu09n7_Z9Rws9TFqBHaGCXwio3cozh2Bjv6da7rmyZUSp7ztH_4UcfYQgt5iJnxUdsjD7vXnyWFwvefs-6Wn6vlRp4fVmCfNrkzDL7QPWsjJJoWQ&quot;&lt;/span&gt;

❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$n&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;tr&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;_-&apos;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;/+&apos;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; n.bin

❯ &lt;span class=&quot;nv&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;AQAB&quot;&lt;/span&gt;

❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$e&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; e.bin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ok, now do:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ xxd e.bin
00000000: 0100 01                                  ...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This represents the number &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;65537&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, we need to convert these 2 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n.bin&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e.bin&lt;/code&gt; binaries to Hexadecimal strings.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ xxd &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; n.bin | &lt;span class=&quot;nb&quot;&gt;tr&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;\n&apos;&lt;/span&gt;
bcab108efa474166decf674b8936f6689a77e922a9556be4f9e804d6945eaed3099adab779e0cfb246fc9ff9ac01663818a20cc7746799f28131bb3f58702456debcd5c1f4033179091fe852d27452775ed6b227525b399f141c43bfdc0a3029c8a425639c7967fbc04b287b7cebcc2945a67cb26deccdb4843a04be5334585f6451ea8081ec415e516fd74eaa73edc2a0edbe1cf37a9a53a7f16a8777e2b2fe341a8f9c66fff034a34e07ec912ed3d9fbfd9f51c2cf5316a047686097c22a37728ce1d818efe9d6bbae6c99512a7bced1ffe1471f61082de62267c5476c8c3eef5e7c96170bde7ecfba5a7eaf951a787d59827cdae4cc32fb40f5ac8c926859

❯ xxd &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; e.bin
010001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, we need to convert these into an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ASN.1&lt;/code&gt; format.&lt;/p&gt;

&lt;p&gt;so, we create a file called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rsa.asn1&lt;/code&gt;, with the following contents:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;asn1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;SEQUENCE:rsa_key

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;rsa_key]
&lt;span class=&quot;nv&quot;&gt;modulus&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;INTEGER:0x&amp;lt;PASTE_HEX_OF_N_HERE&amp;gt;
&lt;span class=&quot;nv&quot;&gt;publicExponent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;INTEGER:0x&amp;lt;PASTE_HEX_OF_E_HERE&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;so, the final version would look something like:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;rsa.asn1 
&lt;span class=&quot;nv&quot;&gt;asn1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;SEQUENCE:rsa_key

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;rsa_key]
&lt;span class=&quot;nv&quot;&gt;modulus&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;INTEGER:0xbcab108efa474166decf674b8936f6689a77e922a9556be4f9e804d6945eaed3099adab779e0cfb246fc9ff9ac01663818a20cc7746799f28131bb3f58702456debcd5c1f4033179091fe852d27452775ed6b227525b399f141c43bfdc0a3029c8a425639c7967fbc04b287b7cebcc2945a67cb26deccdb4843a04be5334585f6451ea8081ec415e516fd74eaa73edc2a0edbe1cf37a9a53a7f16a8777e2b2fe341a8f9c66fff034a34e07ec912ed3d9fbfd9f51c2cf5316a047686097c22a37728ce1d818efe9d6bbae6c99512a7bced1ffe1471f61082de62267c5476c8c3eef5e7c96170bde7ecfba5a7eaf951a787d59827cdae4cc32fb40f5ac8c926859
&lt;span class=&quot;nv&quot;&gt;publicExponent&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;INTEGER:0x010001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;With this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ASN.1&lt;/code&gt; format available now, we can generate a DER encoded value.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ openssl asn1parse &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-genconf&lt;/span&gt; rsa.asn1 &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-out&lt;/span&gt; rsa_pub.der
   
    0:d&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;0  &lt;span class=&quot;nv&quot;&gt;hl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;4 &lt;span class=&quot;nv&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 266 cons: SEQUENCE          
    4:d&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1  &lt;span class=&quot;nv&quot;&gt;hl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;4 &lt;span class=&quot;nv&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 257 prim: INTEGER           :BCAB108EFA474166DECF674B8936F6689A77E922A9556BE4F9E804D6945EAED3099ADAB779E0CFB246FC9FF9AC01663818A20CC7746799F28131BB3F58702456DEBCD5C1F4033179091FE852D27452775ED6B227525B399F141C43BFDC0A3029C8A425639C7967FBC04B287B7CEBCC2945A67CB26DECCDB4843A04BE5334585F6451EA8081EC415E516FD74EAA73EDC2A0EDBE1CF37A9A53A7F16A8777E2B2FE341A8F9C66FFF034A34E07EC912ED3D9FBFD9F51C2CF5316A047686097C22A37728CE1D818EFE9D6BBAE6C99512A7BCED1FFE1471F61082DE62267C5476C8C3EEF5E7C96170BDE7ECFBA5A7EAF951A787D59827CDAE4CC32FB40F5AC8C926859
  265:d&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1  &lt;span class=&quot;nv&quot;&gt;hl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;2 &lt;span class=&quot;nv&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;   3 prim: INTEGER           :010001
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Before we move ahead, I want to show why we are doing all this.&lt;/p&gt;

&lt;p&gt;Because, the RSA Public key will be of this structure:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;RSAPublicKey ::= SEQUENCE {
  modulus           INTEGER (n),
  publicExponent    INTEGER (e)
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;so, if you see the output of our DER encoding command, we see somethings that are needed in the above RSA Public Key structure.&lt;/p&gt;

&lt;p&gt;In the output, we have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SEQUENCE&lt;/code&gt; consisting of two prime INTEGERS.&lt;br /&gt;
That’s exactly what we need.&lt;/p&gt;

&lt;p&gt;Now, we are almost close to the final part, of actually converting the “n” and “e” to a RSA Public key.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ openssl rsa &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-pubin&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-inform&lt;/span&gt; DER &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-in&lt;/span&gt; rsa_pub.der &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-outform&lt;/span&gt; PEM &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
   &lt;span class=&quot;nt&quot;&gt;-out&lt;/span&gt; public.pem
writing RSA key

❯ &lt;span class=&quot;nb&quot;&gt;cat &lt;/span&gt;public.pem 
&lt;span class=&quot;nt&quot;&gt;-----BEGIN&lt;/span&gt; PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvKsQjvpHQWbez2dLiTb2
aJp36SKpVWvk+egE1pRertMJmtq3eeDPskb8n/msAWY4GKIMx3RnmfKBMbs/WHAk
Vt681cH0AzF5CR/oUtJ0Unde1rInUls5nxQcQ7/cCjApyKQlY5x5Z/vASyh7fOvM
KUWmfLJt7M20hDoEvlM0WF9kUeqAgexBXlFv106qc+3CoO2+HPN6mlOn8WqHd+Ky
/jQaj5xm//A0o04H7JEu09n7/Z9Rws9TFqBHaGCXwio3cozh2Bjv6da7rmyZUSp7
ztH/4UcfYQgt5iJnxUdsjD7vXnyWFwvefs+6Wn6vlRp4fVmCfNrkzDL7QPWsjJJo
WQIDAQAB
&lt;span class=&quot;nt&quot;&gt;-----END&lt;/span&gt; PUBLIC KEY-----
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hurrah! Hurrah! Hurrah! We have the public key! finally!&lt;/p&gt;

&lt;p&gt;ok, but let’s verify once&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ openssl rsa &lt;span class=&quot;nt&quot;&gt;-pubin&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-in&lt;/span&gt; public.pem &lt;span class=&quot;nt&quot;&gt;-text&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-noout&lt;/span&gt;
Public-Key: &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;2048 bit&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Modulus:
    00:bc:ab:10:8e:fa:47:41:66:de:cf:67:4b:89:36:
    f6:68:9a:77:e9:22:a9:55:6b:e4:f9:e8:04:d6:94:
    5e:ae:d3:09:9a:da:b7:79:e0:cf:b2:46:fc:9f:f9:
    ac:01:66:38:18:a2:0c:c7:74:67:99:f2:81:31:bb:
    3f:58:70:24:56:de:bc:d5:c1:f4:03:31:79:09:1f:
    e8:52:d2:74:52:77:5e:d6:b2:27:52:5b:39:9f:14:
    1c:43:bf:dc:0a:30:29:c8:a4:25:63:9c:79:67:fb:
    c0:4b:28:7b:7c:eb:cc:29:45:a6:7c:b2:6d:ec:cd:
    b4:84:3a:04:be:53:34:58:5f:64:51:ea:80:81:ec:
    41:5e:51:6f:d7:4e:aa:73:ed:c2:a0:ed:be:1c:f3:
    7a:9a:53:a7:f1:6a:87:77:e2:b2:fe:34:1a:8f:9c:
    66:ff:f0:34:a3:4e:07:ec:91:2e:d3:d9:fb:fd:9f:
    51:c2:cf:53:16:a0:47:68:60:97:c2:2a:37:72:8c:
    e1:d8:18:ef:e9:d6:bb:ae:6c:99:51:2a:7b:ce:d1:
    ff:e1:47:1f:61:08:2d:e6:22:67:c5:47:6c:8c:3e:
    ef:5e:7c:96:17:0b:de:7e:cf:ba:5a:7e:af:95:1a:
    78:7d:59:82:7c:da:e4:cc:32:fb:40:f5:ac:8c:92:
    68:59
Exponent: 65537 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0x10001&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;we-got-the-public-key-lets-verify-the-jwt-token-now&quot;&gt;We got the Public Key! Let’s verify the JWT token now.&lt;/h3&gt;

&lt;p&gt;Ok, I’m back to doing things by myself now.&lt;/p&gt;

&lt;p&gt;Remember from the Part 1 and Part 2 of the token were actually the “Header” and “Payload”. And “Part3”, the signature.&lt;/p&gt;

&lt;p&gt;What we have to verify is Part 1 and Part 2, which is what is signed by Part 3.&lt;/p&gt;

&lt;p&gt;So, let’s sort out the the required parts.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nv&quot;&gt;TOKEN&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;eyJhbGciOiJSUzI1NiIsImtpZCI6IncwY3FpcXhvZGt1SFlGelNQa1FwenFMcmpoeEFkVi1McjFYcTZVTEh3X1kifQ.eyJhdWQiOlsiaHR0cHM6Ly9rdWJlcm5ldGVzLmRlZmF1bHQuc3ZjLmNsdXN0ZXIubG9jYWwiXSwiZXhwIjoxNzk3Njg3ODgxLCJpYXQiOjE3NjYxNTE4ODEsImlzcyI6Imh0dHBzOi8va3ViZXJuZXRlcy5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsIiwianRpIjoiNmJiNzc0MjMtNmE3Yi00MjBmLTg1MDgtOTUzY2Y0YmE5MWZhIiwia3ViZXJuZXRlcy5pbyI6eyJuYW1lc3BhY2UiOiJkZWZhdWx0Iiwibm9kZSI6eyJuYW1lIjoia2luZC1jb250cm9sLXBsYW5lIiwidWlkIjoiNWU0MmM4M2YtMmI2NC00ZjU3LWEyZGMtMjI3M2ZmZjk3ZTBlIn0sInBvZCI6eyJuYW1lIjoiand0LXRlc3QiLCJ1aWQiOiI4M2E5YmE4OC0yOTg5LTRlYmItYTRiZS04ZjA0ODY2ZmM4OGEifSwic2VydmljZWFjY291bnQiOnsibmFtZSI6ImRlZmF1bHQiLCJ1aWQiOiI4Y2ZhNWYxNS0wOWJhLTRmM2QtODE2Ny02OGFhNjE5ZjRmN2YifSwid2FybmFmdGVyIjoxNzY2MTU1NDg4fSwibmJmIjoxNzY2MTUxODgxLCJzdWIiOiJzeXN0ZW06c2VydmljZWFjY291bnQ6ZGVmYXVsdDpkZWZhdWx0In0.ByKLRb2376aYeAmOWL1LTHsRmwgjWYp3kklUmoDcAzfMXWOBOcU_R4iXC4UqM5iwpEw_lWhDgEndGghiUg6HFau0rtj5VxFiFWwXkxSfzYNvxzW_nO3uFZlI4R3tWJqIeLMX3hqaWQGb_LvfvjI1My6XNZhkt8UTByUg3nKTmtMWmg-9-XKMylmD078vT4n8f0nSL6YlchJuTFivWc1lGE-FrZmWk6WeiRtH_jTyXp95dhg_Chf566otezUrPE8ern-8sI0rSVDzvLNsF4YvL9IXx2JQn57QR_Pr3otFXpeUTgj5oBUllsCTrA2xpXRmWxUD9qoncjviVkAkcj1fiw

❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TOKEN&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f1&lt;/span&gt;,2 &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; signed-data.txt

❯ &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TOKEN&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;cut&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f3&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;tr&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;_-&apos;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;/+&apos;&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;base64&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; signature.bin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ok, now, we verify the signed-data.txt with the signature.bin&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ openssl dgst &lt;span class=&quot;nt&quot;&gt;-sha256&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
∙   &lt;span class=&quot;nt&quot;&gt;-verify&lt;/span&gt; public.pem &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
∙   &lt;span class=&quot;nt&quot;&gt;-signature&lt;/span&gt; signature.bin &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
∙   signed-data.txt
Verification failure
40F7505CB27F0000:error:02000068:rsa routines:ossl_rsa_verify:bad signature:crypto/rsa/rsa_sign.c:442:
40F7505CB27F0000:error:1C880004:Provider routines:rsa_verify_directly:RSA lib:providers/implementations/signature/rsa_sig.c:1043:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and I failed. 😂&lt;/p&gt;

&lt;p&gt;Goodness, the process was tiring, so, I’m not repeating it right now.&lt;/p&gt;

&lt;p&gt;I’ll come back to it and see at what place, I made mistakes.&lt;/p&gt;

&lt;p&gt;But this effort was to learn how it is done, i.e., how a signature verification happens.&lt;/p&gt;

&lt;p&gt;And also, I should not forget it all started with me just trying to understand whether a Kubernetes Service Account is a JWT token.&lt;/p&gt;

&lt;p&gt;I got my answer and I learnt so much more.&lt;/p&gt;

&lt;p&gt;There’s an article that I haven’t read just yet, but I was recommended to read (by &lt;a href=&quot;https://github.com/luxas&quot;&gt;Lucas Käldström&lt;/a&gt;).&lt;br /&gt;
Because, we didn’t end with a shiny green “verified” message, I will leave you to read that brilliant article - &lt;br /&gt;
&lt;a href=&quot;https://www.cs.cornell.edu/courses/cs5430/2015sp/notes/rsa_sign_vs_dec.php&quot;&gt;RSA Signing is Not RSA Decryption&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you, if you followed so far. :)&lt;/p&gt;
</description>
    <pubDate>Fri, 19 Dec 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/12/19/k8s-serviceaccount-jwt.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/12/19/k8s-serviceaccount-jwt.html</guid>
  </item>
  
  <item>
    <title>How to run Kubernetes (Node) e2e tests locally?</title>
    <description>&lt;p&gt;&lt;strong&gt;&lt;em&gt;TL;DR:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;To run Node e2e tests&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;without feature-gate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;KUBE_ROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; make test-e2e-node &lt;span class=&quot;nv&quot;&gt;FOCUS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;a pod failing to mount volumes&quot;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;with feature-gate&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;KUBE_ROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; make test-e2e-node &lt;span class=&quot;nv&quot;&gt;FOCUS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;a pod failing to mount volumes&quot;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;TEST_ARGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;--feature-gates=PodReadyToStartContainersCondition=true&apos;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;To run rest of the e2e tests:&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; ./_output/bin/e2e.test &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--provider&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--kubeconfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.kube/config &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--ginkgo&lt;/span&gt;.focus&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PodReadyToStartContainerCondition&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;p&gt;(logging for my future self!)&lt;/p&gt;

&lt;p&gt;Below are a bunch of my raw running notes as I try to figure out how to run Kubernetes e2e tests locally.&lt;/p&gt;

&lt;p&gt;I’m trying to add a new e2e test in the Kubernetes codebase (as part of the work required for the GA promotion of KEP-3085 (aka the feature-gate, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PodReadyToStartContainerCondition&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;And I want to be able to run this locally.&lt;/p&gt;

&lt;p&gt;So, starting with the following steps to set up my environment:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;clone the kubernetes repository&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git clone git@github.com:kubernetes/kubernetes.git

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;kubernetes

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; git checkout &lt;span class=&quot;nt&quot;&gt;-b&lt;/span&gt; some-new-branch-name

&lt;span class=&quot;c&quot;&gt;# build all the binaries you&apos;ll need for running e2e locally&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; make &lt;span class=&quot;nv&quot;&gt;WHAT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt;/e2e/e2e.test

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;This will produce the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e2e.test&lt;/code&gt; binary in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./output/bin/e2e.test&lt;/code&gt; path.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Set up a local kubernetes cluster (I’ll use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kind&lt;/code&gt;)&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; kind create cluster &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; local-e2e-test

&lt;span class=&quot;c&quot;&gt;# to make sure my kubeconfig is pointing to the intended cluster&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; kubectl cluster-info
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Run the e2e test binary (the newly built &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./output/bin/e2e.test&lt;/code&gt; binary).&lt;/p&gt;

    &lt;p&gt;The e2e framework runs Ginkgo tests.&lt;/p&gt;

    &lt;p&gt;I can target the test I want to run, by its &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--ginkgo.focus&lt;/code&gt; flag.&lt;/p&gt;

    &lt;p&gt;Example:&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; ./_output/bin/e2e.test &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--provider&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;local&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--kubeconfig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$HOME&lt;/span&gt;/.kube/config &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--ginkgo&lt;/span&gt;.focus&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PodReadyToStartContainerCondition&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;I also learnt, that there’s a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--help&lt;/code&gt; flag also available, if I want to understand the full length of the capablities offered by this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e2e.test&lt;/code&gt; binary.&lt;/p&gt;

    &lt;p&gt;I tried a few of them below.&lt;/p&gt;

    &lt;p&gt;For example, If I want to get a dump of the entire list of e2e tests from the binary:&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; ./_output/bin/e2e.test &lt;span class=&quot;nt&quot;&gt;--list-tests&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;That prints all 7k+ test names.&lt;/p&gt;

    &lt;p&gt;So, if I want to check for a specific test, I can grep for some keyword or string used in the test definition (I learnt this needs to some keyword or string from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ginkgo.It(...)&lt;/code&gt; block where the test is invoked):&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; ./_output/bin/e2e.test &lt;span class=&quot;nt&quot;&gt;--list-tests&lt;/span&gt; | &lt;span class=&quot;nb&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;some-string-in-the-test-definition&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;Also, &lt;strong&gt;&lt;em&gt;please note&lt;/em&gt;&lt;/strong&gt;, if I have added a new test after above steps, then IIUC &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e2e.test --list-tests&lt;/code&gt; won’t show it right away.&lt;br /&gt;
I’ll need to rebuild the binary to make the new test visible.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;You know what? I realised what I did above, doesn’t really help me to run the Node e2e tests (aka the tests defined in the path &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test/e2d_node/*&lt;/code&gt; of the Kubernetes repository).&lt;/p&gt;

&lt;p&gt;(And for the KEP-3085, that is exactly what I need - to be able to write and run Node e2e tests locally)&lt;/p&gt;

&lt;p&gt;But before I move ahead - How did I realise that I need something else?&lt;/p&gt;

&lt;p&gt;Well, because - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e2e.test&lt;/code&gt; binary wasn’t able to list my intended test (which is defined in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test/e2e_node/pod_conditions_test.go&lt;/code&gt; path in the Kubernetes repo).&lt;/p&gt;

&lt;p&gt;Ok, moving forward.&lt;/p&gt;

&lt;p&gt;I figured out, there’s a different way to run these Node e2e tests locally.&lt;/p&gt;

&lt;p&gt;I came across this handy document – &lt;a href=&quot;https://github.com/kubernetes/community/blob/d71ff1332c77beebcdbeaa2b7004453a2a136d1f/contributors/devel/sig-node/e2e-node-tests.md?plain=1#L1&quot;&gt;Node End-To-End (e2e) tests&lt;/a&gt;.&lt;br /&gt;
This very thoroughly describes the process for running Node e2e tests locally (as well as, remotely, but that’s for some other day. I want to try the local execution first).
(Thank you, to the good folks in the SIG Node, this truly is a gem of a resource!)&lt;/p&gt;

&lt;p&gt;Ok, let’s see if this helps me with my usecase!&lt;/p&gt;

&lt;p&gt;There’s a bit of work needed (the pre-requisities) before I can start following the instructions in the document to actually run the tests.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;I need to install etcd, and make sure it’s available in the path.&lt;br /&gt;
(I’m on an openSUSE Tumbleweed machine, so I did &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zypper install etcd&lt;/code&gt; and that did the job. Otherwise, follow the instructions from Etcd documentation &lt;a href=&quot;https://etcd.io/docs/v3.6/install/&quot;&gt;here&lt;/a&gt;.)&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; which etcd
/usr/sbin/etcd
  
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; etcd &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
etcd Version: 3.6.4
Git SHA: Not provided &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;use ./build instead of go build&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Go Version: go1.24.5
Go OS/Arch: linux/amd64
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Next, I need to install Containerd and configure cgroup driver to cgroupfs.&lt;br /&gt;
(once again, I did &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zypper install containerd&lt;/code&gt;. Otherwise, follow the instructions from Containerd documentation &lt;a href=&quot;https://github.com/containerd/containerd/blob/main/docs/getting-started.md&quot;&gt;here&lt;/a&gt;.)&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; /etc/containerd
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;containerd config default | &lt;span class=&quot;nb&quot;&gt;sudo tee&lt;/span&gt; /etc/containerd/config.toml
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo sed&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;s/SystemdCgroup = true/SystemdCgroup = false/&apos;&lt;/span&gt; /etc/containerd/config.toml
&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;systemctl restart containerd

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; containerd &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
containerd github.com/containerd/containerd v1.7.27 05044ec0a9a75232cad458027ca83437aae3f4da
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And then finally, I need to ensure that there’s a valid CNI configuration in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/cni/net.d/&lt;/code&gt;.&lt;br /&gt;
For that I ran the following steps.&lt;/p&gt;

    &lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; /opt/cni/bin

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;curl &lt;span class=&quot;nt&quot;&gt;-L&lt;/span&gt; https://github.com/containernetworking/plugins/releases/download/v1.3.0/cni-plugins-linux-amd64-v1.3.0.tgz | &lt;span class=&quot;nb&quot;&gt;sudo tar&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-C&lt;/span&gt; /opt/cni/bin &lt;span class=&quot;nt&quot;&gt;-xz&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo mkdir&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; /etc/cni/net.d

&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;sudo tee&lt;/span&gt; /etc/cni/net.d/10-bridge.conf &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;
{
  &quot;cniVersion&quot;: &quot;0.4.0&quot;,
  &quot;name&quot;: &quot;bridge&quot;,
  &quot;type&quot;: &quot;bridge&quot;,
  &quot;bridge&quot;: &quot;cni0&quot;,
  &quot;isGateway&quot;: true,
  &quot;ipMasq&quot;: true,
  &quot;ipam&quot;: {
      &quot;type&quot;: &quot;host-local&quot;,
      &quot;subnet&quot;: &quot;10.22.0.0/16&quot;,
      &quot;routes&quot;: [{&quot;dst&quot;: &quot;0.0.0.0/0&quot;}]
  }
}
&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these pre-requisties out of my way, for running the Node e2e tests (i.e., to run the &lt;em&gt;ginkgo&lt;/em&gt; binary against the subdirectory &lt;em&gt;test/e2e_node&lt;/em&gt;), I will use the following &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make&lt;/code&gt; target:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make test-e2e-node
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And this also has a handy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HELP&lt;/code&gt; option:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make test-e2e-node &lt;span class=&quot;nv&quot;&gt;PRINT_HELP&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;y
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Right now, I want to try running a single test, so, I will use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FOCUS&lt;/code&gt; arugment to target it.&lt;br /&gt;
(I want to test &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/09aaf7226056a7964adcb176d789de5507313d00/test/e2e_node/pod_conditions_test.go#L140-L199&quot;&gt;this block&lt;/a&gt; invoked via this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ginkgo.It(...)&lt;/code&gt; &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/09aaf7226056a7964adcb176d789de5507313d00/test/e2e_node/pod_conditions_test.go#L61-L69&quot;&gt;description&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;So, my make target call would look something like:&lt;br /&gt;
(Please note, I also had to set the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KUBE_ROOT&lt;/code&gt; variable to point to the correct path to my local kubernetes repo clone.)&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nv&quot;&gt;KUBE_ROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; make test-e2e-node &lt;span class=&quot;nv&quot;&gt;FOCUS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;just the scheduled condition set&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Wait! It ran, but not successfully. I got the following error:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Captured&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt; StdOut/StdErr Output

  Timeline &amp;gt;&amp;gt;
  I0920 14:50:41.511206   22650 server.go:105] Starting server &quot;services&quot; with command &quot;/home/psaggu/work-upstream/kep-3085-add-condition-for-sandbox-creation/kubernetes/_output/local/go/bin/e2e_node.test --run-services-mode --bearer-token=Ai-zpfsimz4_NvH2 --test.timeout=0 --ginkgo.seed=1758360041 --ginkgo.timeout=23h59m59.999947072s --ginkgo.grace-period=30s --ginkgo.focus=just the scheduled condition set --ginkgo.skip=&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;[Flaky&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;]|&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;[Slow&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;]|&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;[Serial&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt;] --ginkgo.parallel.process=1 --ginkgo.parallel.total=8 --ginkgo.parallel.host=127.0.0.1:33109 --v 4 --report-dir=/tmp/_artifacts/250920T145006 --node-name alpha --kubelet-flags=--cluster-domain=cluster.local --dns-domain=cluster.local --prepull-images=false --container-runtime-endpoint=unix:///run/containerd/containerd.sock --runtime-config= --kubelet-config-file=test/e2e_node/jenkins/default-kubelet-config.yaml&quot;
  I0920 14:50:41.511254   22650 util.go:48] Running readiness check for service &quot;services&quot;
  I0920 14:50:41.511354   22650 server.go:133] Output file for server &quot;services&quot;: /tmp/_artifacts/250920T145006/services.log
  I0920 14:50:41.511706   22650 server.go:163] Waiting for server &quot;services&quot; start command to complete
  W0920 14:50:43.029782   22650 util.go:106] Health check on &quot;https://127.0.0.1:6443/healthz&quot; failed, status=500
  I0920 14:50:44.032240   22650 services.go:69] Node services started.
  I0920 14:50:44.032254   22650 kubelet.go:157] Starting kubelet
  I0920 14:50:44.032259 22650 kubelet.go:159] Standalone mode: false
  I0920 14:50:44.033031   22650 feature_gate.go:385] feature gates: {map[]}
  I0920 14:50:44.042420   22650 server.go:105] Starting server &quot;kubelet&quot; with command &quot;/usr/bin/systemd-run -p Delegate=true -p StandardError=append:/tmp/_artifacts/250920T145006/kubelet.log --unit=kubelet-20250920T145044.service --slice=runtime.slice --remain-after-exit /home/psaggu/work-upstream/kep-3085-add-condition-for-sandbox-creation/kubernetes/_output/local/go/bin/kubelet --kubeconfig /home/psaggu/work-upstream/kep-3085-add-condition-for-sandbox-creation/kubernetes/_output/local/go/bin/kubeconfig --root-dir /var/lib/kubelet --v 4 --config-dir /home/psaggu/work-upstream/kep-3085-add-condition-for-sandbox-creation/kubernetes/_output/local/go/bin/kubelet.conf.d --hostname-override alpha --container-runtime-endpoint unix:///run/containerd/containerd.sock --config /home/psaggu/work-upstream/kep-3085-add-condition-for-sandbox-creation/kubernetes/_output/local/go/bin/kubelet-config --cluster-domain=cluster.local&quot;
  I0920 14:50:44.042464   22650 util.go:48] Running readiness check for service &quot;kubelet&quot;
  I0920 14:50:44.042571   22650 server.go:133] Output file for server &quot;kubelet&quot;: /tmp/_artifacts/250920T145006/kubelet.log
  I0920 14:50:44.043021   22650 server.go:163] Waiting for server &quot;kubelet&quot; start command to complete
  W0920 14:50:45.058069   22650 util.go:104] Health check on &quot;http://127.0.0.1:10248/healthz&quot; failed, error=Head &quot;http://127.0.0.1:10248/healthz&quot;: dial tcp 127.0.0.1:10248: connect: connection refused

    ...
    ...

  In [SynchronizedBeforeSuite] at: k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:235 @ 09/20/25 14:52:44.204
------------------------------
[SynchronizedBeforeSuite] [FAILED] [122.848 seconds]
[SynchronizedBeforeSuite] 
k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:235

  [FAILED] SynchronizedBeforeSuite failed on Ginkgo parallel process #1
    The first SynchronizedBeforeSuite function running on Ginkgo parallel process
    #1 failed.  This suite will now abort.

  
  In [SynchronizedBeforeSuite] at: k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:235 @ 09/20/25 14:52:44.211
------------------------------

Summarizing 8 Failures:
  [FAIL] [SynchronizedBeforeSuite] 
  k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:235

  ...
  ...

Ran 0 of 876 Specs in 130.799 seconds
FAIL! -- A BeforeSuite node failed so all tests were skipped.

Ginkgo ran 1 suite in 2m11.106353619s

Test Suite Failed
F0920 14:52:52.136374   21331 run_local.go:101] Test failed: exit status 1
exit status 1
make: *** [Makefile:292: test-e2e-node] Error 1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I did a little bit looking around and realised that my test is not able to start &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubelet&lt;/code&gt; properly.&lt;/p&gt;

&lt;p&gt;But I still couldn’t understand why exactly! Because the Kubelet binary is built as part of the test run and is available in the path - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_output/local/go/bin/kubelet&lt;/code&gt;.&lt;br /&gt;
(I didn’t have to install kubelet binary by myself, it was built as part of the above make target run along with other components like kube-apiserver, etc.)&lt;/p&gt;

&lt;p&gt;Some more digging (well, actually reading the above error message once again, &lt;em&gt;properly&lt;/em&gt;).&lt;br /&gt;
I realised, I can find out the actually issue in the kubelet logs.&lt;/p&gt;

&lt;p&gt;Below log helped:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;I0920 14:50:44.042571   22650 server.go:133] Output file for server “kubelet”: /tmp/_artifacts/250920T145006/kubelet.log&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, checking the kubelet logs and it gave me the problem right away.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; /tmp/_artifacts/250920T145006/kubelet.log

I0920 14:50:44.151457   22917 server.go:579] &lt;span class=&quot;s2&quot;&gt;&quot;Sending events to api server&quot;&lt;/span&gt;
I0920 14:50:44.151587   22917 swap_util.go:119] &lt;span class=&quot;s2&quot;&gt;&quot;Swap is on&quot;&lt;/span&gt; /proc/swaps &lt;span class=&quot;nv&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&amp;lt;
	Filename				Type		Size		Used		Priority
	/dev/nvme0n1p3                          partition	2097472		0		&lt;span class=&quot;nt&quot;&gt;-2&lt;/span&gt;
 &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
E0920 14:50:44.151610   22917 run.go:72] &lt;span class=&quot;s2&quot;&gt;&quot;command failed&quot;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;failed to run Kubelet: running with swap on is not supported, please disable swap or set --fail-swap-on flag to false&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;swap&lt;/code&gt; is ON, on my machine.&lt;br /&gt;
The test setup expects me to to turn it OFF atleast for the duration of the execution of the test.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;swapoff &lt;span class=&quot;nt&quot;&gt;-a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I turned off the swap and reran the test.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;KUBE_ROOT&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; make test-e2e-node &lt;span class=&quot;nv&quot;&gt;FOCUS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;just the scheduled condition set&quot;&lt;/span&gt;

  &lt;span class=&quot;o&quot;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Captured&lt;/span&gt;&lt;span class=&quot;sh&quot;&gt; StdOut/StdErr Output
------------------------------
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Ran 1 of 876 Specs in 37.704 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 875 Skipped

Ginkgo ran 1 suite in 37.997204389s
Test Suite Passed
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It worked! The test ran successfully! Hurrah!&lt;/p&gt;

&lt;p&gt;But where to check the logs now?&lt;br /&gt;
I can’t see any test execution logs, information like Pod status (pending -&amp;gt; initializing -&amp;gt; running, etc).&lt;/p&gt;

&lt;p&gt;Figured out - the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make test-e2e-node&lt;/code&gt; run captures a bunch of artifacts from the execution of the test.&lt;/p&gt;

&lt;p&gt;I can find them in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/tmp/_artifacts&lt;/code&gt; path.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; /tmp/_artifacts/250920T153001

build-log.txt  containerd-installation.log  containerd.log  junit_01.xml  kern.log  kubelet.log  services.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And in my case, for the Pod status related information, I can check those from the Kubelet logs.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ &lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; /tmp/_artifacts/250920T153001/kubelet.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, here we go. I have a solution for running my new node e2e tests locally.&lt;/p&gt;

&lt;p&gt;(Off I go to implement the test! o/)&lt;/p&gt;

</description>
    <pubDate>Sat, 20 Sep 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/09/20/run-e2e-on-kubernetes.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/09/20/run-e2e-on-kubernetes.html</guid>
  </item>
  
  <item>
    <title>go workspaces usage in kubernetes project</title>
    <description>&lt;p&gt;Kubernetes (k/k) &lt;a href=&quot;https://github.com/kubernetes/kubernetes/commit/65b841c077e0d3282d28b9199aec72d23d045104&quot;&gt;recently started&lt;/a&gt; using &lt;a href=&quot;https://go.dev/doc/tutorial/workspaces&quot;&gt;&lt;strong&gt;Go Workspaces&lt;/strong&gt;&lt;/a&gt; to manage its multi-module setup more effectively.&lt;/p&gt;

&lt;p&gt;The goal is to helps keep things consistent across the many staging repositories and the main k/k project.&lt;/p&gt;

&lt;p&gt;At the root of the k/k repo, you’ll find &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go.work&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go.work.sum&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These files are auto-generated by the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/73014647f9bdd7186b5fe121326b961d6521c162/hack/update-vendor.sh&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hack/update-vendor.sh&lt;/code&gt;&lt;/a&gt; script.&lt;/p&gt;

&lt;p&gt;Specifically, the logic lives around &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/73014647f9bdd7186b5fe121326b961d6521c162/hack/update-vendor.sh#L198-L219&quot;&gt;lines 198–219&lt;/a&gt; and &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/73014647f9bdd7186b5fe121326b961d6521c162/hack/update-vendor.sh#L293-L303&quot;&gt;293–303&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;At a high level, the script runs the following commands from the root of the repo:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;go work init
go work edit &lt;span class=&quot;nt&quot;&gt;-go&lt;/span&gt; 1.24.0 &lt;span class=&quot;nt&quot;&gt;-godebug&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;go1.24
go work edit &lt;span class=&quot;nt&quot;&gt;-use&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;

git ls-files &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;:(glob)./staging/src/k8s.io/*/go.mod&apos;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  | xargs &lt;span class=&quot;nt&quot;&gt;-0&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n1&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;dirname&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-z&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
  | xargs &lt;span class=&quot;nt&quot;&gt;-0&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-n1&lt;/span&gt; go work edit &lt;span class=&quot;nt&quot;&gt;-use&lt;/span&gt;

go mod download
go work vendor
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This creates:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/master/go.work&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go.work&lt;/code&gt;&lt;/a&gt; file that includes the root module (.) and all the Kubernetes staging modules under &lt;a href=&quot;https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io&quot;&gt;staging/src/k8s.io&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;go&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1.24.0&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;godebug&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;go1&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;.24&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;use&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;staging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;api&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;staging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;apiextensions&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;apiserver&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;staging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;apimachinery&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;o&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;staging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;io&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sample&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;controller&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/master/go.work.sum&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go.work.sum&lt;/code&gt;&lt;/a&gt; file that tracks checksums for the workspace modules — like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go.sum&lt;/code&gt;, but at the workspace level.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;and the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/tree/master/vendor&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vendor/&lt;/code&gt;&lt;/a&gt; directory which is populated via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go work vendor&lt;/code&gt; and collects all dependencies from the workspace modules.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</description>
    <pubDate>Thu, 19 Jun 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/06/19/go-workspaces-in-k8s.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/06/19/go-workspaces-in-k8s.html</guid>
  </item>
  
  <item>
    <title>Access data persisted in Etcd with etcdctl and kubectl</title>
    <description>&lt;p&gt;I created the following CRD (Custom Resource Definition) with — &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl apply -f crd-with-x-validations.yaml&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  # name must be in the form: &amp;lt;plural&amp;gt;.&amp;lt;group&amp;gt;
  name: myapps.example.com
spec:
  # group name to use for REST API: /apis/&amp;lt;group&amp;gt;/&amp;lt;version&amp;gt;
  group: example.com
  scope: Namespaced
  names:
    # kind is normally the CamelCased singular type. 
    kind: MyApp
    # singular name to be used as an alias on the CLI
    singular: myapp
    # plural name in the URL: /apis/&amp;lt;group&amp;gt;/&amp;lt;version&amp;gt;/&amp;lt;plural&amp;gt;
    plural: myapps
  versions:
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            x-kubernetes-validations: 
              - rule: &quot;self.minReplicas &amp;lt;= self.maxReplicas&quot;
                messageExpression: &quot;&apos;minReplicas (%d) cannot be larger than maxReplicas (%d)&apos;.format([self.minReplicas, self.maxReplicas])&quot;
            type: object
            properties:
              minReplicas:
                type: integer
              maxReplicas:
                type: integer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I want to check how the above CRD is persisted in Etcd.&lt;/p&gt;

&lt;p&gt;I have two ways to do the job:&lt;/p&gt;

&lt;h4 id=&quot;option-1&quot;&gt;Option 1:&lt;/h4&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;etcdctl&lt;/code&gt; to directly verify the persisted data in Etcd.&lt;sup id=&quot;fnref:1&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;My three steps process:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Exec inside the etcd pod in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-system&lt;/code&gt; namespace of your kubernetes cluster —
 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl exec -it -n kube-system etcd-kep-4595-cluster-control-plane -- /bin/sh&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Create alias —
 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alias e=&quot;etcdctl --endpoints 127.0.0.1:2379 --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key --cacert=/etc/kubernetes/pki/etcd/ca.crt&quot;&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Access the data —
 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;e get --prefix /registry/apiextensions.k8s.io/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sh-5.2# e get --prefix /registry/apiextensions.k8s.io/

/registry/apiextensions.k8s.io/customresourcedefinitions/shirts.stable.example.com
{&quot;kind&quot;:&quot;CustomResourceDefinition&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1beta1&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;shirts.stable.example.com&quot;,&quot;uid&quot;:&quot;09696eb0-d58b-4a21-8820-b2230b13707e&quot;,&quot;generation&quot;:1,&quot;creationTimestamp&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;annotations&quot;:{&quot;kubectl.kubernetes.io/last-applied-configuration&quot;:&quot;{\&quot;apiVersion\&quot;:\&quot;apiextensions.k8s.io/v1\&quot;,\&quot;kind\&quot;:\&quot;CustomResourceDefinition\&quot;,\&quot;metadata\&quot;:{\&quot;annotations\&quot;:{},\&quot;name\&quot;:\&quot;shirts.stable.example.com\&quot;},\&quot;spec\&quot;:{\&quot;group\&quot;:\&quot;stable.example.com\&quot;,\&quot;names\&quot;:{\&quot;kind\&quot;:\&quot;Shirt\&quot;,\&quot;plural\&quot;:\&quot;shirts\&quot;,\&quot;shortNames\&quot;:[\&quot;shrt\&quot;],\&quot;singular\&quot;:\&quot;shirt\&quot;},\&quot;scope\&quot;:\&quot;Namespaced\&quot;,\&quot;versions\&quot;:[{\&quot;additionalPrinterColumns\&quot;:[{\&quot;jsonPath\&quot;:\&quot;.spec.color\&quot;,\&quot;name\&quot;:\&quot;Fruit\&quot;,\&quot;type\&quot;:\&quot;string\&quot;}],\&quot;name\&quot;:\&quot;v1\&quot;,\&quot;schema\&quot;:{\&quot;openAPIV3Schema\&quot;:{\&quot;properties\&quot;:{\&quot;spec\&quot;:{\&quot;properties\&quot;:{\&quot;color\&quot;:{\&quot;type\&quot;:\&quot;string\&quot;},\&quot;size\&quot;:{\&quot;type\&quot;:\&quot;string\&quot;}},\&quot;type\&quot;:\&quot;object\&quot;}},\&quot;type\&quot;:\&quot;object\&quot;}},\&quot;served\&quot;:true,\&quot;storage\&quot;:true}]}}\n&quot;},&quot;managedFields&quot;:[{&quot;manager&quot;:&quot;kube-apiserver&quot;,&quot;operation&quot;:&quot;Update&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1&quot;,&quot;time&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;fieldsType&quot;:&quot;FieldsV1&quot;,&quot;fieldsV1&quot;:{&quot;f:status&quot;:{&quot;f:acceptedNames&quot;:{&quot;f:kind&quot;:{},&quot;f:listKind&quot;:{},&quot;f:plural&quot;:{},&quot;f:shortNames&quot;:{},&quot;f:singular&quot;:{}},&quot;f:conditions&quot;:{&quot;k:{\&quot;type\&quot;:\&quot;Established\&quot;}&quot;:{&quot;.&quot;:{},&quot;f:lastTransitionTime&quot;:{},&quot;f:message&quot;:{},&quot;f:reason&quot;:{},&quot;f:status&quot;:{},&quot;f:type&quot;:{}},&quot;k:{\&quot;type\&quot;:\&quot;NamesAccepted\&quot;}&quot;:{&quot;.&quot;:{},&quot;f:lastTransitionTime&quot;:{},&quot;f:message&quot;:{},&quot;f:reason&quot;:{},&quot;f:status&quot;:{},&quot;f:type&quot;:{}}}}},&quot;subresource&quot;:&quot;status&quot;},{&quot;manager&quot;:&quot;kubectl-client-side-apply&quot;,&quot;operation&quot;:&quot;Update&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1&quot;,&quot;time&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;fieldsType&quot;:&quot;FieldsV1&quot;,&quot;fieldsV1&quot;:{&quot;f:metadata&quot;:{&quot;f:annotations&quot;:{&quot;.&quot;:{},&quot;f:kubectl.kubernetes.io/last-applied-configuration&quot;:{}}},&quot;f:spec&quot;:{&quot;f:conversion&quot;:{&quot;.&quot;:{},&quot;f:strategy&quot;:{}},&quot;f:group&quot;:{},&quot;f:names&quot;:{&quot;f:kind&quot;:{},&quot;f:listKind&quot;:{},&quot;f:plural&quot;:{},&quot;f:shortNames&quot;:{},&quot;f:singular&quot;:{}},&quot;f:scope&quot;:{},&quot;f:versions&quot;:{}}}}]},&quot;spec&quot;:{&quot;group&quot;:&quot;stable.example.com&quot;,&quot;version&quot;:&quot;v1&quot;,&quot;names&quot;:{&quot;plural&quot;:&quot;shirts&quot;,&quot;singular&quot;:&quot;shirt&quot;,&quot;shortNames&quot;:[&quot;shrt&quot;],&quot;kind&quot;:&quot;Shirt&quot;,&quot;listKind&quot;:&quot;ShirtList&quot;},&quot;scope&quot;:&quot;Namespaced&quot;,&quot;validation&quot;:{&quot;openAPIV3Schema&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;spec&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;color&quot;:{&quot;type&quot;:&quot;string&quot;},&quot;size&quot;:{&quot;type&quot;:&quot;string&quot;}}}}}},&quot;versions&quot;:[{&quot;name&quot;:&quot;v1&quot;,&quot;served&quot;:true,&quot;storage&quot;:true}],&quot;additionalPrinterColumns&quot;:[{&quot;name&quot;:&quot;Fruit&quot;,&quot;type&quot;:&quot;string&quot;,&quot;JSONPath&quot;:&quot;.spec.color&quot;}],&quot;conversion&quot;:{&quot;strategy&quot;:&quot;None&quot;},&quot;preserveUnknownFields&quot;:false},&quot;status&quot;:{&quot;conditions&quot;:[{&quot;type&quot;:&quot;NamesAccepted&quot;,&quot;status&quot;:&quot;True&quot;,&quot;lastTransitionTime&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;reason&quot;:&quot;NoConflicts&quot;,&quot;message&quot;:&quot;no conflicts found&quot;},{&quot;type&quot;:&quot;Established&quot;,&quot;status&quot;:&quot;True&quot;,&quot;lastTransitionTime&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;reason&quot;:&quot;InitialNamesAccepted&quot;,&quot;message&quot;:&quot;the initial names have been accepted&quot;}],&quot;acceptedNames&quot;:{&quot;plural&quot;:&quot;shirts&quot;,&quot;singular&quot;:&quot;shirt&quot;,&quot;shortNames&quot;:[&quot;shrt&quot;],&quot;kind&quot;:&quot;Shirt&quot;,&quot;listKind&quot;:&quot;ShirtList&quot;},&quot;storedVersions&quot;:[&quot;v1&quot;]}}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;option-2&quot;&gt;Option 2:&lt;/h4&gt;

&lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt; to access the persisted data from Etcd –&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl get --raw /apis/apiextensions.k8s.io/v1/customresourcedefinitions/shirts.stable.example.com&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;gt; kubectl get --raw /apis/apiextensions.k8s.io/v1/customresourcedefinitions/shirts.stable.example.com

{&quot;kind&quot;:&quot;CustomResourceDefinition&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1&quot;,&quot;metadata&quot;:{&quot;name&quot;:&quot;shirts.stable.example.com&quot;,&quot;uid&quot;:&quot;09696eb0-d58b-4a21-8820-b2230b13707e&quot;,&quot;resourceVersion&quot;:&quot;594&quot;,&quot;generation&quot;:1,&quot;creationTimestamp&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;annotations&quot;:{&quot;kubectl.kubernetes.io/last-applied-configuration&quot;:&quot;{\&quot;apiVersion\&quot;:\&quot;apiextensions.k8s.io/v1\&quot;,\&quot;kind\&quot;:\&quot;CustomResourceDefinition\&quot;,\&quot;metadata\&quot;:{\&quot;annotations\&quot;:{},\&quot;name\&quot;:\&quot;shirts.stable.example.com\&quot;},\&quot;spec\&quot;:{\&quot;group\&quot;:\&quot;stable.example.com\&quot;,\&quot;names\&quot;:{\&quot;kind\&quot;:\&quot;Shirt\&quot;,\&quot;plural\&quot;:\&quot;shirts\&quot;,\&quot;shortNames\&quot;:[\&quot;shrt\&quot;],\&quot;singular\&quot;:\&quot;shirt\&quot;},\&quot;scope\&quot;:\&quot;Namespaced\&quot;,\&quot;versions\&quot;:[{\&quot;additionalPrinterColumns\&quot;:[{\&quot;jsonPath\&quot;:\&quot;.spec.color\&quot;,\&quot;name\&quot;:\&quot;Fruit\&quot;,\&quot;type\&quot;:\&quot;string\&quot;}],\&quot;name\&quot;:\&quot;v1\&quot;,\&quot;schema\&quot;:{\&quot;openAPIV3Schema\&quot;:{\&quot;properties\&quot;:{\&quot;spec\&quot;:{\&quot;properties\&quot;:{\&quot;color\&quot;:{\&quot;type\&quot;:\&quot;string\&quot;},\&quot;size\&quot;:{\&quot;type\&quot;:\&quot;string\&quot;}},\&quot;type\&quot;:\&quot;object\&quot;}},\&quot;type\&quot;:\&quot;object\&quot;}},\&quot;served\&quot;:true,\&quot;storage\&quot;:true}]}}\n&quot;},&quot;managedFields&quot;:[{&quot;manager&quot;:&quot;kube-apiserver&quot;,&quot;operation&quot;:&quot;Update&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1&quot;,&quot;time&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;fieldsType&quot;:&quot;FieldsV1&quot;,&quot;fieldsV1&quot;:{&quot;f:status&quot;:{&quot;f:acceptedNames&quot;:{&quot;f:kind&quot;:{},&quot;f:listKind&quot;:{},&quot;f:plural&quot;:{},&quot;f:shortNames&quot;:{},&quot;f:singular&quot;:{}},&quot;f:conditions&quot;:{&quot;k:{\&quot;type\&quot;:\&quot;Established\&quot;}&quot;:{&quot;.&quot;:{},&quot;f:lastTransitionTime&quot;:{},&quot;f:message&quot;:{},&quot;f:reason&quot;:{},&quot;f:status&quot;:{},&quot;f:type&quot;:{}},&quot;k:{\&quot;type\&quot;:\&quot;NamesAccepted\&quot;}&quot;:{&quot;.&quot;:{},&quot;f:lastTransitionTime&quot;:{},&quot;f:message&quot;:{},&quot;f:reason&quot;:{},&quot;f:status&quot;:{},&quot;f:type&quot;:{}}}}},&quot;subresource&quot;:&quot;status&quot;},{&quot;manager&quot;:&quot;kubectl-client-side-apply&quot;,&quot;operation&quot;:&quot;Update&quot;,&quot;apiVersion&quot;:&quot;apiextensions.k8s.io/v1&quot;,&quot;time&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;fieldsType&quot;:&quot;FieldsV1&quot;,&quot;fieldsV1&quot;:{&quot;f:metadata&quot;:{&quot;f:annotations&quot;:{&quot;.&quot;:{},&quot;f:kubectl.kubernetes.io/last-applied-configuration&quot;:{}}},&quot;f:spec&quot;:{&quot;f:conversion&quot;:{&quot;.&quot;:{},&quot;f:strategy&quot;:{}},&quot;f:group&quot;:{},&quot;f:names&quot;:{&quot;f:kind&quot;:{},&quot;f:listKind&quot;:{},&quot;f:plural&quot;:{},&quot;f:shortNames&quot;:{},&quot;f:singular&quot;:{}},&quot;f:scope&quot;:{},&quot;f:versions&quot;:{}}}}]},&quot;spec&quot;:{&quot;group&quot;:&quot;stable.example.com&quot;,&quot;names&quot;:{&quot;plural&quot;:&quot;shirts&quot;,&quot;singular&quot;:&quot;shirt&quot;,&quot;shortNames&quot;:[&quot;shrt&quot;],&quot;kind&quot;:&quot;Shirt&quot;,&quot;listKind&quot;:&quot;ShirtList&quot;},&quot;scope&quot;:&quot;Namespaced&quot;,&quot;versions&quot;:[{&quot;name&quot;:&quot;v1&quot;,&quot;served&quot;:true,&quot;storage&quot;:true,&quot;schema&quot;:{&quot;openAPIV3Schema&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;spec&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;color&quot;:{&quot;type&quot;:&quot;string&quot;},&quot;size&quot;:{&quot;type&quot;:&quot;string&quot;}}}}}},&quot;additionalPrinterColumns&quot;:[{&quot;name&quot;:&quot;Fruit&quot;,&quot;type&quot;:&quot;string&quot;,&quot;jsonPath&quot;:&quot;.spec.color&quot;}]}],&quot;conversion&quot;:{&quot;strategy&quot;:&quot;None&quot;}},&quot;status&quot;:{&quot;conditions&quot;:[{&quot;type&quot;:&quot;NamesAccepted&quot;,&quot;status&quot;:&quot;True&quot;,&quot;lastTransitionTime&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;reason&quot;:&quot;NoConflicts&quot;,&quot;message&quot;:&quot;no conflicts found&quot;},{&quot;type&quot;:&quot;Established&quot;,&quot;status&quot;:&quot;True&quot;,&quot;lastTransitionTime&quot;:&quot;2025-02-21T12:38:19Z&quot;,&quot;reason&quot;:&quot;InitialNamesAccepted&quot;,&quot;message&quot;:&quot;the initial names have been accepted&quot;}],&quot;acceptedNames&quot;:{&quot;plural&quot;:&quot;shirts&quot;,&quot;singular&quot;:&quot;shirt&quot;,&quot;shortNames&quot;:[&quot;shrt&quot;],&quot;kind&quot;:&quot;Shirt&quot;,&quot;listKind&quot;:&quot;ShirtList&quot;},&quot;storedVersions&quot;:[&quot;v1&quot;]}}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;I realised while I’m accessing the same CRD data with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;etcdctl&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt;, I’m getting a few things different in my output. In case of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;etcdctl&lt;/code&gt; — I get &lt;strong&gt;(i)&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;version&quot;:&quot;v1&quot;&lt;/code&gt;, &lt;strong&gt;(ii)&lt;/strong&gt; the CRD &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;schema&lt;/code&gt; is stored in field &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;validation&quot;:{&quot;openAPIV3Schema&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;spec&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;color&quot;:{&quot;type&quot;:&quot;string&quot;},&quot;size&quot;:{&quot;type&quot;:&quot;string&quot;}}}}}}&lt;/code&gt; and &lt;strong&gt;(iii)&lt;/strong&gt; and there’s a top level &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additionalPrinterColumns&lt;/code&gt;. While in case of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt;— I don’t get the above bits, and instead I get both, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;schema&lt;/code&gt; and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additionalPrinterColumns&lt;/code&gt; stored in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;versions&lt;/code&gt; array - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;versions&quot;:[{&quot;name&quot;:&quot;v1&quot;,&quot;served&quot;:true,&quot;storage&quot;:true,&quot;schema&quot;:{&quot;openAPIV3Schema&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;spec&quot;:{&quot;type&quot;:&quot;object&quot;,&quot;properties&quot;:{&quot;color&quot;:{&quot;type&quot;:&quot;string&quot;},&quot;size&quot;:{&quot;type&quot;:&quot;string&quot;}}}}}},&quot;additionalPrinterColumns&quot;:[{&quot;name&quot;:&quot;Fruit&quot;,&quot;type&quot;:&quot;string&quot;,&quot;jsonPath&quot;:&quot;.spec.color&quot;}]}]&lt;/code&gt;.  This is (maybe) something to do with how currently (as of writing) Kubernetes stores/persists CRD &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1&lt;/code&gt; as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1beta1&lt;/code&gt; in Etcd, because &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1&lt;/code&gt; takes more space to represent the same CRD (due to denormalization of fields among multi-version CRDs) and we have CRDs in the wild that are already bumping against the max allowed size (Thank you, &lt;a href=&quot;https://jordan.liggitt.net/&quot;&gt;Jordan Liggit&lt;/a&gt; for explaining this.) Read this&lt;sup id=&quot;fnref:2&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:2&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; and this&lt;sup id=&quot;fnref:3&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:3&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt; for some context. &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:2&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/931ad2a9fdedaf1e47126f5b3e5880eb3708bfb2/pkg/controlplane/apiserver/apiextensions.go#L55-L56&quot;&gt;code block&lt;/a&gt;, where the encoding version for CRDs is configured &lt;a href=&quot;#fnref:2&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:3&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;Attempt to bump the storage version from v1beta1 → v1, but was blocked on &lt;a href=&quot;https://github.com/kubernetes/kubernetes/issues/82292&quot;&gt;k/k PR #82292&lt;/a&gt; &lt;a href=&quot;#fnref:3&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
    <pubDate>Tue, 25 Feb 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/02/25/access-persisted-dated-in-etcd.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/02/25/access-persisted-dated-in-etcd.html</guid>
  </item>
  
  <item>
    <title>slabtop - to check kernel memory usage, and kubelet&apos;s container_memory_kernel_usage metrics</title>
    <description>&lt;p&gt;Today, I learnt about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;slabtop&lt;/code&gt;&lt;sup id=&quot;fnref:1&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;, a command line utility to check the memory used by kernel&lt;br /&gt;
(or as its man page says, it displays the kernel slab cache information in real time&lt;sup id=&quot;fnref:2&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:2&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/623dcdd3-a8e5-4d59-a802-08daed8ba619&quot; alt=&quot;image&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;(Logging for the future me)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;So, what led to me learning about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;slabtop&lt;/code&gt;?&lt;/strong&gt;&lt;/em&gt; 🙂&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://janusworx.com&quot;&gt;Jason Braganza&lt;/a&gt; taught me this, while we were preparing for our upcoming conference talk (on Kubernetes Metrics)!&lt;/p&gt;

&lt;p&gt;Precisely, following is the metrics (exposed by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubelet&lt;/code&gt; component within a kubernetes cluster) that led to the discussion.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# HELP container_memory_kernel_usage Size of kernel memory allocated in bytes.
# TYPE container_memory_kernel_usage gauge
container_memory_kernel_usage{container=&quot;&quot;,id=&quot;/&quot;,image=&quot;&quot;,name=&quot;&quot;,namespace=&quot;&quot;,pod=&quot;&quot;} 0 1732452865827
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And how &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubelet&lt;/code&gt; gets this “kernel memory allocation” information and feeds to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container_memory_kernel_usage&lt;/code&gt; metrics?&lt;/p&gt;

&lt;p&gt;The answer is (at least to the best of my understanding) –&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubelet&lt;/code&gt;’s &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L39&quot;&gt;server&lt;/a&gt; package imports &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L39C2-L39C38&quot;&gt;“github.com/google/cadvisor/metrics”&lt;/a&gt;&lt;sup id=&quot;fnref:3&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:3&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;3&lt;/a&gt;&lt;/sup&gt; (aka the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cadvisor/metrics&lt;/code&gt;) module.&lt;/p&gt;

&lt;p&gt;This &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cadvisor/metrics&lt;/code&gt; go module provides a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NewPrometheusCollector()&lt;/code&gt; function (which kubelet uses here&lt;sup id=&quot;fnref:4&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:4&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;4&lt;/a&gt;&lt;/sup&gt;).&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NewPrometheusCollector()&lt;/code&gt; function take &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;includedMetrics&lt;/code&gt; as one of its many parameters.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  r.RawMustRegister(metrics.NewPrometheusCollector(prometheusHostAdapter{s.host}, containerPrometheusLabelsFunc(s.host), includedMetrics, clock.RealClock{}, cadvisorOpts))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And when this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;includedMetrics&lt;/code&gt; contains &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cadvisormetrics.MemoryUsageMetrics&lt;/code&gt; (which it does in the case in question, check here&lt;sup id=&quot;fnref:6&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:6&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;5&lt;/a&gt;&lt;/sup&gt;),&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;	includedMetrics := cadvisormetrics.MetricSet{
		...
		cadvisormetrics.MemoryUsageMetrics:  struct{}{},
		...
	}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;then &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NewPrometheusCollector()&lt;/code&gt; function exposes the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container_memory_kernel_usage&lt;/code&gt;&lt;sup id=&quot;fnref:5&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:5&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;6&lt;/a&gt;&lt;/sup&gt; metrics.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;func NewPrometheusCollector(i infoProvider, f ContainerLabelsFunc, includedMetrics container.MetricSet, now clock.Clock, opts v2.RequestOptions) *PrometheusCollector {
        ...
        ...
	if includedMetrics.Has(container.MemoryUsageMetrics) {
		c.containerMetrics = append(c.containerMetrics, []containerMetric{
		       ...
		       ...
		       {
				name:      &quot;container_memory_kernel_usage&quot;,
				help:      &quot;Size of kernel memory allocated in bytes.&quot;,
				valueType: prometheus.GaugeValue,
				getValues: func(s *info.ContainerStats) metricValues {
					return metricValues
				},
			},
        ...
        ...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And as we see above in the definition of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container_memory_kernel_usage&lt;/code&gt; metrics,&lt;br /&gt;
the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;valueType&lt;/code&gt; is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prometheus.Gaugevalue&lt;/code&gt; (so its a gauge type metrics),&lt;br /&gt;
and the value is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;value: float64(s.Memory.KernelUsage)&lt;/code&gt; where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KernelUsage&lt;/code&gt; is defined here&lt;sup id=&quot;fnref:7&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:7&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;7&lt;/a&gt;&lt;/sup&gt; and interpreted here&lt;sup id=&quot;fnref:8&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:8&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;8&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;I still feel I can go further down a few more steps to find out the true source of this information, but that’s all for now.&lt;/p&gt;

&lt;hr /&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;which in turn gets the information from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/proc/slabinfo&lt;/code&gt;. &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:2&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;to me it looks something like, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;top&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;htop&lt;/code&gt;. &lt;a href=&quot;#fnref:2&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:3&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;here: &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L39C2-L39C38&quot;&gt;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L39C2-L39C38&lt;/a&gt; &lt;a href=&quot;#fnref:3&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:4&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;kubelet registring the cadvisor metrics provided by cdvisor’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;metrics.NewPrometheusCollector(...)&lt;/code&gt; function – https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L463 &lt;a href=&quot;#fnref:4&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:6&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;Kubelet server package creating a (cadvisor metrics based) set of includedMetrics: &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L441-L451&quot;&gt;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/pkg/kubelet/server/server.go#L441-L451&lt;/a&gt; &lt;a href=&quot;#fnref:6&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:5&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;codeblock adding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;container_memory_kernel_usage&lt;/code&gt; metrics: &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/vendor/github.com/google/cadvisor/metrics/prometheus.go#L371-L393&quot;&gt;https://github.com/kubernetes/kubernetes/blob/d92b99ea637ee67a5c925e5e628f5816a01162ac/vendor/github.com/google/cadvisor/metrics/prometheus.go#L371-L393&lt;/a&gt; &lt;a href=&quot;#fnref:5&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:7&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;Cadvisor’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MemoryStats&lt;/code&gt; struct providing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KernelUsage&lt;/code&gt;: &lt;a href=&quot;https://github.com/google/cadvisor/blob/5bd422f9e1cea876ee9d550f2ed95916e1766f1a/info/v1/container.go#L430-L432&quot;&gt;https://github.com/google/cadvisor/blob/5bd422f9e1cea876ee9d550f2ed95916e1766f1a/info/v1/container.go#L430-L432&lt;/a&gt; &lt;a href=&quot;#fnref:7&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:8&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;Cadvisor’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setMemoryStats()&lt;/code&gt; function, setting value for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KernelUsage&lt;/code&gt;: &lt;a href=&quot;https://github.com/google/cadvisor/blob/5bd422f9e1cea876ee9d550f2ed95916e1766f1a/container/libcontainer/handler.go#L799-L803&quot;&gt;https://github.com/google/cadvisor/blob/5bd422f9e1cea876ee9d550f2ed95916e1766f1a/container/libcontainer/handler.go#L799-L803&lt;/a&gt; &lt;a href=&quot;#fnref:8&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
    <pubDate>Mon, 24 Feb 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/02/24/check-kernel-memory.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/02/24/check-kernel-memory.html</guid>
  </item>
  
  <item>
    <title>TIL: what is structural schema, and how to drop unknown fields in a custom resource (CR)</title>
    <description>&lt;p&gt;Today, during our pair-(learning/programming) session for the &lt;a href=&quot;https://github.com/kubernetes/enhancements/issues/4595&quot;&gt;KEP 4595&lt;/a&gt; aka, CEL for CRD AdditionalPrinterColumns, &lt;a href=&quot;https://sreeram.xyz/&quot;&gt;Sreeram&lt;/a&gt; and I, came across this article – &lt;a href=&quot;https://kubernetes.io/blog/2019/06/20/crd-structural-schema/#towards-complete-knowledge-of-the-data-structure&quot;&gt;Future of CRDs: Structural Schemas&lt;/a&gt;.&lt;br /&gt;
(It’s an old article from 2019, written by Dr. Stefan Schimanski&lt;sup id=&quot;fnref:2&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:2&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;. I will check if &amp;amp; what anything changed since 2019, but still reading this article in its current state, itself, was a turning point for me w.r.t my understanding of CRD(s).)&lt;/p&gt;

&lt;p&gt;For the first time today, I understood - what is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;structural schema&lt;/code&gt; (something that I keep reading about and keep finding it refereneced everywhere within the kubernetes codebase, over and over again.)&lt;/p&gt;

&lt;p&gt;So, &lt;strong&gt;T&lt;/strong&gt;oday &lt;strong&gt;I&lt;/strong&gt; &lt;strong&gt;L&lt;/strong&gt;earnt (TIL)&lt;sup id=&quot;fnref:1&quot; role=&quot;doc-noteref&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;An OpenAPI v3 schema is a Structural Schema, if:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;the core of an OpenAPI v3 schema, is made out of the following 7 constructs:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;properties&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;items&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additionalProperties&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;type&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nullable&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;title&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;descriptions&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In addition, all types must be non-empty, and in each sub-schema only one of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;properties&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additionalProperties&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;items&lt;/code&gt; may be used.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;if all types are defined&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;the core is extended with value validation following the constraints:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;(i) inside of value validations, there’s no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additionalProperties&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;type&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nullable&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;title&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;description&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;(ii) all fields mentioned in value validation are specified in the core.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Example of a structural schema&lt;/strong&gt; (understand below as a snippet from a CRD definition file, in the CRD &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;schema&lt;/code&gt; field):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  type: object
  properties:
    spec:
      type: object
      properties
        command:
          type: string
          minLength: 1                          # value validation
        shell:
          type: string
          minLength: 1                          # value validation
        machines:
          type: array
          items:
            type: string
            pattern: “^[a-z0-9]+(-[a-z0-9]+)*$” # value validation
      oneOf:                                    # value validation
      - required: [“command”]                   # value validation
      - required: [“shell”]                     # value validation
  required: [“spec”]                            # value validation
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This schema is structural:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;because we have only used the permitted OpenAPI constructs (Rule 1).&lt;/li&gt;
  &lt;li&gt;and each field (like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;spec&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;command&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shell&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;machines&lt;/code&gt;, …) has their types defined (Rule 2).&lt;/li&gt;
  &lt;li&gt;plus, all value validations also follow the above defined rules (Rule 3).&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Example of a non-structural schema&lt;/strong&gt; (understand below as a snippet from a CRD definition file, in the CRD &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;schema&lt;/code&gt; field):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  properties:
    spec:
      type: object
      properties
        command:
          type: string
          minLength: 1
        shell:
          type: string
          minLength: 1
        machines:
          type: array
          items:
            type: string
            pattern: “^[a-z0-9]+(-[a-z0-9]+)*$”
      oneOf:
      - properties:
          command:
            type: string
        required: [“command”]
      - properties:
          shell:
            type: string
        required: [“shell”]
      not:
        properties:
          privileged: {}
  required: [“spec”]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This spec is non-structural for many reasons:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;type:&lt;/code&gt; object at the root is missing (Rule 2).&lt;/li&gt;
  &lt;li&gt;inside of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oneOf&lt;/code&gt; it is not allowed to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;type&lt;/code&gt; (Rule 3-i).&lt;/li&gt;
  &lt;li&gt;inside of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;not&lt;/code&gt; the property &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;privileged&lt;/code&gt; is mentioned, but it is not specified in the core (Rule 3-ii).&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;The non-structural schema, highlighted a big problem (before we had structural schema in place), that is - if we can’t use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;not&lt;/code&gt; to indicate the Kubernetes API server to drop the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;privileged&lt;/code&gt; field, then it will be forever preserved by the API server in Etcd.&lt;/p&gt;

&lt;p&gt;This was fixed by &lt;strong&gt;Pruning&lt;/strong&gt;. (which is not on by default in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io/v1&lt;/code&gt; but had to be explicitly enabled in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io/v1beta1&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Pruning in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io/v1beta1&lt;/code&gt; is enabled via:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  apiVersion: apiextensions/v1beta1
  kind: CustomResourceDefinition
  spec:
    …
    preserveUnknownFields: false
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/kubernetes-deep-dive-code-generation-customresources&quot;&gt;Kubernetes Deep Dive: Code Generation for CustomResources&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/kubernetes-deep-dive-api-server-part-1&quot;&gt;Kubernetes deep dive: API Server - part 1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/kubernetes-deep-dive-api-server-part-2&quot;&gt;Kubernetes Deep Dive: API Server – Part 2&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.redhat.com/en/blog/kubernetes-deep-dive-api-server-part-2&quot;&gt;Kubernetes Deep Dive: API Server – Part 3a&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:2&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;well, while searching for links to add as hyperlink for Dr. Stefan Schimanski, I came across more articles written by him, so, those are for my ToDos now. &lt;a href=&quot;#fnref:2&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:1&quot; role=&quot;doc-endnote&quot;&gt;
      &lt;p&gt;This’s just me rephrasing, all what I learnt from and is mentioned in the original article – &lt;a href=&quot;https://kubernetes.io/blog/2019/06/20/crd-structural-schema/#towards-complete-knowledge-of-the-data-structure&quot;&gt;Future of CRDs: Structural Schemas&lt;/a&gt;. &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
    <pubDate>Mon, 17 Feb 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/02/17/til-structural-schema.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/02/17/til-structural-schema.html</guid>
  </item>
  
  <item>
    <title>The final release of Kubernetes Mandala</title>
    <description>&lt;p&gt;The Kubernetes v1.29.0, aka the &lt;a href=&quot;https://kubernetes.io/blog/2023/12/13/kubernetes-v1-29-release/&quot;&gt;Kubernetes Mandala&lt;/a&gt; was released on &lt;em&gt;&lt;strong&gt;December 13, 2023&lt;/strong&gt;&lt;/em&gt;. This marked the last (major) Kubernetes minor version release of the year, 2023.&lt;br /&gt;
&lt;em&gt;(The original release date was December 5, 2023, but then we had a few rounds of un-avoidable delays.)&lt;/em&gt; 🙂&lt;/p&gt;

&lt;p&gt;This is a very special release for me. I had the honor of being the Release Lead for Kubernetes v1.29 Release cycle, which had a team of &lt;a href=&quot;https://github.com/kubernetes/sig-release/blob/master/releases/release-1.29/release-team.md&quot;&gt;40 ever amazing folks&lt;/a&gt;.&lt;br /&gt;
This release, like all others, also had a very special theme &amp;amp; logo — thanks to &lt;em&gt;&lt;strong&gt;Jason Braganza&lt;/strong&gt;&lt;/em&gt;. He shared the story – &lt;a href=&quot;https://janusworx.com/work/on-how-the-kubernetes-v129-logo-came-about/&quot;&gt;On How the Kubernetes v1.29 Logo Came About&lt;/a&gt;.&lt;/p&gt;

&lt;div style=&quot;text-align: center;&quot;&gt;

&lt;/div&gt;

&lt;figure style=&quot;text-align: center;&quot;&gt;
  &lt;img src=&quot;https://psaggu.com/assets/k8s-logo/k8s129.svg&quot; alt=&quot;Kubernetes Mandala Logo&quot; style=&quot;width: 400px;  display: block; margin: 0 auto;&quot; /&gt;
  &lt;figcaption style=&quot;text-align: center;&quot;&gt;&lt;em&gt;Logo — Kubernetes Mandala&lt;/em&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Today, &lt;em&gt;&lt;strong&gt;February 13, 2025&lt;/strong&gt;&lt;/em&gt;, after an year and 2 months later, marks the final release of Kubernetes 1.29 aka, the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/releases/tag/v1.29.14&quot;&gt;&lt;em&gt;&lt;strong&gt;v1.29.14&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;figure style=&quot;text-align: center;&quot;&gt;
  &lt;img src=&quot;https://github.com/user-attachments/assets/03ac8fbc-8bba-4e03-ac11-439156106a40&quot; alt=&quot;Kubernetes v1.24.9&quot; style=&quot;width: 400px;  display: block; margin: 0 auto;&quot; /&gt;
&lt;/figure&gt;

&lt;p&gt;I’m really grateful for my experience during the 4 months from September to December 2023. It had its ups and downs, but I learned a &lt;em&gt;lot&lt;/em&gt; lot.&lt;br /&gt;
Most importantly, it helped me become more confident and comfortable in having conversations, discussions, and especially, in &lt;em&gt;finding solutions&lt;/em&gt; – both on regular days and especially on tough ones.&lt;/p&gt;
</description>
    <pubDate>Thu, 13 Feb 2025 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2025/02/13/kubernetes-1-29-14.html</link>
    <guid isPermaLink="true">https://psaggu.com/2025/02/13/kubernetes-1-29-14.html</guid>
  </item>
  
  <item>
    <title>The First, CNCF Maintainer Summit, 2024</title>
    <description>&lt;p&gt;I had the opportunity to co-chair the first ever CNCF Maintainer Summit, which was also the first one held in India.&lt;br /&gt;
The event took place on &lt;strong&gt;December 10, 2024&lt;/strong&gt;, as part of the KubeCon + CloudNativeCon India 2024 (the first ever KubeCon in India), at Yashobhoomi (India International Convention &amp;amp; Expo Centre).&lt;br /&gt;
(so many &lt;em&gt;first evers&lt;/em&gt;, I know 😂)&lt;/p&gt;

&lt;figure style=&quot;text-align: center;&quot;&gt;
  &lt;img src=&quot;https://github.com/user-attachments/assets/da8c272c-8025-4ce1-9e9e-f397a548f532&quot; alt=&quot;Maintainer Summit India 2024, Community Team&quot; style=&quot;display: block; margin: 0 auto;&quot; /&gt;
  &lt;figcaption style=&quot;text-align: center;&quot;&gt;&lt;em&gt;Meet the community team of the Maintainer Summit India 2024.&lt;br /&gt;From left to right – Bob Killen, Nabarun Pal (fellow co-chair), Priyanka Saggu (me), Mario Jason Braganza, Sandeep Kanabar, Arvind Parekh, and Arka Saha.
&lt;/em&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

</description>
    <pubDate>Tue, 10 Dec 2024 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2024/12/10/maintainer-summit-india.html</link>
    <guid isPermaLink="true">https://psaggu.com/2024/12/10/maintainer-summit-india.html</guid>
  </item>
  
  <item>
    <title>On receiving the CNCF Community Award, 2024</title>
    <description>&lt;p&gt;On November 14, 2024, I received the &lt;a href=&quot;https://www.cncf.io/announcements/2024/11/14/cloud-native-computing-foundation-announces-the-2024-community-awards-winners/&quot;&gt;CNCF Community Award&lt;/a&gt;, under the category — Chop Wood, Carry Water.&lt;br /&gt;
The award was announced during the &lt;a href=&quot;https://youtu.be/p7J0lAU3AWo?feature=shared&amp;amp;t=535&quot;&gt;Awards Ceremony&lt;/a&gt; on the second day of keynotes at KubeCon + CloudNativeCon 2024.&lt;/p&gt;

&lt;figure style=&quot;text-align: center;&quot;&gt;
  &lt;img src=&quot;https://github.com/user-attachments/assets/0e5a392e-99e4-425b-95f2-76242d8cd0c0&quot; alt=&quot;CNCF Community Award – Priyanka Saggu&quot; style=&quot;display: block; margin: 0 auto;&quot; /&gt;
  &lt;figcaption style=&quot;text-align: center;&quot;&gt;&lt;em&gt;Me, receiving the CNCF Community Award (Choop Wood, Carry Water) 2024, on the keynote stage at KubeCon NA 2024.&lt;/em&gt;&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;hr /&gt;

&lt;figure style=&quot;text-align: center;&quot;&gt;
  &lt;img src=&quot;https://github.com/user-attachments/assets/59d589e0-70e0-4bdd-b900-c7430d01999d&quot; alt=&quot;CNCF Community Award – Priyanka Saggu&quot; style=&quot;display: block; margin: 0 auto;&quot; /&gt;
  &lt;figcaption style=&quot;text-align: center;&quot;&gt;&lt;em&gt;Me, alongside my fellow recipients of the CNCF Community Awards 2024&lt;/em&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
</description>
    <pubDate>Thu, 14 Nov 2024 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/2024/11/14/cncf-cwcw-award.html</link>
    <guid isPermaLink="true">https://psaggu.com/2024/11/14/cncf-cwcw-award.html</guid>
  </item>
  
  <item>
    <title>Kubernetes 1.25 Enhancements Role Lead! #33</title>
    <description>&lt;p&gt;June 14, 2022&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Extending on &lt;a href=&quot;https://www.psaggu.com/upstream-contribution/2021/09/03/notes.html&quot;&gt;my earlier post about the Kubernetes Release Team&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I’m serving as the &lt;strong&gt;Enhancements Role Lead&lt;/strong&gt; for the current &lt;em&gt;Kubernetes 1.25 Release Team&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As a role lead this time, I have a group of five outstanding shadows that I am not only mentoring to become future leads, but I am also learning from them - both &lt;em&gt;“how to teach”&lt;/em&gt; and &lt;em&gt;“how to learn”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I haven’t posted in a long time &lt;em&gt;(ups &amp;amp; downs &amp;amp; new roles &amp;amp; responsibilities &amp;amp; sometimes you don’t feel like doing anything at all &amp;amp; it literally takes all the energy even to do the required)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, just adding that I was also an Enhancements Shadow on the Kubernetes 1.24 Release Team, and my former role lead, &lt;a href=&quot;https://twitter.com/gracenng&quot;&gt;Grace Ngyuen&lt;/a&gt;, nominated me to be the next role lead at the conclusion of the previous release cycle.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/173579594-7cd618e7-ca72-433b-b3b9-8733668d4846.png&quot; alt=&quot;Screenshot 2022-06-14 at 6 12 05 PM&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When I look back on my time throughout these three cycles, I’m amazed at how much I’ve learned. It’s been a great experience. 🙂 Not only did I learn, but I also felt recognized.&lt;/p&gt;

&lt;p&gt;Currently, We’re at Week 4 of the 1.25 release cycle, and it’s one of the busiest for the Enhancements role (as we’re almost approaching Enhancements Freeze in a week). I would say, we’re doing good so far! 😄&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;And one more thing before I finish up this small post!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I got to go to my first ever KubeCon event in person!&lt;/p&gt;

&lt;p&gt;I had the opportunity to attend the KubeCon EU 2022 event in Valencia, Spain (my first ever international travel as well). I was astonished that so many people knew who I was (&lt;em&gt;anything more than zero was “so many” for me&lt;/em&gt;) and that I already belonged to a tiny group of people. It was an incredible feeling.&lt;/p&gt;

&lt;p&gt;I’m not a very photo photo person, but sharing some 🙂&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/173583191-e5c332d0-fd47-4f77-b9d0-3bcf15f509ae.jpg&quot; alt=&quot;52093810604_21284f81cc_o&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/173583230-d084fb4f-c75f-4043-a852-858a5d98ce58.jpg&quot; alt=&quot;Image from iOS (5)&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/173583508-dbe6e4c5-ade1-4c7b-b65d-bcb11ec103ea.jpg&quot; alt=&quot;52093788719_4489628efa_o&quot; /&gt;&lt;/p&gt;

</description>
    <pubDate>Tue, 14 Jun 2022 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2022/06/14/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2022/06/14/notes.html</guid>
  </item>
  
  <item>
    <title>Update: Kubernetes 1.23 Release Enhancements Shadow! #32</title>
    <description>&lt;p&gt;Sept 3, 2021&lt;/p&gt;

&lt;p&gt;👋 &lt;strong&gt;&lt;em&gt;A very quick update!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m serving as a &lt;strong&gt;shadow on the Enhancements team&lt;/strong&gt; for the current &lt;strong&gt;Kubernetes 1.23 release&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/131946173-e58364b8-5233-4461-bc37-2eff6edf7872.png&quot; alt=&quot;enhancements shadow&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Most of the work for Enhancements team, i.e shepherding features for the current Kubernetes release cycle and maintaining the status of &lt;a href=&quot;https://github.com/kubernetes/enhancements/blob/master/keps/README.md&quot;&gt;Kubernetes Enhancements Proposals or KEP(s)&lt;/a&gt;, happens right at the beginning of the release.&lt;/p&gt;

&lt;p&gt;As of today, we’re already 2 weeks into the current release cycle. The Enhancements team has now reached out to each SIG, to remind everyone of the opt-in process, the deadline, and confirming which enhancements are currently being tracked for each SIG.&lt;/p&gt;

&lt;p&gt;If you want to read what all Enhancements KEP(s) are being tracked under the Kubernetes 1.23 release, please check the current Enhancements tracking sheet: &lt;a href=&quot;https://bit.ly/k8s123-enhancement&quot;&gt;https://bit.ly/k8s123-enhancements&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;To folks who’re interested in learning how Kubernetes releases happens and what goes on behind all the hard work, please consider reading &lt;a href=&quot;https://github.com/kubernetes/sig-release/tree/master/release-team/role-handbooks&quot;&gt;the Release Team Role Handbooks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You may also want to read about the &lt;a href=&quot;https://github.com/kubernetes/sig-release/blob/master/release-team/shadows.md&quot;&gt;Release Team Shadow Program&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The Release Team recruits a number of apprentices for each release role, in order to train new release team leads, handle tasks that each lead may not be able to cover, share knowledge about the release process, and help contributors broaden their areas of knowledge and participation.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    <pubDate>Fri, 03 Sep 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/09/03/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/09/03/notes.html</guid>
  </item>
  
  <item>
    <title>How to add a new check in KubeLinter? #31</title>
    <description>&lt;p&gt;Aug 17, 2021&lt;/p&gt;

&lt;h2 id=&quot;contents&quot;&gt;Contents&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;#Introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#steps-to-add-a-new-check&quot;&gt;Steps to add a new check&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#steps-to-verify-the-new-check&quot;&gt;Steps to verify the new check&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;The following document demonstrates the steps followed while adding a new validation check in the upstream &lt;a href=&quot;https://github.com/stackrox/kube-linter&quot;&gt;&lt;strong&gt;kube-linter&lt;/strong&gt;&lt;/a&gt; project.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.&lt;/p&gt;

  &lt;p&gt;&lt;sub&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/stackrox/kube-linter&quot;&gt;kube-linter GitHub Project&lt;/a&gt;&lt;/em&gt;&lt;/sub&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This document uses the static check &lt;a href=&quot;https://github.com/stackrox/kube-linter/tree/main/pkg/templates/latesttag&quot;&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;, as an example to lay down the steps written below.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag&lt;/code&gt; validation check indicates when a deployment-like kubernetes object (i.e. deployments, statefulsets, etc) is running a container with an invalid container image (by default, flags for a floating image tag like “latest”)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;steps-to-add-a-new-check&quot;&gt;Steps to add a new check&lt;/h2&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;[STEP 1] Setup the project on your local machine&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Clone the project repository &amp;amp; change directory to the project root&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone git@github.com:stackrox/kube-linter.git
  
cd kube-linter/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 2] Setup a new directory for the new validation check&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;From the root of the project, change directory to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/&lt;/code&gt; folder&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd pkg/templates
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create a new directory with the name corresponding to the new check (for example, in this case, &lt;a href=&quot;https://github.com/stackrox/kube-linter/tree/main/pkg/templates/latesttag&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latesttag&lt;/code&gt;&lt;/a&gt;)&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir latesttag
  
cd latesttag/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 3] Implement the logic for the new check under the new directory&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Create the following files &amp;amp; folders in the path &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/latesttag/&lt;/code&gt;&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir -p internal/params
  
touch internal/prarms/params.go
  
touch template.go template_test.go
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The above files can be understood as (&amp;amp; referred from):&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;internal/params/params.go&lt;/strong&gt;&lt;/p&gt;

        &lt;p&gt;The &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/latesttag/internal/params/params.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/params/params.go&lt;/code&gt;&lt;/a&gt; file will contain the paramaters required for the test check.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;template.go&lt;/strong&gt;&lt;/p&gt;

        &lt;p&gt;The actual implementation logic for the new test check will be written in the &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/latesttag/template.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;template.go&lt;/code&gt;&lt;/a&gt; file.&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;template_test.go&lt;/strong&gt;&lt;/p&gt;

        &lt;p&gt;And finally, the unit tests to validate the new check logic will be written in &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/latesttag/template_test.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;template_test.go&lt;/code&gt;&lt;/a&gt; file&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 4] Make the new check visible to kube-linter&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;From the root of the project, modify the &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/all/all.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/all/all.go&lt;/code&gt;&lt;/a&gt; file to include the path to our new test, i.e. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/latesttag&lt;/code&gt;&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vim pkg/templates/all/all.go
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And modify the file to look like following:&lt;/p&gt;

    &lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;k&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;all&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;// Import all check templates.&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;_&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;golang.stackrox.io/kube-linter/pkg/templates/latesttag&quot;&lt;/span&gt;
  &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 5] Include the new check as a kube-linter builtin check&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;From the root of the project, go to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/builtin-checks/yamls&lt;/code&gt; folder &amp;amp; make a new yaml file corresponding to the name of the new check, (for example, &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/builtinchecks/yamls/latest-tag.yaml&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag.yaml&lt;/code&gt;&lt;/a&gt;).&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vim latest-tag.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And edit the file to look like following:&lt;/p&gt;

    &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;latest-tag&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Indicates&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;when&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;deployment-like&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;is&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;running&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;an&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;invalid&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;image&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;remediation&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;Use&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;proper&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;tag&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;satisfying&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;the&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;AllowList&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;BlockList&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;regex&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s&quot;&gt;patterns.&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;objectKinds&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;DeploymentLike&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;latest-tag&quot;&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;BlockList&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;.*:(latest)$&quot;&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;AllowList&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag.yaml&lt;/code&gt; file does the following:&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;provide self-explanatory string values for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;name&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;description&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;remediation&lt;/code&gt; fields&lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;define the scope of the check, using the following block&lt;/p&gt;

        &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;scope&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;objectKinds&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;DeploymentLike&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;references the new test check template (defined at &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/latesttag/template.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/latesttag/template.go&lt;/code&gt;&lt;/a&gt;), for example, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;template: &quot;latest-tag&quot;&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;provides default paramaeter values required by the check validation logic (defined at &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/pkg/templates/latesttag/internal/params/params.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pkg/templates/latesttag/internal/params/params.go&lt;/code&gt;&lt;/a&gt;)&lt;/p&gt;

        &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;BlockList&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;.*:(latest)$&quot;&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;AllowList&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;pi&quot;&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(Optional)&lt;/code&gt; [STEP 6] Include the new check as a kube-linter default built-in check&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;So far, the new check is just a &lt;strong&gt;builtin check&lt;/strong&gt;, and is not a &lt;strong&gt;default check&lt;/strong&gt; yet (i.e. kube-linter won’t run this check by default unless specified)&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;In order to add the new check as a kube-linter default check:&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Edit the &lt;a href=&quot;https://github.com/stackrox/kube-linter/blob/main/internal/defaultchecks/default_checks.go&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal/defaultchecks/defaultcheck.go&lt;/code&gt;&lt;/a&gt; file &amp;amp; add the new check name, to look like the following:&lt;/p&gt;

    &lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;k&quot;&gt;package&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;defaultchecks&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;s&quot;&gt;&quot;golang.stackrox.io/kube-linter/internal/set&quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;// List is the list of built-in checks that are enabled by default.&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;List&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NewFrozenStringSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
      &lt;span class=&quot;s&quot;&gt;&quot;latest-tag&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once everything above is done, the next step is to test the the newly added check!&lt;/p&gt;

&lt;h2 id=&quot;steps-to-verify-the-new-check&quot;&gt;Steps to verify the new check&lt;/h2&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;[STEP 1] Build the kube-linter binary from the local project source code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The local kube-linter binary will contain the new check &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make generated-srcs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And the output would look something like:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ make generated-srcs 
go generate ./...
Compiling Go source in ./cmd/kube-linter to bin/darwin/kube-linter
Compiling Go source in ./cmd/kube-linter to bin/linux/kube-linter
Compiling Go source in ./cmd/kube-linter to bin/windows/kube-linter.exe
kube-linter templates list --format markdown &amp;gt; docs/generated/templates.md
kube-linter checks list --format markdown &amp;gt; docs/generated/checks.md
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;The above command generate local kube-linter binary (for linux, windows &amp;amp; macOS), along with all other auto-generated check templates &amp;amp; markdown documentation required by the kube-linter command line binary tooling to interact with.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 2] Create an example static yaml manifest&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;As the new check &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag&lt;/code&gt; (we’re adding as part of this documentation), is defined for a scope of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DeploymentLike&lt;/code&gt; object, I’m creating an example deployment manifest yaml to do the testing.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;At the root of the project, create an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples&lt;/code&gt; directory &amp;amp; put a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deployment.yaml&lt;/code&gt; file under it (as our test deployment yaml manifest):&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;mkdir examples

cd examples/

vim deployment.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;Edit the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deployment.yaml&lt;/code&gt; file to look like the following:&lt;/p&gt;

    &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;apiVersion&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;apps/v1&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Deployment&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx-deployment&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;replicas&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;selector&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;matchLabels&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;example.com/test:v1.0.0&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;ports&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;containerPort&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;80&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;frontend&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;quay.io/django:latest&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;ports&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;containerPort&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;8000&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;key-value-store&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;docker.io/redis:v1.4.1&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;ports&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;containerPort&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;6379&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 3] Test the new check with the above example static yaml manifest&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Execute the following command to run all the kube-linter checks on the test &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deployment.yaml&lt;/code&gt; manifest&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/bin/linux/kube-linter lint examples/deployment.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case, you want to run just the newly added &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;latest-tag&lt;/code&gt; check, execute the following command:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/bin/linux/kube-linter lint --do-not-include-builtin-checks --include latest-tag examples/deployment.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And the output would look something like this:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;❯ ./bin/linux/kube-linter lint /examples/deployment.yaml 
KubeLinter 0.2.2-6-gc65dd74013-dirty

examples/deployment.yaml: (object: &amp;lt;no namespace&amp;gt;/nginx-deployment apps/v1, Kind=Deployment) The container &quot;nginx&quot; is using an invalid container image, &quot;example.com/test:v1.0.0&quot;. Please use images that satisfies the `AllowList` criteria : [&quot;^(docker.io)&quot;] (check: latest-tag, remediation: Use a container image with a proper image tag satisfying the &quot;AllowList&quot; &amp;amp; &quot;BlockList&quot; regex patterns.)

examples/deployment.yaml: (object: &amp;lt;no namespace&amp;gt;/nginx-deployment apps/v1, Kind=Deployment) The container &quot;frontend&quot; is using an invalid container image, &quot;quay.io/django:latest&quot;. Please use images that are not blocked by the `BlockList` criteria : [&quot;.*:(latest)$&quot;] (check: latest-tag, remediation: Use a container image with a proper image tag satisfying the &quot;AllowList&quot; &amp;amp; &quot;BlockList&quot; regex patterns.)
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 4] Verify the unit tests &amp;amp; the E2E (end-to-end) tests&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command from the root of the project&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make test
  
make e2e-test
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[STEP 5] Lint the project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command from the root of the project to lint the project source code&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make lint
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;And finally, when you’re happy with how the new check performs, please raise a PR for the upstream &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-linter&lt;/code&gt; project &amp;amp; wait for a review! 🙂&lt;/p&gt;
</description>
    <pubDate>Tue, 17 Aug 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/08/17/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/08/17/notes.html</guid>
  </item>
  
  <item>
    <title>Deploy kubernetes cluster on AWS EC2 instances using Ansible #30</title>
    <description>&lt;p&gt;August 16, 2021&lt;/p&gt;

&lt;h5 id=&quot;github-project-link-httpsgithubcompriyankasaggu11929ansible-k8s-cluster-deploy&quot;&gt;GitHub Project link: &lt;em&gt;&lt;a href=&quot;https://github.com/Priyankasaggu11929/ansible-k8s-cluster-deploy&quot;&gt;https://github.com/Priyankasaggu11929/ansible-k8s-cluster-deploy&lt;/a&gt;&lt;/em&gt;&lt;/h5&gt;

&lt;h2 id=&quot;contents&quot;&gt;Contents&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;#Introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#Prerequistes&quot;&gt;Prerequistes&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#Project-description&quot;&gt;Project description&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#Instructions-to-provision-the-cluster&quot;&gt;Instructions to provision the cluster&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;The following document demonstrates the process and the steps followed, to configure a Kubernetes cluster, on AWS EC2 instances.&lt;/p&gt;

&lt;p&gt;I have used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ansible&lt;/code&gt; playbooks to automate the provisioning of AWS EC2 instances, the security-group &amp;amp; key pairs, and the further process of initiating &amp;amp; bootstrapping the kubernetes cluster on EC2 instances (as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;master&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;worker&lt;/code&gt; nodes) using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm&lt;/code&gt; tool.&lt;/p&gt;

&lt;h2 id=&quot;prerequistes&quot;&gt;Prerequistes&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Create a SSH key pair (in my case, I’ve named it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ansible&lt;/code&gt;)&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ ssh-keygen -t rsa
 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /user/.ssh/ansible
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;tools-and-software&quot;&gt;Tools and Software&lt;/h3&gt;

&lt;p&gt;Before laying down steps/instructions for provisioning the cluster, here’s a compiled list of the tools/software/services I used.&lt;/p&gt;

&lt;h4 id=&quot;on-the-local-machine&quot;&gt;On the Local Machine&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html&quot;&gt;AWS CLI&lt;/a&gt; (configured with the aws account credentials &amp;amp; set to the required region)
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;region:&lt;/strong&gt; &lt;em&gt;ap-southeast-2&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;ami-id:&lt;/strong&gt; &lt;em&gt;ami-0f39d06d145e9bb63 (Ubuntu Server 18.04 LTS (HVM))&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;instance type:&lt;/strong&gt;  &lt;em&gt;t3.small&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html&quot;&gt;Ansible&lt;/a&gt; - core 2.11.3
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://docs.ansible.com/ansible/latest/collections/amazon/aws/ec2_module.html&quot;&gt;amazon.aws.ec2&lt;/a&gt; module&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.python.org/downloads/&quot;&gt;Python&lt;/a&gt; 3.9.5&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://itsfoss.com/install-pip-ubuntu/&quot;&gt;pip&lt;/a&gt; 21.2.1&lt;/li&gt;
  &lt;li&gt;Python modules:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html&quot;&gt;Boto3&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;on-the-aws-ec2-instances&quot;&gt;On the AWS EC2 instances&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://docs.docker.com/engine/install/ubuntu/&quot;&gt;Docker&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/&quot;&gt;kubelet, kubeadm, &amp;amp; kubectl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;project-description&quot;&gt;Project description&lt;/h2&gt;

&lt;p&gt;The project uses Ansible to automate the provisioning of Amazon EC2 machines (&amp;amp; other required resources), as well further process of bootstrapping the kubernetes cluster.&lt;/p&gt;

&lt;p&gt;The project is using the following 2 ansible playbook(s) :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;##create-clusteryml-does-the-following-in-order&quot;&gt;create-cluster.yml&lt;/a&gt;&lt;/strong&gt;: create AWS EC2 instances, &amp;amp; bootstrap them as cluster nodes using the tool &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;##delete-clusteryml-does-the-following-in-order&quot;&gt;delete-cluster.yml&lt;/a&gt;&lt;/strong&gt;: decommission the kubernetes cluster by deleting the EC2 instances along with the security-group &amp;amp; key pairs. Also, clean the locally saved private keys, cluster kubeconfig file and the ansible hosts inventory.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;create-clusteryml-does-the-following-in-order&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create-cluster.yml&lt;/code&gt; does the following in order:&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/127725521-fd178450-e688-4ad0-80cb-b208eac35583.jpg&quot; alt=&quot;create-cluster-yaml&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;In the specified AWS account (and specified region), it creates an EC2 key pair, further saving the private key to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;keys&lt;/code&gt; directory on localhost (in the project directory).&lt;/li&gt;
  &lt;li&gt;Determines the default VPC and its subnets, in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ap-southeast-2&lt;/code&gt; region. Then randomly select a subnet from the list to host the EC2 instances.&lt;/li&gt;
  &lt;li&gt;Create a security group to be attached to the EC2 instances.&lt;/li&gt;
  &lt;li&gt;In the above selected subnet, it creates two EC2 instances (to be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;master&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;worker&lt;/code&gt; nodes later) associated with the security group (created above).&lt;/li&gt;
  &lt;li&gt;Updates the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;inventory/ec2&lt;/code&gt; hosts file with the new master &amp;amp; worker node’s host IPs.&lt;/li&gt;
  &lt;li&gt;Add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ansible.pub&lt;/code&gt; SSH public key to the remote master &amp;amp; worker hosts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next, it bootstraps the kubernetes cluster on the above ec2 instances&lt;/strong&gt;&lt;/p&gt;

&lt;h5 id=&quot;setup-cluster-dependencies--kube-clusterkube-dependenciesyml&quot;&gt;Setup cluster dependencies  (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-cluster/kube-dependencies.yml&lt;/code&gt;):&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;On both master &amp;amp; worker EC2 instances:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Docker&lt;/code&gt;, the container runtime for the kubernetes cluster.&lt;/li&gt;
      &lt;li&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apt-transport-https&lt;/code&gt;, to allow adding external HTTPS sources to the APT source list.&lt;/li&gt;
      &lt;li&gt;Add the apt key of the Kubernetes APT repository for key verification&lt;/li&gt;
      &lt;li&gt;Add the Kubernetes APT repository to the remote server APT sources list&lt;/li&gt;
      &lt;li&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Kubelet&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Kubeadm&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;On master EC2 instance:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt; (as only Kubectl commands will be run from the master)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;initialize-the-cluster-using-kubeadm-on-the-master-node-kube-clustermasteryml&quot;&gt;Initialize the cluster using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Kubeadm&lt;/code&gt; on the master node (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-cluster/master.yml&lt;/code&gt;):&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;On master EC2 instance:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;Run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm init&lt;/code&gt; in order to initialize the kubernetes cluster, passing an argument &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--pod-network-cidr = 10.244.0.0/16&lt;/code&gt; to specify the private subnet from which the pod IPs will be assigned.&lt;/li&gt;
      &lt;li&gt;Create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home/ubuntu/.kube&lt;/code&gt;, to contain the kubernetes cluster configuration file.&lt;/li&gt;
      &lt;li&gt;Copy the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/kubernetes/admin.conf&lt;/code&gt; file generated by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm init&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home/ubuntu/.kube/config&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Install flannel (for pod network)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h5 id=&quot;add-worker-node-to-the-cluster---kube-clusterworkersyml&quot;&gt;Add worker node to the cluster - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-cluster/workers.yml&lt;/code&gt;&lt;/h5&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;On master EC2 instance:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;From the master node, grab the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm join ...&lt;/code&gt; command using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm token create --print-join-command&lt;/code&gt; &amp;amp; set it as an ansible artifact.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;On worker EC2 instance:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;Execute the above &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeadm join&lt;/code&gt; command to attach it as a worker node in the kubernetes clustee initiated during the previous steps.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;em&gt;On master EC2 instance:&lt;/em&gt;
    &lt;ul&gt;
      &lt;li&gt;Copy the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeconfig&lt;/code&gt; file from the master node to the local machine, at folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeconfig/admin.conf&lt;/code&gt; in the active directory.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;delete-clusteryml-does-the-following-in-order&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;delete-cluster.yml&lt;/code&gt; does the following in order:&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/127725544-4061d864-e3e0-4eab-b107-b4ccf1f5cc1e.jpg&quot; alt=&quot;delete-cluster-yml&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Delete the EC2 instances (master &amp;amp; worker nodes of the kubernets cluster)&lt;/li&gt;
  &lt;li&gt;Delete the security group that was attached to the above instances&lt;/li&gt;
  &lt;li&gt;Delete the Key pair&lt;/li&gt;
  &lt;li&gt;Clean the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;inventory/ec2&lt;/code&gt; hosts file&lt;/li&gt;
  &lt;li&gt;Clean the locally saved EC2 private keys&lt;/li&gt;
  &lt;li&gt;Clean the locally saved cluster kubeconfig file&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;instructions-to-provision-the-cluster&quot;&gt;Instructions to provision the cluster&lt;/h2&gt;

&lt;p&gt;Once, &lt;a href=&quot;#on-the-local-machine&quot;&gt;the tools and software listed above&lt;/a&gt;, are installed and setup on your local machine, follow the steps listed below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[Step 1]  Configure the AWS CLI&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command to login into the provided aws account using aws-cli, providing the respective &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AWS Access Key ID&lt;/code&gt; , &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AWS Secret Access Key&lt;/code&gt;, &amp;amp; required &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;region&lt;/code&gt; name.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;aws configure
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[Step 2]  Clone the project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Run the following command to clone the project on your local machine:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git clone git@github.com:Priyankasaggu11929/ansible-k8s-cluster-deploy.git
cd ansible-k8s-cluster-deploy/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[Step 3] Create the cluster&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;It will run the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create-cluster.yml&lt;/code&gt; ansible playbook&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make create-cluster
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;In case, you want to create a kubernetes cluster with &lt;strong&gt;multiple worker nodes&lt;/strong&gt;, run the following command, providing the worker node count using the argument &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;worker=n&lt;/code&gt;:&lt;/p&gt;

    &lt;p&gt;For ex:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make create-cluster worker=2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[Step 4] Get the kube-config file&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;The kubeconfig file is copied from the kubernetes cluster’s master node running in AWS EC2 instance (during the Step 4)&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make get_kubeconfig
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;[Step 5] Decommission the cluster &amp;amp; clean the project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;It will run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;delete-cluster.yml&lt;/code&gt; ansible playbook&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;make delete_cluster
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h6 id=&quot;note-clean-the-project-using-make-delete_cluster-before-re-running-the-make-create-cluster-command&quot;&gt;Note: Clean the project using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make delete_cluster&lt;/code&gt;, before re-running the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;make create-cluster&lt;/code&gt; command.&lt;/h6&gt;

</description>
    <pubDate>Mon, 16 Aug 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/08/16/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/08/16/notes.html</guid>
  </item>
  
  <item>
    <title>Quality of Service for Pods #29</title>
    <description>&lt;p&gt;August 03, 2021&lt;/p&gt;

&lt;p&gt;While working on a side project yesterday, I was reading through the Pod manifests for some services. And one of the fields, I read there was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;qosClass: BestEffort&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I might be very ignorant before (as I never paid attention to this), but I wanted to understand what this QoS class (or Quality of Service class) meant.&lt;/p&gt;

&lt;p&gt;So, yea below is what I understood &amp;amp; it is a very easy concept. 🙂&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;So, when we create pods in a kubernetes cluster, kubernetes assigns one of following QoS classes to (every) Pod:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Guaranteed&lt;/li&gt;
  &lt;li&gt;Burstable&lt;/li&gt;
  &lt;li&gt;BestEffort&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these QoS class listed above have something to do with whether the Pod objects have properly defined resources (CPU, memory) or not.&lt;/p&gt;

&lt;h3 id=&quot;guaranteed&quot;&gt;Guaranteed&lt;/h3&gt;

&lt;p&gt;A Pod (including all the init containers and app containers) will get a QoS class of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Guaranteed&lt;/code&gt;, if:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;apiVersion&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;v1&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Pod&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-pod&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;namespace&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-container&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;resources&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;limits&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;50Mi&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;cpu&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;200m&quot;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;50Mi&quot;&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;cpu&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;200m&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;Every Container in the Pod must have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memory limit&lt;/code&gt; and a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memory request&lt;/code&gt; set.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For every Container in the Pod, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memory limit&lt;/code&gt; must be equal to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;memory request&lt;/code&gt;.&lt;/p&gt;

    &lt;p&gt;For example ~&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;limits(memory) = requests(memory) = 50 Mi&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Every Container in the Pod must have a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CPU limit&lt;/code&gt; and a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CPU request&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For every Container in the Pod, the CPU limit must equal the CPU request.&lt;/p&gt;

    &lt;p&gt;For example ~&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;limits(cpu) = requests(cpu) = 200m&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;burstable&quot;&gt;Burstable&lt;/h3&gt;

&lt;p&gt;A Pod will get a QoS class of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Burstable&lt;/code&gt;, if:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;apiVersion&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;v1&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Pod&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-pod&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;namespace&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-container&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;resources&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;limits&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;50Mi&quot;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;100Mi&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;The Pod does not meet the criteria for QoS class Guaranteed.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;At least one Container in the Pod has a memory or CPU request.&lt;/p&gt;

    &lt;p&gt;For example ~&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;requests(memory) &amp;gt; limits(memory)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;besteffort&quot;&gt;BestEffort&lt;/h3&gt;

&lt;p&gt;A Pod will get a QoS class of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;BestEffort&lt;/code&gt;, if:&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;apiVersion&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;v1&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Pod&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-pod&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;namespace&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;test-container&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;nginx&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;The containers in the Pod must not have any memory or CPU limits or requests.&lt;/li&gt;
&lt;/ul&gt;
</description>
    <pubDate>Tue, 03 Aug 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/08/03/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/08/03/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: getting started with Cluster-API (CAPI)! #28</title>
    <description>&lt;p&gt;July 26, 2021&lt;/p&gt;

&lt;p&gt;Last friday, I attended a kubernetes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#in-dev&lt;/code&gt; community session around the &lt;strong&gt;Cluster API (CAPI)&lt;/strong&gt; project.&lt;/p&gt;

&lt;p&gt;This was my very first time knowing what CAPI project is about (although, I’ve come across the name quite a lot of times before). And well, I found it to be a very interesting one for me. The reason being CAPI is a project, a tooling that helps with managing cluster infrastructure as declarative configuration. And this is the area that I’m concerned with, on a regular basis.&lt;/p&gt;

&lt;p&gt;This blog is just me taking notes as I try to understand the concepts of the CAPI project &amp;amp; further play, around while seting it up locally.&lt;/p&gt;

&lt;p&gt;Before I start with the commands, here is the definition for the CAPI (from &lt;a href=&quot;https://cluster-api.sigs.k8s.io/introduction.html&quot;&gt;he Cluster API Book&lt;/a&gt;).&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Cluster API is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters.&lt;/p&gt;

  &lt;p&gt;Started by the Kubernetes Special Interest Group (SIG) Cluster Lifecycle, the Cluster API project uses Kubernetes-style APIs and patterns to automate cluster lifecycle management for platform operators. The supporting infrastructure, like virtual machines, networks, load balancers, and VPCs, as well as the Kubernetes cluster configuration are all defined in the same way that application developers operate deploying and managing their workloads. This enables consistent and repeatable cluster deployments across a wide variety of infrastructure environments.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;With that, let’s get started now!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is required to have the following installed &amp;amp; setup on the machine (as pre-requisites):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://kubernetes.io/docs/tasks/tools/install-kubectl/&quot;&gt;kubectl&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://kind.sigs.k8s.io/&quot;&gt;Kind&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.docker.com/&quot;&gt;Docker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-1:&lt;/strong&gt; Once the above pre-requisites are setup, the first step is, creating a local kubernetes cluster locally. (I’ll do this with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kind&lt;/code&gt;)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Later in the post, I’ll be using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Docker infrastructure provider&lt;/code&gt; (while playing around with CAPI to generate workload cluster, something we will discuss later in the post)&lt;/p&gt;

    &lt;p&gt;Think of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;infrastructure provider&lt;/code&gt; as any of these cloud providers like AWS, GCP, Azure, etc that provides compute and resources, required in order to spin up a cluster. Because I are going to do it locally, I’ll be using docker containers as my infrastructure provider (i.e. use docker containers as computer resources) to create a cluster using CAPI.&lt;/p&gt;

    &lt;p&gt;I require to create a custom &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kind&lt;/code&gt; config file as the following (for allowing the &lt;em&gt;Docker provider&lt;/em&gt; to access Docker on the host):&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cat &amp;gt; kind-cluster-with-extramounts.yaml &amp;lt;&amp;lt;EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
  extraMounts:
    - hostPath: /var/run/docker.sock
      containerPath: /var/run/docker.sock
EOF
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And then I create a kind cluster, with the above config file.&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kind create cluster --config kind-cluster-with-extramounts.yaml&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-2:&lt;/strong&gt; Installing the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl&lt;/code&gt; CLI tool. It handles the lifecycle of a Cluster API management cluster.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Since, I’m on a linux OS, following are the commands I’m using:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.4.0/clusterctl-linux-amd64 -o clusterctl
$ chmod +x ./clusterctl
$ sudo mv ./clusterctl /usr/local/bin/clusterctl
$ clusterctl version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-3:&lt;/strong&gt; At this step, I’ll use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl&lt;/code&gt; tool to transform the (one I spinned up above) kind cluster into a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;management cluster&lt;/code&gt; by using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl init&lt;/code&gt;. The command accepts as input a list of providers to install.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;A Management cluster is a Kubernetes cluster that manages the lifecycle of Workload Clusters. A Management Cluster is also where one or more Infrastructure Providers run, and where resources such as Machines are stored.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Since, I’m using Docker infrastructure provider, I will add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--infrastructure docker&lt;/code&gt; flag to my command.&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl init --infrastructure docker&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/126908313-8c59e4aa-c3e5-4940-8ecb-8dc425366449.png&quot; alt=&quot;Screenshot from 2021-07-25 23-15-17&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The above command actually created the following CRD (custom resource definitions) &amp;amp; CR (custom resources) in the kind cluster (specific to the infrastructure provider I mentioned above)&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/126908439-a6559b8b-1962-4061-b1ef-81d270de9478.png&quot; alt=&quot;Screenshot from 2021-07-25 23-19-53&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-4:&lt;/strong&gt; Now, next step is to create a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Workload Cluster&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;A workload cluster is a cluster created by a ClusterAPI controller, which is not a bootstrap cluster, and is meant to be used by end-users, as opposed to by CAPI tooling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl generate cluster&lt;/code&gt; with input flags is used to generate a YAML template for creating a workload cluster. In my case, I’m using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker&lt;/code&gt; as infrasture provider, I’ll use the following command:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;clusterctl generate cluster test-workload-cluster --flavor development \
--kubernetes-version v1.21.2 \
--control-plane-machine-count=3 \
--worker-machine-count=3 \
&amp;gt; test-workload-cluster.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;This command will populate the &lt;a href=&quot;https://gist.github.com/Priyankasaggu11929/487f0090d41d07c44bc4d5fa7b57de34&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test-workload-cluster.yaml&lt;/code&gt; file with a predefined list of Cluster API objects; Cluster, Machines, Machine Deployments, etc.&lt;/a&gt; required to create a workload cluster with the (⬆️) listed cluster control &amp;amp; worker machine configs.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Apply the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;test-workload-cluster.yaml&lt;/code&gt; file to create the workload cluster.&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl apply -f test-workload-cluster.yaml&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/126909421-b719a0bf-e59e-4a90-89c9-cdce7978e80e.png&quot; alt=&quot;Screenshot from 2021-07-25 23-57-38&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-5:&lt;/strong&gt; Now is the time to verify the workload cluster deployment &amp;amp; actually accessing it.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Check the status of the cluster&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl get cluster&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl&lt;/code&gt; to view of the cluster and its resources&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl describe cluster  test-workload-cluster&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Check the status of the control plane&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl get kubeadmcontrolplane&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/strong&gt; *The control plane won’t be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ready&lt;/code&gt; until I’ll insall a CNI (container network interface) in the following step.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-6:&lt;/strong&gt; Deploy a CNI solution.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;First, retrieve the workload cluster kubeconfig:&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;clusterctl get kubeconfig test-workload-cluster &amp;gt; test-workload-cluster.kubeconfig&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Here, it will use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;calico&lt;/code&gt; for an example.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;kubectl --kubeconfig=./test-workload-cluster.kubeconfig apply -f https://docs.projectcalico.org/v3.18/manifests/calico.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;After a short while, the nodes should be up &amp;amp; running&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;kubectl --kubeconfig=./test-workload-cluster.kubeconfig get nodes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Note that in the above commands, we are using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;workerload cluster&lt;/code&gt; kubeconfig, and so, with that we are accessing the workload cluster, not the kind (management cluster) we spinned up for the first.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;STEP-7:&lt;/strong&gt; Finally, step is to delete the workload cluster &amp;amp; the management cluster&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Delete the workload cluster&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl delete cluster test-workload-cluster&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Delete the management cluster&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kind delete cluster&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;references&quot;&gt;References&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://cluster-api.sigs.k8s.io/user/quick-start.html&quot;&gt;The Cluster API Book - Quick Start&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://cluster-api.sigs.k8s.io/clusterctl/overview.html&quot;&gt;Overview of clusterctl&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://cluster-api.sigs.k8s.io/user/concepts.html&quot;&gt;Cluster API Concepts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    <pubDate>Mon, 26 Jul 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/07/26/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/07/26/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: customizing starship! #27</title>
    <description>&lt;p&gt;July 25, 2021&lt;/p&gt;

&lt;p&gt;On my local machine, I use a &lt;a href=&quot;https://starship.rs/&quot;&gt;starship&lt;/a&gt; cross-shell prompt setup on top of bash (which I truly find as a very handy tool!)&lt;/p&gt;

&lt;p&gt;So, as part of my day to day work, I require to spin up or connect to multiple kubernetes &amp;amp; OpenShift clusters at a time. Although &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt; has an inbuilt kubernetes module, to dynamically configure the shell prompt based on the currently active kubernetes cluster, but for some reason, it never reflected on my kubernetes/OpenShift cluster logins (so far).&lt;/p&gt;

&lt;p&gt;And I also didn’t realise that until now, because most of the times, I used a python-based tooling to login into multiple clusters in a containerized manner (in simple words, each cluster login happened in a separate docker container (&amp;amp; not on my host machine)).&lt;/p&gt;

&lt;p&gt;And, so the few times, I spinned up local clusters, well, I didn’t notice much. And at other times, on the docker container shell (created for cluster logins), it had custom bash prompts, (&amp;amp; ofcourse, no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt;), so, again, it never stuck me.&lt;/p&gt;

&lt;p&gt;But today, I was trying to add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt; to the above python tooling contianer image &amp;amp; then I realised for the first time, that it didn’t pick up any of the cluster configs or the active namespace value (basically all stuff that the starship’s &lt;a href=&quot;https://github.com/starship/starship/blob/master/src/modules/kubernetes.rs&quot;&gt;kubernetes module&lt;/a&gt; look for, to configure the prompt accordingly).&lt;/p&gt;

&lt;p&gt;So, then I was looking for ways to set up a custom config for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt;, to help with this scenario.&lt;/p&gt;

&lt;p&gt;Well, it was easy (after a little while of wasted time, in random blind internet search). The &lt;a href=&quot;https://starship.rs/config/&quot;&gt;official documentation for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt; talks about the steps required to add custom configurations.&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The default configuration path for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt; is set to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/starship.toml&lt;/code&gt; (which is something that’s not created at the time of fresh install. FYI, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship config&lt;/code&gt; command gives you the path.)&lt;/p&gt;

&lt;p&gt;So, below are the (very quick) steps that I followed to configure &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;starship&lt;/code&gt; to work my with requirements for the kubernetes/OpenShift clusters.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;create the config file&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mkdir -p ~/.config &amp;amp;&amp;amp; touch ~/.config/starship.toml&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;edit the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/starship.toml&lt;/code&gt; file &amp;amp; add the following (⬇️) &amp;amp; save the changes.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[kubernetes]
symbol = &quot;☸️  &quot;
style = &quot;green&quot;
disabled = false
  
[username]
style_user = &quot;bold blue&quot;
show_always = true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yea, that’s all what was required. The prompt right away, started picking up the changes &amp;amp; showing the required stuff.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;psaggu on ☸️  test-openshift-cluster/psaggu-cssre (test-namespace) took 42s
❯ 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
    <pubDate>Sun, 25 Jul 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/07/25/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/07/25/notes.html</guid>
  </item>
  
  <item>
    <title>Week notes: sig-arch KEP reading club community meeting, deep-dive in sig-testing infrastructure, learning OWASP Top ten #26</title>
    <description>&lt;p&gt;June 27, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Very quick notes from this previous week:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;sig-arch-kep-reading-club-community-meeting&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-arch KEP reading club community meeting&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;I followed up with the recording of the recent (and the second) sig-arch KEP reading club community meeting. I couldn’t join it live ( but for someone who want to join, it happens every 2nd week, on Monday from 8:30 – 9:30 PM IST tz. Subscribe to sig-arch mailing list for invite!). &lt;!-- break --&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;The following KEPs were covered during the session:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/2599-minreadyseconds-for-statefulsets&quot;&gt;KEP-2599: minReadySeconds for StatefulSets&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; specifies the minimum number of seconds within which a newly created Pod should be ready without any of its containers going crashing. If that happens successfully, it marks the pod valid to be considered as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;available&lt;/code&gt;. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; defaults to value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0&lt;/code&gt; (which means the pod will be considered &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;available&lt;/code&gt; as soon as it is in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ready&lt;/code&gt; state).&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; is already available as an optional field in these other workload controllers - Deployments, DaemonSets, ReplicasSets and Replication Controllers. Enabling this option in StatefulSets, helps bringing StatefulSets at par with these other workload controllers.&lt;/p&gt;

    &lt;p&gt;The listed drawbacks are ~&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;It adds more complexity to StatefulSet controller in terms of checking Pod availability for a certain amount of time.&lt;/li&gt;
      &lt;li&gt;Measuring the availability may be hard as there can be clock skew between Master/node. However, this feature is successfully implemented in Deployment and DaemonSet controllers.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Another argument here were&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;“why not move the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; field in Pod Spec itself?”&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;“What will be the consequences of adding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; firstly in StatefulSets workload controller, but moving forward in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PodSpec&lt;/code&gt; itself?&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;What will take precendence amongst or whether the values of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; at both StatefulSets level &amp;amp; Pod Spec level will be added?”&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;There was some discussion on it, and it was clarified that moving &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minReadySeconds&lt;/code&gt; to Pod Spec is beyond the scope of this KEP. The major reasons are listed in the &lt;a href=&quot;https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/2599-minreadyseconds-for-statefulsets#non-goals&quot;&gt;Non-Goals section of the KEP&lt;/a&gt;. But in nutshell, the change required for implementing this is too large of an effort.&lt;/p&gt;

    &lt;p&gt;This KEP discussion brought out more useful points that are currently not reflected in the KEP document, so, it was requested to include them now, further for the purpose of improvement.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/blob/master/keps/sig-windows/2258-node-service-log-viewer/README.md&quot;&gt;KEP-2258: Node service log viewer&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;The motivation of this KEP is to help k8s cluster administrators, to help efficiently troubleshooting issues with control-plane and worker nodes. At the moment, it typically require a cluster admin to SSH into the nodes for debugging. While it is understood that certain issues will require being on the node, but issues with the kube-proxy or kubelet (to name a couple) could be solved by checking the logs. So, this KEP proposes a feature to add a node capability to view logs using the exising k8s command line tool, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl&lt;/code&gt;, in order to significntly simply these basic level of node/control-plane troubleshooting.&lt;/p&gt;

    &lt;p&gt;The meeting had a discussion over understanding various technicalaties behind implementing this feature on linux &amp;amp; windows worker nodes (brief is in the KEP itself), while specifying that it won’t include providing support for non-systemd linux distributions.&lt;/p&gt;

    &lt;p&gt;There are lots of security considerations, points of confusion &amp;amp; questions at the moment in regard to moving this KEP to a feature implementation.&lt;/p&gt;

    &lt;p&gt;As discussed, it will be followed up in the upcoming sig-cli biweekly meeting (on coming Wednesday, June 29, 2021 at 9:30PM - 10:00PM IST)&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found both of these feature enhancement proposals really interesting (&amp;amp; useful too in many ways, but ofcourse there are lots of question that might bring blockers or require further iterations of improvement before approval).&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;deep-dive-in-sig-testing-infrastructure&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deep-dive in sig-testing infrastructure&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;This was a further step in exploring more on the kubernetes testing infrastructure after &lt;a href=&quot;https://www.psaggu.com/upstream-contribution/2021/06/10/notes.html&quot;&gt;I learnt about the CI jobs Testgrid&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Over this last week, I went through &lt;a href=&quot;https://www.youtube.com/results?search_query=sig+testing+deep+dive&quot;&gt;all of the sig-testing deep dive videos&lt;/a&gt; (there were only 3).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;I learnt about the lifecycle of a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Prow job&lt;/code&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From its different &lt;strong&gt;triggering mechanisms&lt;/strong&gt;,&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;trigger using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/test all&lt;/code&gt; like commands in the PR comments,&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;trigger based on time or periodic job triggeres (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Horologium&lt;/code&gt; component does that)&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;trigger based on a PR getting merged, etc.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;to different &lt;strong&gt;executing platforms&lt;/strong&gt;,&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;kubernetes Pod&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Knative build CRDs (&amp;amp; more to come)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;then followed by &lt;strong&gt;hooks&lt;/strong&gt;,&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Github/Gitlab webhooks&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Slack webhooks, (&amp;amp; other similar service webhooks)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&amp;amp; then &lt;strong&gt;plugins&lt;/strong&gt; to handle various (incoming) webhooks (or as the docs &amp;amp; the source code term it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hooks&lt;/code&gt;),&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Plugins:trigger&lt;/code&gt; to handle trigger Prow Job webhook&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Plugins:configUpdate&lt;/code&gt; to handle triggeres created by config changes, &amp;amp; so to do config updates automatically in return&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Plugins:cat&lt;/code&gt;, it add a cat meme in the PR comments, somewhere from internet&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;(and more could be found here -&amp;gt; &lt;a href=&quot;https://prow.k8s.io/command-help&quot;&gt;prow.k8s.io/command-help&lt;/a&gt;)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I then learnt about &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;plank&lt;/code&gt;&lt;/strong&gt; that actually (initiate &amp;amp; does the reconcile &amp;amp; so life managemenet) runs the pods for Prow jobs,&lt;/p&gt;

&lt;p&gt;&amp;amp; then &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sinker&lt;/code&gt;&lt;/strong&gt; that does the garbage collection,&lt;/p&gt;

&lt;p&gt;&amp;amp; finally about the different &lt;strong&gt;reporting sinks&lt;/strong&gt; such as GitHub reporter, Gerrit reporter, PubSub reporter, etc (which happens through &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crier&lt;/code&gt;&lt;/strong&gt;). This is basically reporting prow job status back to the external services that triggered them!&lt;/p&gt;

&lt;p&gt;I then also learnt about &lt;strong&gt;Pod Utilities&lt;/strong&gt; that could be added to prow job pods (created/executed by Plank), for the care-taking purpose of basic recurrent utility tasks like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source code checkout&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logs &amp;amp; artifact upload&lt;/code&gt; &amp;amp; so on). I came across this handy &lt;a href=&quot;https://gist.github.com/dims/c1296f8ed42238baea0a5fcae45f4cf4&quot;&gt;migration guide written by Dims&lt;/a&gt; for migrating pods from using (the older way of doing things) &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bootstrap.py&lt;/code&gt; to using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podUtilities&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I have started looking at &amp;amp; reading the source code for all these various components at the moment. Further steps would be ~&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;picking a set of jobs that I can migrate (from using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bootstrap.py&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podUtilities&lt;/code&gt;) and do the migration.&lt;/li&gt;
  &lt;li&gt;and also convert the migration gist (I linked above) to a document and drop it in &lt;a href=&quot;https://github.com/kubernetes/community/tree/master/contributors/devel/sig-testing&quot;&gt;sig-testing development docs&lt;/a&gt; based on my experience doing the migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Something to note is, the above learning that I’ve gathered through just watching the sig-testing deep-dive videos might be slightly (or more) dated.&lt;/p&gt;

&lt;p&gt;But as of today, I can say,&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is what I’ve learnt the following so far:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/123533212-1f187d00-d731-11eb-8193-e560c88005e0.png&quot; alt=&quot;Screenshot from 2021-06-27 09-29-30&quot; /&gt;
&lt;sub&gt;(&lt;em&gt;credits: &lt;a href=&quot;https://www.youtube.com/watch?v=1rwiKDTJILY&amp;amp;t=616s&quot;&gt;Deep Dive: Testing SIG - Cole Wagner &amp;amp; Katharine Berry, Google&lt;/a&gt;)&lt;/em&gt;&lt;/sub&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And this is, what it looks like (as of today):&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.githubusercontent.com/kubernetes/test-infra/746533ea3361590cc28fdcf5f847e98548d99672/docs/architecture.svg&quot; alt=&quot;test-infra architecture&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hahahaha, yeah, it looks like too much of a difference. And ofcourse it is, but I’m familier with lots of these new components too, so good for me. 🙂&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;learning-owasp-top-ten&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;learning OWASP Top ten&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;And lastly, I had spent some time early this week, doing the first part of the &lt;a href=&quot;https://www.linkedin.com/learning/paths/master-the-owasp-top-10?u=2056732&quot;&gt;Master the OWASP Top 10&lt;/a&gt; linkedIn learning course track. Will block some more time to finish it later. :)&lt;/p&gt;

&lt;p&gt;So far, I just verbally understand &lt;em&gt;&lt;a href=&quot;https://owasp.org/www-project-top-ten/&quot;&gt;what are OWASP Top Ten&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for this week. I had a wonderful productive work time as well. I’ve contributed to &lt;a href=&quot;https://github.com/stackrox/kube-linter&quot;&gt;upstream kub-linter project&lt;/a&gt; for adding more validation checks. Hopefully, that will be a different blogs.&lt;/p&gt;

&lt;p&gt;Till, then o/&lt;/p&gt;
</description>
    <pubDate>Sun, 27 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/27/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/27/notes.html</guid>
  </item>
  
  <item>
    <title>Week notes: passed Red Hat certified specialist in OpenShift Administration exam, attended community session on client-go informers code walk-through #25</title>
    <description>&lt;p&gt;June 20, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Very quick notes from this previous week:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;passed-red-hat-certified-specialist-in-openshift-administration-exam&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;passed Red Hat certified specialist in OpenShift Administration exam&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;This is what all I did for this last whole week (mostly).&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Prepared for the &lt;strong&gt;&lt;em&gt;Red Hat Certified Specialist in OpenShift Administration (EX280V45K)&lt;/em&gt;&lt;/strong&gt; exam.&lt;/li&gt;
  &lt;li&gt;Appeared first time on June 15, 2021 (Tuesday) &amp;amp; failed with &lt;em&gt;a very not so good score&lt;/em&gt;.&lt;/li&gt;
  &lt;li&gt;Re-appeared on June 18, 2021 (Friday) &amp;amp; passed this time with good score.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And here is the &lt;strong&gt;Certification ID:&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;210-093-068&lt;/code&gt;, that can be verified &lt;a href=&quot;https://www.redhat.com/rhtapps/certification/verify/?certId=210-093-068&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;attended-community-session-on-client-go-informers-code-walk-through&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;attended community session on client-go informers code walk-through&lt;/code&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;This friday, I attended a k8s in-dev community session for the client-go informers codebase walk-through.&lt;/p&gt;

&lt;p&gt;I was just aware of the term &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;informers&lt;/code&gt; as in there is something, some concept, some component known as &lt;em&gt;informers&lt;/em&gt; &amp;amp; this falls under the realm of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-api-machinery&lt;/code&gt;. But that is all, what my understanding was before the session!&lt;/p&gt;

&lt;p&gt;This session was more of a hacking session, as in both the presenter &amp;amp; the attendees together were trying to decypher stuff written in the codebase (this time for client-go informers). I liked this sort of learning, because it right away set a bar. The bar is not the technical understanding because ofcourse nobody is assuming people would understand the things being discussed beforehand. But the bar is that the session will only make sense &amp;amp; bring value to the people who would care to put in the time &amp;amp; attention &amp;amp; stick until the end.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;(And that’s a choice ofcourse.)&lt;/em&gt;&lt;/strong&gt; 🙂&lt;/p&gt;

&lt;p&gt;For me, I absolutely learnt a lot.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;The least I know now,  &lt;strong&gt;&lt;em&gt;what Informers are?&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;And the best I know &lt;strong&gt;&lt;em&gt;where I could go &amp;amp; look into the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/informers/generic.go&quot;&gt;huge kubernetes codebase to understand more about it&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also touched terms like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;watchers&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;listwatchers&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;edge-triggered&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;level-triggered logics&lt;/code&gt; but that’s for me to explore more.&lt;/p&gt;

&lt;p&gt;I’m putting all the useful links here for myself (so, I could later on refer them from here)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;edge triggered and level triggered logic
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://speakerdeck.com/thockin/edge-vs-level-triggered-logic&quot;&gt;https://speakerdeck.com/thockin/edge-vs-level-triggered-logic&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://kube.academy/courses/the-kubernetes-machine/lessons/kubernetes-design&quot;&gt;https://kube.academy/courses/the-kubernetes-machine/lessons/kubernetes-design&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://hackernoon.com/level-triggering-and-reconciliation-in-kubernetes-1f17fe30333d&quot;&gt;https://hackernoon.com/level-triggering-and-reconciliation-in-kubernetes-1f17fe30333d&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://firehydrant.io/blog/stay-informed-with-kubernetes-informers/&quot;&gt;Stay Informed with Kubernetes Informers&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.cncf.io/blog/2019/10/15/extend-kubernetes-via-a-shared-informer/&quot;&gt;Extend Kubernetes via a shared informer&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;The example code in the above article was used to write dummy informer. Found very useful!&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://kubernetes.io/docs/reference/using-api/api-concepts/&quot;&gt;Kubernetes API Concepts&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/sample-controller/blob/master/controller.go&quot;&gt;kubernetes/sample-controller&lt;/a&gt; ~ pointed during the session for references.&lt;/li&gt;
  &lt;li&gt;And lastly, the client-go codebase sits &lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/informers&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The recording for the session could be found &lt;a href=&quot;http://bit.ly/in-dev-sessions&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for my this week!&lt;/p&gt;

&lt;p&gt;I would call it a very productive week for me, both during the work &amp;amp; otherwise too.&lt;/p&gt;
</description>
    <pubDate>Sun, 20 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/20/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/20/notes.html</guid>
  </item>
  
  <item>
    <title>How to ask someone for a 1:1 (learning or mentoring) session? #24</title>
    <description>&lt;p&gt;June 14, 2021&lt;/p&gt;

&lt;p&gt;A few days back, I had a small, very useful conversation with a friend from the community. We were discussing, &lt;strong&gt;&lt;em&gt;How to ask someone for a 1:1 (learning or mentoring) session?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is what I do! ⬇️&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(and so, I’m putting the raw conversation below, just that I feel this might help someone else too, who are like me. 🙂)&lt;/em&gt; &lt;!-- break --&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;blockquote&gt;
  &lt;p&gt;Hi Priyanka! 👋&lt;/p&gt;

  &lt;p&gt;First off, thanks for sharing your learnings! They were really helpful :)&lt;/p&gt;

  &lt;p&gt;I was planning on approaching a few people and setting up a 1:1 with them as well, but I was a little scared and basically have no idea what you would say, since you’ve done it with XYZ, any pointers?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;blockquote&gt;
  &lt;p&gt;Hello, really sorry for the late reply. I was away for a good while  😅&lt;/p&gt;

  &lt;p&gt;Regarding reaching out to people. It’s always hard (for me atleast) but I always tell myself it’s a one step thing.&lt;/p&gt;

  &lt;p&gt;You ask and they say no or yes 😅&lt;/p&gt;

  &lt;p&gt;But because I want it to be yes from their end, I do the work that gives them reason to help me.&lt;/p&gt;

  &lt;p&gt;The only thing I would say is don’t ask them vaguely (and I am not saying you would do that, just learnt from my own experience 🙂)&lt;/p&gt;

  &lt;p&gt;Like “could we catch-up on say some X topic?”&lt;/p&gt;

  &lt;p&gt;But rather describe it, tell them you want to meet on “X thing, and in X thing, you are interested about this particular Y thing and you tried doing this &amp;amp; this.&lt;/p&gt;

  &lt;p&gt;These are your learning so far from what you did and now you want some help to take this on one next further step, from where you feel you are blocked right now, and where you feel, this someone (from whom you are trying to ask) is really well equipped with the information.”&lt;/p&gt;

  &lt;p&gt;So, yea, usually this happens to go positively.&lt;/p&gt;

  &lt;p&gt;When I go asking to someone for a session, or a call, I try to be as precise as possible with what is something that I am trying to learn from them.&lt;/p&gt;

  &lt;p&gt;And then I myself do the work of deciding dates and time and day and everything.&lt;/p&gt;

  &lt;p&gt;So, only thing left for them is to “Say yes or no, or make modifications so, it works for them”&lt;/p&gt;

  &lt;p&gt;😆😆😆😆 was that too much of gyaan, sorry, but seriously that works for me&lt;/p&gt;

  &lt;p&gt;XYZ, on the other hand, I didn’t ask them for 1:1. I was just talking to them on one Day and about certain stuff and then they just asked me to create those meeting (and I am really grateful 😇)&lt;/p&gt;

  &lt;p&gt;So, with them, as well, I do the same thing ~&lt;/p&gt;

  &lt;p&gt;I would do the work and I would write notes and the only thing that happens (or left) in the meeting is asking the doubts.&lt;/p&gt;

  &lt;p&gt;On other hand, I have people who didn’t agree (like they won’t say direct no but won’t say yes at all)&lt;/p&gt;

  &lt;p&gt;So, in that case, it’s my decision whether I want to stick with them thinking “oh that fellow didn’t talk to me!”&lt;/p&gt;

  &lt;p&gt;Or I would see if regardless of them saying no, “are they still very very important to stick around?” That I should do more work and be more visible to them, or show them I am worth their time and session, so, in these cases, I do the work required. :)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;blockquote&gt;
  &lt;p&gt;While I am already typing, want to share this one more thing&lt;/p&gt;

  &lt;p&gt;It’s from some couple of months before, it was time when I was seriously not aware of anything at all in the kubernetes project, other than the couple of people we see in #in-dev&lt;/p&gt;

  &lt;p&gt;And like everyone (we usually see in the channel and outside), I was thinking of going on a call with some person who were very well known in the community &amp;amp; ask them for help!&lt;/p&gt;

  &lt;p&gt;And I was very sure what I wanted to ask? (Wait for it 😂)&lt;/p&gt;

  &lt;p&gt;I wanted to ask them how to get started with Kubernetes project, because I am very interested in contributing and learning&lt;/p&gt;

  &lt;p&gt;But I know (you would resonate with it this), it is sooooo broad question that there is absolutely no answer for it.&lt;/p&gt;

  &lt;p&gt;(And yes, that fellow said no, not directly but very directly in almost literal way 😂)&lt;/p&gt;

  &lt;p&gt;My mentor (I have one outside &amp;amp; I was talking to them about it), he just told me this thing ~&lt;/p&gt;

  &lt;p&gt;That the person who said no was very intelligent because they cared to save their precious time.&lt;/p&gt;

  &lt;p&gt;You (he was talking about me) were asking them to&lt;/p&gt;

  &lt;ul&gt;
    &lt;li&gt;first come on a call&lt;/li&gt;
    &lt;li&gt;And then even do your own thinking, around
      &lt;ul&gt;
        &lt;li&gt;the hard thinking of finding out some work for you,&lt;/li&gt;
        &lt;li&gt;and then even tell you how to do that work&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;

  &lt;p&gt;So, my mentor asked me ~ Just think now, if you would like to do this thing for anyone else.&lt;/p&gt;

  &lt;p&gt;And my answer was literally a big NO.&lt;/p&gt;

  &lt;p&gt;So, yea, that’s how I realized, sometime, people are not saying no to me, but they are saying no to wasting their own time.&lt;/p&gt;

  &lt;p&gt;Because well I (&amp;amp; others like me) are not willing to put in the required work.&lt;/p&gt;

  &lt;p&gt;(This conversation really really helped me)&lt;/p&gt;

  &lt;p&gt;Just a story I thought I could share from my experience with you 🙂&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;em&gt;(PS: Find the screenshots to the conversation &lt;a href=&quot;https://user-images.githubusercontent.com/30499743/121845317-e3c68900-cd02-11eb-9dfb-ccf63651872b.png&quot;&gt;here&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://user-images.githubusercontent.com/30499743/121845324-e5904c80-cd02-11eb-826f-5201ec2ad5ad.png&quot;&gt;here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

</description>
    <pubDate>Mon, 14 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/14/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/14/notes.html</guid>
  </item>
  
  <item>
    <title>Breaking down CI jobs testgrid for the upstream kubernetes project #23</title>
    <description>&lt;p&gt;June 10, 2021&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Thursdays are the weekly 1:1 meetings with &lt;a href=&quot;https://twitter.com/dims?lang=en&quot;&gt;dims&lt;/a&gt;. You could find the &lt;a href=&quot;https://docs.google.com/document/d/1ekAkKUt67WH_7nYrA3imDWTFVeY69a9y1qi_fruGksg/edit?usp=sharing&quot;&gt;agenda document here&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Today’s meeting was a discussion in continuation to this &lt;em&gt;&lt;a href=&quot;https://www.psaggu.com/upstream-contribution/2021/05/27/notes.html&quot;&gt;previous blog, where I wrote about dims giving me a walkthrough of the k8s testgrid dashboard&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As a takeaway, I had left for myself a home-work exercise in the end of that discussion. Below is where I’m trying to take notes of what I learnt broadly after doing that homework exercise.&lt;/p&gt;

&lt;p&gt;And yea, the homework was to explore what I learnt about the kubernetes testgrid (above), now through the source code.&lt;/p&gt;

&lt;hr /&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;The source code for the kubernetes CI test jobs are present in this repository here ~ &lt;strong&gt;&lt;a href=&quot;https://github.com/kubernetes/test-infra&quot;&gt;kubernetes/test-infra&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;There are broadly the following three types of CI test jobs in the kubernetes project ~
    &lt;ul&gt;
      &lt;li&gt;Pre-submit jobs&lt;/li&gt;
      &lt;li&gt;Post-submit jobs&lt;/li&gt;
      &lt;li&gt;Periodic jobs&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For the purpose of note taking, let’s start by taking the &lt;strong&gt;Pre-submit&lt;/strong&gt; jobs as our example usecase.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;( &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Here is something important to know (which is also the reason why I&apos;m picking Pre-submit jobs for our example):&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;Only the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pre-submit&lt;/code&gt; CI jobs have this properly defined &amp;amp; maintained dashboard. You would not find a similar testgrid dashboard (something that we are going to discuss below in the notes) for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Post-submit&lt;/code&gt; jobs or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Periodic&lt;/code&gt; jobs. Following being the major reasons:&lt;/em&gt;&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pre-submit jobs&lt;/code&gt; are the kind of jobs that runs everytime before a PR is submitted or merged. So, it contains mostly blocking jobs. And because these are blocking jobs &amp;amp; run on almost all the PRs during a day, we want the number of these jobs to be very less. And thus, the effort of maintaining a dashboard for these limited number of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pre-submit&lt;/code&gt; jobs sound reasonabe &amp;amp; quite doable.&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;On the other hand, the number of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Periodic jobs&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Post-submit jobs&lt;/code&gt; is very high, &amp;amp; currently most of these are frequently ending up failing only. So, the dashboard usually end up being all red. People argue that these jobs fail so often &amp;amp; so much, that maybe the evaluation/validation criteria of these jobs are not good enough &amp;amp; so, no use of maintaining an all time red board for this large number of jobs.  )&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;That being said, now we could start exploring things in action.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Head onto the kubenetes CI jobs testgrid dashboard groups UI using this link ~ &lt;a href=&quot;https://testgrid.k8s.io&quot;&gt;https://testgrid.k8s.io&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;You will find something like following ~&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/121569472-71be1d80-ca3e-11eb-9be7-2a251978d68d.png&quot; alt=&quot;Screenshot from 2021-06-10 22-51-21&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;All these tiles such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;conformance&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gardener&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;google&lt;/code&gt;, … , &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt;, … , &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wg-multi-tenancy&lt;/code&gt; corresponds to a set of CI jobs dashboards or a dashboard-group (as we call it in the source-code), for a specific project or a sig-group.&lt;/p&gt;

    &lt;p&gt;The source-code corresponding to all these dashboard-group tiles (shown in the above screenshot) sits here ~ &lt;a href=&quot;https://github.com/kubernetes/test-infra/tree/master/config/testgrids&quot;&gt;kubernetes/test-infra/config/testgrids&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For our example, as I mentioned above, we are checking &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group.&lt;/p&gt;

    &lt;p&gt;The &lt;a href=&quot;https://testgrid.k8s.io/presubmits&quot;&gt;kubernetes testgrid dashboard-group for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pre-submit jobs&lt;/code&gt;&lt;/a&gt; (as of my writing this blog) looks like the following ~&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/121568532-6cac9e80-ca3d-11eb-80c6-d327fde6e24b.png&quot; alt=&quot;Screenshot from 2021-06-10 22-42-07&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;You’ll see in the top left corner, a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grid-like&lt;/code&gt; icon. Clicking that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grid-like&lt;/code&gt; icon would take you back to the &lt;a href=&quot;https://testgrid.k8s.io&quot;&gt;same list of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard-groups&lt;/code&gt; home page UI&lt;/a&gt; as we discussed in the last point above.&lt;/p&gt;

    &lt;p&gt;Now, on this &lt;a href=&quot;https://testgrid.k8s.io/presubmits&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pre-submits&lt;/code&gt; dashboard-group&lt;/a&gt; page, we see all these tabs (or the similar row entries under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard&lt;/code&gt; column in the &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dashboard Group presubmits :: Overview&lt;/code&gt;&lt;/strong&gt; table) ~&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-alibaba-cloud-csi-driver&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-cloud-provider-alibaba&lt;/code&gt;, … , &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-test-infra&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;These tabs corresponds to the dashboards that goes under our &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group. And of course, these dashboard tabs will further divide into CI jobs (as we’ll see later in the notes).&lt;/p&gt;

    &lt;p&gt;Before we move further, it’s also interesting to look at the information provided in the &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dashboard Group presubmits :: Overview&lt;/code&gt;&lt;/strong&gt; table.&lt;/p&gt;

    &lt;p&gt;As we can see, there are three columns:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Status&lt;/code&gt;,&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dashboard&lt;/code&gt; (which is basically list of names of the dashboard such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-alibaba-cloud-csi-driver&lt;/code&gt;, … , etc.),&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Health&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;This table gives a broader view of how many CI jobs under a certain dashboard are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PASSING&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FAILING&lt;/code&gt;, or are there any &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FLAKY&lt;/code&gt; jobs. For ex, in case of dashboard &lt;a href=&quot;https://testgrid.k8s.io/presubmits-kubernetes-nonblocking&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-nonblocking&lt;/code&gt;&lt;/a&gt; (from the above screenshot),&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;The overall status of this dashboard is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FAILING&lt;/code&gt; (because we see there is atleast one CI job failing)&lt;/li&gt;
      &lt;li&gt;There are 6 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PASSING&lt;/code&gt; CI jobs, 15 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FLAKY&lt;/code&gt; CI jobs, &amp;amp; 1 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FAILING&lt;/code&gt; CI job.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;The source-code corresponding to this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group sits here ~ &lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/master/config/testgrids/kubernetes/presubmits/config.yaml&quot;&gt;kubernetes/test-infra/config/testgrids/kubernetes/presubmits/config.yaml&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s try to break this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits/config.yaml&lt;/code&gt; file (I linked just above).&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;The following two lines in the very beginning of the config file, tells us about the name of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard-group&lt;/code&gt; it corresponds to.&lt;/p&gt;

        &lt;p&gt;So, in this as we can see, this config file corresponds to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group.&lt;/p&gt;

        &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;dashboard_groups&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;further down, this section &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard_names&lt;/code&gt; tells us about what all dashboards are included as tabs in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group.&lt;/p&gt;

        &lt;p&gt;As we could match from the above screenshot, all the dashboard tabs we could see there, are listed under this section.&lt;/p&gt;

        &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;dashboard_names&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-alibaba-cloud-csi-driver&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-cloud-provider-alibaba&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-cloud-provider-vsphere-blocking&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-cluster-registry&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kops&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kube-batch&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kubernetes-blocking&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kubernetes-nonblocking&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kubernetes-scalability&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-misc&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-node-problem-detector&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-poseidon&lt;/span&gt;
&lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-test-infra&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s move another step forward.&lt;/p&gt;

    &lt;p&gt;Click on one of the dashboard tab under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; dashboard-group &amp;amp; see what all CI jobs are added under this.&lt;/p&gt;

    &lt;p&gt;Let’s take &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; as an example. Clicking this dashboard tab, will bring something like this ~&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/121576715-4808f480-ca46-11eb-951b-66c0d6f73bd8.png&quot; alt=&quot;Screenshot from 2021-06-10 23-47-09&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;Now, we could see all the various CI jobs collected under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; dashboard, like ~&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind-ipv6&lt;/code&gt;, … , &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-unit&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;The source-code corresponding to this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; dashboard sits in the same config file, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits/config.yaml&lt;/code&gt; –&amp;gt; &lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/master/config/testgrids/kubernetes/presubmits/config.yaml&quot;&gt;kubernetes/test-infra/config/testgrids/kubernetes/presubmits/config.yaml&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;Something to note is that although all the CI jobs under this dashbaord will be listed in same config file, but those CI jobs may or may not be defined here (we’ll discuss more about it, below in the notes).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Continuing with the same &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; dashboard example above, let’s now explore the source-code for the various CI jobs listed under it:&lt;/p&gt;

    &lt;p&gt;The following lines of code under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dasboards&lt;/code&gt; –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;name: presubmits-kubernetes-blocking&lt;/code&gt; –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard_tab&lt;/code&gt; section, defines what CI jobs will fall under this particular dashboard.&lt;/p&gt;

    &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;dashboards&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  
  &lt;span class=&quot;s&quot;&gt;...&lt;/span&gt;
    
  &lt;span class=&quot;s&quot;&gt;- name&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;presubmits-kubernetes-blocking&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;dashboard_tab&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-kind&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-kind&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-kind-ipv6&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-kind-ipv6&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-bazel-build&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-bazel-build&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-bazel-test&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-bazel-test&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-100-performance&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-100-performance&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-node-e2e&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-node-e2e&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-node-e2e-containerd&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-node-e2e-containerd&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-integration&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-integration&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-verify&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-verify&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-typecheck&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-typecheck&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-dependencies&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-dependencies&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-network-proxy-http-connect&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-network-proxy-http-connect&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-conformance-kind-ga-only-parallel&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-conformance-kind-ga-only-parallel&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-ubuntu-containerd&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-gce-ubuntu-containerd&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-verify-govet-levee&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-verify-govet-levee&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-files-remake&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;test_group_name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-files-remake&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;base_options&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;width=10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;Now, as we see, this section just lists what all CI jobs will go under this one specific dashboard tab, but the definition of these CI jobs are not given here.&lt;/p&gt;

    &lt;p&gt;And that’s our next step to explore below.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;These CI jobs under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; tab are defined at multiple places based on the category or sub-project these CI job(s) fall into.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;(something to note here is, one CI job can fall under multiple &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard&lt;/code&gt; tabs, further under multiple &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard-groups&lt;/code&gt;. So, that is one reason why these general purpose CI jobs are not defined just under one &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard-group&lt;/code&gt; config file, but at certain separate places so they could be referenced by multiple dashboards)&lt;/em&gt;&lt;/p&gt;

    &lt;p&gt;Let’s start by taking few of the CI jobs listed above under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; dashboard tab for reference example:&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind&lt;/code&gt; CI job is defined here ~ &lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/b1cb6db14e13aadc69ccb1e7e12e5d21e8555afd/config/jobs/kubernetes/sig-testing/kubernetes-kind-presubmits.yaml#L3-L47&quot;&gt;kubernetes/test-infra/config/jobs/kubernetes/sig-testing/kubernetes-kind-presubmits.yaml#L3-L47&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;pull-kubernetes-e2e-kind&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;cluster&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;k8s-infra-prow-build&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;optional&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;false&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;always_run&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;decorate&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;skip_branches&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;release-\d+\.\d+&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;# per-release settings&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;preset-dind-enabled&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&quot;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;preset-kind-volume-mounts&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&quot;&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;decoration_config&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;timeout&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;60m&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;grace_period&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;15m&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;path_alias&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;k8s.io/kubernetes&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;gcr.io/k8s-testimages/krte:v20210512-b8d1b30-master&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;wrapper.sh&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;bash&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;-c&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;curl -sSL https://kind.sigs.k8s.io/dl/latest/linux-amd64.tgz | tar xvfz - -C &quot;${PATH%%:*}/&quot; &amp;amp;&amp;amp; e2e-k8s.sh&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;FOCUS&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;.&quot;&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# TODO(bentheelder): reduce the skip list further&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;SKIP&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;\[Slow\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|PodSecurityPolicy|LoadBalancer|load.balancer|Simple.pod.should.support.exec.through.an.HTTP.proxy|subPath.should.support.existing|NFS|nfs|inline.execution.and.attach|should.be.rejected.when.no.endpoints.exist&lt;/span&gt;
        &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;PARALLEL&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&quot;&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;# we need privileged mode in order to do docker in docker&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;securityContext&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;privileged&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;resources&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;limits&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;cpu&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;7&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;9000Mi&lt;/span&gt;
          &lt;span class=&quot;na&quot;&gt;requests&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;cpu&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;7&lt;/span&gt;
            &lt;span class=&quot;na&quot;&gt;memory&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;9000Mi&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;annotations&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;testgrid-num-failures-to-alert&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;10&apos;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;testgrid-alert-stale-results-hours&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;24&apos;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;testgrid-create-test-group&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&apos;&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;fork-per-release&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;true&quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;Similarily, the CI jobs &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-node-e2e&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-node-e2e-conatinerd&lt;/code&gt; are defined in this same one file, &lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/bbcb6a5205090156e33e10f61e7619b27685d9ac/config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml#L3-L42&quot;&gt;here&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/bbcb6a5205090156e33e10f61e7619b27685d9ac/config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml#L131-L172&quot;&gt;here&lt;/a&gt; respectively.&lt;/p&gt;

    &lt;p&gt;For finding where rest of the CI jobs are defined under the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/test-infra&lt;/code&gt; repository, you can utilize the following:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;Do a GitHub respository wide search.&lt;/p&gt;

        &lt;p&gt;&lt;em&gt;for ex, &lt;a href=&quot;https://github.com/kubernetes/test-infra/search?q=pull-kubernetes-node-e2e&amp;amp;type=&quot;&gt;here I’m searching for where could be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-node-e2e&lt;/code&gt; CI job in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/test-infra&lt;/code&gt; repository&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;Dr do a similar search using &lt;a href=&quot;https://cs.k8s.io&quot;&gt;k8s hound search engine&lt;/a&gt;.&lt;/p&gt;

        &lt;p&gt;&lt;em&gt;for ex, &lt;a href=&quot;https://cs.k8s.io/?q=pull-kubernetes-node-e2e&amp;amp;i=nope&amp;amp;files=&amp;amp;excludeFiles=&amp;amp;repos=&quot;&gt;here I’m again searching for various places across the k8s projet, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-node-e2e2&lt;/code&gt; Ci job is referenced&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Moving one more step further in the testgrid dashboard, let’s try to exapand &amp;amp; explore one of the CI jobs under one of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard&lt;/code&gt; tabs now.&lt;/p&gt;

    &lt;p&gt;In continuation to our above examples, let’s try to see what comes when you click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits&lt;/code&gt; (dashboard-group) –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;presubmits-kubernetes-blocking&lt;/code&gt; (dashboard-tab) –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind&lt;/code&gt; (CI job):&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/121582815-16dff280-ca4d-11eb-8e24-21b597da7aec.png&quot; alt=&quot;Screenshot from 2021-06-11 00-35-49&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;We could see the following:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;on the left hand side, we see this wide grey section&lt;/code&gt; ~ These are the logs generated when the CI job &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind&lt;/code&gt; ran (spanned across multiple rows). To look at the full logs in a plain text, &lt;a href=&quot;https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/102332/pull-kubernetes-e2e-kind/1397528065768165376/&quot;&gt;look at the artificats created by the CI job&lt;/a&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;on the right hand side, we see the small tiles in green, red, white &amp;amp; grey colors&lt;/code&gt; ~ These are statuses of this CI job run across a period of time (days, divided by hours, and so on). This tells us how this certain CI job is performing.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Based on how frequently, a certain CI job fails, you would also see that CI jobs are marked as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FLAKY&lt;/code&gt;.&lt;/p&gt;

    &lt;p&gt;The kind of calculations required to decide if a certain job will be marked as flaky based on “this is x no of times when this job failed”, is done using the metrics calculation config files present here ~ &lt;a href=&quot;https://github.com/kubernetes/test-infra/tree/master/metrics/configs&quot;&gt;kubernetes/test-infra/metrics/configs&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;And yea, finally we reached at the end. All these above steps can be repeated to understand different &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboard-groups&lt;/code&gt; –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dashboards&lt;/code&gt; –&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CI jobs&lt;/code&gt; across the kubernetes prow testgrid platform.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the time! o/&lt;/p&gt;

</description>
    <pubDate>Thu, 10 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/10/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/10/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: brainstormed on proposing the plural version for klog.KObj, writing new validation checks in the upstream kube-linter #22</title>
    <description>&lt;p&gt;June 9, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;brainstormed-on-proposing-the-plural-version-for-klogkobj&quot;&gt;&lt;strong&gt;brainstormed on proposing the plural version for klog.KObj&lt;/strong&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Couple of weeks back, I had picked up this issue &lt;a href=&quot;https://github.com/kubernetes/kubernetes/issues/102434&quot;&gt;Propose plural version for klog.KObj #102434&lt;/a&gt; as part of a requirement in the structured logging migration work. Although, I didn’t assign the issue then, to myself because I wasn’t quite sure about the blueprint (structure of input arguments, &amp;amp; the output format) for this intended new function&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;So, as my starting point (during these last weeks), to understand the requirements of the feature, I went through understanding the previous implementation of the same function for singular arguments here ~ &lt;a href=&quot;https://github.com/kubernetes/klog/pull/128/files&quot;&gt;Implement klog.KObj klog.KRef functions #128&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;I was able to understand this previous singular functions &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KObj&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KRef&lt;/code&gt; functions definition, but again that was it. I was still struggling to understand what would be the input structure for a similar plural function &amp;amp; so the intended output (as I already mentioned above).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;So, I reached out to &lt;a href=&quot;https://github.com/serathius&quot;&gt;Marek Siarkowicz&lt;/a&gt; today (Tech Lead of the structured logging working group) to discuss it.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;(Note: It took me eons to finally ask! Asking is always one of those things that make me uncomfortable, but taking this step always opens up thousand opportunities for me, right away!)&lt;/em&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;He started by asking me &lt;strong&gt;&lt;em&gt;“did you have any ideas about the input structure?”&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

    &lt;p&gt;(And I was like, what should I answer now. This is exactly what I wanted to understand during this discussion. Although I realised very soon later, I should have put more work before asking as well.)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;So, to answer the question, I spent some time digging in &amp;amp; reading the relevant discussion from this old PR ~ &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/99799/files#&quot;&gt;Refactor pods format to return ObjRef slice #99799&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;From this PR, I got to learn about a previous attempt to support plural version of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kog.KOj&lt;/code&gt; function. I found this &lt;a href=&quot;https://github.com/QiWang19/kubernetes/blob/8133d295869c27b416c638175110d0f15286ebfa/pkg/kubelet/util/format/pod_test.go#L129-L139&quot;&gt;test case (one of the file changes introduced by the PR)&lt;/a&gt; that I felt like, could serve as an input blueprint for the required plural version of the function.&lt;/p&gt;

    &lt;p&gt;The test case patch looked like this ~&lt;/p&gt;

    &lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;testCases&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;caseName&lt;/span&gt;      &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;pods&lt;/span&gt;          &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;expectedValue&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_empty_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1Obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_more_than_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pod2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1Obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pod2Obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_include_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1Obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;So, as I see from this test patch,&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;testCases&lt;/code&gt; go variable is a slice (go array) of structure having struct variables as the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;caseName&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pods&lt;/code&gt; (which is k8s pod object list, so the plural input, i.e. in place of single pod object as in case of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.kObj&lt;/code&gt; function, here we have a list of pod objects), &amp;amp; finally the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;expectedValue&lt;/code&gt; (again the plural output i.e a list/slice of object references).&lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;Taking one of the value of this struct slice as an example ~&lt;/p&gt;

        &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{&quot;input_length_more_than_one_case&quot;, []*v1.Pod{pod1, pod2}, []klog.ObjectRef{pod1Obj, pod2Obj}}&lt;/code&gt;, I understood:&lt;/p&gt;

        &lt;ul&gt;
          &lt;li&gt;My input (if I take the above example while defining my plural function) would look something like this slice of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kObj&lt;/code&gt; (in this case, a slice of pod k8s objects)  ~  &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[]*v1.Pod{pod1, pod2}&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;And so, the output would be a slice of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kObjRef&lt;/code&gt;, looking something like ~ []klog.ObjectRef{pod1Obj, pod2Obj}}&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;But that’s not it.&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;As stated in the description of this issue &lt;a href=&quot;https://github.com/kubernetes/kubernetes/issues/102434&quot;&gt;Propose plural version for klog.KObj #102434&lt;/a&gt;,&lt;/p&gt;

        &lt;blockquote&gt;
          &lt;p&gt;In golang, slice of struct cannot be passed into slice of interfaces they implement. This is due to difference in memory representation of two slices (cant wait for Generics).&lt;/p&gt;

          &lt;p&gt;For example ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[]corev1.Pods{}&lt;/code&gt; cannot be passed to func &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KObjs(objs []klog.ObjectRef)&lt;/code&gt;&lt;/p&gt;
        &lt;/blockquote&gt;
      &lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;So, beause of the above stated problem, the above test case implementation was later changed to something like this ~&lt;/p&gt;

    &lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;testCases&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;caseName&lt;/span&gt;      &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;pods&lt;/span&gt;          &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;expectedValue&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_empty_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;pod1_default(551f5a43-9f2f-11e7-a589-fa163e148d75):DeletionTimestamp=2017-09-26T14:37:50Z&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_more_than_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pod2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;pod1_default(551f5a43-9f2f-11e7-a589-fa163e148d75):DeletionTimestamp=2017-09-26T14:37:50Z, pod2_default(e84a99bf-d1f9-43c2-9fa5-044ac85f794b):DeletionTimestamp=2017-09-26T14:37:50Z&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_include_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Pod&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pod1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;pod1_default(551f5a43-9f2f-11e7-a589-fa163e148d75):DeletionTimestamp=2017-09-26T14:37:50Z, &amp;lt;nil&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;that is ~&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;in place of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[]klog.ObjectRef{pod1Obj, pod2Obj}}&lt;/code&gt;, the output now looks something like ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&quot;pod1_default(551f5a43-9f2f-11e7-a589-fa163e148d75):DeletionTimestamp=2017-09-26T14:37:50Z, pod2_default(e84a99bf-d1f9-43c2-9fa5-044ac85f794b):DeletionTimestamp=2017-09-26T14:37:50Z&quot;}&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;So, yea, all of this above is what I answered to Marek to the question he asked about the input structure.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;(Note that, this was the very first time I was able to decipher even this much. So, that is why when I said above I should have worked a little more, I meant about all this above ^)&lt;/em&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Marek very kindly added the following to make things even more clear.&lt;/p&gt;

    &lt;blockquote&gt;
      &lt;p&gt;To provide a consistent way of representing Kubernetes Objects in logs (Pods, Secrets, Nodes etc) we have created dedicated functions like klog.KObj. This works for single objects as contributor can just call &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.InfoS(&quot;message&quot;, &quot;pod&quot;, klog.KObj(pod), &quot;secret&quot;, klog.KObj(secret))&lt;/code&gt;  and they are done. One function that can handle any object type.&lt;/p&gt;

      &lt;p&gt;This is thanks to fact that all Kubernetes objects implement &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GetName()&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GetNamespace()&lt;/code&gt; methods, so we can simply accept an interface.&lt;/p&gt;

      &lt;p&gt;The problem is with slices of objects, we don’t have any method &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KObjs&lt;/code&gt;, ultimately requiring contributors to implement it themselves (like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;format.Pods&lt;/code&gt;).&lt;/p&gt;

      &lt;p&gt;So, the gal is to introduce this function &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KObjs&lt;/code&gt;.&lt;/p&gt;
    &lt;/blockquote&gt;

    &lt;p&gt;I was very happy with this explanation. Quite a lot of things made so much sense now.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Marek also added that&lt;/p&gt;

    &lt;blockquote&gt;
      &lt;p&gt;logging library and all the methods needed to write logs should be in upstream &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog&lt;/code&gt; source code.&lt;/p&gt;

      &lt;p&gt;It creates one place where contributors can search and find all functions needed to write logs.&lt;/p&gt;

      &lt;p&gt;Fact that we have some helper methods spread around &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/kubernetes&lt;/code&gt; repository is bad, as it leads to worse discover-ability and diverging log format.&lt;/p&gt;

      &lt;p&gt;We want consistant log format, as it will be much easier for consumer of logs just to handle one representation of Pods, instead of having big switch statements to differently read Pod info in kube-apiserver than kube-controller-manager.&lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;So, the final outcome of this discussion was the following ~&lt;/p&gt;

    &lt;p&gt;The blueprint of the new function would look like:&lt;/p&gt;

    &lt;div class=&quot;language-go highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;testCases&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;:=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;struct&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;caseName&lt;/span&gt;                 &lt;span class=&quot;kt&quot;&gt;string&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;generalised_objects&lt;/span&gt;      &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;any&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;
     &lt;span class=&quot;n&quot;&gt;expectedValue&lt;/span&gt;            &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}},&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_empty_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;any&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{}},&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;any&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;object1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_length_more_than_one_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;any&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;object1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;object2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
     &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;input_include_nil_case&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;any&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;k8s&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;objects&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;klog&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ObjectRef&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;object1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;that is, in place of just the pod object lists, as in the above cases, we need something as one &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kObjs&lt;/code&gt; fucntion that’s generic to all the k8s objects.&lt;/p&gt;

    &lt;p&gt;and all this will implemented in the upstream klog library source code.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;writing-new-validation-checks-in-the-upstream-kube-linter&quot;&gt;&lt;strong&gt;writing new validation checks in the upstream kube-linter&lt;/strong&gt;&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;(I also had this another small win today. I was kind of under a work block so, was finding so hard to even start, but again I learnt it’s the first 10 min that is the hard part &amp;amp; provides the highest resistence. Following that, it will happen! I need to work really hard at bringing this in practice!)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;We’ve decided to write the validation checks (that were previously meant to be written under DVO as I mentioned in &lt;a href=&quot;https://www.psaggu.com/upstream-contribution/2021/05/26/notes.html&quot;&gt;one of the previous blogs here&lt;/a&gt;) in the upstream &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-linter&lt;/code&gt; project itself. That is to remove the redundant part of maintaining the checks in a consumer project &amp;amp; ofcourse, to help grow the upstream library validation checks.&lt;/li&gt;
  &lt;li&gt;I’ve picked up the following two issues &amp;amp; I’m currently working on them ~
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/stackrox/kube-linter/issues/182&quot;&gt;[FEATURE_REQUEST] Add check for trusted sources #182&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/stackrox/kube-linter/issues/183&quot;&gt;[FEATURE_REQUEST] Add check for trusted tags #183&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;I was able to work today (&amp;amp; just a little yesterday too. That is when I realised, we’re now doing the new checks in the upstream project only)&lt;/p&gt;

    &lt;p&gt;So, I had set up &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kube-linter&lt;/code&gt; project locally, &amp;amp; currently trying to implement the check for trusted container image tags.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for today. Happy that I finally managed to get back to writing. 🙂&lt;/p&gt;
</description>
    <pubDate>Wed, 09 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/09/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/09/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: worked on PR reviews on the watch request handler server side &amp; client side timeout settings docs #21</title>
    <description>&lt;p&gt;June 2, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;worked-on-pr-reviews-on-the-watch-request-handler-server-side--client-side-timeout-settings-docs&quot;&gt;&lt;strong&gt;worked on PR reviews on the watch request handler server side &amp;amp; client side timeout settings docs&lt;/strong&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Not much I did, other than rephrasing &amp;amp; removing &amp;amp; discussing more on some sections of docs in the PR ~ &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467&quot;&gt;add documentation for the server &amp;amp; client side timeout #1467&lt;/a&gt;, as part of the review suggestions.&lt;/p&gt;

    &lt;p&gt;Ok, that’s still some substantial work, so fine!&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Other than above, I learnt something really important today (&amp;amp; that might be really trivial to others, but who really cares 😆). So, in one of the &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467#discussion_r643312870&quot;&gt;review suggestion comments&lt;/a&gt; in the PR, &lt;a href=&quot;https://github.com/yliaog&quot;&gt;Yu Liao&lt;/a&gt; pointed that one of the reference docs link I added was too old, so, I should change that to a latest release version.&lt;/p&gt;

    &lt;p&gt;That comment made me realise, that when I add reference links to source code documentation, or code patches, or something that’s part of a dynamic source code, I should never point to code/doc/patches or anything from a source code repo’s branch (like master, or staging, or any feature branch). The way to do it is by referencing the information from release tags. Reason being the branches are dynamic, &amp;amp; more &amp;amp; more work, &amp;amp; changes will keep coming up in there, so it won’t take anytime for those branch references to code/docs to get outdated, ultimately making these links useless &amp;amp; pointing to all wrong stuffs.&lt;/p&gt;

    &lt;p&gt;Well, it was a very important realisation for me (maybe I’m too slow &amp;amp; dumb to understand this much), but I always used to point source code patches links from master/main branches, for really no particular reason.&lt;/p&gt;

    &lt;p&gt;So, that’s one thing I learnt today! And another thing I’m slowly getting a hang of, is being OK with the very long PR reviews (or never ending questions around every small bits of changes). These might be frustrating in the beginning, but really, I’ve found each one of those small, big or any kind of nitpicks to be really useful &amp;amp; I’ve always ended up learning something new from them (sometimes, a whole new concept, or other times some set of best practices, but definitely something worth)&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;
</description>
    <pubDate>Wed, 02 Jun 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/06/02/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/06/02/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: documenting server side &amp; client side connection timeout settings, for the watch request handler #20</title>
    <description>&lt;p&gt;May 31, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;documenting-server-side--client-side-connection-timeout-settings-for-the-watch-request-handler&quot;&gt;&lt;strong&gt;documenting server side &amp;amp; client side connection timeout settings, for the watch request handler!&lt;/strong&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Re-started working on this long pending PR ~ &lt;em&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467/files&quot;&gt;add documentation for the server &amp;amp; client side timeout #1467&lt;/a&gt;&lt;/em&gt;, on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; project. The documentation provides information for the server-side &amp;amp; client-side connection timeout settings for the client’s watch request handler method. There were review comments on the PR, pointing to a few links explaining the process in more details, &amp;amp; ultimately requesting changes on my previous attempt.&lt;/li&gt;
  &lt;li&gt;I read through &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467#discussion_r632692426&quot;&gt;all of the links in the review comments on the PR&lt;/a&gt; &amp;amp; quite nicely managed to understand the concept. Putting all what I learnt &amp;amp; understood below (&amp;amp; the same is exactly what I have put in the documentation for the PR)&lt;/li&gt;
  &lt;li&gt;And rather than adding the entire documentation as inline docstrings in the python script, I just &lt;a href=&quot;https://github.com/kubernetes-client/python/blob/9bb536ced7255ecea07f93796f2f88a5b843a575/examples/watch/pod_namespace_watch.py#L22-L25&quot;&gt;added a small section with a link to the markdown documentation file in there&lt;/a&gt;.
    &lt;ul&gt;
      &lt;li&gt;The reason for not including the entire doc-string was because the python linter (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pycodestyle&lt;/code&gt;) used in the project pre-submit PR tests threw errors for the length of the documentation I added in the doc-strings section.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;There are two inputs available in the client, that could be used to set connection timeouts:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout_seconds&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_request_timeout&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;sever-side-timeout-kwargstimeout_seconds--n&quot;&gt;Sever-side timeout (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kwargs[&apos;timeout_seconds&apos;] = n&lt;/code&gt;)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;The value of the argument &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout_seconds&lt;/code&gt;, &lt;strong&gt;n&lt;/strong&gt;, (which is time duration in seconds) is consumed at the server side. It is included in the request URL to the server.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;For eg.&lt;/em&gt; ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://localhost:6443/api/v1/namespaces/default/pods?labelSelector=app%3Ddemo&amp;amp;timeoutSeconds=100&amp;amp;watch=True&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case, if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout_seconds&lt;/code&gt; value is set, the value &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; would determine the server-side connection timeout duration.&lt;/p&gt;

    &lt;p&gt;&lt;em&gt;For eg.&lt;/em&gt; ~ if &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kwargs[&apos;timeout_seconds&apos;] = 3600&lt;/code&gt;, then the server-side connection timeout will be equal to 1 hour.&lt;/p&gt;

    &lt;p&gt;This timeout duration is determined by the expression ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout = time.Duration(3600) * time.seconds&lt;/code&gt;, &lt;em&gt;i.e.&lt;/em&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout = 1 hour&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Refer:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/kubernetes/apiserver/blob/92392ef22153d75b3645b0ae339f89c12767fb52/pkg/endpoints/handlers/get.go#L255&quot;&gt;kubernetes/apiserver/pkg/endpoints/handlers/get.go#L255&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case, if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout_seconds&lt;/code&gt; value is not set, then the connection timeout will be a randomized value (in seconds) between 0 and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minRequestTimeout&lt;/code&gt;, to spread out load.&lt;/p&gt;

    &lt;p&gt;It is determined using the expression ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;timeout = time.Duration(float64(minRequestTimeout) * (rand.Float64() + 1.0))&lt;/code&gt;&lt;/p&gt;

    &lt;p&gt;Where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minRequestTimeout&lt;/code&gt; indicates the minimum number of seconds a handler must keep a request open before timing it out.&lt;/p&gt;

    &lt;p&gt;The default value of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minRequestTimeout&lt;/code&gt; is 1800 seconds.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Refer:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/kubernetes/apiserver/blob/92392ef22153d75b3645b0ae339f89c12767fb52/pkg/endpoints/handlers/get.go#L258&quot;&gt;kubernetes/apiserver/pkg/endpoints/handlers/get.go#L258&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
      &lt;li&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/admin/kube-apiserver.md&quot;&gt;kubernetes/release-1.1/docs/admin/kube-apiserver.md&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case of a network outage, this timeout value will have no effect &amp;amp; the client will hang indefinitely without raising any exception.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;It is recommended to set this timeout value to a higher number such as 3600 seconds (1 hour).&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;client-side-timeout-kwargs_request_timeout--n&quot;&gt;Client-side timeout (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kwargs[&apos;_request_timeout&apos;] = n&lt;/code&gt;)&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;The value of the argument &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_request_timeout&lt;/code&gt;, &lt;strong&gt;n&lt;/strong&gt; (which is time duration in seconds) is set to the socket used for the connection.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;In case, if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_request_timeout&lt;/code&gt; value is set, this argument can accept 2 types of input values ~
    &lt;ul&gt;
      &lt;li&gt;integer (int),&lt;/li&gt;
      &lt;li&gt;a tuple (with a length of 2)&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;If it is tuple input type, the first value will be ignored.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case of network outage, leading to dropping all packets with no RST/FIN, the timeout value (in seconds) determined by the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;request_timeout&lt;/code&gt; argument, would be the time duration for how long the client will wait before realizing &amp;amp; dropping the connection.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;When the timeout happens, an exception will be raised, for eg. ~&lt;/p&gt;

    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=&apos;localhost&apos;, port=6443): Read timed out.&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;In case, if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_request_timeout&lt;/code&gt; value is not set, then the default value is &lt;strong&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;None&lt;/code&gt;&lt;/strong&gt; &amp;amp; socket will have no timeout.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;&lt;em&gt;Refer:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;em&gt;&lt;a href=&quot;https://docs.python.org/2/library/socket.html#socket.getdefaulttimeout&quot;&gt;https://docs.python.org/2/library/socket.html#socket.getdefaulttimeout&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Mon, 31 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/31/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/31/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: k8s prow jobs testgrid walkthrough, k8s enhancement tracking spreadsheet, bi-weekly structured-logging workgroup meeting #19</title>
    <description>&lt;p&gt;May 27, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;k8s-prow-jobs-testgrid-walkthrough&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k8s prow jobs testgrid walkthrough&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;[The meeting notes are in this &lt;a href=&quot;https://docs.google.com/document/d/1ekAkKUt67WH_7nYrA3imDWTFVeY69a9y1qi_fruGksg/edit?usp=sharing&quot;&gt;google document&lt;/a&gt;]&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;During today’s 1:1 Thursday meeting with dims, he very kindly walked me through the &lt;strong&gt;testGrid for different prow ci job&lt;/strong&gt; under the k8s project.&lt;/li&gt;
  &lt;li&gt;Below are most of the things (I guess all, if I’m really not missing any more) that I learnt:
    &lt;ul&gt;
      &lt;li&gt;How to point to the prow job results dashboard from a PR.
        &lt;ul&gt;
          &lt;li&gt;Look for the list of the prow tests at the bottom of the PR, pick one prow job &amp;amp; click on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Details&lt;/code&gt; button next to it. For ex, &lt;a href=&quot;https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/102332/pull-kubernetes-e2e-kind/1397528065768165376&quot;&gt;this one&lt;/a&gt; goes to prow job &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull-kubernetes-e2e-kind&lt;/code&gt; outcomes for this &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/102332&quot;&gt;PR&lt;/a&gt;.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;From there, I walked through all the following tabs on the prow job dashboard:
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://prow.k8s.io/job-history/gs/kubernetes-jenkins/pr-logs/directory/pull-kubernetes-e2e-kind&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Job History&lt;/code&gt;&lt;/a&gt;: lists all the previous runs of a particular job across PRs under different k8s projects, with their statuses, whether failed or passed or skipped or else.&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://prow.k8s.io/prowjob?prowjob=c2ea64e1-be1c-11eb-ade9-d23ecbe60be7&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Prow Job YAML&lt;/code&gt;&lt;/a&gt;: shows the k8s yaml manifest for a particular prow ci job&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://prow.k8s.io/pr-history?org=kubernetes&amp;amp;repo=kubernetes&amp;amp;pr=102332&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PR History&lt;/code&gt;&lt;/a&gt;: Lists outcome of all the prow jobs/tests runs (not for a particular one job) on a particular PR across it’s different commits&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/102332&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PR&lt;/code&gt;&lt;/a&gt;: takes back to the PR from where we started&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/102332/pull-kubernetes-e2e-kind/1397528065768165376/&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Artifacts&lt;/code&gt;&lt;/a&gt;: directory containing a rich compilation of all the logs &amp;amp; artifacts that were created during a particular prow job run&lt;/li&gt;
          &lt;li&gt;
            &lt;p&gt;&lt;a href=&quot;https://testgrid.k8s.io/presubmits-kubernetes-blocking#pull-kubernetes-e2e-kind&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Testgrid&lt;/code&gt;&lt;/a&gt;: looks like the screenshot below. I need to play around it more to write a better minimal explanation for this, but what I understand right now is, it is same as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Job History&lt;/code&gt; but with a tile (or a graph) representation distributed across differnet time periods (if it’s a periodic jobs) for when the job was executed &amp;amp; wha were the results of those runs (success, failure or skipped). The job results are in a compact grid structure, so it becomes easier to do retrospective on the performance of a particular job for a really long period of time in one screen itself.&lt;/p&gt;

            &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/119876626-b6798d00-bf45-11eb-8ce3-52252fa885eb.png&quot; alt=&quot;K8s-prow-job-testgrid&quot; width=&quot;800&quot; /&gt;&lt;/p&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Followed by that, I learnt how I could utilize &lt;a href=&quot;https://cs.k8s.io&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cs.k8s.io&lt;/code&gt;&lt;/a&gt; (or Hound) to fetch both the job configuration &amp;amp; corresponding testgrid configuration for a particular prow job (for ex, here is for this job ~ &lt;a href=&quot;https://cs.k8s.io/?q=ci-cri-containerd-node-e2e&amp;amp;i=nope&amp;amp;files=&amp;amp;excludeFiles=&amp;amp;repos=kubernetes/test-infra&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci-cri-containerd-node-e2e&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;And lastly, I learnt about different types of prow jobs under k8s projects. The ones I learnt today (not sure if these are the only ones) are:
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Periodic jobs&lt;/code&gt; ~ runs over a defined period of time, say over every 5 hours, etc.&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pre-submit jobs&lt;/code&gt; ~ the CI jobs which are required to be green for a PR to be merged. Pre-submit here means this job is a pre-submit check for a PR.&lt;/li&gt;
          &lt;li&gt;
            &lt;s&gt;`On-demand jobs`&lt;/s&gt;
            &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Post-submit jobs&lt;/code&gt; ~ the CI jobs that are expensive to run periodically &amp;amp; are not common to most of the PRs. Can be initiated using a prow test flag in the PR commaents, for ex ~ &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/101571#issuecomment-828304420&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/test pull-kubernetes-e2e-kind&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Exercise for the coming week (Testgrid exercise)
    &lt;ul&gt;
      &lt;li&gt;Pick up one PR -&amp;gt; Pick up one prow job&lt;/li&gt;
      &lt;li&gt;Investigate how that prow job is defined, whether it is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;periodic&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pre-submit&lt;/code&gt; or an &lt;s&gt;`on-demand`&lt;/s&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;post-submit&lt;/code&gt; job&lt;/li&gt;
      &lt;li&gt;Investiage the results of a prow job run, so check &amp;amp; understand the following:
        &lt;ul&gt;
          &lt;li&gt;the artifacts created by the job run&lt;/li&gt;
          &lt;li&gt;logs it produced across various components&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;k8s-enhancement-tracking-spreadsheet&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k8s enhancement tracking spreadsheet&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Find the enhancements tracking spreadsheet for all the previous &amp;amp; current kubernetes project release version milestone &lt;a href=&quot;https://github.com/kubernetes/enhancements#enhancements-tracking-spreadsheet&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;bi-weekly-structured-logging-workgroup-meeting&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bi-weekly structured-logging workgroup meeting&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Today was the second meeting for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;structured-logging&lt;/code&gt; working group.&lt;/li&gt;
  &lt;li&gt;It was a wonderful discussion, touching progress on all following areas:
    &lt;ul&gt;
      &lt;li&gt;How the work under the working group would be organised/managed?
        &lt;ul&gt;
          &lt;li&gt;&lt;strong&gt;new label under all k8s projects&lt;/strong&gt; ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wg/structured-logging-label&lt;/code&gt; (apply it as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/wg structured-logging&lt;/code&gt;)&lt;/li&gt;
          &lt;li&gt;&lt;strong&gt;teams&lt;/strong&gt; ~ interested folks could add themselves as either &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;member&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reviewer&lt;/code&gt; to the project, based on their level of understanding. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;member&lt;/code&gt; is open to everyone, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reviewer&lt;/code&gt; is for folks having prior skills &amp;amp; experience.
            &lt;ul&gt;
              &lt;li&gt;I’ve added myself as a &lt;a href=&quot;https://github.com/kubernetes/org/pull/2739&quot;&gt;member&lt;/a&gt; currently.&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Updates on the status of work in areas:
        &lt;ul&gt;
          &lt;li&gt;Retrospection of kubelet migration (a survery is passed to the teams/people who participated in the kubelet structured logging migration process as either code-contributots, or reviewers, or approvers, etc)&lt;/li&gt;
          &lt;li&gt;Structured logging is well tested to check correctness and prevent regressions (related PRs were discussed)&lt;/li&gt;
          &lt;li&gt;Verification of log volumes (discussed as one of the major concerns. Issues will be created to track progress in this space. One of the suggestion was to add a periodic prow test that would check if the logs generated by a PR under structured logging is generating more than 10% logs)&lt;/li&gt;
          &lt;li&gt;Graduate JSON format to Beta (related PRs were discussed)&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;As part of the retrospective on the kubelet logs migration, the following point was reflected:
        &lt;ul&gt;
          &lt;li&gt;Lack of plural support in case of structured logging key names&lt;/li&gt;
          &lt;li&gt;The proposed solution is to implement the plural imitations of the existing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KObj&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog.KRef&lt;/code&gt; methods. I’ve picked up to do the same.&lt;/li&gt;
          &lt;li&gt;I’ve current not much idea on how it would be implemented. I’ll start by looking at the &lt;a href=&quot;https://www.google.com/url?q=https://github.com/kubernetes/klog/pull/128/files&amp;amp;sa=D&amp;amp;source=editors&amp;amp;ust=1622144426669000&amp;amp;usg=AOvVaw37UBoMSF4M4ymn-qgwQiw5&quot;&gt;previous singular implementation here&lt;/a&gt;.&lt;/li&gt;
          &lt;li&gt;Will also read through the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/99799#discussion_r588252534&quot;&gt;discussion that reflected the issue&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Thu, 27 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/27/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/27/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: reviewed KEP-281 ~ Dynamic Kubelet Configuration, explored kubeLinter ~ static analysis tool for Kubernetes #18</title>
    <description>&lt;p&gt;May 26, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;reviewed-kep-281--dynamic-kubelet-configuration&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;reviewed KEP-281 ~ Dynamic Kubelet Configuration&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;As part of my weekly regular exercises for getting really up-to-date with what’s going on in the kubernetes enhancements area, I try to read one KEP, per week. This time, I have picked up ~ &lt;a href=&quot;https://github.com/SergeyKanzhelev/enhancements/tree/e324e84516eff5119750a717851e934f6a197fdf/keps/sig-node/281-dynamic-kubelet-configuration&quot;&gt;KEP-281: Dynamic Kubelet Configuration&lt;/a&gt;.
    &lt;ul&gt;
      &lt;li&gt;Major points from the KEP:
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dynamic Kubelet Configuration&lt;/code&gt; allows a new Kubelet configurations to be rolled out in a live cluster.&lt;/li&gt;
          &lt;li&gt;The motivation, goals &amp;amp; design pattern is documented &lt;a href=&quot;https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node/dynamic-kubelet-configuration.md&quot;&gt;here&lt;/a&gt;
            &lt;ul&gt;
              &lt;li&gt;I’m still reading this above document.&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;The feature is deprecated at the version v1.22 due to lack of interest in promoting it to stable. &lt;a href=&quot;https://github.com/SergeyKanzhelev/enhancements/tree/e324e84516eff5119750a717851e934f6a197fdf/keps/sig-node/281-dynamic-kubelet-configuration#deprecation&quot;&gt;Read here&lt;/a&gt;:
            &lt;blockquote&gt;
              &lt;p&gt;Dynamic Kubelet Configuration feature was promoted to beta in v1.11, 3 July 2018. As per the Avoiding Permanent Beta policy this feature is marked for deprecation as there were no interest expressed to promote the feature to stable. Removal of Dynamic Kubelet Configuration logic will simplify code and improve code reliability.&lt;/p&gt;
            &lt;/blockquote&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;So, this KEP was around deprecating a long-standing beta feature. I learnt lots of new things while reading this so far. Major ones are:
    &lt;ul&gt;
      &lt;li&gt;KEPs doesn’t necessarily means always proposing for new features. This also could mean deprecating old features for reasons like not enough feedback from community for the feature version promotion, removing the feature might increase code-readability, etc.&lt;/li&gt;
      &lt;li&gt;I learnt about &lt;strong&gt;&lt;a href=&quot;https://kubernetes.io/blog/2020/08/21/moving-forward-from-beta/#avoiding-permanent-beta&quot;&gt;Avoiding Permanent Beta&lt;/a&gt;&lt;/strong&gt; policy, which says:
        &lt;blockquote&gt;
          &lt;p&gt;For Kubernetes REST APIs, when a new feature’s API reaches beta, that starts a countdown. The beta-quality API now has three releases (about nine calendar months) to either:&lt;/p&gt;

          &lt;ul&gt;
            &lt;li&gt;reach GA, and deprecate the beta, or&lt;/li&gt;
            &lt;li&gt;have a new beta version (and deprecate the previous beta).&lt;/li&gt;
          &lt;/ul&gt;

          &lt;p&gt;If a beta API has not graduated to GA after three Kubernetes releases, then the next Kubernetes release will deprecate that API version. There’s no option for the REST API to stay at the same beta version beyond the first Kubernetes release to come out after the release window.&lt;/p&gt;
        &lt;/blockquote&gt;
      &lt;/li&gt;
      &lt;li&gt;I got to read about the &lt;a href=&quot;https://kubernetes.io/docs/reference/using-api/deprecation-policy/#:~:text=rule%20%235b%3A&quot;&gt;Kubernetes Deprecation Policy&lt;/a&gt; document.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;explored-kubelinter--static-analysis-tool-for-kubernetes&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;explored kubeLinter ~ static analysis tool for Kubernetes&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;This is in continuation to the DVO (deployment validation operator) project, I’ve been working on. The operator basically aims at running various validation checks against the kubernetes resource yaml manifest, thus performing a static analysis.
    &lt;ul&gt;
      &lt;li&gt;The DVO project already have some validation checks like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;minimum replica count&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;resource request/limit&lt;/code&gt; etc, defined under it.&lt;/li&gt;
      &lt;li&gt;The next goal here is to leverage the wide catalouge of validation checks that comes with this kubernetes go static analysis tool, &lt;a href=&quot;https://github.com/stackrox/kube-linter&quot;&gt;KubeLinter&lt;/a&gt;.&lt;/li&gt;
      &lt;li&gt;So, as part of the same goal, today, I spent time exploring the entire &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeLinter&lt;/code&gt; source code, broadly understanding the various levels of checks that are defined under it.
        &lt;ul&gt;
          &lt;li&gt;check templates are defined here ~ &lt;a href=&quot;https://github.com/stackrox/kube-linter/tree/main/pkg/templates&quot;&gt;stackrox/kube-linter/pkg/templates&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Followed by that, I spent time understanding the new DVO operator’s &lt;a href=&quot;https://github.com/rrati/dv-operator/blob/kube-linter/pkg/controller/controller.go&quot;&gt;controller&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://github.com/rrati/dv-operator/blob/kube-linter/pkg/controller/generic_reconciler.go#L91&quot;&gt;reconcillation&lt;/a&gt; logic.
        &lt;ul&gt;
          &lt;li&gt;Understood how to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeLinter&lt;/code&gt; plugin to &lt;a href=&quot;https://github.com/rrati/dv-operator/blob/kube-linter/pkg/controller/controller.go#L28-L38&quot;&gt;construct GVK (Group-Version-Kind) for different objects&lt;/a&gt; (like service, DeploymentLike, ReplicationController, Registry &amp;amp; All) using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objectkinds.AllObjectKinds()&lt;/code&gt; method.&lt;/li&gt;
          &lt;li&gt;Understood how to create a &lt;a href=&quot;https://github.com/rrati/dv-operator/blob/kube-linter/pkg/controller/controller.go#L48-L59&quot;&gt;set of api groups/versions sorted with priority versions&lt;/a&gt; using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scheme.PrioritizedVersionsAllGroups()&lt;/code&gt; method.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This much helped me, in resolving couple of Jira tickets in the related EPIC as the validation checks asked in those tickets are already included in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubeLinter&lt;/code&gt; library.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Wed, 26 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/26/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/26/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: day of learning ~ learning how to create k8s go operators using operator-sdk, bi-weekly python-client PR/issues triage meeting #17</title>
    <description>&lt;p&gt;May 24, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;day-of-learning--learning-how-to-create-k8s-go-operators-using-operator-sdk&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;day of learning ~ learning how to create k8s go operators using operator-sdk&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Last friday (May 21, 2021) was a Day of Learning (DOL) for APAC teams at Red Hat. &lt;a href=&quot;https://github.com/pepedocs&quot;&gt;Jose Cueto&lt;/a&gt; and I (as suggested by Jose) decided to explore how to write kubernetes go operators using the &lt;a href=&quot;https://github.com/operator-framework/operator-sdk&quot;&gt;operator-sdk&lt;/a&gt; framework.&lt;/li&gt;
  &lt;li&gt;Putting the following links (that Jose compiled) for myself, so, I could refer them quickly later as I require:
    &lt;ul&gt;
      &lt;li&gt;Set up kind cluster
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://kind.sigs.k8s.io/docs/user/quick-start/#installation&quot;&gt;https://kind.sigs.k8s.io/docs/user/quick-start/#installation&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster&quot;&gt;https://kind.sigs.k8s.io/docs/user/quick-start/#creating-a-cluster&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Followed the following tutorial for building operators using operator-sdk
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/&quot;&gt;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Load local operator (container) image in a kind cluster
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster&quot;&gt;https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Deploy reference addon in kind cluster.
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#2-run-as-a-deployment-inside-the-cluster&quot;&gt;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#2-run-as-a-deployment-inside-the-cluster&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Deploy olm in kind cluster
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#3-deploy-your-operator-with-olm&quot;&gt;https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/#3-deploy-your-operator-with-olm&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;I also learnt how to deploy/reconcile operators in multiple clusters from a single centralised Hive clusters using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SelectorSyncSets (SSS)&lt;/code&gt;.&lt;/li&gt;
      &lt;li&gt;Some more links, that are important:
        &lt;ul&gt;
          &lt;li&gt;Highly recommend these links for understanding a bunch of operator concepts.
            &lt;ul&gt;
              &lt;li&gt;&lt;a href=&quot;https://olm.operatorframework.io/docs/tasks/&quot;&gt;https://olm.operatorframework.io/docs/tasks/&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;Although, I’m still facing some issues while deploying my dummy go operator through OLM. Jose &amp;amp; me continued to troubleshoot the issues today as well. Not much success on that, seems like I’ve some different configuration on my machine than Jose’s. And these differences are what we are trying to figure out currently. Once I’m done with some tangible results on this part, I would aim to write a little better blog around the steps I followed, &amp;amp; what all things I learnt.&lt;/p&gt;

    &lt;p&gt;But I thoroughly enjoyed thi time’s DOL. Totally worth it!&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;bi-weekly-python-client-prissues-triage-meeting&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bi-weekly python-client PR/issues triage meeting&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Attended the bi-weekly kubernetes python-client PR/issues triage meeting&lt;/li&gt;
  &lt;li&gt;Picked up the following issue. It’s a simple one, but the solution involves regenerating the python-client, so would be a very good learning exercise for me.
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1470&quot;&gt;BatchV1Api documentation examples are mis-indented #1470&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Also, I’ve a pending PR to finish ~ &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467&quot;&gt;[WIP] add documentation for the server &amp;amp; client side timeout #1467&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Some major discussions from today’s meeting:
    &lt;ul&gt;
      &lt;li&gt;Proposal to reduce the alpha -&amp;gt; beta, beta -&amp;gt; GA release soak time to 1 week from previously 2 weeks.&lt;/li&gt;
      &lt;li&gt;Although the new pattern would still ensure there will be a 2 week time for feedbacks between a beta to next alpha release.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;And, I have volunteered to participate in creating the upcoming python-client v18.0.0 beta release. I might pick up the release documentation or other small bits (I’m yet not aware what might be those) that might come up during the process.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Mon, 24 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/24/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/24/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: k8s org(s) membership 🥳 , structured-logging KEP review session, bump containerd &amp; runc on kubernetes CI jobs #16</title>
    <description>&lt;p&gt;May 19, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;k8s-orgs-membership&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k8s org(s) membership&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Finally got the kubernetes org(s) invitation emails in the inbox. 😁 💃. It really feels like I’ve earned them, this time! ❤️ &lt;!-- break --&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/119024688-fded9f80-b9c0-11eb-8715-a7c0e3e71c69.jpg&quot; alt=&quot;Kubernetes-org-invitation&quot; width=&quot;800&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/119024745-0e057f00-b9c1-11eb-9eb1-c35adae9f070.jpg&quot; alt=&quot;kubernetes-csi-invitation&quot; width=&quot;800&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/119024817-1f4e8b80-b9c1-11eb-862f-1547385e510f.jpg&quot; alt=&quot;kubernetes-sig-invitation&quot; width=&quot;800&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;structured-logging-kep-review-session&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;structured-logging KEP review session&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Had a very deep dive through the &lt;a href=&quot;https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging#motivation&quot;&gt;structured logging KEP&lt;/a&gt;. Logged all my review notes in &lt;a href=&quot;https://hackmd.io/qDIg8R-lSNa7oqWKsnIT5Q?view#Release-Signoff-Checklist&quot;&gt;this hackmd document&lt;/a&gt;.
    &lt;ul&gt;
      &lt;li&gt;Presented my review notes &amp;amp; the KEP idea to dims. He wanted me to present the KEP idea to him as if I was presenting that in a SIG meeting as my own proposal. It was a really good exercise. I got good comments. :)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;More stuff that I discussed during today’s (weekly Thursday) 1:1 meeting with dims are &lt;a href=&quot;https://docs.google.com/document/d/1ekAkKUt67WH_7nYrA3imDWTFVeY69a9y1qi_fruGksg/edit&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;bump-containerd--runc-on-kubernetes-ci-jobs&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bump containerd &amp;amp; runc on kubernetes CI jobs&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/test-infra/pull/22273&quot;&gt;Raised this PR&lt;/a&gt; on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/test-infra&lt;/code&gt; project to bump the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runc&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.0.0-rc95&lt;/code&gt;, &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.5.2&lt;/code&gt; in the kubernetes CI jobs.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Thu, 20 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/20/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/20/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: bumped runc version to v1.0.0-rc95 in cadvisor &amp; containerd, sig-doc issues triage #15</title>
    <description>&lt;p&gt;May 19, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;bumped-runc-version-to-v100-rc95-in-cadvisor--containerd&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bumped runc version to v1.0.0-rc95 in cadvisor &amp;amp; containerd&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Raised PRs to bump the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runc&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.0.0-rc95&lt;/code&gt;:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;google/cadvisor&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/google/cadvisor/pull/2873#event-4767993277&quot;&gt;bump runc version to v1.0.0-rc95 #2873&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd/containerd&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/containerd/containerd/pull/5514#event-4766604591&quot;&gt;bump runc version to v1.0.0-rc95 #5514&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This release of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runc&lt;/code&gt; contains a fix for &lt;a href=&quot;https://github.com/opencontainers/runc/security/advisories/GHSA-c3xm-pvg7-gh7r&quot;&gt;CVE-2021-30465&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;sig-doc-issues-triage&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-doc issues triage&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Reviewed/triaged the following &lt;a href=&quot;https://github.com/kubernetes/website/issues/&quot;&gt;kubernetes/website&lt;/a&gt; issues (which falls under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-doc&lt;/code&gt;):
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27920&quot;&gt;Delete a StatefulSet #27920&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27951#issuecomment-844218003&quot;&gt;Install and Set Up kubectl on Linux #27951&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27982#issuecomment-844272373&quot;&gt;Non-existent script is being referenced #27982&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reviewed the last issue from the above list, as part of helping someone from the community who wanted to write a PR for the fix.&lt;/p&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;updates-on-previous-contributions&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;updates on previous contributions&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;This PR on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/website&lt;/code&gt; from yesterday is merged now ~ &lt;a href=&quot;https://github.com/kubernetes/website/pull/28025&quot;&gt;fix the kubelet-config-1.21 configmap key value from config to kubelet #28025&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Wed, 19 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/19/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/19/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: hacking DVO, kubernetes/website issues review/triage, sharing good-first-issues with folks in community, Kubernetes sig-security Tooling meeting, hacking client-generator code #14</title>
    <description>&lt;p&gt;May 18, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;hacking-dvo&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hacking DVO&lt;/code&gt;&lt;/h4&gt;

&lt;p&gt;DVO aka &lt;a href=&quot;https://github.com/app-sre/deployment-validation-operator&quot;&gt;Deployment Validation Operator&lt;/a&gt; is an openshift-sdk based operator, which checks deployments and other resources against a curated collection of best practices. Some folks from Red Hat’s AppSRE team are working on building this operator. This is majorly a work in progress currently, &amp;amp; I’m trying to getting involved in this quite early itself. As part of my getting onboarded, I spent couple of hours in the morning hacking the existing implemenation &amp;amp; below is what I did:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;I’ve deployed the DVO operator on a local code-ready-container (crc) cluster.&lt;/li&gt;
  &lt;li&gt;I can see the gauge metrics in one of the dvo-operator pod logs.
  &lt;img src=&quot;https://user-images.githubusercontent.com/30499743/118699201-e41c5300-b82e-11eb-98a3-70b07aac84ff.png&quot; alt=&quot;Screenshot from 2021-05-18 12-23-48&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;I spent time reading the code under the &lt;a href=&quot;https://github.com/app-sre/deployment-validation-operator/tree/master/pkg&quot;&gt;deployment-validation-operator/pkg&lt;/a&gt;, more specifically the validation tests. What I understood there, is:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/app-sre/deployment-validation-operator/blob/master/pkg/validations/replicas_test.go&quot;&gt;replicas_test.go&lt;/a&gt; is analogous to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dv_replicas&lt;/code&gt; gauge metrics.&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/app-sre/deployment-validation-operator/blob/master/pkg/validations/requests_limits_test.go&quot;&gt;requests_limits_test.go&lt;/a&gt; is analogous to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dv_requests_limits&lt;/code&gt; gauge metrics.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;I had a question:
    &lt;ul&gt;
      &lt;li&gt;The gauge metrics &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dv_replicas&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dv_requests_limits&lt;/code&gt; , are these being exported to Prometheus with the help of some exporter, when I deploy DVO? I was not able to query them on Prometheus. Maybe I’m unable to understand something here?&lt;/li&gt;
      &lt;li&gt;Just got the following answer:
        &lt;blockquote&gt;
          &lt;p&gt;DVO generates them but to see them in prometheus via the prometheus operator, you would need to create a “service monitor” in the namespace of the prometheus operator.
At least, that’s how app-sre has that setup. It’s because the prometheus operator we deploy, doesn’t find the “service monitors” in any namespace except its own.  I suspect that may be the case for crc as well.&lt;/p&gt;
        &lt;/blockquote&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;And, I’m yet to try doing this part ~ &lt;strong&gt;&lt;em&gt;making DVO run on top of kube-linter.&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;kuberneteswebsite-issues-reviewtriage&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/website issues review/triage&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;I triaged/reviewed the following 4 issues from the &lt;a href=&quot;https://github.com/kubernetes/website&quot;&gt;kubernetes/website&lt;/a&gt; project. (&amp;amp; a lot more actually. I didn’t include because there was not any action on them from me):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27931&quot;&gt;Issue with k8s.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/ #27931&lt;/a&gt;
    &lt;ul&gt;
      &lt;li&gt;For this one, I raised a PR as well ~ &lt;a href=&quot;https://github.com/kubernetes/website/pull/28025&quot;&gt;fix the kubelet-config-1.21 configmap key value from config to kubelet #28025&lt;/a&gt;. It’s labelled &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lgtm&lt;/code&gt; now.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27056#issuecomment-843129207&quot;&gt;Last command of “Interactive Tutorial - Exposing Your App” interactive lesson is deprecated #27056&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27475#issuecomment-843066458&quot;&gt;List All Container Images Running in a Cluster (#27475)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/website/issues/27162#issuecomment-843223669&quot;&gt;Unclear requirements for “Using Source IP” tutorial #27162&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;sharing-good-first-issues-with-folks-in-community&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sharing good-first-issues with folks in community&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;I shared the last two issues (I mentioned above) in the kubernetes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;in-dev&lt;/code&gt; slack channel, after I was done prepping them with the solutions. The only thing I left for the folks attempting, was to right away implement it. Well, people might call it &lt;em&gt;spoon feeding&lt;/em&gt; (which I &lt;em&gt;myself&lt;/em&gt; am totally against of). But the fact is, the kubernetes project has become really complex that the entry barrier has become more emotionally overwhelming, if not anything else. So, yea, that’s what I did today, tried to help someone getting started. Alteast making it easy for two of the folks to start.&lt;/p&gt;

&lt;p&gt;It made me really happy. I recalled &lt;em&gt;&lt;a href=&quot;https://janusworx.com&quot;&gt;jason braganza&lt;/a&gt;&lt;/em&gt; telling me, that &lt;strong&gt;&lt;em&gt;paying it forward is the only way to paying it back&lt;/em&gt;&lt;/strong&gt;. I’m trying to do it. 🙂&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/118704823-25affc80-b835-11eb-9ce8-00a7b1ea7df6.png&quot; alt=&quot;Screenshot from 2021-05-18 23-49-09&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/118704831-26e12980-b835-11eb-9690-8cc16017f728.png&quot; alt=&quot;Screenshot from 2021-05-18 23-49-37&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;kubernetes-sig-security-tooling-meeting&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Kubernetes sig-security Tooling meeting&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;Attended the very first meeting of a new sub-group/working-group under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-security&lt;/code&gt;. This new sub-group is known as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-security-tooling&lt;/code&gt;. Today’s meeting was more of an introduction to the project charter, setting up expectations &amp;amp; making everyone comfortable by discussing what could be different ways to get involved. I’ll follow up with the coming updates on the project &amp;amp; wherever I’ll get opportunities, I’ll definitely contribute back. But it was lovely talking to some wonderful folks like &lt;strong&gt;&lt;em&gt;Tabitha Sable&lt;/em&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;em&gt;Pushkar Joglekar&lt;/em&gt;&lt;/strong&gt; and so many others.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;hacking-client-generator-code&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hacking client-generator code&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;I’m currently trying to learn, how I can generate the entire &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-python/client&lt;/code&gt; source code from scratch. I tried with the following so far:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;I tried hacking the &lt;a href=&quot;https://github.com/kubernetes-client/gen&quot;&gt;kubernetes-client/gen&lt;/a&gt; tool.&lt;/li&gt;
  &lt;li&gt;Following the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;README&lt;/code&gt; doc for the client generator, I attempted the stuff below:
    &lt;ul&gt;
      &lt;li&gt;Cloned the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/gen&lt;/code&gt; repo &amp;amp; ran the following command inside the cloned repo ~
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./openapi/python.sh python-client/ settings-file.sh&lt;/code&gt;
            &lt;ul&gt;
              &lt;li&gt;where &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python-client&lt;/code&gt; is the output directory.&lt;/li&gt;
              &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;settings-file.sh&lt;/code&gt; has these content inside it ~
                &lt;ul&gt;
                  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;export KUBERNETES_BRANCH=&quot;master&quot; export CLIENT_VERSION=&quot;v17.17.0&quot; export PACKAGE_NAME=&quot;client&quot;&lt;/code&gt;&lt;/li&gt;
                &lt;/ul&gt;
              &lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;But building this ended up in the following error:&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Step 26/26 : ENTRYPOINT [&quot;mvn-entrypoint.sh&quot;, &quot;/generate_client.sh&quot;]
 ---&amp;gt; Using cache
 ---&amp;gt; bd1d3efce8aa
Successfully built bd1d3efce8aa
Successfully tagged psaggu-kubernetes-python-client-gen-with-openapi-generator:v1
--- Running generator inside container...
/source/openapi-generator /
/
--- Downloading and pre-processing OpenAPI spec
/usr/local/lib/python2.7/dist-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Error downloading spec file https://raw.githubusercontent.com/psaggu/kubernetes/master/api/openapi-spec/swagger.json. Reason: Not Found
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul&gt;
  &lt;li&gt;As I can see from the error message, it is because :
    &lt;ul&gt;
      &lt;li&gt;In the spec file url ~ &lt;a href=&quot;https://raw.githubusercontent.com/psaggu/kubernetes/master/api/openapi-spec/swagger.json&quot;&gt;https://raw.githubusercontent.com/psaggu/kubernetes/master/api/openapi-spec/swagger.json&lt;/a&gt;, it is looking for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;swagger.json&lt;/code&gt; file, in a kubernetes repo fork under some GitHub username, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;psaggu&lt;/code&gt;.&lt;/li&gt;
      &lt;li&gt;But in my case it is, &lt;a href=&quot;https://raw.githubusercontent.com/Priyankasaggu11929/kubernetes/master/api/openapi-spec/swagger.json&quot;&gt;https://raw.githubusercontent.com/Priyankasaggu11929/kubernetes/master/api/openapi-spec/swagger.json&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;I discussed this with &lt;a href=&quot;https://github.com/roycaihw&quot;&gt;Haowei Kai&lt;/a&gt;, one of the project leads &amp;amp; he suggested the following:
    &lt;ul&gt;
      &lt;li&gt;The simpler way to do it is, trying using the &lt;a href=&quot;https://github.com/kubernetes-client/python/blob/master/scripts/update-client.sh&quot;&gt;kubernetes-client/python/scripts/update-client.sh&lt;/a&gt;, which is how we generate the python client. It builds on top of the client-gen repo. It basically set the configuration for you.&lt;/li&gt;
      &lt;li&gt;And for the issue I had above, this line controls that ~ &lt;a href=&quot;https://github.com/kubernetes-client/gen/blob/65a1e4739cf0dcc2b93f887d33fe0ad3772b6169/openapi/openapi-generator/client-generator.sh#L52&quot;&gt;kubernetes-client/gen/openapi/openapi-generator/client-generator.sh#L52&lt;/a&gt;. For username (that was coming in the spec file error above), it reads from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;USERNAME&lt;/code&gt; env, so maybe I have to set it in my shell &amp;amp; try again.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for the day! It was a wonderful day today. 🙏&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;PS:&lt;/strong&gt; Find &lt;a href=&quot;https://www.psaggu.com/kubernetes.html#may-2021&quot;&gt;here&lt;/a&gt;, the links to all the kubernetes-contributions for the month of May, 2021.&lt;/em&gt;&lt;/p&gt;
</description>
    <pubDate>Tue, 18 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/18/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/18/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: sig-auth PR/issue triage meeting, drop python2 support from kubernetes-client/python | python-base #13</title>
    <description>&lt;p&gt;May 17, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;sig-auth-prissue-triage-meeting&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth PR/issue triage meeting&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;I attended the bi-weekly &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt; PR/issue triage meeting. I still am a silent listener in the meeting, but I don’t have any regrets, the more I am listening with focus, the more I’m learning. The only thing I need to do moving forward is ask wherever required. But yea, today’s takeaways:
    &lt;ul&gt;
      &lt;li&gt;I need to read more about what are the responsibilities that fall under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt;, because for the most part in the meeting, I just see the reviewers removing the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt; label mentioning that it belongs to so &amp;amp; so sig.&lt;/li&gt;
      &lt;li&gt;I should read old reviews first before starting reviewing new PR/issues. Also, more specifically, the older ones from &lt;strong&gt;&lt;em&gt;jordan liggit&lt;/em&gt;&lt;/strong&gt; (now I understand why &lt;strong&gt;&lt;em&gt;dims&lt;/em&gt;&lt;/strong&gt; one time (6 months back, in one of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-node-reviewer-group&lt;/code&gt; meeting) mentioned about how elaborate Jordan’s reviews are. And we should look at his reviews while learning how to review PRs). I’m happy that I’m (if not doing any reviews) but attending the meetings. These are really full of rich information &amp;amp; lots of fodder to learn.&lt;/li&gt;
      &lt;li&gt;Review/Triage is a complex job, might require multiple release to get the ball rolling. People need to be really careful to put lgtm to changes like ones that might break backward compatibility, impact performace (like Jordan was talking about one today where adding more headers might lead to adding more volume to the logs leading to poor performance (he also pointed to the structured logging thing where using gloc to make logs structured impact performance really significantly))&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;drop-python2-support-from-kubernetes-clientpython--python-base&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;drop python2 support from kubernetes-client/python | python-base&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;The PR to &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1468&quot;&gt;drop python2 support&lt;/a&gt; from the upstream &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; repo’s master branch is done &amp;amp; is merged. All the tests are using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt; versions now.&lt;/li&gt;
  &lt;li&gt;The next step here to take these changes from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;master&lt;/code&gt; branch &amp;amp; make it available to community by dropping the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python2&lt;/code&gt; support in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v18.0.0&lt;/code&gt; beta release of the client-python.&lt;/li&gt;
  &lt;li&gt;I had &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1468#issuecomment-841440671&quot;&gt;couple of questions&lt;/a&gt; that I asked during the PR process. &lt;a href=&quot;https://github.com/yliaog&quot;&gt;Yu Liao&lt;/a&gt; very kindly helped me with providing answers to them. Following were the questions:
    &lt;blockquote&gt;
      &lt;p&gt;Q 2: Do I require to add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;update-pycodestyle.sh&lt;/code&gt; check for all the current set of python3 versions ( py3{5,6,7,8,9} )?&lt;/p&gt;
    &lt;/blockquote&gt;
    &lt;ul&gt;
      &lt;li&gt;I only need to run one &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt; version, say &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python 3.7&lt;/code&gt;, as all python3 versions share one common style guide.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;blockquote&gt;
      &lt;p&gt;Q 3: What’s the difference between &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;py3{5,6,7,8,9}&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;py3{5,6,7,8,9}-functional&lt;/code&gt;?&lt;/p&gt;
      &lt;ul&gt;
        &lt;li&gt;The  &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;py-functional&lt;/code&gt; has e2e (end to end) tests. The commands that shows the difference is here ~ &lt;a href=&quot;https://github.com/kubernetes-client/python/blob/821618feb3456674ea586047b972b3ae7559fa42/tox.ini#L15&quot;&gt;tox.ini#L15&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
  &lt;li&gt;The PR to &lt;a href=&quot;https://github.com/kubernetes-client/python-base/pull/238&quot;&gt;drop python2 support&lt;/a&gt; from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python-base&lt;/code&gt; repo is also merged into master.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;updates-on-previous-prs&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;updates on previous PRs&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;The PR to &lt;a href=&quot;https://github.com/containerd/containerd/pull/5505#event-4754268509&quot;&gt;bump hcsshim version to v0.8.17 on containerd/containerd (#5505)&lt;/a&gt; is merged into master.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for today!&lt;/p&gt;
</description>
    <pubDate>Mon, 17 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/17/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/17/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: bump hcsshim version to v0.8.17 in containerd #12</title>
    <description>&lt;p&gt;May 15, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;bump-hcsshim-version-to-v0817&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bump hcsshim version to v0.8.17&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Created a PR to bump &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hcsshim&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v0.8.17&lt;/code&gt; in &lt;a href=&quot;https://github.com/containerd/containerd&quot;&gt;containerd&lt;/a&gt;. Link to the PR here ~ &lt;a href=&quot;https://github.com/containerd/containerd/pull/5505&quot;&gt;containerd/containerd/pull/5505&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;There were 2 failing CI tests:
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/containerd/containerd/pull/5505/checks?check_run_id=2590402439&quot;&gt;CI / Linux Integration (io.containerd.runc.v2, crun) (pull_request)&lt;/a&gt;&lt;/strong&gt;
        &lt;ul&gt;
          &lt;li&gt;This one failed at the CRI Integration Test ~ &lt;a href=&quot;https://github.com/containerd/containerd/blob/08fa9ab625103b43174497911caf74bdeb0fc0f9/.github/workflows/ci.yml#L445-L450&quot;&gt;.github/workflows/ci.yml#L445-L450&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;Failing at this line ~ &lt;a href=&quot;https://github.com/containerd/containerd/blob/master/script/test/utils.sh#L78&quot;&gt;script/test/utils.sh#L78&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/containerd/containerd/pull/5505/checks?check_run_id=2590402511&quot;&gt;CI / CGroupsV2 and SELinux Integration (runc) (pull_request)&lt;/a&gt;&lt;/strong&gt;
        &lt;ul&gt;
          &lt;li&gt;This one failed at the CRI test ~ &lt;a href=&quot;https://github.com/containerd/containerd/blob/master/.github/workflows/ci.yml#L562-L566&quot;&gt;.github/workflows/ci.yml#L562-L566&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;I spent quite a good long time doing the above troubleshooting, ending up finally realising that I missed cleaning/updating the integration tests under containerd (defined &lt;a href=&quot;https://github.com/containerd/containerd/tree/master/integration&quot;&gt;here&lt;/a&gt;) which ultimately led to the above CI tests failing.&lt;/li&gt;
  &lt;li&gt;The above missing step resulted into not updating the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.5.1&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runc&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.0.0-rc94&lt;/code&gt; in the containerd integrations tests.&lt;/li&gt;
  &lt;li&gt;So, now, I’ve just ran &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;go mod tidy&lt;/code&gt; under the &lt;a href=&quot;https://github.com/containerd/containerd/tree/master/integration&quot;&gt;containerd/integration/client&lt;/a&gt; module, which finally updated the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;runc&lt;/code&gt; to required appropriate versions.&lt;/li&gt;
  &lt;li&gt;
    &lt;s&gt;Currently I&apos;m waiting for the CI tests run to finish.&lt;/s&gt;
    &lt;p&gt;The CI tests are all green. 🎊 Now, I’ll be waiting for the final review.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all for the day!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;PS: I created two dedicated kubernetes page on the blog. One for collecting all the &lt;em&gt;upstream kubernetes contributions&lt;/em&gt; &amp;amp; second to collect all the kubernetes posts in one place. Find links to both of the pages, &lt;a href=&quot;https://www.psaggu.com/kubernetes-blogs.html&quot;&gt;here&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://www.psaggu.com/kubernetes.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And, to subscribe to the kubernetes blogs page, find the rss feed &lt;a href=&quot;https://www.psaggu.com/kubernetes.xml&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
    <pubDate>Sat, 15 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/15/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/15/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: containerd v1.5.1 GA, event watch stream server-side timeout, dropping python2 support from k8s python client, dedicated kubernetes contribution page #11</title>
    <description>&lt;p&gt;May 14, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;bumped-containerd-version-to-v151&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Bumped containerd version to v1.5.1&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;In the morning, I worked on writing PRs for bumping the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containered&lt;/code&gt; version to the GA version &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.5.1&lt;/code&gt; in the following projects:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;microsoft/hcsshim&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/microsoft/hcsshim/pull/1027#event-4745184459&quot;&gt;bump containerd version to v1.5.1 #1027&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;google/cadvisor&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/google/cadvisor/pull/2870&quot;&gt;bump containerd version to v1.5.1 #2870&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/image-builder&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/kubernetes-sigs/image-builder/pull/610&quot;&gt;bump containerd version to v1.5.1 #610&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes/test-infra&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/kubernetes/test-infra/pull/22178&quot;&gt;bump containerd version to v1.5.1 #22178&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;dropping-python2-support-from-k8s-clientpython--k8s-clientpython-base&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dropping python2 support from k8s-client/python &amp;amp; k8s-client/python-base&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;I am currently working on the PRs that will drop the python2 support from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python-base&lt;/code&gt; repositories.
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python-base&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/kubernetes-client/python-base/pull/238&quot;&gt;[WIP] drop python2 support #238&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; ~ &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1468&quot;&gt;[WIP] drop python 2 support #1468&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;While doing the PRs, I learnt about what’s the usage of the following python modules:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;isort&lt;/code&gt; ~ Python utility / library to sort imports alphabetically, and automatically separated into sections and by type.&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;coverage&lt;/code&gt; ~ A tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;codecov&lt;/code&gt; ~ A reporting tool that is intended to process any coverage report format into a format that is standard across Codecov.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Both of the PRs are work in progress (WIP). The work done in both the repos, so far is:
    &lt;ul&gt;
      &lt;li&gt;removed python2 from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.travis.yaml&lt;/code&gt; file&lt;/li&gt;
      &lt;li&gt;remove python2 from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tox.ini&lt;/code&gt; file&lt;/li&gt;
      &lt;li&gt;remove &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-y&lt;/code&gt; flag from isort command in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;update-pycodestle.sh&lt;/code&gt; script&lt;/li&gt;
      &lt;li&gt;fix sequence of module imports to fix the failing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pycodestyle&lt;/code&gt; checks in the following files:
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples/multiple_clusters.py&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples/pick_kube_config_context.py&lt;/code&gt;&lt;/li&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples/pod_config_list.py&lt;/code&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;tested &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;coverage&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;codecov&lt;/code&gt; tests with python3 version (currently &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v3.9&lt;/code&gt;)&lt;/li&gt;
      &lt;li&gt;tested updated &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;update-pycodestyle&lt;/code&gt; for python3 version &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v3.9&lt;/code&gt; in case of arch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ppc6le&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Also, just realised, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python-base&lt;/code&gt; clone the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; while running the travis CLI jobs. So, I need to first finish the PR for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python&lt;/code&gt; &amp;amp; then move to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes-client/python-base&lt;/code&gt; one.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;documenting-watch-stream-server-side-timeout&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;documenting watch stream server-side timeout&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;Raised the following PR to document the pods event &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;watch&lt;/code&gt;stream &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;server-side&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;client-side&lt;/code&gt; timeout:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1467&quot;&gt;add documentation for the server &amp;amp; client side timeout #1467&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;dedicated-page-for-upstream-kubernetes-contributions&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dedicated page for upstream kubernetes contributions&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;I have created a dedicated page for logging &amp;amp; tracking all my upstream Kuberenetes project contributions. Find it &lt;a href=&quot;https://www.psaggu.com/kubernetes.html&quot;&gt;here&lt;/a&gt;, on the blog.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all for today! o/&lt;/p&gt;
</description>
    <pubDate>Fri, 14 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/14/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/14/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: sig-auth issues &amp; KEP review, structured-logging workgroup, kubernetes org membership (🎊) #10</title>
    <description>&lt;p&gt;May 13, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h4 id=&quot;sig-auth-issues--kep-review&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth issues &amp;amp; KEP review&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;To get better understanding of the work going on in around various kubernetes sig groups, I’m focusing now on &lt;strong&gt;reviewing PR/issues &amp;amp; the KEP(s) (Kubernetes Enhancement Proposals)&lt;/strong&gt;.
    &lt;ul&gt;
      &lt;li&gt;My first point of start is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt;. Although, today I went through mix set of PRs &amp;amp; KEPs&lt;/li&gt;
      &lt;li&gt;I (kind of) reviewed the following PRs from the &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pulls?q=is%3Apr+is%3Aopen+label%3Asig%2Fauth+sort%3Aupdated-desc&quot;&gt;kubernetes/kubernetes&lt;/a&gt; repo, which are labelled as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt;. Well, “kind of” because this is my first time reviewing k8s project PRs, rather than directly putting comments in the PRs, I collected my review notes &amp;amp; doubts in this &lt;a href=&quot;https://docs.google.com/document/d/1ekAkKUt67WH_7nYrA3imDWTFVeY69a9y1qi_fruGksg/edit?usp=sharing&quot;&gt;google doc here&lt;/a&gt;.
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/101917&quot;&gt;[wip] Proof #101917&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/101730&quot;&gt;opt out secret-based token generation when labeled #101730&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/101573&quot;&gt;Replace x.Sub(time.Now()) with time.Until(x) #101573&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/pull/101571&quot;&gt;deprecate apiserver.k8s.io/v1alpha1 #101571&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;I (kind of) reviewed the following KEPs from the &lt;a href=&quot;https://github.com/kubernetes/enhancements/pulls?q=is%3Aopen+is%3Apr&quot;&gt;kubernetes/enhancements&lt;/a&gt; repo:
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/pull/2734&quot;&gt;make clusterset optional&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/pull/2733&quot;&gt;KEP-2086: update beta milestone for v1.22 #2733&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/pull/2732&quot;&gt;KEP: Update SSA GA to 1.22&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/pull/2731&quot;&gt;KEP-2436: wildcard and default value #2731&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/enhancements/pull/2730&quot;&gt;Updating latest-milestone to 1.22 for KEP-536 #2730&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;It was really really really (I can’t emphasize enough) useful exercise. With this much review, I learnt a heck lot about the process followed by different sig(s) while reviewing their PR(s), what things to consider, what questions to ask, what sections to look at or verify &amp;amp; heck lot more. I’ll keep writing more about them, as I start practising them slowly in action!&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Some useful links:&lt;/strong&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/community/blob/master/contributors/devel/sig-node/triage.md&quot;&gt;SIG Node Triage Process&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://prow.k8s.io/?type=presubmit&amp;amp;author=Priyankasaggu11929&quot;&gt;Where to check the status of the jobs/tests that I ran on my PRs&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://prow.k8s.io/command-help&quot;&gt;Kubernetes: Prow commands help&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/kubernetes/labels?q=priority&quot;&gt;How to check what are the kinds/subcommands/value-types available for a prow/bot command&lt;/a&gt;
            &lt;ul&gt;
              &lt;li&gt;For ex: in the above ^ case it is checking what are the different kinds of the bot command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/priority&lt;/code&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/test-infra/blob/master/label_sync/labels.md&quot;&gt;Guide to what all are the labels available &amp;amp; where &amp;amp; when do they get applied&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;And lastly again, the elaborated review notes are in &lt;a href=&quot;https://docs.google.com/document/d/1ekAkKUt67WH_7nYrA3imDWTFVeY69a9y1qi_fruGksg/edit?usp=sharing&quot;&gt;this document&lt;/a&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;structured-logging-workgroup&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;structured-logging workgroup&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;I attended the first meeting for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;structured-logging&lt;/code&gt; workgroup. This is definitely something that I’m going to work on very soon (or right away). This is a new working group being created, focusing on:
    &lt;ul&gt;
      &lt;li&gt;defining standard structure for Kubernetes log messages,&lt;/li&gt;
      &lt;li&gt;add methods to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;klog&lt;/code&gt; to enforce this structure,&lt;/li&gt;
      &lt;li&gt;add ability to configure Kubernetes components to produce logs in JSON format&lt;/li&gt;
      &lt;li&gt;and finally, initiate migration of kubernetes component logs to structured logging&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Action item (by myself) from today’s meeting for is:
    &lt;ul&gt;
      &lt;li&gt;Thoroughly read through the &lt;a href=&quot;https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/1602-structured-logging#motivation&quot;&gt;Structured Logging&lt;/a&gt; KEP.&lt;/li&gt;
      &lt;li&gt;Slowly slowly go through &lt;a href=&quot;https://github.com/kubernetes/kubernetes/pulls?q=is%3Apr+kubelet+structured+logging+migration&quot;&gt;these PRs for kubelet migration to structured logging&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;updates-on-previous-prs&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Updates on previous PRs&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;PR: &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1452#discussion_r631222205&quot;&gt;
update deployment_crud.py to include a restart_deployment method for typed client
#1452 &lt;/a&gt; is finally merged. It was on hold from more than a week long time just because of the failing (pycodestyle script) job. Everything in the job run logs is green now.&lt;/li&gt;
  &lt;li&gt;And this one from yesterday, &lt;a href=&quot;https://github.com/kubernetes-sigs/image-builder/pull/606&quot;&gt;bump containerd version to v1.5.0 (#606)&lt;/a&gt; is also merged now.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h4 id=&quot;kubernetes-org-membership&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes org membership&lt;/code&gt;&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;And finally, last &amp;amp; the most wonderful thing for today (I literally danced for an hour, I mean &lt;strong&gt;&lt;em&gt;literally&lt;/em&gt;&lt;/strong&gt;)
    &lt;ul&gt;
      &lt;li&gt;Finally, I created the issue for the &lt;a href=&quot;https://github.com/kubernetes/org/issues/2712&quot;&gt;kubernetes organisation access&lt;/a&gt; (and ofcourse, some wonderful folks have sponsered me for my membership 👼)&lt;/li&gt;
      &lt;li&gt;So, yes it is on the way but it will happen for sure (hoping before the next post itself 😄)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;That’s all stuff from my day today.&lt;/p&gt;

&lt;p&gt;It was a work holiday (ah, although, I had on-call duties but fortunately wasn’t paged at all), &amp;amp; I’m happy I utilised my time well (talking, working, learning, dancing &amp;amp; exercising. 🙂)&lt;/p&gt;
</description>
    <pubDate>Thu, 13 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/13/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/13/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: Containerd v1.5.0 GA, Fixing DCO checks #9</title>
    <description>&lt;p&gt;May 12, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;a href=&quot;https://github.com/containerd/containerd/releases/tag/v1.5.0&quot;&gt;Version v1.5.0 for containerd&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt; is GA now. I raised multiple PRs to bump &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1.5.0&lt;/code&gt; in the following kubernetes sub-projects:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes/test-infra/pull/22157&quot;&gt;kubernetes /test-infra&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/containerd/zfs/pull/47&quot;&gt;containerd /zfs&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-sigs/image-builder/pull/606&quot;&gt;kubernetes-sigs/image-builder&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;The first two are merged &amp;amp; third one is marked &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lgtm&lt;/code&gt; &amp;amp; awaiting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;approved&lt;/code&gt; label.&lt;/li&gt;
  &lt;li&gt;While working on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;containerd/zfs&lt;/code&gt; PR, I got to learn a lot of new stuff (simple, but well I wasn’t aware of them. And there is always a first time for everything):
    &lt;ul&gt;
      &lt;li&gt;Got to know about &lt;strong&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin&quot;&gt;Developer Certificate of Origin (DCO)&lt;/a&gt;&lt;/strong&gt;. In context of this PR, it basically meant I needed to sign my PR commits with a gpg key (linked to the email address similar to what I have used to sign the &lt;em&gt;Contributors License Agreement (CLA)&lt;/em&gt;). And followed by that, I need to add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Signed-off-by: Priyanka Saggu &amp;lt;something@example.com&amp;gt;&lt;/code&gt; in the commit description itself, so when the GitHub workflow runs to validate the DCO check, it goes through the checks smoothly (and this part is what I missed &amp;amp; where it took me very long to understand).&lt;/li&gt;
      &lt;li&gt;Got to learn better ways to update go module dependencies. The &lt;a href=&quot;https://github.com/containerd/zfs/pull/47&quot;&gt;PR comments&lt;/a&gt; from the project leads are rich with information around the same.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s mostly what I did outside the work today. It was a busy day today (I’m happy that I was able to focus today properly).&lt;/p&gt;

</description>
    <pubDate>Wed, 12 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/12/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/12/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: Red Hat OpenShift Administration I (DO280), sig-auth PR/issue triage meeting #7</title>
    <description>&lt;p&gt;May 07, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Red Hat OpenShift Administration I (DO280)&lt;/strong&gt; virtual instructor led training (VILT) is finished. Now, will slowly slowly keep practicing &amp;amp; re-practicing the labs for a month, &amp;amp; then sit for the certification exam.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;What I’m thinking is, actually (&amp;amp; conciously) making a 1 hour focus time block for practicing the labs daily. Will do the planning tomorrow &amp;amp; start from monday!&lt;/li&gt;
  &lt;li&gt;Another thing, I need to do here is &lt;strong&gt;actually&lt;/strong&gt; schedule the exam. Will first plan the lab practicing part &amp;amp; then accordingly schedule a date for exam. (This is due for next week)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, the lab I was stuck at yesterday, had some major information missing in the instructions. The instructor helped me pointing out what it was. So, that is sorted now. :)&lt;/p&gt;

&lt;p&gt;Other than that, not much today!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;From the upstream Kubernetes:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;I attended a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt; bi-weekly PR/issue triage meeting. It’s wonderful to see how the project leads &amp;amp; reviewers maintain such huge project board, flooded with issues &amp;amp; PR waiting for triage &amp;amp; reviews. So, joining the meeting gave me an idea of how actually they do it. The one thing that I learnt &amp;amp; I could put here is, they check if the PR/issues is of concern to the respective sig (in this case, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-auth&lt;/code&gt;). if not, just quickly remove the labels from them &amp;amp; check them out of the board. It sounds rude, but trust me it is not &amp;amp; highly required. They have a lot to manage &amp;amp; removing the labels is the way to lead them to next right step.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Good part of joining the meeting was, I got to say hello to Jordon Liggit, Rita Zhang and couple other wonderful folks from Kubernetes community. And the other major realisation was, well, I’m doing a good job with my PRs. Lots of people are there who are raising PRs, just for the sake of raising one (you know what I mean &amp;lt;- &amp;amp; this is what the reviewers said, not me 😅 ).&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Finished listening to the &lt;strong&gt;Atomic Habits&lt;/strong&gt; book. Now, to putting it in action day by day. (Thank you, &lt;em&gt;&lt;a href=&quot;https://janusworx.com/blog/atomic-habits/&quot;&gt;jason braganza&lt;/a&gt;&lt;/em&gt;. 🙏 )&lt;/p&gt;

&lt;p&gt;Cool, that’s it for the day! Will try to catch up with other stuff tomorrow.&lt;/p&gt;
</description>
    <pubDate>Fri, 07 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/07/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/07/notes.html</guid>
  </item>
  
  <item>
    <title>Showing up! #6</title>
    <description>&lt;p&gt;May 06, 2021&lt;/p&gt;

&lt;p&gt;Today was a so so day. I would say, the last some hours were hard, other than that it was wonderful in the morning. I did more than usual productive stuff during the time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;(see, I myself am confused, that’s why it was hard. Just too much overthinking happening. 😅).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Well, I didn’t feel like writing today. But then times like these become the culprit behind me breaking a good going streak. So, decided to just quickly put down some lines.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;So, updates from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I continued with the &lt;strong&gt;Red Hat OpenShift Administration I (DO280)&lt;/strong&gt; virtual instructor led training (VILT).&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Learnt about the OpenShift &lt;strong&gt;Pod Scheduler Algorithm&lt;/strong&gt; today. It’s a three step process:&lt;/p&gt;

    &lt;ol&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;Filtering nodes&lt;/strong&gt;:&lt;/p&gt;

        &lt;blockquote&gt;
          &lt;ul&gt;
            &lt;li&gt;
              &lt;p&gt;The scheduler filters the list of running nodes by evaluating each node against a set of predicates, such as the availability of host ports, or whether a pod can be scheduled to a node experiencing either disk or memory pressure.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;p&gt;Additionally, a pod can define a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;node selector&lt;/code&gt; that matches the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;labels&lt;/code&gt; in the cluster nodes. Nodes whose labels do not match are not eligible.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;p&gt;A pod can also define resource requests for compute resources such as CPU, memory, and storage. Nodes that have insufficient free computer resources are not eligible.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;p&gt;Another filtering check evaluates if the list of nodes have any &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;taints&lt;/code&gt;, and if so whether the pod has an associated &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;toleration&lt;/code&gt; that can accept the taint. If a pod cannot accept the taint of a node, then the node is not eligible. By default, control plane nodes include the taint &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;node-role.kubernetes.io/master:NoSchedule&lt;/code&gt;. A pod that does not have a matching toleration for this taint will not be scheduled to a control plane node.&lt;/p&gt;
            &lt;/li&gt;
          &lt;/ul&gt;

          &lt;p&gt;The end result of the filtering step is typically a shorter list of node candidates that are eligible to run the pod. In some cases, none of the nodes are filtered out, which means the pod could run on any of the nodes.&lt;/p&gt;

          &lt;p&gt;In other cases, all of the nodes are filtered out, which means the pod cannot be scheduled until a node with the desired prerequisites becomes available.&lt;/p&gt;
        &lt;/blockquote&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;Prioritizing the filtered list of nodes&lt;/strong&gt;:&lt;/p&gt;

        &lt;blockquote&gt;
          &lt;ul&gt;
            &lt;li&gt;
              &lt;p&gt;The list of candidate nodes is evaluated using multiple priority criteria that add up to a weighted score. Nodes with higher values are better candidates to run the pod.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;Among the criteria are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;affinity&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;anti-affinity&lt;/code&gt; rules.
              &lt;ul&gt;
                &lt;li&gt;Nodes with higher affinity for the pod have a higher score.&lt;/li&gt;
                &lt;li&gt;Nodes with higher anti-affinity have a lower score.&lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
            &lt;li&gt;
              &lt;p&gt;A common use for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;affinity&lt;/code&gt; rules is to schedule related pods to be close to each other, for performance reasons. An example is to use the same network backbone for pods that synchronize with each other.&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;A common use for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;anti-affinity&lt;/code&gt; rules is to schedule related pods that are not too close to each other, for high availability. An example is to avoid scheduling all pods from the same application to the same node.&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/blockquote&gt;

        &lt;p&gt;(&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;anti-affinity&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;affinity&lt;/code&gt; rules with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;node-selectors&lt;/code&gt; ~ I’ve used this combination in the previous jobs. Good to have proper definition to what they do now.)&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;Selecting the best fit node.&lt;/strong&gt;:&lt;/p&gt;

        &lt;blockquote&gt;
          &lt;p&gt;The candidate list is sorted based on these scores, and the node with the highest score is selected to host the pod. If multiple nodes have the same high score, then one is selected in a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;round-robin&lt;/code&gt; fashion.&lt;/p&gt;
        &lt;/blockquote&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Also learnt about the concept of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ResourceQuotas&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LimitRanges&lt;/code&gt; for limiting resource usage by an application.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And finally, most of the day was doing labs around managing an OpenShift cluster from the web console. Never thought, I would be stuck at labs asking to do stuffs from a UI. It is so easy on the terminal. Anyways, yes, I’m stuck on literally the last &amp;amp; only one step of a grading lab. And that’s why the frustration in the last hours (&amp;amp; so all those funny emotions, crying &amp;amp; feeling like I’m the only poor &amp;amp; alone thing in this whole world 😆 🤷‍♀️). Will ask the instructor in tomorrow’s class for help.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;updates from the upstream kubernetes contributions:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;In the morning, fixed review comments on the &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1454&quot;&gt; (add ‘list_ingressroute_for_all_namespaces’ method #1454)&lt;/a&gt;. It’s merged now.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all from today. Tata everyone. o/&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(PS: Another big reason for frustration was some of my orders delivery getting delayed endlessly. And eventually going back to the seller. AAAAAAAAAAAAAA… too much frustration for absolutely not important stuff. I need to improve!)&lt;/em&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I did my first ever &lt;strong&gt;&lt;em&gt;the perfect pushup&lt;/em&gt;&lt;/strong&gt; today. woot woot 🎊&lt;/p&gt;

</description>
    <pubDate>Thu, 06 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/06/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/06/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: k8s python dynamic client examples, Red Hat OpenShift Administration I (DO280)#5</title>
    <description>&lt;p&gt;May 05, 2021&lt;/p&gt;

&lt;p&gt;Same as yesterday, I spent most of my day continuing with the &lt;strong&gt;Red Hat OpenShift Administration I (DO280)&lt;/strong&gt; virtual instructor led training (VILT). It’s going wonderful. :)&lt;/p&gt;

&lt;p&gt;The topics from today’s class were around configuring OpenShift networking for applications.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;I learnt how OpenShift exposes the conatiner applications to external networks using ingress &amp;amp; routes. I learnt about different types of routes (secure &amp;amp; unsecure) that could be created under the OpenShift clusters:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Edge routes&lt;/code&gt; ~ where TLS termination occurs at the router, between the external client &amp;amp; the application running in the cluster container
   &lt;img src=&quot;https://user-images.githubusercontent.com/30499743/117184624-8af7fc80-adf6-11eb-9bc5-1487c24a4ca6.png&quot; alt=&quot;edge-routes&quot; /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pass-through routes&lt;/code&gt; ~ where encrypted traffic is sent straight to the destination pod, without router providing TLS termination.The certificate is mounted on the container side using secrets. Currently, this is the only mode that supports mutual authentication between application &amp;amp; client that access it.
   &lt;img src=&quot;https://user-images.githubusercontent.com/30499743/117184744-b1b63300-adf6-11eb-9e22-8927bfdb1395.png&quot; alt=&quot;passthrough-routes&quot; /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Re-encrypted routes&lt;/code&gt; ~ (similar to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;edge-routes&lt;/code&gt;) where router terminates TLS connection from the client, with one certificate &amp;amp; then re-encrypt its connection to the container application endpoint once again, with different (or similar) certificate. So, this essentially provides full path encryption.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I also learnt how I can verify which part of network paths is TLS encrypted, from the &lt;strong&gt;external client&lt;/strong&gt;, through the &lt;strong&gt;router&lt;/strong&gt;, to all the way to the &lt;strong&gt;container applications&lt;/strong&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;And lastly, two more concepts, &lt;strong&gt;&lt;a href=&quot;https://docs.openshift.com/container-platform/4.7/authentication/managing-security-context-constraints.html&quot;&gt;Security context constraints (CSS)&lt;/a&gt;&lt;/strong&gt; &lt;strong&gt;&lt;a href=&quot;https://docs.openshift.com/container-platform/4.6/networking/network_policy/about-network-policy.html&quot;&gt;Network Policies&lt;/a&gt;&lt;/strong&gt;. (Well, this is something I’m still struggling to properly understand, so will spend some more time on it, later)&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Some of the updates from the Kubernetes upstream contributions,&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Re &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1448&quot;&gt;PR (add examples to demonstrate the usage of dynamic client #1448)&lt;/a&gt;, it was on hold from being merged due to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strategic-merge-patch&lt;/code&gt; throwing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unsupportedMediaType&lt;/code&gt; error. This got merged today. The reviewers confirmed that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strategic-merge-patch&lt;/code&gt; is not supported currently on custom resources by the upstream kubernetes project. More precise explanation:&lt;/p&gt;

    &lt;blockquote&gt;
      &lt;p&gt;native k8s resources like “deployment” support strategic-merge-patch. CR does not currently have that support. The support needs to be on the k8s server side, not on the python client side.&lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Last week, I’ve been going through some of the open feature requests on the k8s python client project. I wasn’t sure if I understood the requirements properly, so, yersterday I reached out to one of the project lead. I volunteered to pick up this one issue, &lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1413&quot;&gt;Drop Python 2 support #1413&lt;/a&gt;. I asked them to provide me some pointers on how to implement this. They’ve very kindly updated the issue with all the information. So, yes, I’ve assigned it to myself. Will start working on this after the upcoming release of the python-client. :)&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;And the last update from today is quite special.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I submitted a talk proposal for PyCon India, 2021 (again). Here is the &lt;a href=&quot;https://in.pycon.org/cfp/2021/proposals/getting-started-with-kubernetes-python-client~axknq/&quot;&gt;link to the proposal&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The special part is not submitting the proposal, but seeing how much I’ve grown up, since the last time I submitted one (which is the last year itself).&lt;/p&gt;

&lt;p&gt;Look at my talk proposal &lt;a href=&quot;https://www.youtube.com/watch?v=1FOecXfqFdk&quot;&gt;video from last time&lt;/a&gt; and the &lt;a href=&quot;https://www.youtube.com/watch?v=AphSNKf-GPs&quot;&gt;one from this time&lt;/a&gt;, the confidence, I’ve build up in myself is the special part. I’m so happy for the current myself. The earlier me looks troubled (and I know I was) :)&lt;/p&gt;

&lt;p&gt;So, yea, that’s all from today. Good night!&lt;/p&gt;

</description>
    <pubDate>Wed, 05 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/05/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/05/notes.html</guid>
  </item>
  
  <item>
    <title>How does &quot;oc debug node&quot; command works</title>
    <description>&lt;p&gt;May 04, 2021&lt;/p&gt;

&lt;p&gt;This week, I’m working on &lt;strong&gt;Red Hat OpenShift Administration I (DO280)&lt;/strong&gt; virtual instructor led training (VILT). This training is a preparatory course for the &lt;strong&gt;OpenShift Administration Certification Exam (EX280)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;During one of the chapters today, around troubleshooting OpenShift clusters, I came across this command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node-name&amp;gt;&lt;/code&gt;, which is used for debugging cluster nodes (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubelets&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;crio-d&lt;/code&gt; containers, control-plane stuff etc). This command provides a way to open up a shell prompt in a cluster node.&lt;/p&gt;

&lt;p&gt;But I saw something interesting while using this command. As the debug shell prompt open up (after hitting the command), there is this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pod IP: x.x.x.x&lt;/code&gt; appears in the terminal. I was a bit surprised to see a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pod IP&lt;/code&gt; coming in a node debug shell.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/117031653-6deffa80-ad1e-11eb-974b-68bdf166e5b5.png&quot; alt=&quot;debug_shell&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In order to confirm, if this (Pod) IP in the debug shell prompt, matched the node &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal IP&lt;/code&gt;, I ran &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc describe node master01&lt;/code&gt;. And to my more surprise, it does match.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/117034666-2b7bed00-ad21-11eb-933e-4b6244ad55a2.png&quot; alt=&quot;node_internal_ip&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once I was sure both these IPs were same, I asked my course instructor the following question, i.e.:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;When I do &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node-name&amp;gt;&lt;/code&gt;, the debug shell prompts up, printing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pod IP: &amp;lt;some-ip&amp;gt;&lt;/code&gt;. This &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Pod IP&lt;/code&gt; is exactly same as the node’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;internal IP&lt;/code&gt;. So, does that mean, a cluster node is also essentially a pod (or a container)?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He pointed me to &lt;a href=&quot;https://www.redhat.com/sysadmin/how-oc-debug-works&quot;&gt;this article&lt;/a&gt; (from redhat) that totally explained this above behaviour. Before I dig into what really happened (or you could simply go that article 😂). The short answer to my question, is no. The cluster nodes are not equal to pods. But the question still made a lot of sense &amp;amp; because the actual behaviour of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node-name&amp;gt;&lt;/code&gt; command imitates similar thing only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Let’s discuss what really happened!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The new recent versions of OpenShift suggests not to directly SSH into a cluster node. This is evident from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sshd_config&lt;/code&gt; on the cluster nodes, where they have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PermitRootLogin&lt;/code&gt; set to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;no&lt;/code&gt; on them.&lt;/p&gt;

&lt;p&gt;So what really happens is when you run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node_name&amp;gt;&lt;/code&gt;, it creates a pod for the debugging session and points us in the shell (TTY) of that pod. This pod is a &lt;strong&gt;special-purpose tools&lt;/strong&gt; container that mounts the node root file system at the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/host&lt;/code&gt; folder, and allows us to inspect any files from the node using it. This pod remains alive only until we are using the node debug shell prompt.&lt;/p&gt;

&lt;p&gt;To check the pod’s yaml manifest, run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node-name&amp;gt;&lt;/code&gt; command in one terminal &amp;amp; in the second terminal, list down the pods looking for the one with the name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;node-name&amp;gt;-debug&lt;/code&gt;. And then run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc get pod &amp;lt;node-name&amp;gt;-debug -o yaml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/117042358-7c8fdf00-ad29-11eb-9fab-9d17c2091a55.png&quot; alt=&quot;Screenshot from 2021-05-04 20-40-29&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The pod yaml manifest will look like the following:&lt;/strong&gt;&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;na&quot;&gt;apiVersion&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;v1&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;kind&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Pod&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;metadata&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;master01-debug&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;namespace&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default&lt;/span&gt;
&lt;span class=&quot;nn&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;nn&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;nn&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;spec&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;containers&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;/bin/sh&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:57e87210a3f3a3ba4fc85dde180c76988a5f68445f705fd07855003986c75ab0&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;container-00&lt;/span&gt;
      &lt;span class=&quot;s&quot;&gt;...&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;securityContext&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; 
         &lt;span class=&quot;na&quot;&gt;privileged&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
         &lt;span class=&quot;na&quot;&gt;runAsUser&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;
      &lt;span class=&quot;s&quot;&gt;...&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;tty&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;volumeMounts&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; 
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mountPath&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;/host&lt;/span&gt;  
        &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;host&lt;/span&gt;
      &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;mountPath&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;/var/run/secrets/kubernetes.io/serviceaccount&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default-token-p8rss&lt;/span&gt;
        &lt;span class=&quot;na&quot;&gt;readOnly&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;...&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;hostNetwork&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
  &lt;span class=&quot;na&quot;&gt;hostPID&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;nn&quot;&gt;...&lt;/span&gt;

  &lt;span class=&quot;na&quot;&gt;volumes&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;hostPath&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;/&lt;/span&gt; 
      &lt;span class=&quot;na&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Directory&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;host&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default-token-p8rss&lt;/span&gt;
    &lt;span class=&quot;na&quot;&gt;secret&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;defaultMode&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;420&lt;/span&gt;
      &lt;span class=&quot;na&quot;&gt;secretName&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;default-token-dnkrx&lt;/span&gt;
&lt;span class=&quot;na&quot;&gt;status&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;…&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;hostIP&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;192.168.50.10&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;phase&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;Running&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;podIP&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;192.168.50.10&lt;/span&gt;
  &lt;span class=&quot;s&quot;&gt;podIPs&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;pi&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;192.168.50.10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In OpenShift, there is a least possibility to run priviliged pods, with root acces (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user 0&lt;/code&gt;). But the following section in the pod manifest shows entirely a different picture.&lt;/p&gt;

&lt;div class=&quot;language-yaml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;      &lt;span class=&quot;na&quot;&gt;securityContext&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; 
         &lt;span class=&quot;na&quot;&gt;privileged&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;true&lt;/span&gt;
         &lt;span class=&quot;na&quot;&gt;runAsUser&lt;/span&gt;&lt;span class=&quot;pi&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The pod created with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;oc debug node/&amp;lt;node-name&amp;gt;&lt;/code&gt; command is a privileged pod with root user access. This specical kind of pod is what creates an equivalent scenario of SSHing into the node as a root user.&lt;/p&gt;

&lt;p&gt;(The article I linked above, mentions this command, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setpriv -d&lt;/code&gt; to run in the debug shell. It will give you an idea of how highly unrestricted access this priviliged debug pod gives us.)&lt;/p&gt;

&lt;p&gt;So, yea, that is all what I had to share for today. For me, it was quite an interesting concept.&lt;/p&gt;

</description>
    <pubDate>Tue, 04 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/04/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/04/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: demonstrate python dynamic-client usage &amp; brainstorming strategic-merge-patch, deployment rolling restart method, tekton pipelines, Container Storage Interface (CSI) session #4</title>
    <description>&lt;p&gt;May 3, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Improved this &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1448&quot;&gt;PR (add examples to demonstrate the usage of dynamic client #1448)&lt;/a&gt; from yesterday with review pointers. What I fixed is the following:
    &lt;ul&gt;
      &lt;li&gt;used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io/v1&lt;/code&gt; in place of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io/v1beta&lt;/code&gt; for CustomResourceDefintion (CRD) api&lt;/li&gt;
      &lt;li&gt;changing the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apiextensions.k8s.io&lt;/code&gt; version to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v1&lt;/code&gt; made adding &lt;a href=&quot;https://github.com/Priyankasaggu11929/python/blob/psaggu-add-dynamic-client-examples/examples/dynamic-client/cluster_scoped_custom_resource.py#L51-L82&quot;&gt;versions schema&lt;/a&gt; mandatory. So, learnt a lot today about writing CRD schema.&lt;/li&gt;
      &lt;li&gt;improved variables names &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ingressroute_manifest_one&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ingressroute_manifest_first&lt;/code&gt;, so it become more consistent with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ingressroute_manifest_second&lt;/code&gt; (well yes, I’m silly to name this as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*-one&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*-second&lt;/code&gt;, in place of one of two, or first or second)&lt;/li&gt;
      &lt;li&gt;as suggested, tried using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;application/strategic-merge-patch+json&lt;/code&gt; while applying patches to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;custom resource (CR)&lt;/code&gt; objects, but there is some issue here. Seems like, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strategic-merge-patch&lt;/code&gt; is not supported. Atleast that’s what the error says precisely. But &lt;a href=&quot;https://github.com/kubernetes-client/python/commit/789e37464b8512ee4687ecf03221ff088afde450#diff-5a785a7fc5b19b934975d4d49eb71d730de127362b35f89e368179b8355796c8&quot;&gt;this patch&lt;/a&gt; is for supporting the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strategic merge patch&lt;/code&gt;.  See &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1448#discussion_r624919083&quot;&gt;this comment here&lt;/a&gt; for context. I’ll wait for more input on this from the reviewers.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The reviewer to one of the previous &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1450&quot;&gt;PR (add example to demonstrate a rolling restart of the deployment #1450)&lt;/a&gt; suggested to replicate the same example for a k8s python &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;typed client&lt;/code&gt;. So, I refactored &amp;amp; cleaned a previous &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;deployment_crud.py&lt;/code&gt; python script to include a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rolling_restart_deployment&lt;/code&gt; method. Here is the &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1452&quot;&gt;PR (update deployment_crud.py to include a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rolling_restart_deployment&lt;/code&gt; method for typed client #1452)&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;During the office hours, I worked on writing some openshift tekton pipelines/tasks (which are a part of our team’s central autonomous platform, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cssre-pipelines&lt;/code&gt;).
    &lt;ul&gt;
      &lt;li&gt;wrote &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url_shortner&lt;/code&gt; tekton task, which enhances the google-chat notification messages from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;github/ci-pipeline&lt;/code&gt; (another tekton pipeline) by adding a shortened url of the running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pipelinerun&lt;/code&gt; logs tab. PR &lt;a href=&quot;https://github.com/rh-cssre/cssre-pipelines/pull/9&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
      &lt;li&gt;wrote &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;report-unresolved-pagerduty-incidents&lt;/code&gt; tekton pipeline, which will send a report of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unresolved&lt;/code&gt; PagerDuty incidents on the respective (team’s) google-chat channel, after a schedule of every 6 hours (which is at the end of every IC on-call shifts). WIP PR &lt;a href=&quot;https://github.com/rh-cssre/cssre-pipelines/pull/10&quot;&gt;here&lt;/a&gt; (I’m still testing it).&lt;/li&gt;
      &lt;li&gt;spent time setting up a development test namespace to perform testing on new tasks/pipelines defined under &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cssre-pipleines&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Lastly, joined a k8s community session around &lt;em&gt;Container Storage Interface&lt;/em&gt; (CSI). Well, I hardly understood anything there, but that’s my inexperience with the concept. The session was very thorough. I’m keeping the &lt;a href=&quot;https://docs.google.com/document/d/1FsC-XyEoCzbqagvtrrG8EpNy-FbTKU6ZEnRogH7nHc0/edit#&quot;&gt;notes &amp;amp; recording&lt;/a&gt; here for myself.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all from today.&lt;/p&gt;
</description>
    <pubDate>Mon, 03 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/03/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/03/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: python-client method for ingressroutes across namespaces, deployment rolling restart method, kubernetes/api brainstorming session #3</title>
    <description>&lt;p&gt;May 2, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Notes from today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Worked on the following two issues:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1388&quot;&gt;how to get namespaces ingressroutes through #1388&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;PR ready, I’m just waiting for one of my yesterday’s PR to get merged first, so, I could add solution to this as well, on top of that.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1378&quot;&gt;How do we do rolling restart? #1378&lt;/a&gt;
        &lt;ul&gt;
          &lt;li&gt;PR here ~ https://github.com/kubernetes-client/python/pull/1450&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Had a brainstorming session with a friend. For me, it was trying to understand &amp;amp; discuss, what parts (sub-projects) of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sig-api-machinary&lt;/code&gt; to dive-in next? What would be the nodes upwards to python-client? My takeaways, I’m gonna spend time on understanding the &lt;a href=&quot;https://github.com/kubernetes/code-generator/blob/master/OWNERS&quot;&gt;kubernetes/code-generator&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://github.com/kubernetes-client/gen&quot;&gt;kubernetes-client/gen&lt;/a&gt; sub-projects, as my next steps now. And lastly, got a brief walkthrough on the kube-builder boilerplate framework (for writing CRD based controller &amp;amp; operator logic). This is also something that I need to understand.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(no hurries, I will do it slowly with time. I am already working on operators, so, having that much information is far more than enough for now. I need to focus on other significant stuff first)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Learnt how to read the &lt;a href=&quot;https://github.com/kubernetes/api&quot;&gt;kubernetes/api&lt;/a&gt; file (precisely, each k8s internally supported api version’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;types.go&lt;/code&gt; file, which is what exactly contain the schema of all resources defined under a specific api version). Really useful finding this is.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Spent some time going through open issues (&amp;amp; lots of closed, and stale issues &amp;amp; old PRs) on the k8s python client repo. And I would say, I can read them (in terms of what they’re asking for), I have my basic set of terminologies in place now. But not to deny, there is no difference in me getting extremely overwhelmed by the stuff all around there.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But then I ask myself&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;how much time &amp;amp; effort, I have spent so far?&lt;/li&gt;
  &lt;li&gt;And was I able to pick up even this much stuff before?&lt;/li&gt;
  &lt;li&gt;Was I able to understand the context of the problems/issues/PRs before?&lt;/li&gt;
  &lt;li&gt;Was I aware of the project structure (the little I know even now) before?&lt;/li&gt;
  &lt;li&gt;Was I even here &amp;amp; doing this before?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And answers to all these questions, give me hope to keep going. Because I’m learning &amp;amp; I’m learning a lot. And, this is not a competition for me with others but definitely my own obligation with myself, to everyday show up &amp;amp; try. And so, I must do it.&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;(And a note to myself, next time weekend should be mostly weekends. You really need them.)&lt;/p&gt;
</description>
    <pubDate>Sun, 02 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/02/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/02/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: cleaning PR for custom alertmanager template changes in intly-operator, demonstrating dynamic-client, fixing broken CNCF CLA label #2</title>
    <description>&lt;p&gt;May 1, 2021&lt;/p&gt;

&lt;p&gt;Did the following today:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;In the morning, I rebased this &lt;a href=&quot;https://github.com/integr8ly/integreatly-operator/pull/1721&quot;&gt;PR (Add custom alertmanager go template to enhance email config)&lt;/a&gt; with &lt;a href=&quot;https://github.com/integr8ly/integreatly-operator&quot;&gt;integreatly-operator&lt;/a&gt; master branch. And it created a terrible mess (some really serious mess, with changes in 551 files), took me an hour to clean it &amp;amp; finally make it even with the master branch. Hoping it’ll be merged next week, so we get it atleast in the RHOAM 1.7 release.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;And rest of the day was entirely playing around k8s python &lt;a href=&quot;https://github.com/kubernetes-client/python-base/tree/master/dynamic&quot;&gt;dynamic clinet&lt;/a&gt;. I learnt a lot of stuff around how to create, list, patch (update) &amp;amp; delete k8s resources (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CustomResourceDefinition (CRD)&lt;/code&gt;s, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Custom Resources (CR)&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Services&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Configmaps&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Replication-Controller&lt;/code&gt;, &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nodes&lt;/code&gt;).  And as a result of all the learning, I raised &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1448&quot;&gt;quite a long PR&lt;/a&gt; today (the bot marked it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Size/XL&lt;/code&gt;&amp;amp; that means the review will take time). Anyways, the fun part was something that happened when I was done with all my changes &amp;amp; I raised the PR. The kubernetes upstream project accepts changes from folks who sign the &lt;a href=&quot;https://github.com/kubernetes/community/blob/master/CLA.md#the-contributor-license-agreement&quot;&gt;Contributor License Agreement (CLA)&lt;/a&gt;. And well, it is sure that I’ve signed it because that is why I got 3 of my PRs merged last week itself. But as I raised the PR today, the bot labelled it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cncf-cla: no&lt;/code&gt; which means even if everything gets approved, the PR won’t be merged. I cross-checked once again if I needed to sign it again or something, but no, everything was fine with the CLA. Then I was digging within my previous commit information &amp;amp; after a roughly 30/45 min brainstorming, I realised the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Author (email)&lt;/code&gt; in the last commit was something arbitrary value (something like this ~ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;psaggu.localhost@private-domain&lt;/code&gt;). The bot use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Author (email)&lt;/code&gt; value to verify if there is a GitHub username in their record, who have signed the CNCF CLA using this email address. And if there is, then the bot label the PRs from this user as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cncf-cla:yes&lt;/code&gt;, otherwise &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cncf-cla:no&lt;/code&gt;(leaving one of the required PR workflow test failing). Now, I knew the problem but I still wasn’t sure how to fix it. So, with some more tinkering on internet, &lt;a href=&quot;https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history&quot;&gt;this article&lt;/a&gt; came to my rescue. And more precisely this command:
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git commit --amend --author=&quot;John Doe &amp;lt;john-doe@example.com&amp;gt;&quot;&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;That’s it, ammending the previous commit with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--author&lt;/code&gt; flag worked for me &amp;amp; the bot (fortunately) changed the label to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cncf-cla:yes&lt;/code&gt;. Also to note, I spent some time with the Linux Foundation Jira board as well, checking if I could create a case there, but that was extremly slow &amp;amp; I literally closed the tab only after trying for 4/5 times (good for me).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, on and all, today was more of a git learning with all other stuff I did.&lt;/p&gt;

&lt;p&gt;More tomorrow, bye!&lt;/p&gt;
</description>
    <pubDate>Sat, 01 May 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/05/01/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/05/01/notes.html</guid>
  </item>
  
  <item>
    <title>Notes: brainstorming dynamic-client e2e tests, demonstrating patch_cluster_custom_object method, enhancing node_labels.py examples #1</title>
    <description>&lt;p&gt;April 29, 2021&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Did the following today:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Collaborated with a fellow kubernetes contributor (newbie like myself) to discuss his &lt;a href=&quot;https://github.com/kubernetes-client/python-base/pull/236&quot;&gt;PR (Support customizing “Accept” header #1428)&lt;/a&gt; for fixing this issue &lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1428&quot;&gt;here&lt;/a&gt;. It basically asks to make the API Request/Response &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Accept&lt;/code&gt; header more flexible against different &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;content-type&lt;/code&gt; values. (More deeper stuff in the issue itself)&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I also learnt a couple of new k8s api requests debugging stuff. For ex, the “–v=1,2,3…” flag in a kubectl request like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl get pods --v=6&lt;/code&gt; is used to increase the depth of the API response (which can be used for debugging). More on this in the&lt;a href=&quot;https://kubernetes.io/docs/reference/kubectl/cheatsheet/#kubectl-output-verbosity-and-debugging&quot;&gt; kubernetes cheatsheet&lt;/a&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/30499743/116467684-95ae1100-a88d-11eb-964f-9f08f839f2b1.png&quot; alt=&quot;Screenshot from 2021-04-29 01-51-56&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;I also understood why I was unable to import dynamic client module from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes&lt;/code&gt; package, even though I tried thousand times by typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;from kubernetes import dynamic&lt;/code&gt; in the python terminal. So, again the silly reason but I’m really happy I came across it, as it literally refreshed my whatsoever little python understanding. So, I was typing my import commands in a directory which is a clone of &lt;a href=&quot;https://github.com/kubernetes-client/python&quot;&gt;k8s python-client&lt;/a&gt;. This has a directory named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes&lt;/code&gt; inside it. So, when I was typing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;from kubernetes import dynamic&lt;/code&gt; in a python terminal (in the same cloned directory path which has the folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubernetes&lt;/code&gt;), python first tried looking for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dynamic&lt;/code&gt; module in the local path. And it was absent there, so it right away threw the following error (And it took me eons to actually parse the error message in my brain, that it was failing because it was looking for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dynamic&lt;/code&gt; module in the local path, rather than from the kubernetes library that I installed using pip)
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; from kubernetes import python
Traceback (most recent call last):
File &quot;&amp;lt;stdin&amp;gt;&quot;, line 1, in &amp;lt;module&amp;gt;
File &quot;/home/&amp;lt;user&amp;gt;/go/src/k8s.io/kubernetes/python/kubernetes/__init__.py&quot;, line 20, in &amp;lt;module&amp;gt;
  import kubernetes.config
ModuleNotFoundError: No module named &apos;kubernetes.config&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;So, now that I was finally able to import &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dynamic&lt;/code&gt; module from the kubernetes library, I finally started working on this &lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1429&quot;&gt;issue&lt;/a&gt; which is asking for examples demonstrating usage of dynamic client. I was able to frame examples with the help of lots of references from the &lt;a href=&quot;https://github.com/kubernetes-client/python-base/blob/master/dynamic/test_client.py#L136&quot;&gt;e2e test script&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Next was this &lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1427&quot;&gt;issue (Example of body format for patch_cluster_custom_object #1427)&lt;/a&gt;. So, this was also another case where (not only me, but mostly all others) were stuck in a sily scenario. The &lt;a href=&quot;https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/CustomObjectsApi.md&quot;&gt;kubernetes.client.CustomObjectsApi&lt;/a&gt; gives two levels for creating CustomResource (CR) (with scope as either &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cluster&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Namespaced&lt;/code&gt;). Everyone of us (and ofcourse the fellow who raised the issue) were trying to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;patch_cluster_custom_object&lt;/code&gt; method to patch/add/update stuffs in namespaced level custom resources. But note, that this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;patch_cluster_custom_object&lt;/code&gt; is for a cluster scoped custom resource (CR). And for patching a namespaced level CR, the method istead is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;patch_namespaced_custom_resource&lt;/code&gt;. So, as part of the PR, I created a new file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples/cluster_scoped_custom_object.py&lt;/code&gt; which does the following:
    &lt;ul&gt;
      &lt;li&gt;create a cluster scoped custom resource using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;create_cluster_custom_object&lt;/code&gt; method.&lt;/li&gt;
      &lt;li&gt;get a specific cluster scoped custom resoucee using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;get_cluster_custom_object&lt;/code&gt; method.&lt;/li&gt;
      &lt;li&gt;patch a cluster scoped custom resource using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;patch_cluster_custom_object&lt;/code&gt;.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;(link to PR is &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1437&quot;&gt;here&lt;/a&gt; &amp;amp; it’s merged (voila, my second PR merged to upstream k8s python client project)&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Note, I also needed to update the CustomResourceDefinition (CRD) which is required to create the CRs that we’ve been talking to update/patch all this while above. I needed to put &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scope: Cluster&lt;/code&gt; in place of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;scope: Namespaced&lt;/code&gt; in the example CRD manifest &lt;a href=&quot;https://github.com/kubernetes-client/python/pull/1437&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Another &lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1434&quot;&gt;PR (simplify &amp;amp; enhance the node_labels.py example #1434)&lt;/a&gt; also got merged (ok, this is third one :D). It was already ready yesterday, but some of the prow tests (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;travis CI&lt;/code&gt; jobs were failing for off code formatting). Realised those were extra whitspaces in empty lines that I added between patches. Took me really long to understand what &amp;amp; where exactly were those whitespaces (literally two very experienced k8s contributors needed to work with me on fixing this). Saw some other flaky tests (I’m lucky they’re flaky because this time they passed successfully for me.) Well, I learnt what flaky tests actually means for the first time today (google if you want to know, that is what I did myself).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;And final thing for python client project (for today) is, I’m able to understand more open issues &amp;amp; I’ve picked up some of them to work:
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1413&quot;&gt;Drop Python2 support #1413&lt;/a&gt; ~ not sure if I can actually do this. But I aim to do this, or least pick up parts of this process. (so far, haven’t assigned it, but have subscribed for the notifications)&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1388&quot;&gt;how to get namespaces ingressroutes through #1388 &lt;/a&gt; ~ as i read through the conversation, I understand this is mostly related to creating CR &amp;amp; then using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;list_cluster_custom_object&lt;/code&gt; method to list the ingressroute CR. I feel I can do this. Haven’t assigned, but cc’d myself.&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1378&quot;&gt;How do we do rolling restart? #1378&lt;/a&gt; ~ tried working on this one. Not much progress. What I did was adding a annotation to already running deployment with key/value (like this &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kubectl.kubernetes.io/restartedAt: &quot;2021-02-15T11:12:54-05:00&quot;&lt;/code&gt;). Some folk on the thread mentioned that the upstream kubernetes client (kubectl) while restarting/rolling do the same only i.e applying the mentioned annotation k/v pair. More information on upstream kubectl implementation part &lt;a href=&quot;https://github.com/kubernetes/kubectl/blob/c1df07341a15fb36264a018e130ee397332bdfc0/pkg/polymorphichelpers/objectrestarter.go#L51&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;https://github.com/kubernetes-client/python/issues/1402&quot;&gt;Document client-side timeouts in watch #1402&lt;/a&gt; ~ asked if I could document the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;client-side&lt;/code&gt; timeout thing happening in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;examples/pod_namespace._watch.py&lt;/code&gt; example script. This &lt;a href=&quot;Document client-side timeouts in watch #1402&quot;&gt;comment&lt;/a&gt; btw tells what need to be documented.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;And final thing for the day. This is from work. I helped one of the MAS engineering folks to review my &lt;a href=&quot;https://github.com/integr8ly/integreatly-operator/pull/1721&quot;&gt;PR (Add custom alertmanager go template to enhance email config #1721)&lt;/a&gt;. I helped him set up an in-cluster development mailserver to point the cluster alertmanager’s smtp settings to this in-cluster mailserver fpr testing. So, this development server can be used to test alertmanger emails (that is what I’m trying to enhance here by adding a custom go template to the middleware-monitoring alertmanager). The PR is reviewed (finally, after 2 weeks) &amp;amp; got a green flag. Still need to fix a little thing around generalizing the namespace to grab grafana route (which I’m adding as one of the cluster infromation labels to email &amp;amp; PagerDuty config) from both rhoam &amp;amp; rhmi addon, &amp;amp; also need to rebase it to make it at par with master.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Other than this, I had a full on packed working day today with lots of pages &amp;amp; incidents &amp;amp; long long meetings too. I’m happy that I learnt a lot today)&lt;/p&gt;

&lt;p&gt;That’s it. Bye bye!&lt;/p&gt;
</description>
    <pubDate>Thu, 29 Apr 2021 00:00:00 +0000</pubDate>
    <link>https://psaggu.com/upstream-contribution/2021/04/29/notes.html</link>
    <guid isPermaLink="true">https://psaggu.com/upstream-contribution/2021/04/29/notes.html</guid>
  </item>
  
  </channel>
</rss>
