Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/pulumi-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# pulumi.yml の preview と up に共通の準備。checkout は呼ぶ側でする(このファイル自体が checkout の中にある)。
name: pulumi setup
description: bun と Pulumi の CLI を入れ、SDK を作って bun install と型の確認まで済ませる
runs:
using: composite
steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: pulumi/.bun-version
# CLI だけを入れる (command なし)
- uses: pulumi/actions@v7
with:
pulumi-version-file: pulumi/.pulumi-version
# SDK (Pulumi.yaml の packages) を作って bun install まで済ませる。lock がずれたら落とす (--frozen-lockfile の代わり)。
# Renovate の枝では postUpgradeTasks が同じ pulumi install で lock を作るので、ずれない (pulumi/README.md)
- shell: bash
working-directory: pulumi
run: |
pulumi install
git diff --exit-code -- package.json bun.lock || {
echo "::error::pulumi install で package.json / bun.lock が変わった。手元で pulumi install してコミットする"
exit 1
}
# bun は .ts を走らせるだけで型は見ない
- shell: bash
working-directory: pulumi
run: bun run typecheck
46 changes: 7 additions & 39 deletions .github/workflows/pulumi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# **Cloudflare の設定(いまは R2 だけ)を Pulumi で当てる。** 中身は pulumi/。
# **Cloudflare・Entra・NetBird の設定を Pulumi で当てる。** 中身は pulumi/。
#
# PR → preview。差分を PR にコメントする(読み取りの鍵だけ)
# main → up。**マージした時点で当たる**(書き込みの鍵は Environment `pulumi-apply` に置き、
Expand Down Expand Up @@ -36,14 +36,13 @@ name: pulumi

