-
Notifications
You must be signed in to change notification settings - Fork 59
web_terminal_front #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
web_terminal_front #207
Changes from all commits
553b15d
0a70e05
fa3403c
9aa3901
27f89f2
77ae70b
fe15550
f960315
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: Config | ||
clusters: | ||
- name: karmada-apiserver | ||
cluster: | ||
server: https://karmada-apiserver.karmada-system.svc.cluster.local:5443 | ||
insecure-skip-tls-verify: true | ||
users: | ||
- name: karmada-apiserver | ||
user: | ||
token: "" | ||
contexts: | ||
- name: karmada-apiserver | ||
context: | ||
cluster: karmada-apiserver | ||
user: karmada-apiserver | ||
current-context: karmada-apiserver |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: ttyd-cbf14e3f-f53a-4e0c-99e2-b39ebc0d221d | ||
namespace: karmada-system | ||
spec: | ||
containers: | ||
- image: docker.io/sayem4604/ttyd:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you provide with the original Dockerfile for building |
||
imagePullPolicy: IfNotPresent | ||
livenessProbe: | ||
failureThreshold: 3 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
tcpSocket: | ||
port: 7681 | ||
timeoutSeconds: 1 | ||
name: ttyd-cbf14e3f-f53a-4e0c-99e2-b39ebc0d221d | ||
ports: | ||
- containerPort: 7681 | ||
name: tcp | ||
protocol: TCP | ||
readinessProbe: | ||
failureThreshold: 3 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
tcpSocket: | ||
port: 7681 | ||
timeoutSeconds: 1 | ||
volumeMounts: | ||
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount | ||
name: kube-api-access-qqjwf | ||
readOnly: true | ||
dnsPolicy: ClusterFirst | ||
enableServiceLinks: true | ||
volumes: | ||
- name: kube-api-access-qqjwf | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ import ( | |
"github.com/karmada-io/dashboard/pkg/client" | ||
"github.com/karmada-io/dashboard/pkg/config" | ||
"github.com/karmada-io/dashboard/pkg/environment" | ||
"github.com/karmada-io/dashboard/cmd/terminalsetup" | ||
) | ||
|
||
// NewAPICommand creates a *cobra.Command object with default parameters | ||
|
@@ -109,6 +110,7 @@ func run(ctx context.Context, opts *options.Options) error { | |
client.WithInsecureTLSSkipVerify(opts.SkipKubeApiserverTLSVerify), | ||
) | ||
ensureAPIServerConnectionOrDie() | ||
webterminal() | ||
serve(opts) | ||
config.InitDashboardConfig(client.InClusterClient(), ctx.Done()) | ||
<-ctx.Done() | ||
|
@@ -141,3 +143,10 @@ func serve(opts *options.Options) { | |
klog.Fatal(router.Router().Run(insecureAddress)) | ||
}() | ||
} | ||
|
||
|
||
// Custom function to initialize the application | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 here the logic for terminial is clear |
||
func webterminal() { | ||
terminalsetup.Init()// Call the init function | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will not use the pod file directly, we can integrate the pod file with golang, like followoing:
!!! Above is just an example, don't use it directly in your programe.