First iteration of farmos helm chart.
This commit is contained in:
		
							
								
								
									
										7
									
								
								farmos/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								farmos/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
---
 | 
			
		||||
apiVersion: v2
 | 
			
		||||
appVersion: 3.4.5
 | 
			
		||||
description: FarmOS Helm chart for Kubernetes
 | 
			
		||||
name: farmos
 | 
			
		||||
type: application
 | 
			
		||||
version: "0.1.0"
 | 
			
		||||
							
								
								
									
										26
									
								
								farmos/README.org
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								farmos/README.org
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
#+TITLE: Farmos farm management
 | 
			
		||||
#+AUTHOR: James Blair
 | 
			
		||||
#+EMAIL: mail@jamesblair.net
 | 
			
		||||
#+DATE: <2025-08-23 Sat>
 | 
			
		||||
 | 
			
		||||
[[https://github.com/farmos/farmos][FarmOS]] is a self hosted farm management service.
 | 
			
		||||
 | 
			
		||||
I created this simplified helm chart for self-hosting farmos in a container on kubernetes. Complete the steps below to deploy this chart.
 | 
			
		||||
 | 
			
		||||
#+NAME: Deploy gitea via helm
 | 
			
		||||
#+begin_src tmux
 | 
			
		||||
# Ensure gitea namespace exists
 | 
			
		||||
sudo kubectl create namespace jamma-farmos
 | 
			
		||||
 | 
			
		||||
# Create directories if they don't already exist
 | 
			
		||||
mkdir --parent "/home/${USER}/Services/farmos"
 | 
			
		||||
 | 
			
		||||
# Clone charts repository
 | 
			
		||||
cd "/home/${USER}/Services/gitea" && git clone https://gitea.jamma.life/jmhbnz/charts.git
 | 
			
		||||
 | 
			
		||||
# Ensure the repository is up to date
 | 
			
		||||
cd charts/farmos && git pull
 | 
			
		||||
 | 
			
		||||
# Install the chart
 | 
			
		||||
helm upgrade --install -n jamma-farmos jamma-farmos .
 | 
			
		||||
#+end_src
 | 
			
		||||
							
								
								
									
										32
									
								
								farmos/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								farmos/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,32 @@
 | 
			
		||||
---
 | 
			
		||||
apiVersion: apps/v1
 | 
			
		||||
kind: Deployment
 | 
			
		||||
metadata:
 | 
			
		||||
  name: farmos
 | 
			
		||||
  labels:
 | 
			
		||||
    app: farmos
 | 
			
		||||
spec:
 | 
			
		||||
  replicas: {{ .Values.replicaCount }}
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      app: farmos
 | 
			
		||||
  template:
 | 
			
		||||
    metadata:
 | 
			
		||||
      labels:
 | 
			
		||||
        app: farmos
 | 
			
		||||
    spec:
 | 
			
		||||
      containers:
 | 
			
		||||
        - name: {{ .Chart.Name }}
 | 
			
		||||
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
 | 
			
		||||
          imagePullPolicy: "always"
 | 
			
		||||
          ports:
 | 
			
		||||
            - name: http
 | 
			
		||||
              containerPort: 80
 | 
			
		||||
              protocol: TCP
 | 
			
		||||
          volumeMounts:
 | 
			
		||||
            - name: data
 | 
			
		||||
              mountPath: /opt/drupal/web/sites
 | 
			
		||||
      volumes:
 | 
			
		||||
        - name: data
 | 
			
		||||
          persistentVolumeClaim:
 | 
			
		||||
            claimName: farmos
 | 
			
		||||
							
								
								
									
										15
									
								
								farmos/templates/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								farmos/templates/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,15 @@
 | 
			
		||||
---
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: PersistentVolumeClaim
 | 
			
		||||
metadata:
 | 
			
		||||
  labels:
 | 
			
		||||
    app: farmos
 | 
			
		||||
  name: farmos
 | 
			
		||||
spec:
 | 
			
		||||
  accessModes:
 | 
			
		||||
    - ReadWriteOnce
 | 
			
		||||
  resources:
 | 
			
		||||
    requests:
 | 
			
		||||
      storage: 10Gi
 | 
			
		||||
  storageClassName: local-path
 | 
			
		||||
  volumeMode: Filesystem
 | 
			
		||||
							
								
								
									
										16
									
								
								farmos/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								farmos/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
---
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
kind: Service
 | 
			
		||||
metadata:
 | 
			
		||||
  name: farmos
 | 
			
		||||
  labels:
 | 
			
		||||
    app: farmos
 | 
			
		||||
spec:
 | 
			
		||||
  type: ClusterIP
 | 
			
		||||
  ports:
 | 
			
		||||
    - port: 80
 | 
			
		||||
      targetPort: http
 | 
			
		||||
      protocol: TCP
 | 
			
		||||
      name: http
 | 
			
		||||
  selector:
 | 
			
		||||
    app: farmos
 | 
			
		||||
							
								
								
									
										6
									
								
								farmos/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								farmos/values.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
replicaCount: 1
 | 
			
		||||
 | 
			
		||||
image:
 | 
			
		||||
  repository: docker.io/farmos/farmos
 | 
			
		||||
  tag: "3.4.5"
 | 
			
		||||
		Reference in New Issue
	
	Block a user