Running Remotely on k8s
- Dominant language
- C#
- Stars
- 5.1k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I tried to run Remotely on k8s. The webapp works if you create the database before deploying the application and reconfigure the appsettings to 'PostgreSQL'. All the database objects are created and the webapp is active. The only problem is that the webapp is not stateful and therefore you need to login again when the you are connecting to a different pod.
**Describe the solution you'd like**
I would like to see the app to be stateful, so I am able to run it in k8s in a scalable environment.
**Describe alternatives you've considered**
N/A
**Additional context**
```yaml
apiVersion: v1
kind: Namespace
metadata:
name: remotely
---
apiVersion: v1
kind: ConfigMap
metadata:
name: appsettings-remotely
namespace: remotely
labels:
k8s-app: remotely
data:
appsettings.json: |-
{
"ConnectionStrings": {
"PostgreSQL": "Host=database.postgresql.svc.cluster.local;Database=Remotely;Username=postgres;Password=abc123!",
"SQLite": "DataSource=Remotely.db",
"SQLServer": "Server=(localdb)\\mssqllocaldb;Database=Remotely-Server-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information",
"Default": "Information"
}
},
"ApplicationOptions": {
"AllowApiLogin": false,
"BannedDevices": [],
"DataRetentionInDays": 90,
"DBProvider": "PostgreSQL",
"EnableWindowsEventLog": false,
"EnforceAttendedAccess": false,
"ForceClientHttps": false,
"KnownProxies": [],
"MaxConcurrentUpdates": 10,
"MaxOrganizationCount": 1,
"MessageOfTheDay": "",
"RedirectToHttps": true,
"RemoteControlNotifyUser": true,
"RemoteControlRequiresAuthentication": true,
"RemoteControlSessionLimit": 3,
"Require2FA": false,
"SmtpDisplayName": "",
"SmtpEmail": "",
"SmtpHost": "",
"SmtpLocalDomain": "",
"SmtpCheckCertificateRevocation": true,
"SmtpPassword": "",
"SmtpPort": 587,
"SmtpUserName": "",
"Theme": "Dark",
"TrustedCorsOrigins": [],
"UseHsts": false,
"UseHttpLogging": false
}
}
---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: remotely
namespace: remotely
labels:
k8s-app: remotely
spec:
replicas: 3
selector:
matchLabels:
k8s-app: remotely
template:
metadata:
name: remotely
labels:
k8s-app: remotely
spec:
volumes:
- name: remotely-volume
configMap:
name: appsettings-remotely
containers:
- name: remotely
image: 'docker.io/immybot/remotely:latest'
volumeMounts:
- name: remotely-volume
mountPath: /app/appsettings.json
subPath: appsettings.json
imagePullPolicy: Always
ports:
- containerPort: 5000
---
apiVersion: v1
kind: Service
metadata:
name: remotely-svc
namespace: remotely
annotations:
lb.kubesphere.io/v1alpha1: openelb
protocol.openelb.kubesphere.io/v1alpha1: layer2
eip.openelb.kubesphere.io/v1alpha2: eip-k8s-pool
spec:
type: LoadBalancer
selector:
k8s-app: remotely
ports:
- protocol: TCP
port: 5000
targetPort: 5000
externalTrafficPolicy: Cluster
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the Kubernetes manifest and application configuration shown in the issue, then reproduce the login behavior with three replicas and PostgreSQL. Trace how authentication state is stored and shared between pods. Done means users remain logged in when requests reach different pods in a scalable deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, kubernetes, postgresql
- Domain
- authentication, distributed-systems, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100