mirror of
https://github.com/singchia/frontier.git
synced 2025-09-26 20:31:25 +08:00
k8s: update crd and it's example plus version updated
This commit is contained in:
71
README.md
71
README.md
@@ -5,6 +5,7 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
[](https://goreportcard.com/report/github.com/singchia/frontier)
|
[](https://goreportcard.com/report/github.com/singchia/frontier)
|
||||||
|
[](https://pkg.go.dev/github.com/singchia/frontier/api/dataplane/v1/service)
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -888,7 +889,7 @@ exchange:
|
|||||||
### docker
|
### docker
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d --name frontier -p 30011:30011 -p 30012:30012 singchia/frontier:1.0.0
|
docker run -d --name frontier -p 30011:30011 -p 30012:30012 singchia/frontier:1.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -910,6 +911,12 @@ cd dist/helm
|
|||||||
helm install frontier ./ -f values.yaml
|
helm install frontier ./ -f values.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
你的微服务应该连接`service/frontier-servicebound-svc:40011`,你的边缘节点可以连接`:30012`所在的NodePort。
|
||||||
|
|
||||||
|
### operator
|
||||||
|
|
||||||
|
见下面集群部署章节
|
||||||
|
|
||||||
## 集群
|
## 集群
|
||||||
|
|
||||||
### Frontier + Frontlas架构
|
### Frontier + Frontlas架构
|
||||||
@@ -1039,11 +1046,23 @@ service ClusterService {
|
|||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/singchia/frontier.git
|
git clone https://github.com/singchia/frontier.git
|
||||||
cd pkg/operator
|
cd dist/crd
|
||||||
make install && make deploy
|
kubectl apply -f install.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
**CR**
|
查看CRD:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get crd frontierclusters.frontier.singchia.io
|
||||||
|
```
|
||||||
|
|
||||||
|
查看Operator:
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get all -n frontier-system
|
||||||
|
```
|
||||||
|
|
||||||
|
**FrontierCluster集群**
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: frontier.singchia.io/v1alpha1
|
apiVersion: frontier.singchia.io/v1alpha1
|
||||||
@@ -1056,7 +1075,7 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
frontier:
|
frontier:
|
||||||
# 单实例Frontier
|
# 单实例Frontier
|
||||||
replicas: 1
|
replicas: 2
|
||||||
# 微服务侧端口
|
# 微服务侧端口
|
||||||
servicebound:
|
servicebound:
|
||||||
port: 30011
|
port: 30011
|
||||||
@@ -1069,8 +1088,8 @@ spec:
|
|||||||
# 控制面端口
|
# 控制面端口
|
||||||
controlplane:
|
controlplane:
|
||||||
port: 40011
|
port: 40011
|
||||||
# 依赖的Redis配置
|
|
||||||
redis:
|
redis:
|
||||||
|
# 依赖的Redis配置
|
||||||
addrs:
|
addrs:
|
||||||
- rfs-redisfailover:26379
|
- rfs-redisfailover:26379
|
||||||
password: your-password
|
password: your-password
|
||||||
@@ -1078,8 +1097,40 @@ spec:
|
|||||||
redisType: sentinel
|
redisType: sentinel
|
||||||
```
|
```
|
||||||
|
|
||||||
1分钟,你即可拥有一个Frontier+Frontlas的集群。
|
1分钟,你即可拥有一个2实例Frontier+1实例Frontlas的集群。
|
||||||
|
|
||||||
|
通过一下来检查资源部署情况
|
||||||
|
|
||||||
|
> kubectl get all -l app=frontiercluster-frontier
|
||||||
|
> kubectl get all -l app=frontiercluster-frontlas
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
pod/frontiercluster-frontier-57d565c89-dn6n8 1/1 Running 0 7m22s
|
||||||
|
pod/frontiercluster-frontier-57d565c89-nmwmt 1/1 Running 0 7m22s
|
||||||
|
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||||
|
service/frontiercluster-edgebound-svc NodePort 10.233.23.174 <none> 30012:30012/TCP 8m7s
|
||||||
|
service/frontiercluster-servicebound-svc ClusterIP 10.233.29.156 <none> 30011/TCP 8m7s
|
||||||
|
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||||
|
deployment.apps/frontiercluster-frontier 2/2 2 2 7m22s
|
||||||
|
NAME DESIRED CURRENT READY AGE
|
||||||
|
replicaset.apps/frontiercluster-frontier-57d565c89 2 2 2 7m22s
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get all -l app=frontiercluster-frontlas
|
||||||
|
NAME READY STATUS RESTARTS AGE
|
||||||
|
pod/frontiercluster-frontlas-85c4fb6d9b-5clkh 1/1 Running 0 8m11s
|
||||||
|
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||||
|
service/frontiercluster-frontlas-svc ClusterIP 10.233.0.23 <none> 40011/TCP,40012/TCP 8m11s
|
||||||
|
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||||
|
deployment.apps/frontiercluster-frontlas 1/1 1 1 8m11s
|
||||||
|
NAME DESIRED CURRENT READY AGE
|
||||||
|
replicaset.apps/frontiercluster-frontlas-85c4fb6d9b 1 1 1 8m11s
|
||||||
|
```
|
||||||
|
|
||||||
|
你的微服务应该连接`service/frontiercluster-frontlas-svc:40011`,你的边缘节点可以连接`:30012`所在的NodePort。
|
||||||
|
|
||||||
## 开发
|
## 开发
|
||||||
|
|
||||||
@@ -1107,4 +1158,8 @@ spec:
|
|||||||
|
|
||||||
## 许可证
|
## 许可证
|
||||||
|
|
||||||
Released under the [Apache License 2.0](https://github.com/singchia/geminio/blob/main/LICENSE)
|
Released under the [Apache License 2.0](https://github.com/singchia/geminio/blob/main/LICENSE)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
已经看到这里,点个Star⭐️是莫大的认可♥️
|
5
dist/compose/docker-compose.yml
vendored
5
dist/compose/docker-compose.yml
vendored
@@ -3,8 +3,9 @@ version: "3.7"
|
|||||||
services:
|
services:
|
||||||
frontier:
|
frontier:
|
||||||
container_name: frontier
|
container_name: frontier
|
||||||
image: singchia/frontier:1.0.0
|
image: singchia/frontier:1.1.0
|
||||||
restart: always
|
restart: always
|
||||||
|
command: --config /usr/conf/frontier.yaml -v 1
|
||||||
ports:
|
ports:
|
||||||
- 30010:30010
|
- 30010:30010
|
||||||
- 30011:30011
|
- 30011:30011
|
||||||
@@ -16,7 +17,7 @@ services:
|
|||||||
max-file: "5"
|
max-file: "5"
|
||||||
frontlas:
|
frontlas:
|
||||||
container_name: frontlas
|
container_name: frontlas
|
||||||
image: singchia/frontlas:1.0.0
|
image: singchia/frontlas:1.1.0
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 40011:40011
|
- 40011:40011
|
||||||
|
@@ -7,15 +7,17 @@ metadata:
|
|||||||
name: frontiercluster
|
name: frontiercluster
|
||||||
spec:
|
spec:
|
||||||
frontier:
|
frontier:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
servicebound:
|
servicebound:
|
||||||
port: 30011
|
port: 30011
|
||||||
edgebound:
|
edgebound:
|
||||||
port: 30012
|
port: 30012
|
||||||
|
image: singchia/frontier:1.1.0
|
||||||
frontlas:
|
frontlas:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
controlplane:
|
controlplane:
|
||||||
port: 40011
|
port: 40011
|
||||||
|
image: singchia/frontlas:1.1.0
|
||||||
redis:
|
redis:
|
||||||
addrs:
|
addrs:
|
||||||
- rfs-redisfailover:26379
|
- rfs-redisfailover:26379
|
20
dist/crd/iclm-service_example.yaml
vendored
Normal file
20
dist/crd/iclm-service_example.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: iclm-service
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: iclm-service
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: iclm-service
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: Always
|
||||||
|
containers:
|
||||||
|
- name: iclm-service
|
||||||
|
image: singchia/iclm_service:1.0.0-dev
|
||||||
|
imagePullPolicy: Always
|
8
dist/crd/install.yaml
vendored
8
dist/crd/install.yaml
vendored
@@ -109,6 +109,8 @@ spec:
|
|||||||
- mtls
|
- mtls
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
@@ -328,6 +330,8 @@ spec:
|
|||||||
for a service
|
for a service
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
@@ -525,6 +529,8 @@ spec:
|
|||||||
type: array
|
type: array
|
||||||
db:
|
db:
|
||||||
type: integer
|
type: integer
|
||||||
|
masterName:
|
||||||
|
type: string
|
||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
redisType:
|
redisType:
|
||||||
@@ -859,7 +865,7 @@ spec:
|
|||||||
- --leader-elect
|
- --leader-elect
|
||||||
command:
|
command:
|
||||||
- /manager
|
- /manager
|
||||||
image: singchia/frontiercluster-controller:1.0.0
|
image: singchia/frontiercluster-controller:1.1.0
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
|
38
dist/helm/configs/frontier/frontier.yaml
vendored
38
dist/helm/configs/frontier/frontier.yaml
vendored
@@ -7,52 +7,14 @@ daemon:
|
|||||||
enable: true
|
enable: true
|
||||||
addr: 0.0.0.0:6060
|
addr: 0.0.0.0:6060
|
||||||
cpu_profile_rate: 0
|
cpu_profile_rate: 0
|
||||||
controlplane:
|
|
||||||
enable: false
|
|
||||||
listen:
|
|
||||||
network: tcp
|
|
||||||
addr: 0.0.0.0:30010
|
|
||||||
servicebound:
|
servicebound:
|
||||||
listen:
|
listen:
|
||||||
network: tcp
|
network: tcp
|
||||||
addr: 0.0.0.0:30011
|
addr: 0.0.0.0:30011
|
||||||
tls:
|
|
||||||
enable: false
|
|
||||||
mtls: false
|
|
||||||
ca_certs:
|
|
||||||
- ca1.cert
|
|
||||||
- ca2.cert
|
|
||||||
certs:
|
|
||||||
- cert: servicebound.cert
|
|
||||||
key: servicebound.key
|
|
||||||
insecure_skip_verify: false
|
|
||||||
edgebound:
|
edgebound:
|
||||||
listen:
|
listen:
|
||||||
network: tcp
|
network: tcp
|
||||||
addr: 0.0.0.0:30012
|
addr: 0.0.0.0:30012
|
||||||
tls:
|
|
||||||
enable: false
|
|
||||||
mtls: false
|
|
||||||
ca_certs:
|
|
||||||
- ca1.cert
|
|
||||||
- ca2.cert
|
|
||||||
certs:
|
|
||||||
- cert: edgebound.cert
|
|
||||||
key: edgebound.key
|
|
||||||
insecure_skip_verify: false
|
|
||||||
bypass:
|
|
||||||
network: tcp
|
|
||||||
addr: 192.168.1.10:8443
|
|
||||||
tls:
|
|
||||||
enable: true
|
|
||||||
mtls: true
|
|
||||||
ca_certs:
|
|
||||||
- ca1.cert
|
|
||||||
certs:
|
|
||||||
- cert: frontier.cert
|
|
||||||
key: frontier.key
|
|
||||||
insecure_skip_verify: false
|
|
||||||
bypass_enable: false
|
|
||||||
edgeid_alloc_when_no_idservice_on: true
|
edgeid_alloc_when_no_idservice_on: true
|
||||||
dao:
|
dao:
|
||||||
debug: false
|
debug: false
|
||||||
|
4
dist/helm/templates/service_frontier.yaml
vendored
4
dist/helm/templates/service_frontier.yaml
vendored
@@ -1,7 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "frontier.fullname" . }}
|
name: "frontier-servicebound-svc"
|
||||||
labels:
|
labels:
|
||||||
{{- include "frontier.labels" . | nindent 4 }}
|
{{- include "frontier.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
@@ -19,7 +19,7 @@ spec:
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "frontier.fullname" . }}
|
name: "frontier-edgebound-svc"
|
||||||
labels:
|
labels:
|
||||||
{{- include "frontier.labels" . | nindent 4 }}
|
{{- include "frontier.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
|
6
dist/helm/values.yaml
vendored
6
dist/helm/values.yaml
vendored
@@ -2,7 +2,7 @@
|
|||||||
# This is a YAML-formatted file.
|
# This is a YAML-formatted file.
|
||||||
# Declare variables to be passed into your templates.
|
# Declare variables to be passed into your templates.
|
||||||
global:
|
global:
|
||||||
registry: hub.docker.com/singchia
|
registry: singchia
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
@@ -14,7 +14,7 @@ image:
|
|||||||
image: frontier
|
image: frontier
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: 1.0.0
|
tag: 1.1.0
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ service:
|
|||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
targetPort: controlbound
|
targetPort: controlbound
|
||||||
port: 30010
|
port: 30010
|
||||||
- name: servicebound
|
- name: frontier-edgebound-svc
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
targetPort: servicebound
|
targetPort: servicebound
|
||||||
port: 30011
|
port: 30011
|
||||||
|
@@ -87,6 +87,7 @@ func newEdgeManager(conf *config.Configuration, repo apis.Repo, informer apis.Ed
|
|||||||
klog.Errorf("edge manager listen err: %s", err)
|
klog.Errorf("edge manager listen err: %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
klog.V(0).Infof("edgebound server listening on: %s", ln.Addr())
|
||||||
|
|
||||||
geminioLn := ln
|
geminioLn := ln
|
||||||
bypass := conf.Edgebound.BypassEnable
|
bypass := conf.Edgebound.BypassEnable
|
||||||
|
@@ -33,6 +33,9 @@ func NewInformer(conf *config.Configuration, tmr timer.Timer) (*Informer, error)
|
|||||||
if dial.Addrs == nil || len(dial.Addrs) == 0 {
|
if dial.Addrs == nil || len(dial.Addrs) == 0 {
|
||||||
return nil, errors.New("illegal dial addrs")
|
return nil, errors.New("illegal dial addrs")
|
||||||
}
|
}
|
||||||
|
if dial.Network == "" {
|
||||||
|
dial.Network = "tcp"
|
||||||
|
}
|
||||||
|
|
||||||
sbAddr, ebAddr, err := getAdvertisedAddrs(conf.Servicebound.Listen, conf.Edgebound.Listen, dial)
|
sbAddr, ebAddr, err := getAdvertisedAddrs(conf.Servicebound.Listen, conf.Edgebound.Listen, dial)
|
||||||
// meta
|
// meta
|
||||||
|
@@ -87,6 +87,7 @@ func newServiceManager(conf *config.Configuration, repo apis.Repo, informer apis
|
|||||||
klog.Errorf("service manager listen err: %s", err)
|
klog.Errorf("service manager listen err: %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
klog.V(0).Infof("servicebound server listening on: %s", ln.Addr())
|
||||||
sm.ln = ln
|
sm.ln = ln
|
||||||
return sm, nil
|
return sm, nil
|
||||||
}
|
}
|
||||||
|
@@ -130,7 +130,7 @@ func (sm *serviceManager) ConnOffline(d delegate.ConnDescriber) error {
|
|||||||
serviceID := d.ClientID()
|
serviceID := d.ClientID()
|
||||||
meta := string(d.Meta())
|
meta := string(d.Meta())
|
||||||
addr := d.RemoteAddr()
|
addr := d.RemoteAddr()
|
||||||
klog.V(2).Infof("service offline, serviceID: %d, service: %s, remote addr: %s", serviceID, meta, addr)
|
klog.V(1).Infof("service offline, serviceID: %d, service: %s, remote addr: %s", serviceID, meta, addr)
|
||||||
// offline the cache
|
// offline the cache
|
||||||
err := sm.offline(serviceID, addr)
|
err := sm.offline(serviceID, addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -46,7 +46,7 @@ func NewFrontierManager(conf *config.Configuration, dao *repo.Dao, tmr timer.Tim
|
|||||||
klog.Errorf("frontier plane listen err: %s", err)
|
klog.Errorf("frontier plane listen err: %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
klog.V(1).Infof("server listening on: %v", ln.Addr())
|
klog.V(0).Infof("frontierbound server listening on: %v", ln.Addr())
|
||||||
|
|
||||||
fm.ln = ln
|
fm.ln = ln
|
||||||
return fm, nil
|
return fm, nil
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# Image URL to use all building/pushing image targets
|
# Image URL to use all building/pushing image targets
|
||||||
IMG ?= singchia/frontiercluster-controller:1.0.0-dev
|
IMG ?= singchia/frontiercluster-controller:1.1.0
|
||||||
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
|
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
|
||||||
ENVTEST_K8S_VERSION = 1.29.0
|
ENVTEST_K8S_VERSION = 1.29.0
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ type Frontier struct {
|
|||||||
Replicas int `json:"replicas,omitempty"` // frontier replicas, default 1
|
Replicas int `json:"replicas,omitempty"` // frontier replicas, default 1
|
||||||
Servicebound Servicebound `json:"servicebound"`
|
Servicebound Servicebound `json:"servicebound"`
|
||||||
Edgebound Edgebound `json:"edgebound"`
|
Edgebound Edgebound `json:"edgebound"`
|
||||||
|
Image string `json:"image,omitempty"` // default singchia/frontier:1.1.0
|
||||||
NodeAffinity corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
|
NodeAffinity corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,6 +96,7 @@ type Frontlas struct {
|
|||||||
Replicas int `json:"replicas,omitempty"` // frontlas replicas, default 1
|
Replicas int `json:"replicas,omitempty"` // frontlas replicas, default 1
|
||||||
ControlPlane ControlPlane `json:"controlplane,omitempty"`
|
ControlPlane ControlPlane `json:"controlplane,omitempty"`
|
||||||
NodeAffinity corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
|
NodeAffinity corev1.NodeAffinity `json:"nodeAffinity,omitempty"`
|
||||||
|
Image string `json:"image,omitempty"`
|
||||||
Redis Redis `json:"redis"`
|
Redis Redis `json:"redis"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -97,6 +97,8 @@ spec:
|
|||||||
- mtls
|
- mtls
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
@@ -316,6 +318,8 @@ spec:
|
|||||||
for a service
|
for a service
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
|
@@ -5,4 +5,4 @@ kind: Kustomization
|
|||||||
images:
|
images:
|
||||||
- name: controller
|
- name: controller
|
||||||
newName: singchia/frontiercluster-controller
|
newName: singchia/frontiercluster-controller
|
||||||
newTag: 1.0.0-dev
|
newTag: 1.1.0
|
||||||
|
8
pkg/operator/dist/install.yaml
vendored
8
pkg/operator/dist/install.yaml
vendored
@@ -109,6 +109,8 @@ spec:
|
|||||||
- mtls
|
- mtls
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
@@ -328,6 +330,8 @@ spec:
|
|||||||
for a service
|
for a service
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
type: string
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
description: Node affinity is a group of node affinity scheduling
|
description: Node affinity is a group of node affinity scheduling
|
||||||
rules.
|
rules.
|
||||||
@@ -525,6 +529,8 @@ spec:
|
|||||||
type: array
|
type: array
|
||||||
db:
|
db:
|
||||||
type: integer
|
type: integer
|
||||||
|
masterName:
|
||||||
|
type: string
|
||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
redisType:
|
redisType:
|
||||||
@@ -859,7 +865,7 @@ spec:
|
|||||||
- --leader-elect
|
- --leader-elect
|
||||||
command:
|
command:
|
||||||
- /manager
|
- /manager
|
||||||
image: singchia/frontiercluster-controller:1.0.0
|
image: singchia/frontiercluster-controller:1.1.0
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
|
@@ -96,6 +96,10 @@ func (r *FrontierClusterReconciler) ensureFrontierDeployment(ctx context.Context
|
|||||||
labels := map[string]string{
|
labels := map[string]string{
|
||||||
"app": app,
|
"app": app,
|
||||||
}
|
}
|
||||||
|
image := fc.Spec.Frontier.Image
|
||||||
|
if image == "" {
|
||||||
|
image = "singchia/frontier:1.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
volumeMounts := []corev1.VolumeMount{}
|
volumeMounts := []corev1.VolumeMount{}
|
||||||
volumes := []corev1.Volume{}
|
volumes := []corev1.Volume{}
|
||||||
@@ -146,7 +150,7 @@ func (r *FrontierClusterReconciler) ensureFrontierDeployment(ctx context.Context
|
|||||||
// container
|
// container
|
||||||
container := container.Builder().
|
container := container.Builder().
|
||||||
SetName("frontier").
|
SetName("frontier").
|
||||||
SetImage("singchia/frontier:1.0.0-dev").
|
SetImage(image).
|
||||||
SetImagePullPolicy(corev1.PullAlways).
|
SetImagePullPolicy(corev1.PullAlways).
|
||||||
SetEnvs([]corev1.EnvVar{{
|
SetEnvs([]corev1.EnvVar{{
|
||||||
Name: FrontierServiceboundPortEnv,
|
Name: FrontierServiceboundPortEnv,
|
||||||
@@ -221,13 +225,17 @@ func (r *FrontierClusterReconciler) ensureFrontlasDeployment(ctx context.Context
|
|||||||
labels := map[string]string{
|
labels := map[string]string{
|
||||||
"app": app,
|
"app": app,
|
||||||
}
|
}
|
||||||
|
image := fc.Spec.Frontlas.Image
|
||||||
|
if image == "" {
|
||||||
|
image = "singchia/frontlas:1.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
service, _, cpport, _ := fc.FrontlasServicePort()
|
service, _, cpport, _ := fc.FrontlasServicePort()
|
||||||
|
|
||||||
// container
|
// container
|
||||||
container := container.Builder().
|
container := container.Builder().
|
||||||
SetName("frontlas").
|
SetName("frontlas").
|
||||||
SetImage("singchia/frontlas:1.0.0-dev").
|
SetImage(image).
|
||||||
SetImagePullPolicy(corev1.PullAlways).
|
SetImagePullPolicy(corev1.PullAlways).
|
||||||
SetEnvs([]corev1.EnvVar{{
|
SetEnvs([]corev1.EnvVar{{
|
||||||
Name: FrontlasControlPlanePortEnv,
|
Name: FrontlasControlPlanePortEnv,
|
||||||
|
Reference in New Issue
Block a user