8
0
Fork 0

Add Skaffold

master
Lauri Võsandi 3 months ago
parent 2bbcb1a51b
commit 147b323e6b
  1. 80
      k8s/dev/deployment.yaml
  2. 28
      skaffold.yaml

@ -0,0 +1,80 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: logmower-shipper
spec:
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 50%
selector:
matchLabels:
app: logmower-shipper
template:
metadata:
labels:
app: logmower-shipper
spec:
serviceAccountName: logmower-shipper
containers:
- name: logmower-shipper
image: harbor.k-space.ee/lauri/logmower-shipper-prototype
securityContext:
runAsUser: 0
env:
- name: PYTHONUNBUFFERED
value: "1"
- name: KUBE_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: MONGO_URI
valueFrom:
secretKeyRef:
name: logmower-mongodb-application-readwrite
key: connectionString.standard
ports:
- containerPort: 8000
name: metrics
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- name: etcmachineid
mountPath: /etc/machine-id
readOnly: true
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: varlog
mountPath: /var/log
readOnly: true
volumes:
- name: etcmachineid
hostPath:
path: /etc/machine-id
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: varlog
hostPath:
path: /var/log
tolerations:
- operator: "Exists"
effect: "NoExecute"
- operator: "Exists"
effect: "NoSchedule"
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: logmower-shipper
labels:
app: logmower-shipper

@ -0,0 +1,28 @@
apiVersion: skaffold/v3alpha1
kind: Config
metadata:
name: logmower-shipper-prototype
build:
artifacts:
- image: harbor.k-space.ee/lauri/logmower-shipper-prototype
docker:
dockerfile: Dockerfile
deploy:
kubectl: {}
manifests:
rawYaml:
- k8s/staging/deployment.yaml
profiles:
- name: dev
activation:
- command: dev
build:
artifacts:
- image: harbor.k-space.ee/lauri/logmower-shipper-prototype
manifests:
rawYaml:
- k8s/dev/deployment.yaml
Loading…
Cancel
Save