Skip to content

Commit debeb3d

Browse files
committed
fix: fix onex installation in k8s
1 parent aa43279 commit debeb3d

File tree

10 files changed

+20
-9
lines changed

10 files changed

+20
-9
lines changed

configs/appconfig/onex-miner-controller.config.tmpl.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ leaderElection:
1111
leaderElect: false
1212
metricsBindAddress: 0.0.0.0:${ONEX_MINER_CONTROLLER_METRICS_PORT}
1313
healthzBindAddress: 0.0.0.0:${ONEX_MINER_CONTROLLER_HEALTHZ_PORT}
14+
providerKubeconfig: /opt/onex/etc/config.kind
1415
dryRun: true
1516
redis:
1617
addr: ${ONEX_REDIS_ADDR}

configs/appconfig/onex-minerset-controller.config.tmpl.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# this file is https://github.com/superproj/onex.
55
#
66

7-
87
apiVersion: minersetcontroller.config.onex.io/v1beta1
98
kind: MinerSetControllerConfiguration
109
leaderElection:

docs/guide/zh-CN/installation/onex/onex-toyblc/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $ curl -H "Host: onex.toyblc.superproj.com" http://127.0.0.1:18080/v1/peers
3535
$ curl -H "Host: onex.toyblc.superproj.com" http://127.0.0.1:18080/v1/blocks
3636
```
3737

38-
> curl http://genesis.kube-system.svc.onex.io:8080/v1/blocks
38+
> curl http://genesis.kube-system.svc.superproj.com:8080/v1/blocks
3939
4040
### 3. 挖矿
4141

internal/pkg/util/miner/miner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func IsMinerReady(m *v1beta1.Miner) bool {
9191
}
9292

9393
func ChainDNSServiceNameFromMiner(namespace, name string) string {
94-
return fmt.Sprintf("%s.%s.svc.onex.io", name, namespace)
94+
return fmt.Sprintf("%s.%s.svc.superproj.com", name, namespace)
9595
}
9696

9797
func GenesisDNSServiceNameFromMiner(name string) string {

manifests/env.k8s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ONEX_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
44

55
# If deployed in a kubernetes cluster with cluster domain as
66
# cluster.local, please set KUBERNETES_CLUSTER_DOMAIN to cluster.local.
7-
export KUBERNETES_CLUSTER_DOMAIN=${KUBERNETES_CLUSTER_DOMAIN:-onex.io}
7+
export KUBERNETES_CLUSTER_DOMAIN=${KUBERNETES_CLUSTER_DOMAIN:-superproj.com}
88

99
export ONEX_MYSQL_HOST=mariadb.infra.svc.${KUBERNETES_CLUSTER_DOMAIN}
1010
export ONEX_REDIS_HOST=redis.infra.svc.${KUBERNETES_CLUSTER_DOMAIN}

manifests/installation/bare/onex/onex-apiserver/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ spec:
4141
- args:
4242
- --secure-port=52443
4343
- --bind-address=0.0.0.0
44-
- --etcd-servers=etcd.infra.svc.onex.io:2379
44+
- --etcd-servers=etcd.infra.svc.superproj.com:2379
4545
- --client-ca-file=/opt/onex/etc/cert/ca.pem
4646
- --tls-cert-file=/opt/onex/etc/cert/onex-apiserver.pem
4747
- --tls-private-key-file=/opt/onex/etc/cert/onex-apiserver-key.pem

manifests/installation/bare/onex/onex-apiserver/ingressroute.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
# this file is https://github.com/superproj/onex.
55
#
66

7+
apiVersion: traefik.io/v1alpha1
8+
kind: ServersTransport
9+
metadata:
10+
name: onex-apiserver-transport
11+
spec:
12+
serverName: onex.apiserver.superproj.com
13+
insecureSkipVerify: false
14+
rootCAsSecrets:
15+
- root-ca-secret
16+
---
717
apiVersion: traefik.io/v1alpha1
818
kind: IngressRoute
919
metadata:
@@ -18,5 +28,6 @@ spec:
1828
- kind: Service
1929
name: onex-apiserver
2030
port: 52443
31+
serversTransport: onex-apiserver-transport
2132
tls:
2233
secretName: onex-apiserver

manifests/installation/kubernetes/kind-onex.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ kubeadmConfigPatches:
4242
- |
4343
kind: ClusterConfiguration
4444
networking:
45-
dnsDomain: "onex.io"
45+
dnsDomain: "superproj.com"
4646
- |
4747
apiVersion: kubelet.config.k8s.io/v1beta1
4848
kind: KubeletConfiguration

manifests/installation/storage/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 设置集群的域名
2-
clusterDomain: onex.io
2+
clusterDomain: superproj.com
33
# 镜像相关配置
44
image:
55
# 镜像仓库的地址

scripts/gen-certs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ source "${ONEX_ROOT}/scripts/lib/init.sh"
1414
# OUT_DIR can come in from the Makefile, so honor it.
1515
readonly LOCAL_OUTPUT_ROOT="${ONEX_ROOT}/${OUT_DIR:-_output}"
1616
readonly LOCAL_OUTPUT_CAPATH="${LOCAL_OUTPUT_ROOT}/cert"
17-
readonly ONEX_DOMAIN="onex.io"
17+
readonly PROJ_DOMAIN="superproj.com"
1818
# To ensure that access is available in the default k8s cluster (with cluster domain as cluster.local).
1919
readonly DEFAULT_KUBERNETES_CLUSTER_DOMAIN="cluster.local"
2020

@@ -96,7 +96,7 @@ EOF
9696

9797
#echo "Generate "${prefix}" certificates..."
9898
echo '{"CN":"'"${prefix}"'","hosts":[],"key":{"algo":"rsa","size":2048},"names":[{"C":"CN","ST":"Shenzhen","L":"Shenzhen","O":"tencent","OU":"'"${prefix}"'"}]}' \
99-
| ${CFSSL_BIN} gencert -hostname="${CERT_HOSTNAME},${prefix/-/.}.${DEFAULT_KUBERNETES_CLUSTER_DOMAIN},${prefix/-/.}.${ONEX_DOMAIN}" -ca=ca.pem -ca-key=ca-key.pem \
99+
| ${CFSSL_BIN} gencert -hostname="${CERT_HOSTNAME},${prefix/-/.}.${DEFAULT_KUBERNETES_CLUSTER_DOMAIN},${prefix/-/.}.${PROJ_DOMAIN}" -ca=ca.pem -ca-key=ca-key.pem \
100100
-config=ca-config.json -profile=node - | ${CFSSLJSON_BIN} -bare "${prefix}"
101101

102102
# the popd will access `directory stack`, no `real` parameters is actually needed

0 commit comments

Comments
 (0)