Skip to content

Commit a386779

Browse files
committed
fix: fix stability issues
1 parent 7be01f7 commit a386779

File tree

5 files changed

+809
-2
lines changed

5 files changed

+809
-2
lines changed

cmd/krun/ssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type SSHRunner struct {
1313
}
1414

1515
func (s *SSHRunner) Command(addr string, command []string) *exec.Cmd {
16-
cmd := exec.Command("ssh", append([]string{"-o", "StrictHostKeyChecking=no", addr}, command...)...)
16+
cmd := exec.Command("ssh", append([]string{"-o", "StrictHostKeyChecking=no", "-o", "SendEnv=*", addr}, command...)...)
1717
return cmd
1818
}
1919

crds.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.16.4
6+
name: sshauthorizedkeys.ssh-operator.lcpu.dev
7+
spec:
8+
group: ssh-operator.lcpu.dev
9+
names:
10+
kind: SSHAuthorizedKey
11+
listKind: SSHAuthorizedKeyList
12+
plural: sshauthorizedkeys
13+
singular: sshauthorizedkey
14+
scope: Namespaced
15+
versions:
16+
- name: v1alpha1
17+
schema:
18+
openAPIV3Schema:
19+
description: SSHAuthorizedKey is the Schema for the sshauthorizedkeys API.
20+
properties:
21+
apiVersion:
22+
description: |-
23+
APIVersion defines the versioned schema of this representation of an object.
24+
Servers should convert recognized schemas to the latest internal value, and
25+
may reject unrecognized values.
26+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
27+
type: string
28+
kind:
29+
description: |-
30+
Kind is a string value representing the REST resource this object represents.
31+
Servers may infer this from the endpoint the client submits requests to.
32+
Cannot be updated.
33+
In CamelCase.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
35+
type: string
36+
metadata:
37+
type: object
38+
spec:
39+
description: SSHAuthorizedKeySpec defines the desired state of SSHAuthorizedKey.
40+
properties:
41+
key:
42+
description: Key is the SSH public key to be authorized
43+
type: string
44+
required:
45+
- key
46+
type: object
47+
status:
48+
description: SSHAuthorizedKeyStatus defines the observed state of SSHAuthorizedKey.
49+
type: object
50+
type: object
51+
served: true
52+
storage: true
53+
subresources:
54+
status: {}
55+
---
56+
apiVersion: apiextensions.k8s.io/v1
57+
kind: CustomResourceDefinition
58+
metadata:
59+
annotations:
60+
controller-gen.kubebuilder.io/version: v0.16.4
61+
name: sshkeypairs.ssh-operator.lcpu.dev
62+
spec:
63+
group: ssh-operator.lcpu.dev
64+
names:
65+
kind: SSHKeyPair
66+
listKind: SSHKeyPairList
67+
plural: sshkeypairs
68+
singular: sshkeypair
69+
scope: Namespaced
70+
versions:
71+
- name: v1alpha1
72+
schema:
73+
openAPIV3Schema:
74+
description: SSHKeyPair is the Schema for the sshkeypairs API.
75+
properties:
76+
apiVersion:
77+
description: |-
78+
APIVersion defines the versioned schema of this representation of an object.
79+
Servers should convert recognized schemas to the latest internal value, and
80+
may reject unrecognized values.
81+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
82+
type: string
83+
kind:
84+
description: |-
85+
Kind is a string value representing the REST resource this object represents.
86+
Servers may infer this from the endpoint the client submits requests to.
87+
Cannot be updated.
88+
In CamelCase.
89+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
90+
type: string
91+
metadata:
92+
type: object
93+
spec:
94+
description: SSHKeyPairSpec defines the desired state of SSHKeyPair.
95+
properties:
96+
name:
97+
description: |-
98+
Name describes the stored file name of the SSH keys;
99+
for example, if the name is `my-key`, the public key
100+
will be stored in `my-key.pub` and the private key
101+
will be stored in `my-key`.
102+
type: string
103+
privateKey:
104+
type: string
105+
publicKey:
106+
type: string
107+
type:
108+
type: string
109+
type: object
110+
status:
111+
description: SSHKeyPairStatus defines the observed state of SSHKeyPair.
112+
type: object
113+
type: object
114+
served: true
115+
storage: true
116+
subresources:
117+
status: {}

0 commit comments

Comments
 (0)