installer: migrate apps to cuelang
diff --git a/charts/auth/templates/ui.yaml b/charts/auth/templates/ui.yaml
index c9e9416..ed8ba7b 100644
--- a/charts/auth/templates/ui.yaml
+++ b/charts/auth/templates/ui.yaml
@@ -71,8 +71,8 @@
     spec:
       containers:
       - name: server
-        image: giolekva/auth-ui:latest
-        imagePullPolicy: Always
+        image: {{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }}
+        imagePullPolicy: {{ .Values.ui.image.pullPolicy }}
         env:
         - name: KRATOS_PUBLIC_URL
           value: "https://accounts.{{ .Values.ui.domain }}"
diff --git a/charts/dns-ns-controller/templates/install.yaml b/charts/dns-ns-controller/templates/install.yaml
index 555b170..d6f9d36 100644
--- a/charts/dns-ns-controller/templates/install.yaml
+++ b/charts/dns-ns-controller/templates/install.yaml
@@ -245,7 +245,7 @@
         - --upstream=http://127.0.0.1:8080/
         - --logtostderr=true
         - --v=0
-        image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
+        image: {{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}
         name: kube-rbac-proxy
         ports:
         - containerPort: 8443
diff --git a/charts/dns-ns-controller/values.yaml b/charts/dns-ns-controller/values.yaml
index 824e7a8..9ed3ae2 100644
--- a/charts/dns-ns-controller/values.yaml
+++ b/charts/dns-ns-controller/values.yaml
@@ -2,6 +2,11 @@
   repository: giolekva/dns-ns-controller
   tag: latest
   pullPolicy: Always
+kubeRBACProxy:
+  image:
+    repository: gcr.io/kubebuilder/kube-rbac-proxy
+    tag: v0.13.0
+    pullPolicy: IfNotPresent
 installCRDs: false
 volume:
   claimName: data
diff --git a/charts/headscale-controller/templates/crds.yaml b/charts/headscale-controller/templates/crds.yaml
new file mode 100644
index 0000000..4dc4db0
--- /dev/null
+++ b/charts/headscale-controller/templates/crds.yaml
@@ -0,0 +1,57 @@
+{{ if .Values.installCRDs }}
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+  annotations:
+    controller-gen.kubebuilder.io/version: v0.9.2
+  creationTimestamp: null
+  name: headscaleusers.headscale.dodo.cloud
+spec:
+  group: headscale.dodo.cloud
+  names:
+    kind: HeadscaleUser
+    listKind: HeadscaleUserList
+    plural: headscaleusers
+    singular: headscaleuser
+  scope: Namespaced
+  versions:
+  - name: v1
+    schema:
+      openAPIV3Schema:
+        description: HeadscaleUser is the Schema for the headscaleusers API
+        properties:
+          apiVersion:
+            description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
+            type: string
+          kind:
+            description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
+            type: string
+          metadata:
+            type: object
+          spec:
+            description: HeadscaleUserSpec defines the desired state of HeadscaleUser
+            properties:
+              headscaleAddress:
+                type: string
+              name:
+                type: string
+              preAuthKey:
+                properties:
+                  enabled:
+                    type: boolean
+                  secretName:
+                    type: string
+                type: object
+            type: object
+          status:
+            description: HeadscaleUserStatus defines the observed state of HeadscaleUser
+            properties:
+              ready:
+                type: boolean
+            type: object
+        type: object
+    served: true
+    storage: true
+    subresources:
+      status: {}
+{{ end }}
diff --git a/charts/headscale-controller/templates/install.yaml b/charts/headscale-controller/templates/install.yaml
index e145667..7c2c129 100644
--- a/charts/headscale-controller/templates/install.yaml
+++ b/charts/headscale-controller/templates/install.yaml
@@ -1,59 +1,3 @@
-apiVersion: apiextensions.k8s.io/v1
-kind: CustomResourceDefinition
-metadata:
-  annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
-  name: headscaleusers.headscale.dodo.cloud
-spec:
-  group: headscale.dodo.cloud
-  names:
-    kind: HeadscaleUser
-    listKind: HeadscaleUserList
-    plural: headscaleusers
-    singular: headscaleuser
-  scope: Namespaced
-  versions:
-  - name: v1
-    schema:
-      openAPIV3Schema:
-        description: HeadscaleUser is the Schema for the headscaleusers API
-        properties:
-          apiVersion:
-            description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
-            type: string
-          kind:
-            description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
-            type: string
-          metadata:
-            type: object
-          spec:
-            description: HeadscaleUserSpec defines the desired state of HeadscaleUser
-            properties:
-              headscaleAddress:
-                type: string
-              name:
-                type: string
-              preAuthKey:
-                properties:
-                  enabled:
-                    type: boolean
-                  secretName:
-                    type: string
-                type: object
-            type: object
-          status:
-            description: HeadscaleUserStatus defines the observed state of HeadscaleUser
-            properties:
-              ready:
-                type: boolean
-            type: object
-        type: object
-    served: true
-    storage: true
-    subresources:
-      status: {}
----
 apiVersion: v1
 kind: ServiceAccount
 metadata:
@@ -281,7 +225,7 @@
         - --upstream=http://127.0.0.1:8080/
         - --logtostderr=true
         - --v=0
-        image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
+        image: {{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}
         name: kube-rbac-proxy
         ports:
         - containerPort: 8443
@@ -305,8 +249,8 @@
         - --leader-elect
         command:
         - /manager
-        image: giolekva/headscale-controller:latest
-        imagePullPolicy: Always
+        image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
         livenessProbe:
           httpGet:
             path: /healthz
diff --git a/charts/headscale-controller/values.yaml b/charts/headscale-controller/values.yaml
index 13dc30e..2cb2dfc 100644
--- a/charts/headscale-controller/values.yaml
+++ b/charts/headscale-controller/values.yaml
@@ -2,4 +2,9 @@
   repository: giolekva/headscale-controller
   tag: latest
   pullPolicy: Always
+kubeRBACProxy:
+  image:
+    repository: "gcr.io/kubebuilder/kube-rbac-proxy"
+    tag: v0.13.0
+    pullPolicy: IfNotPresent
 installCRDs: false
diff --git a/charts/jellyfin/templates/pv.yaml b/charts/jellyfin/templates/pv.yaml
index a0eef6f..311170f 100644
--- a/charts/jellyfin/templates/pv.yaml
+++ b/charts/jellyfin/templates/pv.yaml
@@ -17,7 +17,7 @@
     readOnly: false
     volumeHandle: {{ .Values.pcloudInstanceId }}-qbittorrent-data
     volumeAttributes:
-      source: "//samba.lekva-app-torrent.svc.cluster.local/share"
+      source: "//samba.{{ .Values.namespacePrefix }}app-torrent.svc.cluster.local/share"
     nodeStageSecretRef:
       name: qbittorrent-samba-creds
-      namespace: lekva-app-jellyfin
+      namespace: {{ .Release.Namespace }}
diff --git a/charts/oauth2-client/.helmignore b/charts/oauth2-client/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/oauth2-client/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/charts/oauth2-client/Chart.yaml b/charts/oauth2-client/Chart.yaml
new file mode 100644
index 0000000..535f1bc
--- /dev/null
+++ b/charts/oauth2-client/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: oauth2-client
+description: A Helm chart for creating PCloud OAuth2 clients
+type: application
+version: 0.0.1
+appVersion: "0.0.1"
diff --git a/charts/oauth2-client/templates/oauth2-client.yaml b/charts/oauth2-client/templates/oauth2-client.yaml
new file mode 100644
index 0000000..81b7d96
--- /dev/null
+++ b/charts/oauth2-client/templates/oauth2-client.yaml
@@ -0,0 +1,17 @@
+apiVersion: hydra.ory.sh/v1alpha1
+kind: OAuth2Client
+metadata:
+  name: {{ .Values.name }}
+  namespace: {{ .Release.Namespace }}
+spec:
+  secretName: {{ .Values.secretName }}
+  grantTypes: {{ .Values.grantTypes }}
+  responseTypes: {{ .Values.reponseTypes }}
+  scope: {{ .Values.scope }}
+  redirectUris: {{ .Values.redirectUris }}
+  hydraAdmin:
+    endpoint: /admin/clients
+    forwardedProto: https
+    port: 80
+    url: {{ .Values.hydraAdmin }}
+  tokenEndpointAuthMethod: {{ .Values.tokenEndpointAuthMethod }}
diff --git a/charts/oauth2-client/values.yaml b/charts/oauth2-client/values.yaml
new file mode 100644
index 0000000..d9df00e
--- /dev/null
+++ b/charts/oauth2-client/values.yaml
@@ -0,0 +1,8 @@
+name: oauth2-client
+secretName: oauth2-credentials
+grantTypes: []
+responseTypes: []
+scope: ""
+redirectUris: []
+hydraAdmin: ""
+tokenEndpointAuthMethod: ""
diff --git a/charts/qbittorrent/templates/deploy.yaml b/charts/qbittorrent/templates/deploy.yaml
index 7ae0218..562139e 100644
--- a/charts/qbittorrent/templates/deploy.yaml
+++ b/charts/qbittorrent/templates/deploy.yaml
@@ -76,8 +76,8 @@
         - name: data
           mountPath: /downloads
           readOnly: false
-      nodeSelector:
-       "kubernetes.io/hostname": rpi05
+      # nodeSelector:
+      #  "kubernetes.io/hostname": rpi05
         # command:
         # - torrent
         # - --port=8080
diff --git a/charts/resource-renderer-controller/templates/install.yaml b/charts/resource-renderer-controller/templates/install.yaml
index 5a30ae1..64af9de 100644
--- a/charts/resource-renderer-controller/templates/install.yaml
+++ b/charts/resource-renderer-controller/templates/install.yaml
@@ -1,56 +1,3 @@
-apiVersion: apiextensions.k8s.io/v1
-kind: CustomResourceDefinition
-metadata:
-  annotations:
-    controller-gen.kubebuilder.io/version: v0.9.2
-  creationTimestamp: null
-  name: resourcerenderers.dodo.cloud.dodo.cloud
-spec:
-  group: dodo.cloud.dodo.cloud
-  names:
-    kind: ResourceRenderer
-    listKind: ResourceRendererList
-    plural: resourcerenderers
-    singular: resourcerenderer
-  scope: Namespaced
-  versions:
-  - name: v1
-    schema:
-      openAPIV3Schema:
-        description: ResourceRenderer is the Schema for the resourcerenderers API
-        properties:
-          apiVersion:
-            description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
-            type: string
-          kind:
-            description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
-            type: string
-          metadata:
-            type: object
-          spec:
-            description: ResourceRendererSpec defines the desired state of ResourceRenderer
-            properties:
-              resourceTemplate:
-                type: string
-              secretName:
-                description: Foo is an example field of ResourceRenderer. Edit resourcerenderer_types.go to remove/update
-                type: string
-              secretNamespace:
-                type: string
-            type: object
-          status:
-            description: ResourceRendererStatus defines the observed state of ResourceRenderer
-            properties:
-              ready:
-                description: 'INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file'
-                type: boolean
-            type: object
-        type: object
-    served: true
-    storage: true
-    subresources:
-      status: {}
----
 apiVersion: v1
 kind: ServiceAccount
 metadata:
@@ -290,7 +237,7 @@
         - --upstream=http://127.0.0.1:8080/
         - --logtostderr=true
         - --v=0
-        image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
+        image: {{ .Values.kubeRBACProxy.image.repository }}:{{ .Values.kubeRBACProxy.image.tag }}
         name: kube-rbac-proxy
         ports:
         - containerPort: 8443
@@ -314,8 +261,8 @@
         - --leader-elect
         command:
         - /manager
-        image: giolekva/resource-renderer-controller:latest
-        imagePullPolicy: Always
+        image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
         livenessProbe:
           httpGet:
             path: /healthz
diff --git a/charts/resource-renderer-controller/values.yaml b/charts/resource-renderer-controller/values.yaml
index 64c0347..d424d0a 100644
--- a/charts/resource-renderer-controller/values.yaml
+++ b/charts/resource-renderer-controller/values.yaml
@@ -1,5 +1,10 @@
 image:
-  repository: giolekva/rpuppy-arm
+  repository: "giolekva/resource-renderer-controller"
   tag: latest
   pullPolicy: Always
+kubeRBACProxy:
+  image:
+    repository: "gcr.io/kubebuilder/kube-rbac-proxy"
+    tag: v0.13.0
+    pullPolicy: IfNotPresent
 installCRDs: false