-
-
Save j0n3/9268f77903ecb6892db3c2fa97a53a30 to your computer and use it in GitHub Desktop.
Installing Taskwarrior in Kubernetes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update && apt-get -y upgrade | |
RUN apt-get install -y taskd | |
CMD taskd server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=latest | |
TAG=foo.bar/k8s/setup/taskd | |
push: build | |
docker push $(TAG):$(VERSION) | |
build: Dockerfile | |
docker build . -t $(TAG):$(VERSION) | |
all: push | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: taskd | |
namespace: services | |
spec: | |
selector: | |
matchLabels: | |
app: taskd | |
serviceName: "taskd" | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: taskd | |
spec: | |
terminationGracePeriodSeconds: 5 | |
imagePullSecrets: | |
- name: gitlab | |
containers: | |
- name: taskd | |
image: foo.bar/k8s/setup/taskd:latest | |
imagePullPolicy: "Always" | |
env: | |
- name: TASKDDATA | |
value: "/data/taskd" | |
volumeMounts: | |
- name: data | |
mountPath: /data/taskd | |
restartPolicy: Always | |
volumeClaimTemplates: | |
- metadata: | |
name: data | |
spec: | |
accessModes: [ "ReadWriteOnce" ] | |
storageClassName: "manual-taskd" | |
resources: | |
requests: | |
storage: 200Mi | |
--- | |
kind: PersistentVolume | |
apiVersion: v1 | |
metadata: | |
name: taskd | |
labels: | |
type: local | |
spec: | |
storageClassName: manual-taskd | |
capacity: | |
storage: 200Mi | |
accessModes: | |
- ReadWriteOnce | |
hostPath: | |
path: /data/taskd #you can put your taskwarrior certs and files here, and init from the host if you want | |
type: Directory | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: taskd | |
labels: | |
app: taskd | |
namespace: services | |
spec: | |
ports: | |
- port: 53589 | |
targetPort: 53589 | |
nodePort: 30001 | |
name: taskd | |
type: "NodePort" | |
selector: | |
app: taskd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment