<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Openssl on ln --help</title>
    <link>https://blog.mei-home.net/tags/openssl/</link>
    <description>Recent content in Openssl on ln --help</description>
    <generator>Hugo -- 0.147.2</generator>
    <language>en</language>
    <lastBuildDate>Thu, 01 May 2025 23:50:19 +0200</lastBuildDate>
    <atom:link href="https://blog.mei-home.net/tags/openssl/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Sammelsurium I</title>
      <link>https://blog.mei-home.net/posts/sammelsurium-1/</link>
      <pubDate>Thu, 01 May 2025 23:50:19 +0200</pubDate>
      <guid>https://blog.mei-home.net/posts/sammelsurium-1/</guid>
      <description>A random mix of topics too small for their own posts but not ephemeral enough for a Fediverse post</description>
      <content:encoded><![CDATA[<p>Wherein I write down things that don&rsquo;t feel like they should be their own post.</p>
<p>My blogging notes are starting to really fill up with small topics I&rsquo;d like to
write about, but which don&rsquo;t feel like they warrant their own post. On the other
hand, they also don&rsquo;t feel ephemeral enough to just be a Fediverse post. So I
decided to introduce the Sammelsurium, which is the German word for a random
collection of things.</p>
<h2 id="setting-up-autocomplete-for-a-shell-alias">Setting up autocomplete for a shell alias</h2>
<p>Way back when I started my k8s experiments, I made the reasonable decision to
set up <code>k</code> as a bash alias for <code>kubectl</code>. Over the last 16 or so months that
must have saved me quite a lot of typing. The alias is as simple as they come:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>alias k<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;kubectl&#34;</span>
</span></span></code></pre></div><p>There&rsquo;s also a pretty extensive autocomplete. I&rsquo;ve deployed it into my bashrc
by first writing it out into a file:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>kubectl completion bash &gt; ~/.kube/kubectl-comp
</span></span></code></pre></div><p>Then I source that file in my bashrc:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>source ~/.kube/kubectl-comp
</span></span></code></pre></div><p>So far, so nice. But the problem is now: This only works for <code>kubectl</code>, not for
my <code>k</code> alias!</p>
<p>To make it work for my alias as well, I had to add these lines to my bashrc:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#66d9ef">if</span> <span style="color:#f92672">[[</span> <span style="color:#66d9ef">$(</span>type -t compopt<span style="color:#66d9ef">)</span> <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;builtin&#34;</span> <span style="color:#f92672">]]</span>; <span style="color:#66d9ef">then</span>
</span></span><span style="display:flex;"><span>    complete -o default -F __start_kubectl k
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">else</span>
</span></span><span style="display:flex;"><span>    complete -o default -o nospace -F __start_kubectl k
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">fi</span>
</span></span></code></pre></div><p>Perhaps similarly useful, I&rsquo;ve also set up an alias for the <a href="https://github.com/rook/kubectl-rook-ceph">Rook Ceph</a>
kubectl plugin. This plugin needs to be told the cluster and operator namespaces.
As I&rsquo;ve only got one Rook Ceph cluster in my setup, those values never change,
so it doesn&rsquo;t make any sense to type them again and again. My alias looks like
this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>alias kceph<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;kubectl rook-ceph --operator-namespace rook-ceph -n rook-cluster&#34;</span>
</span></span></code></pre></div><h2 id="ceph-telemetry">Ceph telemetry</h2>
<p>Like to many projects these days, Ceph also has some <a href="https://docs.ceph.com/en/latest/mgr/telemetry/">telemetry function</a>.
It is opt-in, and the only bad thing I could say about it is that the project
asks you to enable it from time to time. I&rsquo;ve got it enabled. I&rsquo;ve always felt
that data sharing is a good way to help out a project.</p>
<p>But Ceph goes one step further. They also share some of the data in public
dashboards you can find <a href="https://telemetry-public.ceph.com/">here</a>.</p>
<p>The dashboard shows some general information, like the fact that there&rsquo;s about
3.5k Ceph clusters with telemetry enabled, which have a capacity of 1.73 EiB.
It also shows that an average cluster has about 16 - 32 TiB of storage and
has a mere 4 OSDs. I&rsquo;m wondering whether that&rsquo;s skewed by e.g. Proxmox clusters?</p>
<h2 id="showing-information-from-tls-certs-on-the-command-line">Showing information from TLS certs on the command line</h2>
<p>This one always comes up when I&rsquo;m updating my Let&rsquo;s Encrypt certs. I just want
to have a quick look at my webservers to make sure they&rsquo;ve all updated to the
new certificate correctly.</p>
<p>The command, using my blog as an example, looks like this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>$ openssl s_client -connect blog.mei-home.net:443 2&gt;&amp;<span style="color:#ae81ff">1</span> | openssl x509 -text -noout
</span></span><span style="display:flex;"><span>Certificate:
</span></span><span style="display:flex;"><span>    Data:
</span></span><span style="display:flex;"><span>        Version: <span style="color:#ae81ff">3</span> <span style="color:#f92672">(</span>0x2<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>        Serial Number:
</span></span><span style="display:flex;"><span>            05:22:36:ee:6e:19:df:56:0a:ee:66:44:a3:fc:a3:00:8c:d7
</span></span><span style="display:flex;"><span>        Signature Algorithm: ecdsa-with-SHA384
</span></span><span style="display:flex;"><span>        Issuer: C<span style="color:#f92672">=</span>US, O<span style="color:#f92672">=</span>Let<span style="color:#960050;background-color:#1e0010">&#39;</span>s Encrypt, CN<span style="color:#f92672">=</span>E5
</span></span><span style="display:flex;"><span>        Validity
</span></span><span style="display:flex;"><span>            Not Before: Apr  <span style="color:#ae81ff">7</span> 08:53:40 <span style="color:#ae81ff">2025</span> GMT
</span></span><span style="display:flex;"><span>            Not After : Jul  <span style="color:#ae81ff">6</span> 08:53:39 <span style="color:#ae81ff">2025</span> GMT
</span></span><span style="display:flex;"><span>        Subject: CN<span style="color:#f92672">=</span>mei-home.net
</span></span><span style="display:flex;"><span>        Subject Public Key Info:
</span></span><span style="display:flex;"><span>            Public Key Algorithm: id-ecPublicKey
</span></span><span style="display:flex;"><span>                Public-Key: <span style="color:#f92672">(</span><span style="color:#ae81ff">384</span> bit<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>                pub:
</span></span><span style="display:flex;"><span>                    04:6c:97:b7:bb:b1:26:cf:2f:c9:c8:14:65:a2:46:
</span></span><span style="display:flex;"><span>                    b6:4c:ab:a4:ea:47:57:29:cd:d4:3b:de:11:43:5d:
</span></span><span style="display:flex;"><span>                    69:a7:9f:be:50:50:81:41:b6:f6:97:a7:35:3a:13:
</span></span><span style="display:flex;"><span>                    4b:d1:a1:31:84:d0:e6:62:82:47:1f:97:d7:5d:ef:
</span></span><span style="display:flex;"><span>                    05:1d:5e:42:0d:f1:19:17:9f:59:d0:89:a3:ca:78:
</span></span><span style="display:flex;"><span>                    8a:d7:ed:a2:9f:d7:9c:32:15:92:f8:6d:ef:5a:7d:
</span></span><span style="display:flex;"><span>                    20:07:b8:c3:67:30:31
</span></span><span style="display:flex;"><span>                ASN1 OID: secp384r1
</span></span><span style="display:flex;"><span>                NIST CURVE: P-384
</span></span><span style="display:flex;"><span>        X509v3 extensions:
</span></span><span style="display:flex;"><span>            X509v3 Key Usage: critical
</span></span><span style="display:flex;"><span>                Digital Signature
</span></span><span style="display:flex;"><span>            X509v3 Extended Key Usage:
</span></span><span style="display:flex;"><span>                TLS Web Server Authentication, TLS Web Client Authentication
</span></span><span style="display:flex;"><span>            X509v3 Basic Constraints: critical
</span></span><span style="display:flex;"><span>                CA:FALSE
</span></span><span style="display:flex;"><span>            X509v3 Subject Key Identifier:
</span></span><span style="display:flex;"><span>                43:C0:F9:C3:C5:10:E4:F0:A5:68:AC:82:8E:7E:B4:D7:74:90:46:29
</span></span><span style="display:flex;"><span>            X509v3 Authority Key Identifier:
</span></span><span style="display:flex;"><span>                9F:2B:5F:CF:3C:21:4F:9D:04:B7:ED:2B:2C:C4:C6:70:8B:D2:D7:0D
</span></span><span style="display:flex;"><span>            Authority Information Access:
</span></span><span style="display:flex;"><span>                OCSP - URI:http://e5.o.lencr.org
</span></span><span style="display:flex;"><span>                CA Issuers - URI:http://e5.i.lencr.org/
</span></span><span style="display:flex;"><span>            X509v3 Subject Alternative Name:
</span></span><span style="display:flex;"><span>                DNS:*.mei-home.net, DNS:mei-home.net
</span></span><span style="display:flex;"><span>            X509v3 Certificate Policies:
</span></span><span style="display:flex;"><span>                Policy: 2.23.140.1.2.1
</span></span><span style="display:flex;"><span>            X509v3 CRL Distribution Points:
</span></span><span style="display:flex;"><span>                Full Name:
</span></span><span style="display:flex;"><span>                  URI:http://e5.c.lencr.org/88.crl
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>            CT Precertificate SCTs:
</span></span><span style="display:flex;"><span>                Signed Certificate Timestamp:
</span></span><span style="display:flex;"><span>                    Version   : v1 <span style="color:#f92672">(</span>0x0<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>                    Log ID    : CC:FB:0F:6A:85:71:09:65:FE:95:9B:53:CE:E9:B2:7C:
</span></span><span style="display:flex;"><span>                                22:E9:85:5C:0D:97:8D:B6:A9:7E:54:C0:FE:4C:0D:B0
</span></span><span style="display:flex;"><span>                    Timestamp : Apr  <span style="color:#ae81ff">7</span> 09:52:10.214 <span style="color:#ae81ff">2025</span> GMT
</span></span><span style="display:flex;"><span>                    Extensions: none
</span></span><span style="display:flex;"><span>                    Signature : ecdsa-with-SHA256
</span></span><span style="display:flex;"><span>                                30:45:02:20:47:88:12:84:60:3F:FB:62:7F:4C:A8:05:
</span></span><span style="display:flex;"><span>                                23:18:C5:25:66:1F:9A:13:58:8E:AD:94:DB:34:9E:C9:
</span></span><span style="display:flex;"><span>                                9D:F8:A2:07:02:21:00:83:76:32:B0:F7:34:11:B1:BB:
</span></span><span style="display:flex;"><span>                                EC:6A:2D:8C:B1:47:E6:93:DC:FE:31:3E:53:AE:67:47:
</span></span><span style="display:flex;"><span>                                08:B4:A3:38:5A:56:A0
</span></span><span style="display:flex;"><span>                Signed Certificate Timestamp:
</span></span><span style="display:flex;"><span>                    Version   : v1 <span style="color:#f92672">(</span>0x0<span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span>                    Log ID    : DD:DC:CA:34:95:D7:E1:16:05:E7:95:32:FA:C7:9F:F8:
</span></span><span style="display:flex;"><span>                                3D:1C:50:DF:DB:00:3A:14:12:76:0A:2C:AC:BB:C8:2A
</span></span><span style="display:flex;"><span>                    Timestamp : Apr  <span style="color:#ae81ff">7</span> 09:52:12.253 <span style="color:#ae81ff">2025</span> GMT
</span></span><span style="display:flex;"><span>                    Extensions: none
</span></span><span style="display:flex;"><span>                    Signature : ecdsa-with-SHA256
</span></span><span style="display:flex;"><span>                                30:44:02:20:03:29:9E:A8:29:43:3B:A9:44:EE:DB:60:
</span></span><span style="display:flex;"><span>                                70:E0:4A:9C:DB:DD:0C:9F:20:7D:7F:FB:DA:AF:90:FD:
</span></span><span style="display:flex;"><span>                                4E:EB:59:31:02:20:5B:84:2C:BC:05:A7:53:A4:EB:04:
</span></span><span style="display:flex;"><span>                                59:A4:7B:77:0E:5A:90:39:1B:68:BF:48:71:14:E5:16:
</span></span><span style="display:flex;"><span>                                72:42:89:55:76:95
</span></span><span style="display:flex;"><span>    Signature Algorithm: ecdsa-with-SHA384
</span></span><span style="display:flex;"><span>    Signature Value:
</span></span><span style="display:flex;"><span>        30:65:02:31:00:87:c9:85:13:1f:f7:b1:0a:d0:2d:0c:56:7f:
</span></span><span style="display:flex;"><span>        bd:1e:f5:51:2b:31:59:62:03:ee:bf:ca:fc:3f:09:b0:e4:e2:
</span></span><span style="display:flex;"><span>        74:80:aa:16:ac:1b:bf:17:38:3a:3a:22:6a:70:4c:57:e3:02:
</span></span><span style="display:flex;"><span>        30:1e:73:29:b1:e4:c4:43:a5:d8:bd:8f:81:a6:23:c6:10:b3:
</span></span><span style="display:flex;"><span>        cc:b0:3f:31:8b:86:f3:51:76:c8:85:b4:37:a2:be:96:e0:83:
</span></span><span style="display:flex;"><span>        61:65:cb:b8:6a:cd:d8:56:d7:7b:f4:a4:83
</span></span></code></pre></div><h2 id="excluding-containers-from-pull-through-cache-in-cri-o">Excluding containers from pull-through cache in cri-o</h2>
<p>I wrote about migrating to <a href="https://goharbor.io/">Harbor</a> during my k8s migration,
and about the fact that <a href="https://cri-o.io/">cri-o</a> supports pull-through caches
for any registry <a href="https://blog.mei-home.net/posts/k8s-migration-11-harbor/">in the past</a>.</p>
<p>I&rsquo;d like to provide a short update on the setup, namely on pull-through cache
setup. Because there&rsquo;s one tinsy problem with setting Harbor up as a generic
pull-through cache: Harbor itself. What if an important Harbor component gets
migrated during a node restart? And the Harbor images aren&rsquo;t available on the
new node - but Harbor is already down, so the cache doesn&rsquo;t work?</p>
<p>Well, first of all cri-o of course still works. If the cache doesn&rsquo;t work,
the original address is tried. But this seems to depend on what exactly doesn&rsquo;t
work. Namely, I ran into issues with my Dockerhub mirror, which runs through a
Caddy proxy. I described the reason in the blog post I linked above.</p>
<p>Well, luckily the cri-o team thought of that, and you can prevent specific
repositories from using the cache altogether. So now my config for DockerHub
looks like this:</p>
<pre tabindex="0"><code class="language-conf" data-lang="conf">[[registry]]
prefix = &#34;docker.io&#34;
insecure = false
blocked = false
location = &#34;docker.io&#34;
[[registry.mirror]]
location = internal.example.com/dockerhub-cache&#34;
[[registry]]
prefix = &#34;docker.io/goharbor&#34;
location = &#34;docker.io/goharbor&#34;
[[registry]]
prefix = &#34;docker.io/caddy&#34;
location = &#34;docker.io/caddy&#34;
</code></pre><p>This configuration redirects all DockerHub image pulls to my internal Harbor
instance by default. But specifically for Harbor&rsquo;s own images and for Caddy,
the redirection is overwritten to point to DockerHub again.
With this config I can be sure that Harbor itself can always pull its own images.</p>
<p>And that&rsquo;s already for my first Sammelsurium post. I think this a good format
for providing some short information I&rsquo;d like to put somewhere more permanent,
but don&rsquo;t want to write a full blog post about.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
