Compare commits
	
		
			30 commits
		
	
	
		
			db6bdca9ca
			...
			2517f8a30d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 2517f8a30d | ||
| dd6202a26f | |||
| a70b28c905 | |||
| 2b39418104 | |||
| 83b0b4be59 | |||
| 13a005f6b5 | |||
| 440682a8ff | |||
| 7a57c678c2 | |||
| 020d13ada2 | |||
| f709eec878 | |||
| 3c3107b021 | |||
| 9cd9b6fdfe | |||
| c91aa4c42b | |||
| a885f275a6 | |||
| a7597c2b52 | |||
| 187db433de | |||
| 8893c46d72 | |||
| 7f6b2e43f4 | |||
| 6e45ada258 | |||
| eb0b528423 | |||
| 6c29998db6 | |||
| a1c4693c7c | |||
| 1152916cc3 | |||
| 6369b00e24 | |||
| 9d0b2425a9 | |||
| fae5c02ba6 | |||
| 29e535cb29 | |||
| dab777f748 | |||
|  | 8987b8d2a0 | ||
|  | 88f6961dc1 | 
					 22 changed files with 173 additions and 123 deletions
				
			
		|  | @ -24,3 +24,11 @@ patches: | |||
|       version: v1 | ||||
|       kind: ConfigMap | ||||
|       name: argocd-cm | ||||
| 
 | ||||
|   - patch: |- | ||||
|       - op: add | ||||
|         path: /spec/template/spec/containers/0/args/- | ||||
|         value: --insecure=true | ||||
|     target: | ||||
|       kind: Deployment | ||||
|       name: argocd-server | ||||
|  |  | |||
|  | @ -33,8 +33,6 @@ spec: | |||
|           mountPath: /config | ||||
|         - name: series | ||||
|           mountPath: /series | ||||
|         - name: oldseries | ||||
|           mountPath: /oldseries | ||||
|         - name: films | ||||
|           mountPath: /films | ||||
|       volumes: | ||||
|  | @ -44,9 +42,6 @@ spec: | |||
|       - name: series | ||||
|         persistentVolumeClaim: | ||||
|           claimName: smb-series | ||||
|       - name: oldseries | ||||
|         persistentVolumeClaim: | ||||
|           claimName: smb-oldseries | ||||
|       - name: films | ||||
|         persistentVolumeClaim: | ||||
|           claimName: smb-films | ||||
|  |  | |||
|  | @ -12,18 +12,6 @@ spec: | |||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   name: smb-oldseries | ||||
| spec: | ||||
|   accessModes: | ||||
|   - ReadWriteOnce | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: 1Gi | ||||
|   storageClassName: smb-oldseries | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   name: smb-films | ||||
| spec: | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ spec: | |||
|       automountServiceAccountToken: false | ||||
|       containers: | ||||
|         - env: [] | ||||
|           image: grafana/grafana:9.5.3 | ||||
|           image: grafana/grafana:9.5.21 | ||||
|           name: grafana | ||||
|           ports: | ||||
|             - containerPort: 3000 | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ spec: | |||
|         app: lidarr | ||||
|     spec: | ||||
|       containers: | ||||
|       - image: hotio/lidarr:release | ||||
|       - image: hotio/lidarr:release-2.9.6.4552 | ||||
|         name: lidarr | ||||
|         resources: | ||||
|           requests: | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ spec: | |||
|         app: prowlarr | ||||
|     spec: | ||||
|       containers: | ||||
|       - image: hotio/prowlarr:release-1.26.1.4844 | ||||
|       - image: hotio/prowlarr:release-1.31.2.4975 | ||||
|         imagePullPolicy: Always | ||||
|         name: prowlarr | ||||
|         ports: | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ spec: | |||
|         app: radarr | ||||
|     spec: | ||||
|       containers: | ||||
|       - image: hotio/radarr:release-5.18.4.9674 | ||||
|       - image: hotio/radarr:release-5.19.3.9730 | ||||
|         imagePullPolicy: IfNotPresent | ||||
|         name: radarr | ||||
|         ports: | ||||
|  |  | |||
|  | @ -38,7 +38,7 @@ metadata: | |||
|   annotations: | ||||
|     configmap.reloader.stakater.com/reload: "ser2net" | ||||
| spec: | ||||
|   replicas: 1 | ||||
|   replicas: 0 | ||||
|   strategy: | ||||
|     type: Recreate | ||||
|   selector: | ||||
|  |  | |||
|  | @ -4,7 +4,7 @@ metadata: | |||
|   name: smb-films | ||||
| provisioner: smb.csi.k8s.io | ||||
| parameters: | ||||
|   source: "//172.20.0.125/films" | ||||
|   source: "//172.20.0.70/films" | ||||
|   csi.storage.k8s.io/node-stage-secret-name: smb-creds | ||||
|   csi.storage.k8s.io/node-stage-secret-namespace: kube-system | ||||
| reclaimPolicy: Retain | ||||
|  |  | |||
|  | @ -1,17 +0,0 @@ | |||
| apiVersion: storage.k8s.io/v1 | ||||
| kind: StorageClass | ||||
| metadata: | ||||
|   name: smb-oldseries | ||||
| provisioner: smb.csi.k8s.io | ||||
| parameters: | ||||
|   source: "//hp40l/disk2/oldseries" | ||||
|   csi.storage.k8s.io/node-stage-secret-name: smb-creds | ||||
|   csi.storage.k8s.io/node-stage-secret-namespace: kube-system | ||||
| reclaimPolicy: Retain | ||||
| volumeBindingMode: Immediate | ||||
| mountOptions: | ||||
|   - dir_mode=0777 | ||||
|   - file_mode=0777 | ||||
|   - uid=1001 | ||||
|   - gid=1001 | ||||
|   - noperm | ||||
|  | @ -4,7 +4,7 @@ metadata: | |||
|   name: smb-series | ||||
| provisioner: smb.csi.k8s.io | ||||
| parameters: | ||||
|   source: "//hp40l/disk2/series" | ||||
|   source: "//172.20.0.70/series" | ||||
|   csi.storage.k8s.io/node-stage-secret-name: smb-creds | ||||
|   csi.storage.k8s.io/node-stage-secret-namespace: kube-system | ||||
| reclaimPolicy: Retain | ||||
|  |  | |||
							
								
								
									
										13
									
								
								apps-kustomized/tailscale-proxy/configmap.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								apps-kustomized/tailscale-proxy/configmap.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,13 @@ | |||
