Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created September 17, 2023 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save proffalken/c766900b0d6ffd74d7b043c5ceb0ccae to your computer and use it in GitHub Desktop.
Save proffalken/c766900b0d6ffd74d7b043c5ceb0ccae to your computer and use it in GitHub Desktop.
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
io.kompose.service: octoprint-server
app: octoprint-server
name: octoprint-server
namespace: default
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: octoprint-server
app: octoprint-server
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
io.kompose.network/octoprint-default: "true"
io.kompose.service: octoprint-server
app: octoprint-server
spec:
containers:
- image: octoprint/octoprint:latest
name: octoprint-server
securityContext:
privileged: true
ports:
- containerPort: 5000
hostPort: 5000
protocol: TCP
name: octoprint
resources: {}
volumeMounts:
- mountPath: /octoprint
name: octoprint-claim
- mountPath: /dev/ttyUSB0
name: i3omega
env:
- name: OCTOPRINT_PORT
value: "5000"
restartPolicy: Always
volumes:
- name: octoprint-claim
persistentVolumeClaim:
claimName: octoprint-claim
- name: i3omega
hostPath:
path: /dev/i3_omega
type: CharDevice
status: {}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: octoprint-server
labels:
app: octoprint-server
spec:
selector:
matchLabels:
app: octoprint-server
endpoints:
- port: octoprint
path: "plugin/prometheus_exporter/metrics"
authorization:
credentials:
name: octoprint-api-key
key: token
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
io.kompose.service: octoprint-server
name: octoprint-server
namespace: default
spec:
ports:
- name: octoprint
port: 5000
targetPort: 5000
selector:
io.kompose.service: octoprint-server
status:
loadBalancer: {}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: octoprint.wallace.network
annotations:
ingress.kubernetes.io/class: "traefik"
ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: traefik
rules:
- host: octoprint.wallace.network
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: octoprint-server
port:
number: 5000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment