Skip to content

Commit

Permalink
add some redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
Waylon S. Walker committed Jan 2, 2025
1 parent f3b7881 commit 6f715cf
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pages/blog/markata.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: markata
tags:
- python
- markata
- slash
published: true
---

Expand Down Expand Up @@ -36,7 +37,7 @@ thought it would be easier to just build my own than learn how to make one do
what I wanted it to. Not invented here syndrome hitting hard.

> I really lacked the depth of knowledge in the js ecosystem to really work on
> it (gatsby) effectively.
> it (gatsby) effectively.
## Plugins all the way down

Expand Down
3 changes: 2 additions & 1 deletion pages/blog/thoughts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Thoughts
tags:
- blog
- meta
- slash
published: True

---
Expand Down Expand Up @@ -43,7 +44,7 @@ journey as I learn, lets talk tech.
The core of the site is a python web server running fastapi. Most of the
endpoints return html via jinja templates to the browser and json to anything
else. So you go to the list of posts at
[https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999 in](https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999 in){.hoverlink}
[https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999 in](<https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999> in){.hoverlink}
a web browser it will be a rendered feed, but from curl you will get json.

### htmx
Expand Down
15 changes: 15 additions & 0 deletions pages/blog/trying-n8n.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
date: 2024-09-03 11:24
templateKey: til
title: Trying-n8n
published: true
tags:
---

Today I gave n8n a try using podman, their docs gave me docker commands, but it
ran fine on my machine using podman.

```
podman volume create n8n_data
podman run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
```
114 changes: 114 additions & 0 deletions pages/til/kubectl-dash-k.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
date: 2024-07-05 20:15:11
templateKey: blog
title: kubectl dash k
published: true
tags:
- k8s
- kubernetes

---


Kubernetes ships with a feature called kustomize that allows you to customize
your manifests in a declarative way. It's a bit like helm, but easier to use.
I found this useful.

## kustomization.yaml

In order to use kustomize you need to have a kustomization.yaml,
kustomization.yml, or Kustomization file in the directory you are applying.

``` bash
kubectl apply -k .
error: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/tank/git/kustomize-playground'
```

The kustomization.yaml file cannot be empty.

``` bash
❯ kubectl apply -k pod
error: kustomization.yaml is empty
```

## lets make an mvp

``` bash
mkdir pod
touch pod/pod.yaml
touch pod/kustomization.yaml
```

``` yaml
# pod.yaml
```

``` yaml
# kustomization.yaml
```

## Overlays

Overlays must point to yaml or a directory with a kustomization.yaml file, and
cannot reside inside the same directory causing a circular reference.

---

## Layout

``` bash
k8s
├── base
│ ├── deployment.yaml
│ └── kustomization.yaml
├── overlays
│ ├── local
│ │ └── kustomization.yaml
│ ├── dev
│ │ └── kustomization.yaml
│ └── prod
│ ├── special-prod.yaml
│ └── kustomization.yaml
```

## base

Place all of the common k8s manifests here in the base directory along with
kustomization.yaml. You can split them up into separate files or just one
file, I'm keeping it to one for simiplicity.

## base - kustomization.yaml

In the base kustomization.yaml file add all of the manifests that you want to
use as a resource.

``` yaml
resources:
- deployment.yaml
```
## overlays
Now for each separate environment that you want to have create a directory in
overlays with a kustomization.yaml file, and any special manifests that only
apply to a particular environment.
## overlays - kustomization.yaml
### resoures
``` yaml
resources:
- ../../base
# any other specific resources, maybe special ones for prod here
- sealed-dotenv.yaml
```
### images
``` yaml
images:
- name: my-image
newName: docker.io/myrepo/myimage
newTag: 1.0.0
```
4 changes: 4 additions & 0 deletions static/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
/rss /archive/rss.xml
/rss.xml /archive/rss.xml

/podroll https://reader.waylonwalker.com/podcast/
/blogroll https://reader.waylonwalker.com/written/
/postroll https://thoughts.waylonwalker.com/

# image upload
/upload https://github.com/WaylonWalker/images.waylonwalker.com/upload/main/static
/uploads https://github.com/WaylonWalker/images.waylonwalker.com/upload/main/static
Expand Down
15 changes: 12 additions & 3 deletions templates/post-templates/blog-post.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
---
date: <% tp.file.creation_date() %>
templateKey: blog
title:
templateKey: blog-post
title: <%*
const originalFileName = await tp.system.prompt("Enter file name");
const toTitleCase = str => str.replace(
/\w\S*/g,
txt => txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
);
const title = toTitleCase(originalFileName);
tR += title + '\n'; // Add the title to the template result
-%>
published: true
tags:
-
---
<%*
const originalFileName = await tp.system.prompt("Enter file name");
const fileName = originalFileName.toLowerCase().replace(/\s+/g, '-');
const newFilePath = `pages/blog/${fileName}`;
await tp.file.move(newFilePath);
-%>

<% tp.file.cursor() %>

0 comments on commit 6f715cf

Please sign in to comment.