| apiVersion: v1 | ||||
| kind: ConfigMap | ||||
| metadata: | ||||
|   name: tailscale-script | ||||
| data: | ||||
|   script.sh: | | ||||
|     tailscaled --socks5-server=localhost:1055 --outbound-http-proxy-listen=localhost:1055 --tun=userspace-networking & | ||||
|     tailscale up --authkey=$TS_AUTHKEY --advertise-tags=tag:k8s --hostname k8s-tailscale-proxy & | ||||
|     sleep 3 | ||||
|     echo "Waiting for $COUNTRY to do something" | ||||
|     while ! tailscale exit-node list 2>/dev/null | grep $COUNTRY >/dev/null; do echo -n . ;sleep 5; done | ||||
|     tailscale set --exit-node $(tailscale exit-node list | grep $COUNTRY | cut -f2 -d' ' | shuf | head -n1) | ||||
|     while true; do sleep 1; done | ||||
							
								
								
									
										100
									
								
								apps-kustomized/tailscale-proxy/deploy.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										100
									
								
								apps-kustomized/tailscale-proxy/deploy.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,100 @@ | |||
| apiVersion: apps/v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   labels: | ||||
|     app: tailscale-proxy | ||||
|   name: tailscale-proxy | ||||
| spec: | ||||
|   replicas: 1 | ||||
|   selector: | ||||
|     matchLabels: | ||||
|       app: tailscale-proxy | ||||
|   strategy: | ||||
|     rollingUpdate: | ||||
|       maxSurge: 25% | ||||
|       maxUnavailable: 25% | ||||
|     type: RollingUpdate | ||||
|   template: | ||||
|     metadata: | ||||
|       labels: | ||||
|         app: tailscale-proxy | ||||
|     spec: | ||||
|       containers: | ||||
|       - command: | ||||
|         - /bin/sh | ||||
|         - -c | ||||
|         - 'sh /script/script.sh' | ||||
|         env: | ||||
|         - name: TS_KUBE_SECRET | ||||
|           value: tailscale | ||||
|         - name: COUNTRY | ||||
|           value: Switzerland | ||||
|         - name: TS_AUTHKEY | ||||
|           valueFrom: | ||||
|             secretKeyRef: | ||||
|               key: TS_AUTHKEY | ||||
|               name: tailscale-auth | ||||
|         image: ghcr.io/tailscale/tailscale:v1.80.3 | ||||
|         imagePullPolicy: IfNotPresent | ||||
|         startupProbe: | ||||
|           exec: | ||||
|             command: | ||||
|               - /bin/sh | ||||
|               - -c | ||||
|               - tailscale ip | grep ^100 > /dev/null | ||||
|           periodSeconds: 30 | ||||
|           failureThreshold: 30 | ||||
|         livenessProbe: | ||||
|           exec: | ||||
|             command: | ||||
|               - /bin/sh | ||||
|               - -c | ||||
|               - tailscale ip | grep ^100 > /dev/null | ||||
|           periodSeconds: 30 | ||||
|           failureThreshold: 2 | ||||
|         readinessProbe: | ||||
|           exec: | ||||
|             command: | ||||
|               - /bin/sh | ||||
|               - -c | ||||
|               - http_proxy=127.0.0.1:1055 wget -O- ifconfig.co/country 2>&1 | grep $COUNTRY > /dev/null | ||||
|           initialDelaySeconds: 60 | ||||
|           periodSeconds: 60 | ||||
|           failureThreshold: 3 | ||||
|         name: tailscale | ||||
|         securityContext: | ||||
|           privileged: true | ||||
|           runAsGroup: 0 | ||||
|           runAsUser: 0 | ||||
|         terminationMessagePath: /dev/termination-log | ||||
|         terminationMessagePolicy: File | ||||
|         volumeMounts: | ||||
|         - mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||||
|           name: kube-api-access-t4rzn | ||||
|           readOnly: true | ||||
|         - mountPath: /script | ||||
|           name: script | ||||
|       serviceAccount: tailscale | ||||
|       serviceAccountName: tailscale | ||||
|       volumes: | ||||
|       - name: script | ||||
|         configMap: | ||||
|           name: tailscale-script | ||||
|       - name: kube-api-access-t4rzn | ||||
|         projected: | ||||
|           defaultMode: 420 | ||||
|           sources: | ||||
|           - serviceAccountToken: | ||||
|               expirationSeconds: 3607 | ||||
|               path: token | ||||
|           - configMap: | ||||
|               items: | ||||
|               - key: ca.crt | ||||
|                 path: ca.crt | ||||
|               name: kube-root-ca.crt | ||||
|           - downwardAPI: | ||||
|               items: | ||||
|               - fieldRef: | ||||
|                   apiVersion: v1 | ||||
|                   fieldPath: metadata.namespace | ||||
|                 path: namespace | ||||
							
								
								
									
										4
									
								
								apps-kustomized/tailscale-proxy/sa.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								apps-kustomized/tailscale-proxy/sa.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | |||
