make a draft of hugo on k8s and some config changes
This commit is contained in:
parent
98c4a91f6a
commit
6673b7605e
179
content/posts/hugo-on-k8s-nginx.md
Normal file
179
content/posts/hugo-on-k8s-nginx.md
Normal file
@ -0,0 +1,179 @@
|
||||
+++
|
||||
title = 'Hugo on Kubernetes & NGINX'
|
||||
date = 2024-02-28T15:35:46-08:00
|
||||
draft = true
|
||||
+++
|
||||
|
||||
i decided to make a website. a static one. this one. with [Hugo][hugo]. this
|
||||
is basically as a vanity project so i have some stuff to host in a
|
||||
[Kubernetes][k8s] cluster i'm running. the k8s cluster is also as a vanity
|
||||
project.
|
||||
|
||||
because i don't like software, i wanted a way to deploy my site that
|
||||
doesn't involve much. this post is about that.
|
||||
|
||||
## Getting Started
|
||||
|
||||
i built my site by following the straight-forward _[Getting Started][hugo-started]_
|
||||
guide in the Hugo documentation.
|
||||
|
||||
i did `hugo new site estradiol.cloud`. and then `cd estradiol.cloud; git init`. and
|
||||
then i picked a ridiculous theme ["inspired by terminal ricing aesthetics"][risotto],
|
||||
installing it like `git submodule add https://github.com/joeroe/risotto.git themes/risotto; echo "theme = 'risotto'" >> hugo.toml`. i appreciate the culinary naming choice.
|
||||
|
||||
at this point, my website is basically finished (i also changed the title in `hugo.toml`).
|
||||
i probably won't be putting much on it, so there's no point fussing with other details.
|
||||
|
||||
about deployment, the guide's _[Basic Usage][hugo-deploy]_ page has this to offer:
|
||||
|
||||
> Most of our users deploy their sites using a CI/CD workflow, where a push{{< sup "1" >}}
|
||||
> to their GitHub or GitLab repository triggers a build and deployment. Popular
|
||||
> providers include AWS Amplify, CloudCannon, Cloudflare Pages, GitHub Pages,
|
||||
> GitLab Pages, and Netlify.
|
||||
>
|
||||
> 1. The Git repository contains the entire project directory, typically excluding the
|
||||
> public directory because the site is built _after_ the push.
|
||||
|
||||
importantly, you can't make a post about depoying this way. _everyone_ deploys
|
||||
this way.
|
||||
|
||||
it also involves some system somewhere that can run Hugo to build the site, and push
|
||||
it to some remote system where my cluster can reach it. i definitely already need
|
||||
Hugo installed on my workstation if i'm going to post anything here (unlikely), so
|
||||
now i'm running Hugo in two places. there's definitely going to be other complex
|
||||
nonsense like webhooks involved.
|
||||
|
||||
and hang on. let's look at this again:
|
||||
|
||||
> 1. The Git repository contains the entire project directory, typically excluding the
|
||||
> public directory because the site is built _after_ the push.
|
||||
|
||||
you're telling me i'm going to build a nice static site and not check the
|
||||
_actual content_ into version control? couldn't be me.
|
||||
|
||||
## Getting Static
|
||||
|
||||
what if instead i pushed my site to a git repository exactly as i intend to serve it?
|
||||
then i could shell into my webserver, pull the site, and _nifty-galifty!_ isn't this
|
||||
the way it has [always been done][worm]?
|
||||
|
||||
one problem is that i don't have a webserver, i have a _container orchestration
|
||||
system_. there are several upsides to this (few of which are relevant for my project)
|
||||
but it demands i get a bit more clever. i _could_ run a little pipeline that builds a
|
||||
container wrapping my static site, pushes it to a registry somewhere so my deployments
|
||||
can pull it, all ready to go. but now i've got _software_ again; build stages and webhooks
|
||||
and i'm hosting and versioning container images. i don't want any of this.
|
||||
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: estradiol-cloud
|
||||
app.kubernetes.io/name: nginx
|
||||
name: web-nginx
|
||||
namespace: estradiol-cloud
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: estradiol-cloud
|
||||
app.kubernetes.io/name: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: estradiol-cloud
|
||||
app.kubernetes.io/name: nginx
|
||||
spec:
|
||||
containers:
|
||||
- name: git-repo-syncer
|
||||
image: docker.io/bitnami/git:2.43.2-debian-12-r2
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
while true; do
|
||||
cd /app && git -c safe.directory=/app pull origin trunk
|
||||
sleep 60
|
||||
done
|
||||
volumeMounts:
|
||||
- mountPath: /app
|
||||
name: staticsite
|
||||
- name: nginx
|
||||
image: docker.io/bitnami/nginx:1.25.4-debian-12-r2
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: NGINX_HTTP_PORT_NUMBER
|
||||
value: "8080"
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: http
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /opt/bitnami/nginx/conf/server_blocks
|
||||
name: nginx-server-block
|
||||
- mountPath: /app
|
||||
name: staticsite
|
||||
initContainers:
|
||||
- name: git-clone-repository
|
||||
image: docker.io/bitnami/git:2.43.2-debian-12-r2
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- /bin/bash
|
||||
- -ec
|
||||
- |
|
||||
[[ -f "/opt/bitnami/scripts/git/entrypoint.sh" ]] && source "/opt/bitnami/scripts/git/entrypoint.sh"
|
||||
git clone https://code.estradiol.cloud/tamsin/estradiol.cloud.git --no-checkout --branch trunk /tmp/app
|
||||
[[ "$?" -eq 0 ]] && cd /tmp/app && git sparse-checkout init --cone && git sparse-checkout set public && git checkout && shopt -s dotglob && rm -rf /app/* && mv /tmp/app/* /app/
|
||||
volumeMounts:
|
||||
- mountPath: /app
|
||||
name: staticsite
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: web-nginx-server-block
|
||||
name: nginx-server-block
|
||||
- emptyDir: {}
|
||||
name: staticsite
|
||||
```
|
||||
|
||||
## Getting Flux'd
|
||||
|
||||
```yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: bitnami
|
||||
namespace: default
|
||||
spec:
|
||||
url: https://charts.bitnami.com/bitnami
|
||||
```
|
||||
|
||||
```yaml
|
||||
apiVersion: source.toolkit.fluxcd.io/v1beta2
|
||||
kind: HelmRepository
|
||||
metadata:
|
||||
name: bitnami
|
||||
namespace: default
|
||||
spec:
|
||||
url: https://charts.bitnami.com/bitnami
|
||||
```
|
||||
|
||||
|
||||
|
||||
[hugo]: https://gohugo.io
|
||||
[hugo-deploy]: https://gohugo.io/getting-started/usage/#deploy-your-site
|
||||
[hugo-started]: https://gohugo.io/getting-started
|
||||
[k8s]: https://kubernetes.io
|
||||
[risotto]: https://github.com/joeroe/risotto
|
||||
[worm]: https://www.mikecurato.com/worm-loves-worm
|
@ -2,3 +2,8 @@ baseURL = 'https://estradiol.cloud/'
|
||||
languageCode = 'en-us'
|
||||
title = 'estradiol.cloud'
|
||||
theme = 'risotto'
|
||||
[menus]
|
||||
[[menus.main]]
|
||||
name = 'Posts'
|
||||
pageRef = '/posts'
|
||||
weight = 20
|
||||
|
1
layouts/shortcodes/sub.html
Normal file
1
layouts/shortcodes/sub.html
Normal file
@ -0,0 +1 @@
|
||||
<sub>{{ .Get 0 | markdownify }}</sub>
|
1
layouts/shortcodes/sup.html
Normal file
1
layouts/shortcodes/sup.html
Normal file
@ -0,0 +1 @@
|
||||
<sup>{{ .Get 0 | markdownify }}</sup>
|
@ -1,2 +1,2 @@
|
||||
<!doctype html><html lang=en><head><title>Categories – estradiol.cloud</title>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li></ul></nav></header><section class=page__body><h1 id=categories>Categories</h1><ul></ul></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li><li class=main-nav__item><a class=nav-main-item href=https://estradiol.cloud/posts/ title>Posts</a></li></ul></nav></header><section class=page__body><h1 id=categories>Categories</h1><ul></ul></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
@ -1,2 +1,2 @@
|
||||
<!doctype html><html lang=en><head><meta name=generator content="Hugo 0.123.5"><title>estradiol.cloud – estradiol.cloud</title>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li></ul></nav></header><section class=page__body></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li><li class=main-nav__item><a class=nav-main-item href=https://estradiol.cloud/posts/ title>Posts</a></li></ul></nav></header><section class=page__body></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>estradiol.cloud</title><link>https://estradiol.cloud/</link><description>Recent content on estradiol.cloud</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://estradiol.cloud/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>estradiol.cloud</title><link>https://estradiol.cloud/</link><description>Recent content on estradiol.cloud</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate/><atom:link href="https://estradiol.cloud/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
255
public/posts/hugo-on-k8s-nginx/index.html
Normal file
255
public/posts/hugo-on-k8s-nginx/index.html
Normal file
@ -0,0 +1,255 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script><title>Hugo on Kubernetes & NGINX – estradiol.cloud</title>
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8"/>
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css" integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="http://localhost:1313/css/palettes/base16-dark.css">
|
||||
<link rel="stylesheet" href="http://localhost:1313/css/risotto.css">
|
||||
<link rel="stylesheet" href="http://localhost:1313/css/custom.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page">
|
||||
|
||||
<header class="page__header"><nav class="page__nav main-nav">
|
||||
<ul>
|
||||
<li class="nomarker"><h1 class="page__logo"><a href="http://localhost:1313/" class="page__logo-inner">estradiol.cloud</a></h1></li>
|
||||
|
||||
|
||||
<li class="main-nav__item"><a class="nav-main-item active" href="http://localhost:1313/posts/" title="">Posts</a></li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
||||
<section class="page__body">
|
||||
<header class="content__header">
|
||||
<h1>Hugo on Kubernetes & NGINX</h1>
|
||||
</header>
|
||||
<div class="content__body">
|
||||
<p>i decided to make a website. a static one. this one. with <a href="https://gohugo.io">Hugo</a>. this
|
||||
is basically as a vanity project so i have some stuff to host in a
|
||||
<a href="https://kubernetes.io">Kubernetes</a> cluster i’m running. the k8s cluster is also as a vanity
|
||||
project.</p>
|
||||
<p>because i don’t like software, i wanted a way to deploy my site that
|
||||
doesn’t involve much. this post is about that.</p>
|
||||
<h2 id="getting-started">Getting Started</h2>
|
||||
<p>i built my site by following the straight-forward <em><a href="https://gohugo.io/getting-started">Getting Started</a></em>
|
||||
guide in the Hugo documentation.</p>
|
||||
<p>i did <code>hugo new site estradiol.cloud</code>. and then <code>cd estradiol.cloud; git init</code>. and
|
||||
then i picked a ridiculous theme <a href="https://github.com/joeroe/risotto">“inspired by terminal ricing aesthetics”</a>,
|
||||
installing it like <code>git submodule add https://github.com/joeroe/risotto.git themes/risotto; echo "theme = 'risotto'" >> hugo.toml</code>. i appreciate the culinary naming choice.</p>
|
||||
<p>at this point, my website is basically finished (i also changed the title in <code>hugo.toml</code>).
|
||||
i probably won’t be putting much on it, so there’s no point fussing with other details.</p>
|
||||
<p>about deployment, the guide’s <em><a href="https://gohugo.io/getting-started/usage/#deploy-your-site">Basic Usage</a></em> page has this to offer:</p>
|
||||
<blockquote>
|
||||
<p>Most of our users deploy their sites using a CI/CD workflow, where a push<sup>1</sup>
|
||||
|
||||
to their GitHub or GitLab repository triggers a build and deployment. Popular
|
||||
providers include AWS Amplify, CloudCannon, Cloudflare Pages, GitHub Pages,
|
||||
GitLab Pages, and Netlify.</p>
|
||||
<ol>
|
||||
<li>The Git repository contains the entire project directory, typically excluding the
|
||||
public directory because the site is built <em>after</em> the push.</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
<p>importantly, you can’t make a post about depoying this way. <em>everyone</em> deploys
|
||||
this way.</p>
|
||||
<p>it also involves some system somewhere that can run Hugo to build the site, and push
|
||||
it to some remote system where my cluster can reach it. i definitely already need
|
||||
Hugo installed on my workstation if i’m going to post anything here (unlikely), so
|
||||
now i’m running Hugo in two places. there’s definitely going to be other complex
|
||||
nonsense like webhooks involved.</p>
|
||||
<p>and hang on. let’s look at this again:</p>
|
||||
<blockquote>
|
||||
<ol>
|
||||
<li>The Git repository contains the entire project directory, typically excluding the
|
||||
public directory because the site is built <em>after</em> the push.</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
<p>you’re telling me i’m going to build a nice static site and not check the
|
||||
<em>actual content</em> into version control? couldn’t be me.</p>
|
||||
<h2 id="getting-static">Getting Static</h2>
|
||||
<p>what if instead i pushed my site to a git repository exactly as i intend to serve it?
|
||||
then i could shell into my webserver, pull the site, and <em>nifty-galifty!</em> isn’t this
|
||||
the way it has <a href="https://www.mikecurato.com/worm-loves-worm">always been done</a>?</p>
|
||||
<p>one problem is that i don’t have a webserver, i have a <em>container orchestration
|
||||
system</em>. there are several upsides to this (few of which are relevant for my project)
|
||||
but it demands i get a bit more clever. i <em>could</em> run a little pipeline that builds a
|
||||
container wrapping my static site, pushes it to a registry somewhere so my deployments
|
||||
can pull it, all ready to go. but now i’ve got <em>software</em> again; build stages and webhooks
|
||||
and i’m hosting and versioning container images. i don’t want any of 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-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">apiVersion</span>: <span style="color:#ae81ff">apps/v1</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">kind</span>: <span style="color:#ae81ff">Deployment</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">metadata</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">labels</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/instance</span>: <span style="color:#ae81ff">estradiol-cloud</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/name</span>: <span style="color:#ae81ff">nginx</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">web-nginx</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">namespace</span>: <span style="color:#ae81ff">estradiol-cloud</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">spec</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">replicas</span>: <span style="color:#ae81ff">1</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">selector</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">matchLabels</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/instance</span>: <span style="color:#ae81ff">estradiol-cloud</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/name</span>: <span style="color:#ae81ff">nginx</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">template</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">metadata</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">labels</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/instance</span>: <span style="color:#ae81ff">estradiol-cloud</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">app.kubernetes.io/name</span>: <span style="color:#ae81ff">nginx</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">spec</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">containers</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">git-repo-syncer</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">docker.io/bitnami/git:2.43.2-debian-12-r2</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">imagePullPolicy</span>: <span style="color:#ae81ff">IfNotPresent</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">command</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">/bin/bash</span>
|
||||
</span></span><span style="display:flex;"><span> - -<span style="color:#ae81ff">ec</span>
|
||||
</span></span><span style="display:flex;"><span> - |<span style="color:#e6db74">
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> while true; do
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> cd /app && git -c safe.directory=/app pull origin trunk
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> sleep 60
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> done</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumeMounts</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">mountPath</span>: <span style="color:#ae81ff">/app</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">staticsite</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">nginx</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">docker.io/bitnami/nginx:1.25.4-debian-12-r2</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">imagePullPolicy</span>: <span style="color:#ae81ff">IfNotPresent</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">env</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">NGINX_HTTP_PORT_NUMBER</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">value</span>: <span style="color:#e6db74">"8080"</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">livenessProbe</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">tcpSocket</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">port</span>: <span style="color:#ae81ff">http</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">readinessProbe</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">tcpSocket</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">port</span>: <span style="color:#ae81ff">http</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">ports</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">containerPort</span>: <span style="color:#ae81ff">8080</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">http</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">protocol</span>: <span style="color:#ae81ff">TCP</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumeMounts</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">mountPath</span>: <span style="color:#ae81ff">/opt/bitnami/nginx/conf/server_blocks</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">nginx-server-block</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">mountPath</span>: <span style="color:#ae81ff">/app</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">staticsite</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">initContainers</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">git-clone-repository</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">image</span>: <span style="color:#ae81ff">docker.io/bitnami/git:2.43.2-debian-12-r2</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">imagePullPolicy</span>: <span style="color:#ae81ff">IfNotPresent</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">command</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#ae81ff">/bin/bash</span>
|
||||
</span></span><span style="display:flex;"><span> - -<span style="color:#ae81ff">ec</span>
|
||||
</span></span><span style="display:flex;"><span> - |<span style="color:#e6db74">
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> [[ -f "/opt/bitnami/scripts/git/entrypoint.sh" ]] && source "/opt/bitnami/scripts/git/entrypoint.sh"
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> git clone https://code.estradiol.cloud/tamsin/estradiol.cloud.git --no-checkout --branch trunk /tmp/app
|
||||
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74"> [[ "$?" -eq 0 ]] && cd /tmp/app && git sparse-checkout init --cone && git sparse-checkout set public && git checkout && shopt -s dotglob && rm -rf /app/* && mv /tmp/app/* /app/</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumeMounts</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">mountPath</span>: <span style="color:#ae81ff">/app</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">staticsite</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">restartPolicy</span>: <span style="color:#ae81ff">Always</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">terminationGracePeriodSeconds</span>: <span style="color:#ae81ff">30</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">volumes</span>:
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">configMap</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">defaultMode</span>: <span style="color:#ae81ff">420</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">web-nginx-server-block</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">nginx-server-block</span>
|
||||
</span></span><span style="display:flex;"><span> - <span style="color:#f92672">emptyDir</span>: {}
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">staticsite</span>
|
||||
</span></span></code></pre></div><h2 id="getting-fluxd">Getting Flux’d</h2>
|
||||
<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-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">apiVersion</span>: <span style="color:#ae81ff">source.toolkit.fluxcd.io/v1beta2</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">kind</span>: <span style="color:#ae81ff">HelmRepository</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">metadata</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">bitnami</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">namespace</span>: <span style="color:#ae81ff">default</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">spec</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">url</span>: <span style="color:#ae81ff">https://charts.bitnami.com/bitnami</span>
|
||||
</span></span></code></pre></div><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-yaml" data-lang="yaml"><span style="display:flex;"><span><span style="color:#f92672">apiVersion</span>: <span style="color:#ae81ff">source.toolkit.fluxcd.io/v1beta2</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">kind</span>: <span style="color:#ae81ff">HelmRepository</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">metadata</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">name</span>: <span style="color:#ae81ff">bitnami</span>
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">namespace</span>: <span style="color:#ae81ff">default</span>
|
||||
</span></span><span style="display:flex;"><span><span style="color:#f92672">spec</span>:
|
||||
</span></span><span style="display:flex;"><span> <span style="color:#f92672">url</span>: <span style="color:#ae81ff">https://charts.bitnami.com/bitnami</span>
|
||||
</span></span></code></pre></div>
|
||||
</div>
|
||||
<footer class="content__footer"></footer>
|
||||
|
||||
</section>
|
||||
|
||||
<section class="page__aside">
|
||||
<div class="aside__about">
|
||||
|
||||
<ul class="aside__social-links">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="aside__content">
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
2024-02-28
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="page__footer"><p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br/><span class="active">$ echo $LANG<br/><b></b></span><br/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
<br /><br />
|
||||
<p class="copyright"></p>
|
||||
<p class="advertisement">Powered by <a href="https://gohugo.io/">hugo</a> and <a href="https://github.com/joeroe/risotto">risotto</a>.</p>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
2
public/posts/index.html
Normal file
2
public/posts/index.html
Normal file
@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=en><head><title>Posts – estradiol.cloud</title>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li><li class=main-nav__item><a class="nav-main-item active" href=https://estradiol.cloud/posts/ title>Posts</a></li></ul></nav></header><section class=page__body><h1 id=posts>Posts</h1><ul></ul></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
1
public/posts/index.xml
Normal file
1
public/posts/index.xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on estradiol.cloud</title><link>https://estradiol.cloud/posts/</link><description>Recent content in Posts on estradiol.cloud</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate/><atom:link href="https://estradiol.cloud/posts/index.xml" rel="self" type="application/rss+xml"/></channel></rss>
|
@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://estradiol.cloud/categories/</loc></url><url><loc>https://estradiol.cloud/</loc></url><url><loc>https://estradiol.cloud/tags/</loc></url></urlset>
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://estradiol.cloud/</loc><lastmod>2024-02-28T15:35:46-08:00</lastmod></url><url><loc>https://estradiol.cloud/posts/</loc><lastmod>2024-02-28T15:35:46-08:00</lastmod></url><url><loc>https://estradiol.cloud/categories/</loc></url><url><loc>https://estradiol.cloud/tags/</loc></url></urlset>
|
@ -1,2 +1,2 @@
|
||||
<!doctype html><html lang=en><head><title>Tags – estradiol.cloud</title>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li></ul></nav></header><section class=page__body><h1 id=tags>Tags</h1><ul></ul></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
||||
<meta name=viewport content="width=device-width,initial-scale=1"><meta charset=UTF-8><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/academicons/1.9.4/css/academicons.min.css integrity="sha512-IW0nhlW5MgNydsXJO40En2EoCkTTjZhI3yuODrZIc8cQ4h1XcF53PsqDHa09NqnkXuIe0Oiyyj171BqZFwISBw==" crossorigin=anonymous referrerpolicy=no-referrer><link rel=stylesheet href=https://estradiol.cloud/css/palettes/base16-dark.css><link rel=stylesheet href=https://estradiol.cloud/css/risotto.css><link rel=stylesheet href=https://estradiol.cloud/css/custom.css></head><body><div class=page><header class=page__header><nav class="page__nav main-nav"><ul><li class=nomarker><h1 class=page__logo><a href=https://estradiol.cloud/ class=page__logo-inner>estradiol.cloud</a></h1></li><li class=main-nav__item><a class=nav-main-item href=https://estradiol.cloud/posts/ title>Posts</a></li></ul></nav></header><section class=page__body><h1 id=tags>Tags</h1><ul></ul></section><section class=page__aside><div class=aside__about><ul class=aside__social-links></ul></div><hr><div class=aside__content></div></section><footer class=page__footer><p><br><span class=active>$ echo $LANG<br><b></b></span><br></p><br><br><p class=copyright></p><p class=advertisement>Powered by <a href=https://gohugo.io/>hugo</a> and <a href=https://github.com/joeroe/risotto>risotto</a>.</p></footer></div></body></html>
|
Loading…
Reference in New Issue
Block a user