forked from roger/k3s-cluster
Compare commits
5 Commits
fix/deadli
...
fix/myorg-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0aeaa2b051 | ||
|
|
8bc3025296 | ||
|
|
7a7d67bedc | ||
|
|
19cdc77880 | ||
|
|
8983f482d0 |
@@ -58,9 +58,9 @@ spec:
|
|||||||
image: ghcr.io/home-assistant/home-assistant:stable
|
image: ghcr.io/home-assistant/home-assistant:stable
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "256Mi"
|
|
||||||
limits:
|
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
memory: "1Gi"
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8123
|
- containerPort: 8123
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|||||||
@@ -59,16 +59,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: myorg-assistant-secret
|
name: myorg-assistant-secret
|
||||||
key: WEB_SECRET_KEY
|
key: WEB_SECRET_KEY
|
||||||
- name: GIT_REPO_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_REPO_URL
|
|
||||||
- name: GIT_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_USERNAME
|
|
||||||
- name: GIT_TOKEN
|
- name: GIT_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -59,16 +59,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: myorg-assistant-secret
|
name: myorg-assistant-secret
|
||||||
key: WEB_SECRET_KEY
|
key: WEB_SECRET_KEY
|
||||||
- name: GIT_REPO_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_REPO_URL
|
|
||||||
- name: GIT_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_USERNAME
|
|
||||||
- name: GIT_TOKEN
|
- name: GIT_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -24,6 +24,47 @@ spec:
|
|||||||
restartPolicy: OnFailure
|
restartPolicy: OnFailure
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: gitea-registry
|
- name: gitea-registry
|
||||||
|
initContainers:
|
||||||
|
- name: git-clone
|
||||||
|
image: alpine/git:latest
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
# Normalize the repo URL host to the correct Gitea subdomain.
|
||||||
|
# The GIT_REPO_URL secret historically contained gitea.rogi.casa,
|
||||||
|
# which 526s through Cloudflare; the working subdomain is git.rogi.casa.
|
||||||
|
export GIT_REPO_URL="$(echo "${GIT_REPO_URL}" | sed -E 's#https?://[^/@]+@?gitea\.rogi\.casa#https://'"${GIT_USERNAME}"':'"${GIT_TOKEN}"'@git.rogi.casa#')"
|
||||||
|
if [ ! -d /data/myorg/.git ]; then
|
||||||
|
echo "Cloning repository from ${GIT_REPO_URL}..."
|
||||||
|
git clone ${GIT_REPO_URL} /data/myorg
|
||||||
|
cd /data/myorg
|
||||||
|
git config user.name "${GIT_USERNAME}"
|
||||||
|
git config user.email "${GIT_USERNAME}@rogi.casa"
|
||||||
|
git config credential.helper store
|
||||||
|
echo "https://${GIT_USERNAME}:${GIT_TOKEN}@git.rogi.casa" > ~/.git-credentials
|
||||||
|
else
|
||||||
|
echo "Repository already exists, skipping clone."
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
- name: GIT_REPO_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: myorg-assistant-secret
|
||||||
|
key: GIT_REPO_URL
|
||||||
|
- name: GIT_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: myorg-assistant-secret
|
||||||
|
key: GIT_USERNAME
|
||||||
|
- name: GIT_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: myorg-assistant-secret
|
||||||
|
key: GIT_TOKEN
|
||||||
|
volumeMounts:
|
||||||
|
- name: myorg-data
|
||||||
|
mountPath: /data/myorg
|
||||||
containers:
|
containers:
|
||||||
- name: git-sync
|
- name: git-sync
|
||||||
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
image: git.rogi.casa/roger/myorg-assistant/myorg-assistant:fcf79bf
|
||||||
|
|||||||
@@ -66,16 +66,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: myorg-assistant-secret
|
name: myorg-assistant-secret
|
||||||
key: WEB_SECRET_KEY
|
key: WEB_SECRET_KEY
|
||||||
- name: GIT_REPO_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_REPO_URL
|
|
||||||
- name: GIT_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_USERNAME
|
|
||||||
- name: GIT_TOKEN
|
- name: GIT_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -59,16 +59,6 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: myorg-assistant-secret
|
name: myorg-assistant-secret
|
||||||
key: WEB_SECRET_KEY
|
key: WEB_SECRET_KEY
|
||||||
- name: GIT_REPO_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_REPO_URL
|
|
||||||
- name: GIT_USERNAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: myorg-assistant-secret
|
|
||||||
key: GIT_USERNAME
|
|
||||||
- name: GIT_TOKEN
|
- name: GIT_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|||||||
@@ -59,6 +59,16 @@ data:
|
|||||||
cron:
|
cron:
|
||||||
wrap_response: false
|
wrap_response: false
|
||||||
|
|
||||||
|
discord:
|
||||||
|
allowed_channels: '1470909384162017444' # DISCORD_HOME_CHANNEL
|
||||||
|
free_response_channels: '1470909384162017444' # no @mention needed here
|
||||||
|
# Per-platform gateway auth. Paired with GATEWAY_ALLOW_ALL_USERS=true in
|
||||||
|
# the env (secret.yaml), this lets the bot reply to inbound DMs and
|
||||||
|
# group messages from anyone. Tighten later by switching to
|
||||||
|
# DISCORD_ALLOWED_USERS=<id> in the secret and dropping these two lines.
|
||||||
|
dm_policy: open
|
||||||
|
group_policy: open
|
||||||
|
|
||||||
memory:
|
memory:
|
||||||
memory_enabled: true
|
memory_enabled: true
|
||||||
user_profile_enabled: true
|
user_profile_enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user