diff --git a/apps/omni-tools.yaml b/apps/omni-tools.yaml new file mode 100644 index 0000000..698fb78 --- /dev/null +++ b/apps/omni-tools.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: omni-tools + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + + source: + repoURL: http://git.home.lan/jay/k8s-gitops.git + targetRevision: main + path: apps/omni-tools + + destination: + server: https://kubernetes.default.svc + namespace: omni-tools + + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/apps/omni-tools/deployment.yaml b/apps/omni-tools/deployment.yaml new file mode 100644 index 0000000..4c8d018 --- /dev/null +++ b/apps/omni-tools/deployment.yaml @@ -0,0 +1,77 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: omni-tools + namespace: omni-tools + labels: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools +spec: + replicas: 1 + revisionHistoryLimit: 3 + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + selector: + matchLabels: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools + template: + metadata: + labels: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools + spec: + automountServiceAccountToken: false + securityContext: + seccompProfile: + type: RuntimeDefault + containers: + - name: omni-tools + image: iib0011/omni-tools:0.6.0 + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 80 + protocol: TCP + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + add: + - CHOWN + - NET_BIND_SERVICE + - SETGID + - SETUID + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 250m + memory: 128Mi + startupProbe: + httpGet: + path: / + port: http + failureThreshold: 30 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 2 + periodSeconds: 10 + timeoutSeconds: 3 + failureThreshold: 3 + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 20 + periodSeconds: 30 + timeoutSeconds: 3 + failureThreshold: 3 diff --git a/apps/omni-tools/ingress.yaml b/apps/omni-tools/ingress.yaml new file mode 100644 index 0000000..832f42a --- /dev/null +++ b/apps/omni-tools/ingress.yaml @@ -0,0 +1,28 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: omni-tools + namespace: omni-tools + labels: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools + annotations: + cert-manager.io/cluster-issuer: home-lab-ca + nginx.ingress.kubernetes.io/ssl-redirect: "true" +spec: + ingressClassName: nginx + tls: + - hosts: + - tools.home.lan + secretName: tools-home-lan-tls + rules: + - host: tools.home.lan + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: omni-tools + port: + name: http diff --git a/apps/omni-tools/kustomization.yaml b/apps/omni-tools/kustomization.yaml new file mode 100644 index 0000000..c5d432d --- /dev/null +++ b/apps/omni-tools/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: omni-tools + +resources: + - namespace.yaml + - deployment.yaml + - service.yaml + - ingress.yaml diff --git a/apps/omni-tools/namespace.yaml b/apps/omni-tools/namespace.yaml new file mode 100644 index 0000000..679f017 --- /dev/null +++ b/apps/omni-tools/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: omni-tools + labels: + app.kubernetes.io/name: omni-tools diff --git a/apps/omni-tools/service.yaml b/apps/omni-tools/service.yaml new file mode 100644 index 0000000..97d7fa8 --- /dev/null +++ b/apps/omni-tools/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: omni-tools + namespace: omni-tools + labels: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: omni-tools + app.kubernetes.io/instance: omni-tools + ports: + - name: http + port: 80 + targetPort: http + protocol: TCP