From ae0b3d3939cb15b26b5f444e07044b0db061fb3b Mon Sep 17 00:00:00 2001 From: Erki Aas Date: Tue, 18 Nov 2025 18:55:22 +0200 Subject: [PATCH] Add rotmower --- argocd/applications/rotmower.yaml | 20 ++++++ rotmower/application.yaml | 105 ++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 argocd/applications/rotmower.yaml create mode 100644 rotmower/application.yaml diff --git a/argocd/applications/rotmower.yaml b/argocd/applications/rotmower.yaml new file mode 100644 index 0000000..2a26fca --- /dev/null +++ b/argocd/applications/rotmower.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: rotmower + namespace: argocd +spec: + project: k-space.ee + source: + repoURL: 'git@git.k-space.ee:k-space/kube.git' + path: rotmower + targetRevision: HEAD + destination: + server: 'https://kubernetes.default.svc' + namespace: rotmower + syncPolicy: + automated: + prune: true + syncOptions: + - CreateNamespace=true diff --git a/rotmower/application.yaml b/rotmower/application.yaml new file mode 100644 index 0000000..cb95782 --- /dev/null +++ b/rotmower/application.yaml @@ -0,0 +1,105 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: rotmower + annotations: + kubernetes.io/ingress.class: traefik + traefik.ingress.kubernetes.io/router.entrypoints: websecure + external-dns.alpha.kubernetes.io/target: traefik.k-space.ee +spec: + rules: + - host: rotmower.k-space.ee + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: rotmower + port: + number: 80 + tls: + - hosts: + - "*.k-space.ee" +--- +apiVersion: v1 +kind: Service +metadata: + name: rotmower +spec: + type: ClusterIP + selector: + app: rotmower + ports: + - protocol: TCP + port: 80 + targetPort: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rotmower + namespace: kube-system + labels: + app: rotmower +spec: + replicas: 1 + selector: + matchLabels: + app: rotmower + template: + metadata: + labels: + app: rotmower + spec: + serviceAccountName: rotmower + containers: + - name: rotmower + image: docker.io/codemowers/rotmower:latest + args: + - web + ports: + - containerPort: 8080 + name: http + resources: + requests: + memory: "128Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "500m" +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: rotmower + namespace: rotmower +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: rotmower +rules: +- apiGroups: [""] + resources: ["pods", "secrets"] + verbs: ["get", "list"] +- apiGroups: ["apps"] + resources: ["deployments", "replicasets", "daemonsets", "statefulsets"] + verbs: ["get", "list"] +- apiGroups: ["batch"] + resources: ["jobs", "cronjobs"] + verbs: ["get", "list"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: rotmower +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: rotmower +subjects: +- kind: ServiceAccount + name: rotmower + namespace: rotmower