Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit c3c67cd

Browse files
committed
templates file updated
1 parent 86e6a95 commit c3c67cd

2 files changed

Lines changed: 18 additions & 31 deletions

File tree

cmd/agent-operator/main.go

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,55 +3,41 @@ package main
33
import (
44
"github.com/kloudlite/operator/toolkit/operator"
55

6-
app "github.com/kloudlite/operator/operators/app-n-lambda/controller"
7-
helmCharts "github.com/kloudlite/operator/operators/helm-charts/controller"
8-
lifecycle "github.com/kloudlite/operator/operators/lifecycle/controller"
9-
10-
msvcAndMres "github.com/kloudlite/operator/operators/msvc-n-mres/controller"
11-
networkingv1 "github.com/kloudlite/operator/operators/networking/register"
12-
project "github.com/kloudlite/operator/operators/project/controller"
13-
resourceWatcher "github.com/kloudlite/operator/operators/resource-watcher/controller"
14-
15-
routers "github.com/kloudlite/operator/operators/routers/controller"
16-
17-
serviceIntercept "github.com/kloudlite/operator/operators/service-intercept/controller"
186
workmachine "github.com/kloudlite/operator/operators/workmachine/register"
197
workspace "github.com/kloudlite/operator/operators/workspace/register"
20-
pluginHelmChart "github.com/kloudlite/plugin-helm-chart/kloudlite"
21-
pluginMongoDB "github.com/kloudlite/plugin-mongodb/kloudlite"
228
)
239

2410
func main() {
2511
mgr := operator.New("agent-operator")
2612

2713
// kloudlite resources
28-
app.RegisterInto(mgr)
29-
project.RegisterInto(mgr)
30-
helmCharts.RegisterInto(mgr)
31-
routers.RegisterInto(mgr)
14+
// app.RegisterInto(mgr)
15+
// project.RegisterInto(mgr)
16+
// helmCharts.RegisterInto(mgr)
17+
// routers.RegisterInto(mgr)
3218

3319
// kloudlite managed services
34-
msvcAndMres.RegisterInto(mgr)
20+
// msvcAndMres.RegisterInto(mgr)
3521

3622
// msvcMongo.RegisterInto(mgr)
3723
// msvcRedis.RegisterInto(mgr)
3824
// msvcMysql.RegisterInto(mgr)
3925
// msvcPostgres.RegisterInto(mgr)
4026

41-
lifecycle.RegisterInto(mgr)
27+
// lifecycle.RegisterInto(mgr)
4228

4329
// kloudlite resource status updates
44-
resourceWatcher.RegisterInto(mgr)
30+
// resourceWatcher.RegisterInto(mgr)
4531

4632
// distribution.RegisterInto(mgr)
4733

48-
networkingv1.RegisterInto(mgr)
49-
serviceIntercept.RegisterInto(mgr)
34+
// networkingv1.RegisterInto(mgr)
35+
// serviceIntercept.RegisterInto(mgr)
5036
workmachine.RegisterInto(mgr)
5137
workspace.RegisterInto(mgr)
5238

53-
pluginMongoDB.RegisterInto(mgr)
54-
pluginHelmChart.RegisterInto(mgr)
39+
// pluginMongoDB.RegisterInto(mgr)
40+
// pluginHelmChart.RegisterInto(mgr)
5541

5642
mgr.Start()
5743
}

operators/workspace/internal/templates/deployments/sts.yml.tpl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:
4949

5050
if [ ! -d "/home/kl/.ssh" ]; then
5151
mkdir -p /home/kl/.ssh
52+
chown -R 1000:1000 /home/kl/.ssh
5253
fi
5354
if [ -f "/home/kl/.ssh/authorized_keys" ]; then
5455
if ! cmp -s /tmp/authorized_keys /home/kl/.ssh/authorized_keys; then
@@ -64,14 +65,14 @@ spec:
6465
if [ -f "/home/kl/.ssh/id_rsa" ]; then
6566
if ! cmp -s /tmp/id_rsa /home/kl/.ssh/id_rsa; then
6667
echo "id_rsa file differs, copying new one"
67-
rm /home/kl/.ssh/id_rsa* || true
68+
rm -f /home/kl/.ssh/id_rsa* 2>/dev/null || true
6869
cp /tmp/id_rsa /home/kl/.ssh/id_rsa
6970
cp /tmp/id_rsa.pub /home/kl/.ssh/id_rsa.pub
7071
fi
7172
echo "id_rsa file is up to date"
7273
else
7374
echo "id_rsa file not found, copying new one"
74-
rm /home/kl/.ssh/id_rsa* || true
75+
rm -f /home/kl/.ssh/id_rsa* 2>/dev/null || true
7576
cp /tmp/id_rsa /home/kl/.ssh/id_rsa
7677
cp /tmp/id_rsa.pub /home/kl/.ssh/id_rsa.pub
7778
fi
@@ -149,11 +150,11 @@ spec:
149150

150151
- mountPath: /tmp/id_rsa.pub
151152
name: ssh-keys
152-
subPath: id_rsa.pub
153+
subPath: public_key
153154

154155
- mountPath: /tmp/id_rsa
155156
name: ssh-keys
156-
subPath: id_rsa
157+
subPath: private_key
157158

158159
- mountPath: /nix
159160
name: nix-dir
@@ -162,7 +163,7 @@ spec:
162163
name: containerenv
163164

164165
- mountPath: /home/kl/.ssh/authorized_keys
165-
name: sshkey
166+
name: ssh-keys
166167
subPath: authorized_keys
167168

168169
containers:
@@ -235,7 +236,7 @@ spec:
235236
{{ end }}
236237

237238
volumes:
238-
- name: sshkey
239+
- name: ssh-keys
239240
secret:
240241
secretName: ssh-public-keys
241242

0 commit comments

Comments
 (0)