Skip to content

Commit 23570fc

Browse files
authored
Merge pull request #20 from nofusscomputing/feat-nfc-bind
2 parents b1d1989 + 4619eee commit 23570fc

16 files changed

Lines changed: 473 additions & 25 deletions

File tree

.gitea/workflows/mkdocs-build.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
3+
name: 'MKDocs'
4+
5+
on:
6+
push:
7+
branches:
8+
- 'STOP'
9+
10+
11+
jobs:
12+
13+
14+
build:
15+
name: Build
16+
if: ${{ github.event_name != 'pull_request' && ! startsWith(github.ref, 'refs/tags/') }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
21+
- name: Checkout Code
22+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
fetch-tags: true
26+
27+
28+
- name: MkDocs Docker CI
29+
shell: bash
30+
env:
31+
IS_BUILD: 1
32+
run: |
33+
git submodule update --init
34+
35+
docker run -t --rm \
36+
-e IS_BUILD=1 \
37+
-e token=${{ secrets.ACTIONS_TOKEN_RO }} \
38+
-e template_repo='http://${token}@gitea-http.git.svc:3000/nofusscomputing/website-template.git' \
39+
--mount type=volume,source=${JOB_CONTAINER_NAME},target=${GITHUB_WORKSPACE} \
40+
--workdir ${GITHUB_WORKSPACE} \
41+
harbor.earth.nww/docker/nofusscomputing/mkdocs-ci:0.4.1 \
42+
43+
44+
- name: Upload Artifacts
45+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/upload-artifact@v3
46+
if: success() || failure()
47+
with:
48+
name: artifacts
49+
path: artifacts/

.gitea/workflows/mkdocs-lint.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
3+
name: 'MkDocs'
4+
5+
on:
6+
pull_request: {}
7+
8+
9+
jobs:
10+
11+
lint:
12+
name: 'Lint'
13+
if: ${{ github.event_name == 'pull_request' }}
14+
env:
15+
MDLINT_PATHS: '"docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template"'
16+
runs-on: ubuntu-latest
17+
steps:
18+
19+
- name: Checkout Code
20+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/checkout@v4
21+
22+
- name: Init Git Submodules
23+
shell: bash
24+
run: |
25+
git submodule update --init;
26+
git submodule foreach git submodule update --init;
27+
28+
ls -ls
29+
30+
- name: Install Dependencies
31+
shell: bash
32+
run: |
33+
sudo apt update;
34+
sudo apt install -y --no-install-recommends npm;
35+
36+
- name: Install Linter
37+
shell: bash
38+
run: |
39+
npm install markdownlint-cli2@v0.18.1 --global;
40+
npm install markdownlint-cli2-formatter-junit --global;
41+
npm install markdownlint-cli2-formatter-template --global;
42+
43+
- name: Create Artifact directory
44+
shell: bash
45+
run: |
46+
mkdir -p artifacts
47+
48+
49+
- name: Enable Problem Matcher
50+
shell: bash
51+
run: |
52+
echo "NFC_PROBLEM_MATCHER=${GITHUB_REF_NAME}";
53+
echo "NFC_PROBLEM_MATCHER_TYPE=markdown-lint";
54+
55+
56+
- name: Lint
57+
id: lint
58+
shell: bash
59+
run: |
60+
markdownlint-cli2 $MDLINT_PATHS 1>&1 || EXITCODE=$?
61+
62+
if [ "${EXITCODE}" ]; then
63+
64+
echo "exit_code=${EXITCODE}" >> $GITHUB_OUTPUT
65+
66+
else
67+
68+
echo "exit_code=0" >> $GITHUB_OUTPUT
69+
70+
fi
71+
72+
echo "[Trace] GITHUB_OUTPUT[$(cat $GITHUB_OUTPUT)]";
73+
74+
ls -la;
75+
76+
mv -vf markdown.junit.xml "artifacts/markdown_lint.junit.xml"
77+
78+
- name: debug ls
79+
if: ${{ success() || failure() }}
80+
shell: bash
81+
run: |
82+
ls -la artifacts/;
83+
84+
85+
- name: Check if Linting Error Occured
86+
shell: bash
87+
run: |
88+
if [ ${{ steps.lint.outputs.exit_code }} -ge 3 ]; then
89+
90+
echo "[Error] ansible lint failed with ${{ steps.lint.outputs.exit_code }}";
91+
92+
exit ${{ steps.lint.outputs.exit_code }};
93+
94+
fi # don't fail the job?? 1=failed test, 2=failed command i.e. switch/flag
95+
96+
- name: Upload build Artifact
97+
if: ${{ success() || failure() }}
98+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/upload-artifact@v3
99+
with:
100+
name: mkdocs-lint
101+
path: artifacts/

.github/workflows/ci.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
3+
name: Mirror
4+
5+
6+
on:
7+
push:
8+
branches:
9+
- '-NO-RUN-'
10+
11+
12+
jobs:
13+
14+
15+
mirror-github:
16+
name: Github
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- name: Checkout Code
21+
uses: pixta-dev/repository-mirroring-action@v1
22+
with:
23+
fetch-depth: 0
24+
fetch-tags: true
25+
26+
- name: Mirror
27+
uses: pixta-dev/repository-mirroring-action@v1
28+
with:
29+
target_repo_url: git.nofusscomputing.com:infrastructure/kubernetes.git
30+
ssh_private_key: ${{ secrets.SSH_DEPLOY_KEY_GITEA }}
31+
ssh_username: git

docs/projects/docker/bind/index.md

Whitespace-only changes.

docs/projects/docker/index.md

Whitespace-only changes.

docs/projects/kustomize/bind9.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: Bind9
3+
description: Documentation for No Fuss Computing's Bind9 Kubernetes Kustomize Manifests
4+
date: 2026-01-06
5+
template: project.html
6+
about: https://github.com/nofusscomputing/kubernetes
7+
---
8+
9+
This documentation page covers deploying our [bind9](../docker/bind/index.md) docker image to kubernetes. [Bind9](https://www.isc.org/bind/) is an open source DNS server Created by the [ISC](https://www.isc.org/).
10+
11+
12+
## Components
13+
14+
### GIT OPS
15+
16+
There is a component called `git-ops`. This component caters for storing you DNS config within a git repository. For this component to function correctly you must include the following secret in the namespace you have deployed to.
17+
18+
``` yaml
19+
20+
---
21+
22+
apiVersion: v1
23+
kind: Secret
24+
metadata:
25+
labels:
26+
app.kubernetes.io/component: bind9
27+
app.kubernetes.io/name: dns
28+
name: bind-config
29+
stringData:
30+
SSH_PRIVATE_KEY: |
31+
-----BEGIN OPENSSH PRIVATE KEY-----
32+
33+
... key contents
34+
35+
-----END OPENSSH PRIVATE KEY-----
36+
SSH_REPOSITORY_HOST: -dns hostname of git provider-
37+
SSH_REPOSITORY_OWNER: -repository owner-
38+
SSH_REPOSITORY_NAME: -repository name-
39+
40+
```
41+
42+
### Overlays
43+
44+
The following overlay is provided as part of this kustomize package:
45+
46+
- `production`

docs/projects/kustomize/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ As the intent of this repository is for config management, although limited to t
3030
- Updating manifest repo locations.
3131

3232
if a manifest that is fetched via git has had an update, then being able to update this when it occurs or close to.
33+
34+
35+
## Manifests
36+
37+
- [bind9](./bind9.md)
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
3+
apiVersion: apps/v1
4+
kind: Deployment
5+
metadata:
6+
labels:
7+
app.kubernetes.io/component: bind9
8+
app.kubernetes.io/name: dns
9+
name: dns
10+
spec:
11+
selector:
12+
matchLabels:
13+
app.kubernetes.io/component: bind9
14+
app.kubernetes.io/name: dns
15+
replicas: 1
16+
minReadySeconds: 10
17+
template:
18+
metadata:
19+
labels:
20+
app.kubernetes.io/component: bind9
21+
app.kubernetes.io/name: dns
22+
spec:
23+
terminationGracePeriodSeconds: 10
24+
affinity: {}
25+
containers:
26+
27+
- name: dns
28+
image: nofusscomputing/bind:dev
29+
resources:
30+
limits:
31+
cpu: 1
32+
memory: 500Mi
33+
requests:
34+
cpu: 50m
35+
memory: 100Mi
36+
37+
ports:
38+
- containerPort: 53
39+
name: dns-tcp
40+
protocol: tcp
41+
- containerPort: 53
42+
name: dns-udp
43+
protocol: udp
44+
45+
volumeMounts:
46+
- name: data
47+
mountPath: /etc/bind/conf.d/external
48+
subPath: /git/conf/conf.d/external
49+
- name: /git/conf/conf.d/internal
50+
mountPath: /etc/bind/conf.d/internal
51+
subPath: /git/conf/conf.d/internal
52+
53+
- name: data
54+
mountPath: /var/bind/dyn
55+
subPath: /git/zones/dyn
56+
- name: data
57+
mountPath: /var/bind/pri
58+
subPath: /git/zones/pri
59+
- name: data
60+
mountPath: /var/bind/sec
61+
subPath: /git/zones/sec
62+
63+
- mountPath: /var/log
64+
name: data
65+
subPath: /logs
66+
67+
priorityClassName: cluster-low
68+
tolerations: []
69+
volumes:
70+
71+
- name: data
72+
persistentVolumeClaim:
73+
claimName: bind

manifests/bind9/base/PVC-bind.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
labels:
6+
app.kubernetes.io/component: bind9
7+
app.kubernetes.io/name: dns
8+
name: bind
9+
spec:
10+
volumeMode: Filesystem
11+
accessModes:
12+
- ReadWriteOnce
13+
resources:
14+
requests:
15+
storage: 5Gi

0 commit comments

Comments
 (0)