diff --git a/apps/aocbot/deploy.yaml b/apps/aocbot/deploy.yaml new file mode 100644 index 0000000..d73b8c1 --- /dev/null +++ b/apps/aocbot/deploy.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aocbot + namespace: default + labels: + app: aocbot +spec: + replicas: 1 + selector: + matchLabels: + app: aocbot + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + template: + metadata: + name: aocbot + labels: + app: aocbot + spec: + containers: + - name: aocbot + image: ghcr.io/wisvch/aocbot:20241205-287e5bf # {"$imagepolicy": "flux-system:aoch"} + imagePullPolicy: IfNotPresent + livenessProbe: null + readinessProbe: null + env: + - name: DISCORD_TOKEN + value: null + valueFrom: + secretKeyRef: + name: aocbot + key: discord_token + resources: + limits: + memory: 20Mi + requests: + cpu: 5m + memory: 5Mi diff --git a/apps/aocbot/image.yaml b/apps/aocbot/image.yaml new file mode 100644 index 0000000..508d4ae --- /dev/null +++ b/apps/aocbot/image.yaml @@ -0,0 +1,23 @@ +apiVersion: image.toolkit.fluxcd.io/v1beta1 +kind: ImageRepository +metadata: + name: aocbot + namespace: flux-system +spec: + image: ghcr.io/wisvch/aocbot + interval: 15m0s +--- +apiVersion: image.toolkit.fluxcd.io/v1beta1 +kind: ImagePolicy +metadata: + name: aocbot + namespace: flux-system +spec: + imageRepositoryRef: + name: aocbot + filterTags: + pattern: "^(?P.*)-[a-fA-F0-9]+" + extract: "$ts" + policy: + numerical: + order: asc diff --git a/apps/aocbot/kustomization.yaml b/apps/aocbot/kustomization.yaml new file mode 100644 index 0000000..e8e4ce2 --- /dev/null +++ b/apps/aocbot/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - image.yaml + - deploy.yaml diff --git a/secrets/aocbot.yaml b/secrets/aocbot.yaml new file mode 100644 index 0000000..72c89ca --- /dev/null +++ b/secrets/aocbot.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Secret +metadata: + name: aocbot + namespace: default +stringData: + discord_token: ENC[AES256_GCM,data:Xbg44S9LoB/9R6mof0DR4OyeSd+tGILdC7xK1qUr/8qt2Vz2K5H+PtL0AV/yx7fFAbs36fwc/piZ9qhd9SIVHKeAd8WATA==,iv:vp06fGZ5dUpTZgS/MBJEd+sNSsPnG8MvqXxhF3nwnv0=,tag:FffNPDiBtVsVQQ44BlKDYA==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1ug2fepnvaqsfpn7t5gjjh2l0j8074jwh9h50pnjcjxn08v8pp3xq7ymxn2 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBK3d4bThtN1REc0VOOEsz + Z1RJWW9wY29pUHpkUnZHYSsreTh4bG1ieDBVCm5qdExrclI2UnQ0WXRSODEzWU5p + ZnlqK05RTmtiMU1Ud3JjQ1dyeUw1RTQKLS0tIDZMSEVYdWJMc0ZFbHBEcURCVW5Q + RDVCNXltQ1NweGd2ZWFXZ3dqZ2xiUmcK1NW6MmNKwA/lMiyXPIX9R3GvC4f+/J4b + k3bjEAFdquZb+DvzPkwDWz06/NiJgJW/Izq0NMCr6IJD8t410dXElg== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2024-12-05T21:48:36Z" + mac: ENC[AES256_GCM,data:k4uiXgZ7cO5OunugKvGcJCXockNp0JtLDTBsKxAbByZ4J/ZFwUFg8OI/5w/6zCATQkFXcWc2GcVsaFPq6orQLRqM06cvcG4ij1sc2gn2EeC/IF8KDn6b4mxsI36YBzbgiMDmjDJXonELLVUu8Cf9XsufiqFNmcuZ+xyOn1KJ3io=,iv:STcx8Uxr1MkEAL02vVJtpBhBJpYwZJmm0RGcCDc88gk=,tag:4EsqDBlOPC0Qkpge1FUqMQ==,type:str] + pgp: [] + encrypted_regex: ^(data|stringData)$ + version: 3.9.2 diff --git a/secrets/templates/aocbot.tpl.yaml b/secrets/templates/aocbot.tpl.yaml new file mode 100644 index 0000000..ae1bb8d --- /dev/null +++ b/secrets/templates/aocbot.tpl.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: aocbot + namespace: default +stringData: + discord_token: ""