on:
pull_request:
paths:
paths: &paths
- pulumi/**
- .github/workflows/pulumi.yml
- .github/actions/pulumi-setup/**
push:
branches: [main]
paths:
- pulumi/**
- .github/workflows/pulumi.yml
paths: *paths
schedule:
- cron: "0 4 * * 1"
workflow_dispatch:
Expand Down Expand Up @@ -95,25 +94,8 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.PREVIEW_AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: pulumi/.bun-version
# CLI だけを入れる (command なし)
- uses: pulumi/actions@v7
with:
pulumi-version-file: pulumi/.pulumi-version
# SDK (Pulumi.yaml の packages) を作って bun install まで済ませる。lock がずれたら落とす (--frozen-lockfile の代わり)。
# Renovate の枝では postUpgradeTasks が同じ pulumi install で lock を作るので、ずれない (pulumi/README.md)
- run: |
pulumi install
git diff --exit-code -- package.json bun.lock || {
echo "::error::pulumi install で package.json / bun.lock が変わった。手元で pulumi install してコミットする"
exit 1
}
working-directory: pulumi
# bun は .ts を走らせるだけで型は見ない
- run: bun run typecheck
working-directory: pulumi
# bun・Pulumi の CLI・SDK・型の確認(up と同じ)
- uses: ./.github/actions/pulumi-setup

- uses: pulumi/actions@v7
with:
Expand Down Expand Up @@ -156,21 +138,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: pulumi/.bun-version
- uses: pulumi/actions@v7
with:
pulumi-version-file: pulumi/.pulumi-version
- run: |
pulumi install
git diff --exit-code -- package.json bun.lock || {
echo "::error::pulumi install で package.json / bun.lock が変わった。手元で pulumi install してコミットする"
exit 1
}
working-directory: pulumi
- run: bun run typecheck
working-directory: pulumi
- uses: ./.github/actions/pulumi-setup

- uses: pulumi/actions@v7
with:
Expand Down
2 changes: 1 addition & 1 deletion apps/3proxy/3proxy-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret 3proxy は Infisical (il.doany.io) のフォルダ /3proxy/3proxy にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
# 値は Infisical の UI で書き換えるだけ(push-bridge が数秒で同期。auto-reload 注釈のある
# Deployment は自動で入れ替わる)。
apiVersion: secrets.infisical.com/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion apps/3proxy/certificate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# px.doany.io の証明書。Gateway は TLS を passthrough するだけなので、終端は Pod 内の
# サイドカー(tls-terminator)が行う。Traefik が内蔵 ACME で持っていた役目の置き換え。
# サイドカー(tls-terminator)が行う。
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
3 changes: 1 addition & 2 deletions apps/adguardhome/certificate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# DoT(853)で使う証明書。以前は Traefik の acme.json を acme-watcher が監視して PVC に書き出していたが、
# cert-manager が直接 Secret に発行する形にした(deployment.yaml がその Secret をマウントする)。
# DoT(853)で使う証明書。deployment.yaml がこの Secret をマウントする。
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down
3 changes: 0 additions & 3 deletions apps/cloudflare-ddns/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ spec:
chart: cloudflare-ddns
targetRevision: 0.1.0
helm:
# HelmChart CRD 時代と同じリリース名にしておくと、描き出されるものが一致して
# そのまま引き取れる(実際に helm template と live の diff が空なのを確認済み)。
releaseName: cloudflare-ddns
valuesObject:
# API token は Infisical operator が作る Secret から(cloudflare-ddns-secrets.yaml)。
# キーは CLOUDFLARE_API_TOKEN。
Expand Down
2 changes: 1 addition & 1 deletion apps/cloudflare-ddns/cloudflare-ddns-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret cloudflare-ddns-secrets は Infisical (il.doany.io) のフォルダ /cloudflare-ddns/cloudflare-ddns-secrets にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
# 値は Infisical の UI で書き換えるだけ(push-bridge が数秒で同期。auto-reload 注釈のある
# Deployment は自動で入れ替わる)。
apiVersion: secrets.infisical.com/v1alpha1
Expand Down
1 change: 0 additions & 1 deletion apps/external-dns/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ spec:
chart: external-dns
targetRevision: 1.23.0
helm:
releaseName: external-dns
valuesObject:
provider:
name: cloudflare
Expand Down
2 changes: 1 addition & 1 deletion apps/external-dns/external-dns-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret external-dns は Infisical (il.doany.io) のフォルダ /external-dns/external-dns にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
#
# cloudflare-api-token Cloudflare の Account API token「external-dns (doany.io DNS write)」。
# 権限は doany.io のゾーンだけの Zone Read + DNS Write(2026-10-06 に作った)
Expand Down
6 changes: 3 additions & 3 deletions apps/forgejo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
## プライベートのリポジトリを移す(1 本ずつ)

**方針: プライベートは GitHub に置かない**(2026-09-15)。GitHub Actions の課金はプライベートにだけ掛かるので、
公開リポジトリ(gitops・blog など)は GitHub のままでよい。対象は shadai / tamasagashi / worklog-cloud(noren は閉じた)。
公開リポジトリ(gitops・blog など)は GitHub のままでよい。対象は todoroku / tamasagashi / worklog-cloud(noren は閉じた)。

**Forgejo が唯一の置き場になる。** バックアップは k8up(R2)の 1 日 1 回だけなので、手元の clone も捨てないこと。

Expand Down Expand Up @@ -95,7 +95,7 @@

**公開にしてはいけない。** パッケージ(コンテナイメージ)の読み取り権限はリポジトリではなく**組織の公開範囲**で決まり、
公開の組織だと非公開リポジトリのイメージでも匿名で pull できる(`services/packages/perm.go` の
`HasOrgOrUserVisible`。2026-09-15 に shadai のイメージが匿名で取れるのを見つけて limited にした)。
`HasOrgOrUserVisible`。2026-09-15 に shadai(今の todoroku)のイメージが匿名で取れるのを見つけて limited にした)。

## Actions からイメージを push するとき

Expand Down Expand Up @@ -162,4 +162,4 @@ curl -X PATCH -H "Authorization: token $T" -H 'Content-Type: application/json' \
https://fj.doany.io/api/v1/repos/doa/<name>
```

2026-09-15 に shadai / renovate / tamasagashi / worklog-cloud へ当てた。
2026-09-15 に shadai(今の todoroku)/ renovate / tamasagashi / worklog-cloud へ当てた。
2 changes: 1 addition & 1 deletion apps/forgejo/postgres.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Forgejo の DB。mattermost/postgres.yaml と同じ形(17 系、pg_dump を k8up に取らせる)。
# Forgejo の DB。PostgreSQL 17 系。pg_dump を k8up に取らせる。
apiVersion: v1
kind: Service
metadata:
Expand Down
1 change: 0 additions & 1 deletion apps/headlamp/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ spec:
chart: headlamp
targetRevision: 0.45.0
helm:
releaseName: headlamp
valuesObject:
serviceAccount:
create: true
Expand Down
1 change: 0 additions & 1 deletion apps/infisical-push-bridge/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ spec:
chart: infisical-push-bridge
targetRevision: 0.1.1
helm:
releaseName: infisical-push-bridge
valuesObject:
infisicalSecret:
enabled: true
Expand Down
1 change: 0 additions & 1 deletion apps/k8up/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spec:
chart: k8up
targetRevision: 4.10.0
helm:
releaseName: k8up
valuesObject:
k8up:
# 注釈の無い PVC は取らない。`k8up.io/backup: "true"` が「取る」という宣言そのもの
Expand Down
2 changes: 1 addition & 1 deletion apps/k8up/notify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ data:
body: JSON.stringify({ text }),
});
if (!r.ok) {
console.error(`Mattermost への投稿に失敗: ${r.status} ${await r.text()}`);
console.error(`Matrix への投稿に失敗: ${r.status} ${await r.text()}`);
process.exit(1);
}
// FAILED でも exit 0。「投稿できた」がこの Job の成功。非ゼロにすると backoffLimit ぶん同じ警告を投稿し、
Expand Down
4 changes: 2 additions & 2 deletions apps/matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ LiveKit が Matrix の通話(Element Call)の音声と映像を中継する。20

### ルーターの転送

**8443 の UDP と TCP をノード(10.0.0.2)に転送しておくこと。** Mattermost Calls のときと同じ番号なので、
その転送をそのまま使う(消していなければ)。Gateway と Cloudflare は通らない。
**8443 の UDP と TCP がノード(10.0.0.2)に届くこと。** ルーターは DMZ で全部をノードに向けているので、
転送の設定は要らない(docs/router.md)。Gateway と Cloudflare は通らない。

外から見える IP は LiveKit が STUN で調べる。家の中の端末も外の IP に向けて送るので、ルーターの
NAT ループバック(ヘアピン)が要る。家の中だけつながらないときはこれを疑う(Tuwunel の docs の Troubleshooting)。
Expand Down
4 changes: 2 additions & 2 deletions apps/matrix/livekit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# 通り道は 2 つ:
# - 合図(WebSocket)は lk.doany.io の Gateway 経由(httproute.yaml)
# - 音声と映像は **hostPort 8443(UDP、つながらないとき TCP)** でノードに直接。Gateway も Cloudflare も通らない。
# ルーターで 8443 の UDP と TCP をノードに転送しておくこと(Mattermost Calls のときと同じ番号・同じ転送)
# ルーターは DMZ で全部をノードに向けているので、転送の設定は要らない(docs/router.md)
#
# 外から見える IP は STUN で調べて客に教える(use_external_ip)。家の中の端末も外の IP に向けて送るので、
# ルーターの「NAT ループバック(ヘアピン)」が要る(Mattermost Calls と同じ条件)。
# ルーターの「NAT ループバック(ヘアピン)」が要る。
---
apiVersion: v1
kind: ConfigMap
Expand Down
2 changes: 1 addition & 1 deletion apps/matrix/matrix-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret matrix は Infisical (il.doany.io) のフォルダ /matrix/matrix にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
#
# oidc-client-secret Entra の共用のアプリ登録のクライアントシークレット(auth などと同じ値)
# hookshot-as-token Tuwunel と hookshot の合言葉(アプリサービスの登録。長いランダム文字列)
Expand Down
1 change: 0 additions & 1 deletion apps/metrics-server/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spec:
chart: metrics-server
targetRevision: 3.14.0
helm:
releaseName: metrics-server
valuesObject:
# `args` は chart の `defaultArgs` に足される(置き換えではない)。
# kubelet の証明書はクラスタ CA では検証できない。Talos の kubelet は自己署名のサービング証明書を
Expand Down
3 changes: 1 addition & 2 deletions apps/netbird/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ metadata:
secrets.infisical.com/auto-reload: "true"
spec:
replicas: 1
# hostPort 3478 と RWO の PVC を新旧 Pod で共有できないので Recreate
# (apps/wireguard の wg-easy と同じ事情)。
# hostPort 3478 と RWO の PVC を新旧 Pod で共有できないので Recreate。
strategy:
type: Recreate
selector:
Expand Down
2 changes: 1 addition & 1 deletion apps/renovate/renovate-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret renovate-secrets は Infisical (il.doany.io) のフォルダ /renovate/renovate-secrets にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。キーは README.md の表。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。キーは README.md の表。
# CronJob は Secret を毎回読み直すので、値を Infisical で書き換えれば次の実行から効く(auto-reload は要らない)。
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
Expand Down
2 changes: 1 addition & 1 deletion apps/rybbit/rybbit-secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret rybbit は Infisical (il.doany.io) のフォルダ /rybbit/rybbit にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする(mattermost と同じ形)。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
#
# | キー | 何に使うか |
# | --- | --- |
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/argocd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ redis:
repository: mirror.gcr.io/library/redis
tag: 8.10.2-alpine
# Native OIDC straight to Entra ID (same tenant/app registration as
# auth/deployment.yaml, gitlab, erpnext) instead of Dex.
# auth/deployment.yaml) instead of Dex.
dex:
enabled: false
configs:
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/auth/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Secret auth-secrets は Infisical (il.doany.io) のフォルダ /auth/auth-secrets にあり、
# Infisical 純正 operator (bootstrap/infisical-operator) が Secret にする。
# Infisical 純正 operator (apps/infisical-operator) が Secret にする。
# 値は Infisical の UI で書き換えるだけ(push-bridge が数秒で同期。auto-reload 注釈のある
# Deployment は自動で入れ替わる)。
apiVersion: secrets.infisical.com/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion bootstrap/auth/sub-proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *.s.doany.io を SSO 付きで LAN のホスト(sub-backend)へ中継する oauth2-proxy。
# Traefik では forward-auth ミドルウェアで実現していたが、Cilium の Gateway には ext auth が無いので
# Cilium の Gateway には ext auth が無いので
# oauth2-proxy 自身を前段のプロキシとして置く(--upstream で中継先を持つ)。
# コールバックは既存の a.doany.io 側インスタンスが受ける。cookie secret を共有しているので
# セッションはそのまま通る。
Expand Down
18 changes: 9 additions & 9 deletions bootstrap/cert-manager/cloudflare-secret.sops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ metadata:
namespace: cert-manager
type: Opaque
stringData:
CF_DNS_API_TOKEN: ENC[AES256_GCM,data:kdJ/zTsY2Kn7LE7AyGbLvXGtoNzVrO3j6coDybrB9Dr8INPcR36SABiyfDud2Gkt+uTF0cM=,iv:baLDIynuLj8xrDgLozcE32R6AGTFR8gUyVyQTztUTsY=,tag:ryBxbPSNhGThDGHrYcWMnA==,type:str]
CF_DNS_API_TOKEN: ENC[AES256_GCM,data:ZKZj+Y7z9VP19myu/lsV/q0gN9MPPHaBvXi4nddVecZVcL6IMeyCNxY+pQ3MHSblwj9RlIs=,iv:Cw73N20ElOtXT8niflI6VFo9pDL2M2B5AokPMcXgUhQ=,tag:T83dCJMIJ1BjvX2+21Obgw==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0THZ3alhkblVZeWRQM0Ir
S2ZoendBS1NpcVhCN2NEQWYwak5nMEhjcVQ4CnhmTGc5R2t4VndpQSticGN4TU5V
bFAxWUhMR3U1WU55UE04bVh1NnAvQ1EKLS0tIDRRSzdGODB2Si9CazFuRUhXUzdw
MSs4MElhMGtuTXkvdXNkTlpwejlHQmcKRM0WcDmSl/3m328waBKzB2QmYITojc7Z
9PT3D5VQZ0v614ZvKR2Hwk5bZm5Uhu9M+QGyVJ19DAkp26btUyI49Q==
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkYmo0VVFlbkJKUW1uT0lr
YmFyZ0R1QkJkblJoRkRRTWZTN0ZzcjVJK0hNCktyK1BaRXVGc3dYODFxRFozZFZE
MnJTZXdyTk9UTUljRFZtMndzeVVaOVUKLS0tIGZ3V2lwL09yRnBVeEpaZEZ5cVhH
NkhYd3dhUGhRTDJycjJXQnp4R04xTjgKquThTvzOEzxMh/j77kJVWP8e5Ya2ZKZJ
itz859E3xv2eLBkxa6whBlZNxt9EVWh9fa20K27IFLY6TutqHEiqDw==
-----END AGE ENCRYPTED FILE-----
recipient: age1sgnnkn67wpt4wgjsff4c36w3cmjkk557ng504e4aczx2lzls9y6ssy0x9r
encrypted_regex: ^(ENCRYPTION_KEY|AUTH_SECRET|CLIENT_ID_GITHUB_LOGIN|CLIENT_SECRET_GITHUB_LOGIN|CF_DNS_API_TOKEN|githubAppPrivateKey|service\.webhook\.mattermost|password)$
lastmodified: "2026-09-07T00:29:07Z"
mac: ENC[AES256_GCM,data:dqa0C4EDH9kjF89ykIZaBf+4w3J2+Om29BAmyYN69eImmYbkj+R0la+m6T6FFhSZ/m7leFHiRYofxskrW+k9qfs8Rz69JJNMCZMB8axIJQqy1RyNwEe5ZqA4mRsF63d1zEf5lCerCC+U91/ZlfIz9Ph2b3HsC6p8WYCNql8Sd2o=,iv:wX3CiNLlvUTLUiMr+CwZdMOo+MTMlhI27N32LKIobQg=,tag:6g9RKn26ZkF/19CSokr/bA==,type:str]
encrypted_regex: ^(ENCRYPTION_KEY|AUTH_SECRET|CLIENT_ID_GITHUB_LOGIN|CLIENT_SECRET_GITHUB_LOGIN|CF_DNS_API_TOKEN)$
lastmodified: "2026-10-18T05:28:56Z"
mac: ENC[AES256_GCM,data:fEvwN+/NUGNImQwgDwaiWTKfN22EHOnXi4WGbC2CX6asPvhvcajEYyOTpxsw9biAJAtTkdJ3TU2b/LR9B4pCNUx0NJO+qtj4HOR243twNlPoVMjiWFyLAWv14iWZzkQAKYM/YSFmDtYySKxP+S9jNmPet4bipc+OgIuXEEL8in0=,iv:jhsWmC3nhkhIJfpxkzAvmcalTcgnKwFD0WbiL3w1j5c=,tag:gRkBWX4vVcm8SQzPDyXq/Q==,type:str]
version: 3.13.3
Loading
Loading