diff --git a/kubernetes/main/apps/dev/forgejo-runner/kustomization.yaml b/kubernetes/main/apps/dev/forgejo-runner/app/kustomization.yaml similarity index 55% rename from kubernetes/main/apps/dev/forgejo-runner/kustomization.yaml rename to kubernetes/main/apps/dev/forgejo-runner/app/kustomization.yaml index 4b16afa..c9dc609 100644 --- a/kubernetes/main/apps/dev/forgejo-runner/kustomization.yaml +++ b/kubernetes/main/apps/dev/forgejo-runner/app/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./reg-token.sops.yaml -- ./service-account.yaml -- ./service.yaml -- ./runner.yaml \ No newline at end of file +#- ./service-account.yaml +#- ./service.yaml +#- ./runner.yaml +- ./runner-dep.yaml \ No newline at end of file diff --git a/kubernetes/main/apps/dev/forgejo-runner/app/reg-token.sops.yaml b/kubernetes/main/apps/dev/forgejo-runner/app/reg-token.sops.yaml new file mode 100644 index 0000000..b18cea5 --- /dev/null +++ b/kubernetes/main/apps/dev/forgejo-runner/app/reg-token.sops.yaml @@ -0,0 +1,70 @@ +apiVersion: v1 +kind: Secret +metadata: + name: forgejo-runner-token +stringData: + token: ENC[AES256_GCM,data:UKDiJKpmWSDJlQaq1WN23Ow3PAuVRPNWSk+zrx91zeyarYPgA6LhmQ==,iv:/JUZFaMYXVeItHsNPCs1mJxhidPi2kxbi/57atSSqAE=,tag:t0SwJLLKnTqs5fS+p1SAnQ==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: [] + lastmodified: "2024-12-15T02:37:38Z" + mac: ENC[AES256_GCM,data:lCpKZk88pMXmsBphnNlQWRFWOz0O/ghrMN8AEtQGhckm1M6r25P6GaoBldM7891dZM1ULzthQjZdCL3Js4Q9jCnVzbuUNQW/UE9Blmfnrrf342I2+XhgMwK473Cqe8v6EpwSaxZpOA5+EUxoYmEw/lU5i0iLrsk3DdJ3CPGczo8=,iv:t/EhngcseRSK5ly5/x03tf/dxRqeY/x5ScwDldzyh4M=,tag:OMn9jwJwgCu6RaJZ6ZP17g==,type:str] + pgp: + - created_at: "2024-12-15T02:37:38Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hQIMAyqlIeyoxYovARAAywMl2DiEYnQxd7deuFeKpyDdv+iQDy5J94qp9tkS5OYH + HYliIjrzNy++ZduizBu9wS7R6LMn4w0rdrN7FKtZb4Ack+JHjJsjzI7E8YBn9DY8 + OsbqShU091mJ8tSPJk2fx3n/1OAk3mil5nUdAobWJnygnQG3fUFI+UDfO39m91Ci + OZtTPSY9NOeCJejN1waDa0Z0F9kuKn2WKlyHoM1l/bbMI4K5HIH1hpO+z7Knvyue + AjcKk1rw7kS6+afv2cj9ZhQDKPaZ0eQoq9h43Csmdwy0uUghd5OzM1a0XeXhD0zL + gPBBNBy30mmEsiehPii/ZeOcGJ1wAPopZOv7k52nWzCb+h1ohRgIWljCfz3AlHE1 + DrOOWAGyDXKV0FmR1Ltum8IL5tRgeOOhHe45BsVG+sWWSo9V3aOX+9EEz/9eFOhj + lWSP7aswAQ1ravlkJa1Y4m1CwPqWEhv4M8pkASmuj4q28lrxTpE75Zj1QkzN1no5 + Fi7P6LXWYE39QYheCv5orH8sY1SkRN2Bl7fiLPIFFGp3AqoGOaxk8v1K7bJ6obOw + bR3oeGT3yuKBejT/a0wzQJrv60hhOiOj0O/Qo3aAqy7U0UW2OKDqI/SxAcuiA3m3 + zD3aD4Ss3yjtqTnLoH6oSX9BTBssLkfl1Z6/enIam+7o+deobB/X59Opk9m0/KCF + AgwDXjg0p2IN1X8BEACPs0fg3Wf9z8hFQrSptKcucMlD/t+sUPZvWTgvy3sbIQIN + c6xHzjtJq7pgnKqFvN7V+guk4F2+AQOxsGmKcC+omH3ZawH9mhNlCBwUlEPcsEaY + LA1/yCVmLX50F4U3p+Z0UYbQcdmWOAJoKTw1Y3uXBdicl/P7WB+4olzTLN+aGcYv + vXCUSv5InZLPQ8znvJrW3gggLyaJbY75xLMaqbIH7wV7EIUy/1kFeV6SjnXoRWm1 + u1m0D9A1oF4aOVaOgmXAS0PBC0l2Q6iLQPxx595go7QMyOFZbDSW9I01DRStCVX1 + R46Ov1fHxxMeWFTOU64dIIPJH7bSiOVWIOWTY4M6ehgRmc+Nur8P/LsebynX5n93 + AFmISit7oybWrRl0qjvcpt1RoLU61uVEb1e1NE6sYriDIaF+JuCqekAGlBa6lJPV + +PWrTk8mR7tTyRU+gWmIDPQO19X26bZBbIoY0/8nMkQP3I/BoBq5Ph/Ufu2nXUNT + S/cTLtzKlFqt6mkWT2agLJulhjlfhVfH8bCinE3dWTFP55UDkp33MQyLVxrqz9Im + fg9FR9WgNCDuPeM/SQ3O/RLsW+qYZtlmB9jgOY1nFJQSzTcvgxRJU30wyxv9O32J + 4svXI+3EPHQOAFyylAVueJbj2HhtLLbroi0T4Z/eRTmWUDgOYETmSw/7BSK799Ro + AQkCEPO3ogD0ZIxLdEwiSyeKAWr+1kuci0YqwTO0DrCHZsM4Acz7h9L7MZc0SU7x + 0mtW7Bfz1gNtFbjmKoa8jhIzu+CaoVFT80pzzvkqMknnRkHjqhglB3Q4IUp2j6dl + mTUZZeOiV8M= + =3xX0 + -----END PGP MESSAGE----- + fp: BD1AAF9D8170F4BEE437365FF6F0933799CFEBCD + - created_at: "2024-12-15T02:37:38Z" + enc: |- + -----BEGIN PGP MESSAGE----- + + hQIMAy5t8IMoPu4VAQ//XPYtg+p+MPu4XLJ1AEGej7fyUjb23J5U6kl54jX+rbhB + BxvwUpumnpGM0RPhbw/6lYRGAq8GxnHY9VNvHeW6L4ckIN3DOenJTcqOa/KD4SZN + eGsdbGCfs5SbbAOIjuMfGcIBd6zgm/O94E+KTv80j17T6o6gcMSkB59siWIzShOs + vBQdb1OwhXo/po9BIzqUeqU+5bqwsMD/pkWRfQGRUkS/ExrmCVg0AU0AniT/Tkyk + umVE6/nhvLEDq+6TOCvXy3eok/wlroyOFuBqQ6zhxLFfaQVCpShS3ka/g79JG1Ft + FVTL3lDlfaz9Tkm/0mWE70iYJk5wyBO5wRusdO9ArivSlYjyHXj0quYfU201f0ui + zshj/6WCfmMwa6llBj7CP1OmX9wddjgrDN5UvhYiKHyH8c+3B+YK5PkEd4Wq5bhl + mZOmPD5mjwBJsxivSe7qvQq8JTPuHN7BcGhZKcbLxOYDH6WhEjJvDj3PYa301cJR + V2Ae3uJKAXvxmUkMUS6mFYvybE83OdU2CmKPgroTq4cI0O5qap3Eum+paPozqKlS + 8+bMD+T4mPdUNfQD9WJ48HE5WWUBRFrEbfvzEzPc221JsQvxdqg2VCCPUHjnpE3K + 5fOr4XjbwrBZivsg+vpO150Iwj1+hJy6oUJ69Yg+NvzS+xQYJGWPS7Ibt0U+P9HU + aAEJAhCM2oNnauMhl+YI+2HQQfdiM8PoMFxLwCT1wtePNfhk+1jyJw4omyDb6A8K + R6PbYttywZeGYFV8l+Nb/EDhNg37siKnMm3cAGPBBQMReFaDjM1LLnHvgvzosSBO + Knn2vaTqtosn + =Lio/ + -----END PGP MESSAGE----- + fp: 687802D4DFD8AA82EA55666CF7DADAC782D7663D + encrypted_regex: ^(data|stringData)$ + version: 3.9.1 diff --git a/kubernetes/main/apps/dev/forgejo-runner/app/runner-dep.yaml b/kubernetes/main/apps/dev/forgejo-runner/app/runner-dep.yaml new file mode 100644 index 0000000..2c02176 --- /dev/null +++ b/kubernetes/main/apps/dev/forgejo-runner/app/runner-dep.yaml @@ -0,0 +1,75 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.29.4/deployment.json +apiVersion: apps/v1 +kind: Deployment +metadata: + name: forgejo-runner + labels: + app: forgejo-runner +spec: + replicas: 5 + selector: + matchLabels: + app: forgejo-runner + strategy: {} + template: + metadata: + labels: + app: forgejo-runner + spec: + restartPolicy: Always + volumes: + - name: docker-certs + emptyDir: {} + - name: runner-data + emptyDir: {} + # Initialise our configuration file using offline registration + # https://forgejo.org/docs/v1.21/admin/actions/#offline-registration + initContainers: + - name: runner-register + image: &runnerImg code.forgejo.org/forgejo/runner:5.0.3 + command: ["forgejo-runner", "register", "--no-interactive", "--token", $(RUNNER_SECRET), "--name", $(RUNNER_NAME), "--instance", $(FORGEJO_INSTANCE_URL)] + env: + - name: RUNNER_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: RUNNER_SECRET + valueFrom: + secretKeyRef: + name: forgejo-runner-token + key: token + - name: FORGEJO_INSTANCE_URL + value: https://git.seanomik.net #${SECRET_NEW_DOMAIN} + resources: + limits: + cpu: "0.50" + memory: "64Mi" + volumeMounts: + - name: runner-data + mountPath: /data + containers: + - name: runner + image: *runnerImg + command: ["sh", "-c", "while ! nc -z localhost 2376