Skip to content

Commit

Permalink
refactor: use standalone customize config file
Browse files Browse the repository at this point in the history
  • Loading branch information
linfan committed May 20, 2022
1 parent a566f57 commit f12f99c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/en-us/reference/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ A: This is caused by the insufficient upper limit of the number of system file h
A: The default `selector` mode of Exchange and the default `auto` mode of Mesh are not compatible with the Istio service mesh. If Istio components are used, please use the `scale` mode of Exchange and the `manual` mode of Mesh.
If the above error still exists after the switch, please check why the `VirtualService` and `DestinationRule` rules on the service cannot select the Shadow Pod created by KT.

#### Q: Encounter error of "unable to do port forwarding: socat not found" when executing `ktctl` command ?
#### Q: Encounter error of "unable to do port forwarding: socat not found" or "ssh: handshake failed: EOF" when executing `ktctl` command ?

A: The port mapping function of `Ktctl` depends on the `socat` tool on the cluster host, please pre-install it on each node of the cluster (Debian/Ubuntu distribution installation command: `apt-get install socat`, CentOS/RedHat distribution installation command: `yum install socat`)

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/reference/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A:这是由于系统文件句柄数上限不足导致的,解决方法参考

A:Exchange默认的`selector`模式和Mesh默认的`auto`模式与Istio服务网格不兼容,如果使用了Istio组件,请使用Exchange的`scale`模式和Mesh的`manual`模式。如果切换后依然存在上述错误,请检查该服务上的VirtualService和DestinationRule规则为何无法选择到KT创建的Shadow Pod。

#### Q:执行`ktctl`命令报错 "unable to do port forwarding: socat not found" ?
#### Q:执行`ktctl`命令报错 "unable to do port forwarding: socat not found" 或 "ssh: handshake failed: EOF"

A:Ktctl的端口映射功能依赖于集群主机上的`socat`工具,请在集群的各个节点上预先安装(Debian/Ubuntu发行版安装命令:`apt-get install socat`,CentOS/RedHat发行版安装命令:`yum install socat`

Expand Down
14 changes: 8 additions & 6 deletions hack/customize.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package hack

var CustomizeKubeConfig = `
PUT YOUR KUBE CONFIG CONTENT HERE
`
import (
_ "embed"
)

var CustomizeKtConfig = `
PUT YOUR KT CONFIG CONTENT HERE
`
//go:embed kube/config
var CustomizeKubeConfig string

//go:embed kt/config
var CustomizeKtConfig string
1 change: 1 addition & 0 deletions hack/kt/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUT YOUR KT CONFIG CONTENT HERE
1 change: 1 addition & 0 deletions hack/kube/config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUT YOUR KUBE CONFIG CONTENT HERE

0 comments on commit f12f99c

Please sign in to comment.