Files
sealos/controllers/terminal
zzjin 425b110110 1. upgrade to go v1.19 (#1500)
2. update go work, add `controllers/app`
3. update usage `github.com/containers/image/docker/reference`to `v5`
4. fix `controllers/app` module name

Signed-off-by: zzjin <tczzjin@gmail.com>

fix action lint version

Signed-off-by: zzjin <tczzjin@gmail.com>

Fix lint error by replace `os`&`io`

Signed-off-by: zzjin <tczzjin@gmail.com>

fix typos

Signed-off-by: zzjin <tczzjin@gmail.com>

update ci version

Signed-off-by: zzjin <tczzjin@gmail.com>

fix utils move go module requires

Signed-off-by: zzjin <tczzjin@gmail.com>

manual fix fmt bug

Signed-off-by: zzjin <tczzjin@gmail.com>

manual fix goimports

Signed-off-by: zzjin <tczzjin@gmail.com>

rebase lint version

Signed-off-by: zzjin <tczzjin@gmail.com>

update golang-lint

Signed-off-by: zzjin <tczzjin@gmail.com>

Fix lint error by replace `os`&`io` (#1504)

Signed-off-by: zzjin <tczzjin@gmail.com>

manual fix fmt bug (#1505)

manual fix goimports
rebase typo

Signed-off-by: zzjin <tczzjin@gmail.com>

1. fix controller/app workspace usage (#1506)

2. fix `buildah/image/v5` duplicate

Signed-off-by: zzjin <tczzjin@gmail.com>

fix nolint typo

Signed-off-by: zzjin <tczzjin@gmail.com>

fix `go fmt`

Signed-off-by: zzjin <tczzjin@gmail.com>

fix fmt typos

Signed-off-by: zzjin <tczzjin@gmail.com>

feat: add terminal keepalived (#1502)

* feat: add default APIServer address for Terminal CRD

Signed-off-by: gitccl <chenchuanle6@gmail.com>

fix: incompatible with cilium (#1501)

* fix: incompatible with cilium

Signed-off-by: fengxsong <fengxsong@outlook.com>

fix typo by `go fmt` (#1507)

upgrade lint version to support `nolint:all`
fix nolint typo

Signed-off-by: zzjin <tczzjin@gmail.com>

add issue no response auto close it (#1509)

Signed-off-by: fanux <fanux@sealos.io>
2022-08-10 15:27:01 +08:00
..
2022-08-10 13:06:23 +08:00
2022-07-26 11:15:50 +08:00
2022-07-26 11:15:50 +08:00
2022-07-26 11:15:50 +08:00
2022-08-10 15:27:01 +08:00
2022-08-10 15:27:01 +08:00
2022-08-10 15:27:01 +08:00
2022-07-26 11:15:50 +08:00
2022-07-26 11:15:50 +08:00
2022-07-26 11:15:50 +08:00

Terminal CRD

apiVersion: terminal.sealos.io/v1
kind: Terminal
metadata:
  name: terminal-sample
  annotations:
    lastUpdateTime: "2022-08-09T15:22:49+08:00"
spec:
  user: ccl
  token: abcdefg
  apiServer: https://192.168.49.2:8443
  keepalived: 5h
  ttyImage: fanux/fist-tty-tools:v1.0.0
  replicas: 3 

TerminalSpec

  • user(string)

  • token(string)

  • keepalived(string)

  • apiServer(string)

    APIServer address of the cluster. Default to https://apiserver.svc.cluster.local:6443

  • ttyImage(string)

    TTY Image Name.

  • replicas(int32)

    Number of desired pods in Deployment.

Usage

  1. run kubectl apply terminal.yaml
  2. run kubectl get service serviceName to get the nodePort that the service expose. The serviceName is same with the terminal name.
  3. Visit http://ip:port

Keep terminal alived

Client should regularly update the lastUpdateTime in annotations to keep the terminal alived. The Cluster will delete the terminal if client does not update the annotations after the time that specified in keepalived filed in TerminalSpec. The lastUpdateTime follows the RFC3339 format.