1
0
Fork 0
kubernetes/jenkins
Dustin 1392a7c181 jenkins: Add storage for Gentoo Portage/binpkgs
Jenkins that build Gentoo-based systems, like Aimee OS, need a
persistent storage volume for the Gentoo ebuild repository. The Job
initially populates the repository using `emerge-webrsync`, and then the
CronJob keeps it up-to-date by running `emaint sync` daily.

In addition to the Portage repository, we also need a volume to store
built binary packages.  Jenkins job pods can mount this volume to make
binary packages they build available for subsequent runs.

Both of these volumes are exposed to use cases outside the cluster using
`rsync` in daemon mode.  This can be useful for e.g. local builds.
2025-01-09 20:15:46 -06:00
..
.gitignore jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
README.md jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
gentoo-storage.yaml jenkins: Add storage for Gentoo Portage/binpkgs 2025-01-09 20:15:46 -06:00
iscsi-migrate.yaml jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
iscsi.yaml jenkins: Force iSCSI volume on specific nodes 2024-06-26 18:29:49 -05:00
jenkins.yaml jenkins: Update to 2.426.2 2024-01-22 18:01:03 -06:00
kustomization.yaml jenkins: Add storage for Gentoo Portage/binpkgs 2025-01-09 20:15:46 -06:00
secrets.yaml jenkins: Add credentials to sign, publish RPMs 2023-11-10 15:31:55 -06:00
ssh_known_hosts jenkins: Trust SSHCA for pyrocufflink.black 2024-11-26 03:35:21 +00:00

README.md

Jenkins in Kubernetes

Kubernetes Setup

Configure Jenkins resources:

ln imagepull-gitea jenkins/.dockerconfigjson
kubectl apply -k jenkins

Jenkins Setup

Install Kubernetes plugin.

Set TCP port for inbound agents setting (Manage JenkinsConfigure Global Security) to Fixed and enter 40414.

Configure Kubernetes (Manage JenkinsManage Nodes and CloudsConfigure Clouds:

  1. Add a new cloudKubernetes
  2. Enter a name
  3. Kubernetes Cloud details...
    • Kubernetes URL: (leave blank; will use Kubernetes service discovery)
    • Kubernetes Namespace: jenkins-jobs
    • Credentials: - none - (will use Service Account token)
    • Jenkins tunnel: jenkins.jenkins.svc.cluster.local: (trailing colon!)

iSCSI Persistent Volume

Because of the large size of the Jenkins volume, it does not work well managed by Longhorn. Instead, we use a pre-provisioned iSCSI volume on the Synology NAS. This improves performance and avoids keeping multiple replicas of the Jenkins data, while still benefiting from snapshots, etc.