diff --git a/clusters/artemis/apps/kustomization.yaml b/clusters/artemis/apps/kustomization.yaml index 4772d92..89c2af7 100644 --- a/clusters/artemis/apps/kustomization.yaml +++ b/clusters/artemis/apps/kustomization.yaml @@ -18,3 +18,4 @@ resources: - immich - digital-garden - nextcloud + - osx diff --git a/clusters/artemis/apps/osx/app-project.yaml b/clusters/artemis/apps/osx/app-project.yaml new file mode 100644 index 0000000..9c0668c --- /dev/null +++ b/clusters/artemis/apps/osx/app-project.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + name: osx +spec: + description: osx container to proxy shortcuts + sourceRepos: + - '*' + sourceNamespaces: + - '*' + destinations: + - namespace: 'osx' + server: '*' + clusterResourceWhitelist: + - group: '*' + kind: '*' diff --git a/clusters/artemis/apps/osx/application.yaml b/clusters/artemis/apps/osx/application.yaml new file mode 100644 index 0000000..942bde3 --- /dev/null +++ b/clusters/artemis/apps/osx/application.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: osx + namespace: osx + labels: + platform.dgse.cloud/cluster: artemis + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: osx + source: + repoURL: 'https://git.dgse.cloud/DGSE/kubernetes.git' + path: manifests/artemis/osx + targetRevision: main + destination: + namespace: osx + name: in-cluster + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true + selfHeal: true diff --git a/clusters/artemis/apps/osx/kustomization.yaml b/clusters/artemis/apps/osx/kustomization.yaml new file mode 100644 index 0000000..f9b2a4b --- /dev/null +++ b/clusters/artemis/apps/osx/kustomization.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - app-project.yaml + - application.yaml diff --git a/manifests/artemis/osx/deployment.yaml b/manifests/artemis/osx/deployment.yaml new file mode 100644 index 0000000..89b1522 --- /dev/null +++ b/manifests/artemis/osx/deployment.yaml @@ -0,0 +1,56 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: macos + labels: + name: macos +spec: + replicas: 1 + selector: + matchLabels: + app: macos + template: + metadata: + labels: + app: macos + spec: + containers: + - name: macos + image: dockurr/macos + env: + - name: VERSION + value: "14" + - name: DISK_SIZE + value: "64G" + ports: + - containerPort: 8006 + name: http + protocol: TCP + - containerPort: 5900 + name: vnc + protocol: TCP + securityContext: + capabilities: + add: + - NET_ADMIN + privileged: true + volumeMounts: + - mountPath: /storage + name: storage + - mountPath: /dev/kvm + name: dev-kvm + - mountPath: /dev/net/tun + name: dev-tun + terminationGracePeriodSeconds: 120 + volumes: + - name: storage + persistentVolumeClaim: + claimName: macos-pvc + - hostPath: + path: /dev/kvm + name: dev-kvm + - hostPath: + path: /dev/net/tun + type: CharDevice + name: dev-tun diff --git a/manifests/artemis/osx/ingress.yaml b/manifests/artemis/osx/ingress.yaml new file mode 100644 index 0000000..9cf8b77 --- /dev/null +++ b/manifests/artemis/osx/ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt + name: osx-ingress +spec: + rules: + - host: osx.dgse.cloud + http: + paths: + - backend: + service: + name: macos + port: + number: 8006 + path: / + pathType: Prefix + tls: + - hosts: + - osx.dgse.cloud + secretName: letsencrypt diff --git a/manifests/artemis/osx/kustomization.yaml b/manifests/artemis/osx/kustomization.yaml new file mode 100644 index 0000000..5d31ff9 --- /dev/null +++ b/manifests/artemis/osx/kustomization.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - service.yaml + - deployment.yaml + - pvc.yaml diff --git a/manifests/artemis/osx/pvc.yaml b/manifests/artemis/osx/pvc.yaml new file mode 100644 index 0000000..6cb684a --- /dev/null +++ b/manifests/artemis/osx/pvc.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: macos-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 64Gi diff --git a/manifests/artemis/osx/service.yaml b/manifests/artemis/osx/service.yaml new file mode 100644 index 0000000..930dee2 --- /dev/null +++ b/manifests/artemis/osx/service.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: macos +spec: + internalTrafficPolicy: Cluster + ports: + - name: http + port: 8006 + protocol: TCP + targetPort: 8006 + - name: vnc + port: 5900 + protocol: TCP + targetPort: 5900 + selector: + app: macos + type: ClusterIP