| apiVersion: v1 | ||||
| kind: ServiceAccount | ||||
| metadata: | ||||
|   name: tailscale | ||||
							
								
								
									
										15
									
								
								apps-kustomized/tailscale-proxy/svc.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								apps-kustomized/tailscale-proxy/svc.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| apiVersion: v1 | ||||
| kind: Service | ||||
| metadata: | ||||
|   labels: | ||||
|     app: tailscale-proxy | ||||
|     app.kubernetes.io/instance: tailscale-proxy | ||||
|   name: tailscale-proxy | ||||
| spec: | ||||
|   ports: | ||||
|   - port: 1055 | ||||
|     protocol: TCP | ||||
|     targetPort: 1055 | ||||
|   selector: | ||||
|     app: tailscale-proxy | ||||
|   type: LoadBalancer | ||||
|  | @ -14,6 +14,7 @@ spec: | |||
|       labels: | ||||
|         app: qbittorrent | ||||
|     spec: | ||||
|       initContainers: | ||||
|       containers: | ||||
|       - image: qbittorrentofficial/qbittorrent-nox:latest | ||||
|         name: qbittorrent | ||||
|  | @ -34,40 +35,6 @@ spec: | |||
|           value: "/config" | ||||
|         - name: QBT_DOWNLOADS | ||||
|           value: "/downloads" | ||||
|       - env: | ||||
|         - name: TS_KUBE_SECRET | ||||
|           value: tailscale | ||||
|         - name: TS_USERSPACE | ||||
|           value: "false" | ||||
|         - name: TS_OUTBOUND_HTTP_PROXY_LISTEN | ||||
|           value: "localhost:1055" | ||||
|         - name: TS_SOCKS5_SERVER | ||||
|           value: "localhost:1055" | ||||
|         - name: TS_EXTRA_ARGS | ||||
|           value: "--exit-node=100.90.55.121" | ||||
|         - name: TS_AUTHKEY | ||||
|           valueFrom: | ||||
|             secretKeyRef: | ||||
|               key: TS_AUTHKEY | ||||
|               name: tailscale-auth | ||||
|               optional: true | ||||
|         livenessProbe: | ||||
|           exec: | ||||
|             command: | ||||
|             - ping | ||||
|             - -c1 | ||||
|             - 100.100.100.100 | ||||
|           initialDelaySeconds: 120 | ||||
|           periodSeconds: 5 | ||||
|         image: ghcr.io/tailscale/tailscale:latest | ||||
|         name: ts-sidecar | ||||
|         securityContext: | ||||
|           runAsGroup: 1000 | ||||
|           runAsUser: 1000 | ||||
|         volumeMounts: | ||||
|         - mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||||
|           name: kube-api-access-t4rzn | ||||
|           readOnly: true | ||||
|       preemptionPolicy: PreemptLowerPriority | ||||
|       priority: 0 | ||||
|       serviceAccountName: tailscale | ||||
|  |  | |||
|  | @ -24,7 +24,7 @@ spec: | |||
|           value: en | ||||
|         - name: WHOOGLE_CONFIG_SEARCH_LANGUAGE | ||||
|           value: en | ||||
|         image: benbusby/whoogle-search@sha256:ecccdb598f890140bf5564ea0307d3a72871ab3d14fbf22e308b904846e5c590 | ||||
|         image: benbusby/whoogle-search@sha256:5bbb30fc4cf67563b48529c5291813b3d49c290e1e8b9e3aaa5081e9cb6e40c0 | ||||
|         imagePullPolicy: IfNotPresent | ||||
|         livenessProbe: | ||||
|           failureThreshold: 3 | ||||
|  |  | |||
|  | @ -8,4 +8,4 @@ spec: | |||
|   storageClassName: longhorn-fast | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: 128Mi | ||||
|       storage: 1280Mi | ||||
|  |  | |||
|  | @ -14,6 +14,10 @@ spec: | |||
|     targetRevision: 4.12.0 | ||||
|     helm: | ||||
|       parameters: | ||||
|       - name: controller.ingressClassResource.default | ||||
|         value: "true" | ||||
|       - name: controller.config.annotations-risk-level | ||||
|         value: "Critical" | ||||
|       - name: controller.service.type | ||||
|         value: LoadBalancer | ||||
|       - name: controller.allowSnippetAnnotations | ||||
|  |  | |||
|  | @ -1,44 +0,0 @@ | |||
| apiVersion: argoproj.io/v1alpha1 | ||||
| kind: Application | ||||
| metadata: | ||||
|   name: bikerwitch | ||||
|   namespace: argocd | ||||
| spec: | ||||
|   destination: | ||||
|     namespace: bikerwitch | ||||
|     server: https://kubernetes.default.svc | ||||
|   project: default | ||||
|   source: | ||||
|     helm: | ||||
|       parameters: | ||||
|       - name: service.type | ||||
|         value: LoadBalancer | ||||
|       - name: persistence.enabled | ||||
|         value: "true" | ||||
|       - name: persistence.storageClass | ||||
|         value: "longhorn-fast" | ||||
|       - name: image.repository | ||||
|         value: drupal | ||||
|       - name: image.tag | ||||
|         value: 9.4-php8.0-apache | ||||
|       values: |- | ||||
|         ingress: | ||||
|           enabled: true | ||||
|           annotations: | ||||
|             cert-manager.io/cluster-issuer: letsencrypt | ||||
|             kubernetes.io/ingress.class: nginx | ||||
|             external-dns.alpha.kubernetes.io/target: armnleg.martyn.berlin | ||||
|           hosts: | ||||
|           - host: bikerwitch.martyn.berlin | ||||
|             paths: | ||||
|             - / | ||||
|           - host: www.bikerwitch.org.uk | ||||
|             paths: | ||||
|             - / | ||||
|           tls: | ||||
|           - hosts: | ||||
|             - bikerwitch.martyn.berlin | ||||
|             - www.bikerwitch.org.uk | ||||
|     path: apps-helm/drupal | ||||
|     repoURL: https://git.martyn.berlin/martyn/infra4talos.git | ||||
|     targetRevision: HEAD | ||||
|  | @ -25,7 +25,7 @@ spec: | |||
|         value: "false" | ||||
|     chart: longhorn | ||||
|     repoURL: https://charts.longhorn.io | ||||
|     targetRevision: 1.8.0 | ||||
|     targetRevision: 1.8.1 | ||||
|   syncPolicy: | ||||
|     automated: | ||||
|       selfHeal: true | ||||
|  |  | |||
							
								
								
									
										17
									
								
								everything-app/tailscale-proxy.yaml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								everything-app/tailscale-proxy.yaml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,17 @@ | |||
| apiVersion: argoproj.io/v1alpha1 | ||||
| kind: Application | ||||
| metadata: | ||||
|   name: tailscale-proxy | ||||
|   namespace: argocd | ||||
| spec: | ||||
|   destination: | ||||
|     namespace: tailscale-proxy | ||||
|     server: https://kubernetes.default.svc | ||||
|   project: apps | ||||
|   source: | ||||
|     path: apps-kustomized/tailscale-proxy | ||||
|     repoURL: https://git.martyn.berlin/martyn/infra4talos | ||||
|     targetRevision: HEAD | ||||
|   syncPolicy: | ||||
|     automated: | ||||
|       selfHeal: true | ||||
		Loading…
	
	Add table
		
		Reference in a new issue