commit e85bdd32765ecb0d6421c6aefa64cb9ef7c8e3a1 Author: Jim Nicholson Date: Tue Dec 21 15:31:35 2021 -0800 initial commit diff --git a/deployment.yaml b/deployment.yaml new file mode 100644 index 0000000..b9e3190 --- /dev/null +++ b/deployment.yaml @@ -0,0 +1,67 @@ +# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: uptime-kuma + namespace: uptime-kuma + labels: + app: uptime-kuma +spec: + selector: + matchLabels: + app: uptime-kuma + replicas: 1 + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: uptime-kuma + spec: + # initContainers: + # Init containers are exactly like regular containers, except: + # - Init containers always run to completion. + # - Each init container must complete successfully before the next one starts. + containers: + - name: uptime-kuma + image: louislam/uptime-kuma:1.11.1-alpine + imagePullPolicy: Always + resources: + requests: + cpu: 100m + memory: 100Mi + limits: + cpu: 100m + memory: 100Mi + livenessProbe: + tcpSocket: + port: 3001 + initialDelaySeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 3 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 3001 + initialDelaySeconds: 5 + timeoutSeconds: 2 + successThreshold: 1 + failureThreshold: 3 + periodSeconds: 10 + ports: + - containerPort: 3001 + name: http-3001 + volumeMounts: + - name: config + mountPath: /app/data + volumes: + - name: config + persistentVolumeClaim: + claimName: uptime-kuma-data + restartPolicy: Always +--- diff --git a/kustomization.yaml b/kustomization.yaml new file mode 100644 index 0000000..bea797a --- /dev/null +++ b/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- namespace.yaml +- storage.yaml +- deployment.yaml +- service.yaml diff --git a/namespace.yaml b/namespace.yaml new file mode 100644 index 0000000..ec3c9bf --- /dev/null +++ b/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: uptime-kuma \ No newline at end of file diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..ec78fb6 --- /dev/null +++ b/service.yaml @@ -0,0 +1,16 @@ +# https://kubernetes.io/docs/concepts/services-networking/service/ +apiVersion: v1 +kind: Service +metadata: + name: uptime-kuma + namespace: uptime-kuma +spec: + selector: + app: uptime-kuma + type: ClusterIP + ports: + - name: uptime-kuma-web + protocol: TCP + port: 80 + targetPort: 3001 +--- diff --git a/storage.yaml b/storage.yaml new file mode 100644 index 0000000..f5f4df9 --- /dev/null +++ b/storage.yaml @@ -0,0 +1,20 @@ +# https://kubernetes.io/docs/concepts/storage/persistent-volumes/ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: uptime-kuma-data + namespace: uptime-kuma + labels: + app: uptime-kuma +spec: + # AKS: default,managed-premium + # GKE: standard + # EKS: gp2 (custom) + # Rook: rook-ceph-block,rook-ceph-fs + # storageClassName: longhorn + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi +---