diff --git a/apps/kubernetes-dashboard/deployment.yaml b/apps/kubernetes-dashboard/deployment.yaml new file mode 100644 index 0000000..fabebe1 --- /dev/null +++ b/apps/kubernetes-dashboard/deployment.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: kubernetes-dashboard + namespace: kubernetes-dashboard +spec: + replicas: 1 + selector: + matchLabels: + k8s-app: kubernetes-dashboard + template: + metadata: + labels: + k8s-app: kubernetes-dashboard + spec: + serviceAccountName: dashboard-admin + containers: + - name: kubernetes-dashboard + image: kubernetesui/dashboard:v2.7.0 + imagePullPolicy: IfNotPresent + args: + - --auto-generate-certificates + ports: + - containerPort: 8443 + livenessProbe: + httpGet: + path: / + port: 8443 + scheme: HTTPS + initialDelaySeconds: 30 + timeoutSeconds: 30 + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1001 + volumeMounts: + - mountPath: /tmp + name: tmp-volume + volumes: + - name: tmp-volume + emptyDir: {} diff --git a/apps/kubernetes-dashboard/ingress.yaml b/apps/kubernetes-dashboard/ingress.yaml new file mode 100644 index 0000000..b4bcef0 --- /dev/null +++ b/apps/kubernetes-dashboard/ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: kubernetes-dashboard + namespace: kubernetes-dashboard + annotations: + nginx.ingress.kubernetes.io/backend-protocol: HTTPS +spec: + ingressClassName: public + rules: + - host: k8s.alexandre-vazquez.internal + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: kubernetes-dashboard + port: + number: 443 + tls: + - hosts: + - k8s.alexandre-vazquez.internal + secretName: k8s-dashboard-tls diff --git a/apps/kubernetes-dashboard/namespace.yaml b/apps/kubernetes-dashboard/namespace.yaml new file mode 100644 index 0000000..7f5196a --- /dev/null +++ b/apps/kubernetes-dashboard/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: kubernetes-dashboard diff --git a/apps/kubernetes-dashboard/rbac.yaml b/apps/kubernetes-dashboard/rbac.yaml new file mode 100644 index 0000000..5722165 --- /dev/null +++ b/apps/kubernetes-dashboard/rbac.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: dashboard-admin + namespace: kubernetes-dashboard +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: dashboard-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: dashboard-admin + namespace: kubernetes-dashboard diff --git a/apps/kubernetes-dashboard/service.yaml b/apps/kubernetes-dashboard/service.yaml new file mode 100644 index 0000000..bf53f86 --- /dev/null +++ b/apps/kubernetes-dashboard/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: kubernetes-dashboard + namespace: kubernetes-dashboard +spec: + ports: + - port: 443 + targetPort: 8443 + selector: + k8s-app: kubernetes-dashboard diff --git a/apps/n8n/values.yaml b/apps/n8n/values.yaml new file mode 100644 index 0000000..061f180 --- /dev/null +++ b/apps/n8n/values.yaml @@ -0,0 +1,56 @@ +defaultLocale: en +timezone: Europe/Berlin + +db: + type: postgresdb + +externalPostgresql: + host: 192.168.1.29 + port: 5432 + database: pgd_n8n + username: pgu_n8n + existingSecret: n8n-postgresql + # secret must have key: postgres-password + +diagnostics: + enabled: false + +versionNotifications: + enabled: false + +main: + extraEnvVars: + N8N_EDITOR_BASE_URL: https://n8n.alexandre-vazquez.cloud + +ingress: + enabled: true + className: public + hosts: + - host: n8n.alexandre-vazquez.cloud + paths: + - path: / + pathType: ImplementationSpecific + +service: + type: ClusterIP + port: 5678 + +image: + repository: n8nio/n8n + tag: "1.111.1" + pullPolicy: IfNotPresent + +podSecurityContext: + fsGroup: 1000 + fsGroupChangePolicy: OnRootMismatch + +securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + privileged: false + readOnlyRootFilesystem: false + runAsGroup: 1000 + runAsNonRoot: true + runAsUser: 1000 diff --git a/apps/xslt-lab/values.yaml b/apps/xslt-lab/values.yaml new file mode 100644 index 0000000..ac6528b --- /dev/null +++ b/apps/xslt-lab/values.yaml @@ -0,0 +1,45 @@ +adsTxt: "google.com, pub-1549720748100858, DIRECT, f08c47fec0942fa0" + +frontend: + backendUrl: https://backend.xsltplayground.com + clarityId: wbgumqnbrz + feedbackWebhookUrl: https://n8n.alexandre-vazquez.cloud/webhook/xslt-feedback + googleAnalyticsId: G-SHRCV4WZP8 + +image: + backend: + repository: ghcr.io/alexandrev/xslt-playground-backend + tag: latest + pullPolicy: Always + frontend: + repository: ghcr.io/alexandrev/xslt-playground-frontend + tag: latest + pullPolicy: Always + +replicaCount: + backend: 1 + frontend: 1 + +hpa: + backend: + enabled: true + minReplicas: 1 + maxReplicas: 5 + targetCPUUtilizationPercentage: 80 + frontend: + enabled: true + minReplicas: 1 + maxReplicas: 5 + targetCPUUtilizationPercentage: 80 + +ingress: + enabled: true + className: public + annotations: + external-dns.alpha.kubernetes.io/target: 192.168.1.10 + nginx.ingress.kubernetes.io/use-forwarded-headers: "true" + hosts: + - host: xsltplayground.com + paths: + - path: / + pathType: Prefix diff --git a/argocd/applications/kubernetes-dashboard.yaml b/argocd/applications/kubernetes-dashboard.yaml new file mode 100644 index 0000000..4dfc730 --- /dev/null +++ b/argocd/applications/kubernetes-dashboard.yaml @@ -0,0 +1,18 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kubernetes-dashboard + namespace: argocd +spec: + project: default + source: + repoURL: https://gitea.alexandre-vazquez.cloud/baphemot/gitops.git + targetRevision: HEAD + path: apps/kubernetes-dashboard + destination: + server: https://kubernetes.default.svc + namespace: kubernetes-dashboard + syncPolicy: + syncOptions: + - CreateNamespace=true + - ServerSideApply=true diff --git a/argocd/applications/n8n.yaml b/argocd/applications/n8n.yaml new file mode 100644 index 0000000..26124a8 --- /dev/null +++ b/argocd/applications/n8n.yaml @@ -0,0 +1,33 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: n8n + namespace: argocd +spec: + project: default + source: + repoURL: https://community-charts.github.io/helm-charts/ + chart: n8n + targetRevision: 1.15.7 + helm: + releaseName: n8n + valueFiles: + - $values/apps/n8n/values.yaml + sources: + - repoURL: https://community-charts.github.io/helm-charts/ + chart: n8n + targetRevision: 1.15.7 + helm: + releaseName: n8n + valueFiles: + - $values/apps/n8n/values.yaml + - repoURL: https://gitea.alexandre-vazquez.cloud/baphemot/gitops.git + targetRevision: HEAD + ref: values + destination: + server: https://kubernetes.default.svc + namespace: n8n + syncPolicy: + syncOptions: + - CreateNamespace=true + - ServerSideApply=true diff --git a/argocd/applications/xslt-lab.yaml b/argocd/applications/xslt-lab.yaml new file mode 100644 index 0000000..617e0b4 --- /dev/null +++ b/argocd/applications/xslt-lab.yaml @@ -0,0 +1,25 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: xslt-lab + namespace: argocd +spec: + project: default + sources: + - repoURL: https://blog.xsltplayground.com + chart: xslt-playground + targetRevision: 0.1.3 + helm: + releaseName: lab + valueFiles: + - $values/apps/xslt-lab/values.yaml + - repoURL: https://gitea.alexandre-vazquez.cloud/baphemot/gitops.git + targetRevision: HEAD + ref: values + destination: + server: https://kubernetes.default.svc + namespace: xslt-lab + syncPolicy: + syncOptions: + - CreateNamespace=true + - ServerSideApply=true