153 lines
3.5 KiB
YAML
153 lines
3.5 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: sshwifty-config
|
|
namespace: sshwifty
|
|
data:
|
|
sshwifty.conf.json: |
|
|
{
|
|
"SharedKey": "4IsTheMindKiller",
|
|
"DialTimeout": 10,
|
|
"Servers": [
|
|
{
|
|
"ListenInterface": "0.0.0.0",
|
|
"ListenPort": 8182,
|
|
"InitialTimeout": 3,
|
|
"ReadTimeout": 60,
|
|
"WriteTimeout": 60,
|
|
"HeartbeatTimeout": 20,
|
|
"ReadDelay": 10,
|
|
"WriteDelay": 10
|
|
}
|
|
],
|
|
"Presets": [
|
|
{
|
|
"Title": "hyper1",
|
|
"Type": "SSH",
|
|
"Host": "hyper1.undercloud.local:22",
|
|
"TabColor": "112233",
|
|
"Meta": {
|
|
"User": "root",
|
|
"Password": "4IsTheMindKiller"
|
|
}
|
|
},
|
|
{
|
|
"Title": "hyper2",
|
|
"Type": "SSH",
|
|
"Host": "hyper2.undercloud.local:22",
|
|
"TabColor": "112233",
|
|
"Meta": {
|
|
"User": "root",
|
|
"Authentication": "Password",
|
|
"Password": "4IsTheMindKiller"
|
|
}
|
|
},
|
|
{
|
|
"Title": "build-node",
|
|
"Type": "SSH",
|
|
"Host": "build-node.undercloud.local:22",
|
|
"TabColor": "112233",
|
|
"Meta": {
|
|
"User": "root",
|
|
"Authentication": "Password",
|
|
"Password": "23esa1b"
|
|
}
|
|
},
|
|
{
|
|
"Title": "control-plane1",
|
|
"Type": "SSH",
|
|
"Host": "control-plane1.undercloud.local:22",
|
|
"TabColor": "112233",
|
|
"Meta": {
|
|
"User": "core",
|
|
"Authentication": "Private Key",
|
|
"Private Key": "file:///config/id_ed25519"
|
|
|
|
}
|
|
}
|
|
],
|
|
"OnlyAllowPresetRemotes": false
|
|
}
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: ssh-key
|
|
namespace: sshwifty
|
|
data:
|
|
id_ed25519: |
|
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
|
QyNTUxOQAAACD5sHjDsr8ZemeVMzCiySNb2vsPCJU5dLQBkJIxnm4h2wAAAKBLYJ18S2Cd
|
|
fAAAAAtzc2gtZWQyNTUxOQAAACD5sHjDsr8ZemeVMzCiySNb2vsPCJU5dLQBkJIxnm4h2w
|
|
AAAECKxXExaNu1eTO7kcxGJdl+CV50jnVAKCY4AySb1tYsGfmweMOyvxl6Z5UzMKLJI1va
|
|
+w8IlTl0tAGQkjGebiHbAAAAHHNlYmFzdGlhbkB1bmRlcmNsb3VkLWZsYXRjYXIB
|
|
-----END OPENSSH PRIVATE KEY-----
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sshwifty
|
|
namespace: sshwifty
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sshwifty
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sshwifty
|
|
spec:
|
|
containers:
|
|
- name: sshwifty
|
|
image: niruix/sshwifty:latest
|
|
ports:
|
|
- containerPort: 8182
|
|
env:
|
|
- name: SSHWIFTY_CONFIG
|
|
value: "/config/sshwifty.conf.json"
|
|
- name: SSHWIFTY_SHAREDKEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: pass
|
|
key: pw
|
|
optional: false
|
|
volumeMounts:
|
|
- name: sshwifty-config
|
|
mountPath: "/config"
|
|
readOnly: true
|
|
- name: ssh-key
|
|
mountPath: "/config"
|
|
readOnly: true
|
|
volumes:
|
|
- name: sshwifty-config
|
|
configMap:
|
|
name: sshwifty-config
|
|
- name: ssh-key
|
|
configMap:
|
|
name: ssh-key
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: sshwifty
|
|
namespace: sshwifty
|
|
spec:
|
|
internalTrafficPolicy: Cluster
|
|
ipFamilies:
|
|
- IPv6
|
|
- IPv4
|
|
ipFamilyPolicy: PreferDualStack
|
|
#ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
protocol: TCP
|
|
targetPort: 8182
|
|
selector:
|
|
app: sshwifty
|
|
#sessionAffinity: None
|
|
type: ClusterIP
|