Skip to content

Commit 6a0a81d

Browse files
committed
fix crd
1 parent fc576d2 commit 6a0a81d

8 files changed

+128
-121
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ flycheck_*.el
9191
*.test
9292

9393
# Output of the go coverage tool, specifically when used with LiteIDE
94+
cover.out
9495
*.out
9596

9697
### Vim ###

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,16 @@ make bundle-push
7272
## 目前不支持直接测试,必须要先把bundle 传到 registry,有issue记录: https://github.com/operator-framework/operator-sdk/issues/6432
7373

7474

75-
# 在 k8s 中运行
75+
```
76+
77+
78+
### 3.2 基于 olm 部署
79+
80+
[operator-sdk 二进制安装方式](https://sdk.operatorframework.io/docs/installation/)
81+
82+
```bash
83+
# 在 k8s集群安装该项目
84+
operator-sdk olm install
7685

7786
## ref https://github.com/operator-framework/operator-lifecycle-manager/releases/tag/v0.24.0
7887

@@ -104,11 +113,3 @@ operator-sdk cleanup vpn-gw
104113

105114

106115

107-
### 3.2 基于 olm 部署
108-
109-
[operator-sdk 二进制安装方式](https://sdk.operatorframework.io/docs/installation/)
110-
111-
```bash
112-
# 在 k8s集群安装该项目
113-
operator-sdk olm install
114-
```

api/v1/vpngw_types.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ type VpnGwSpec struct {
2929
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
3030
// Important: Run "make" to regenerate code after modifying this file
3131

32+
// vpn gw static ip
33+
Ip string `json:"ip"`
3234
// pod subnet
3335
// the vpn gw server pod running inside in this pod
3436
// user can access all pod in this subnet via vpn gw
3537
// if use subnet lb vip in this subnet, so no need svc cidr in this case
36-
Subnet string `json:"subnet"`
37-
// vpn gw static ip
38-
Ip string `json:"ip"`
38+
Subnet string `json:"subnet"`
3939
Replicas int32 `json:"replicas"`
4040
// vpn gw pod node selector
4141
Selector []string `json:"selector"`
@@ -62,16 +62,16 @@ type VpnGwSpec struct {
6262
SslVpnImage string `json:"sslVpnImage"`
6363

6464
// vpn gw enable ipsec vpn
65-
EnableIpsecVpn bool `json:"EnableIpsecVpn"`
65+
EnableIpsecVpn bool `json:"enableIpsecVpn"`
6666
// ipsec use strongswan server
6767
// all ipsec vpn spec start with ipsec
6868
IpsecVpnImage string `json:"ipsecVpnImage"`
6969
}
7070

7171
// VpnGwStatus defines the observed state of VpnGw
7272
type VpnGwStatus struct {
73-
Subnet string `json:"subnet" patchStrategy:"merge"`
7473
Ip string `json:"ip" patchStrategy:"merge"`
74+
Subnet string `json:"subnet" patchStrategy:"merge"`
7575
Replicas int32 `json:"replicas" patchStrategy:"merge"`
7676
Selector []string `json:"selector" patchStrategy:"merge"`
7777
Tolerations []corev1.Toleration `json:"tolerations" patchStrategy:"merge"`

bundle/manifests/vpn-gw.clusterserviceversion.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ metadata:
2121
}
2222
]
2323
capabilities: Basic Install
24-
createdAt: "2023-06-04T02:01:17Z"
24+
createdAt: "2023-06-05T04:21:17Z"
2525
operators.operatorframework.io/builder: operator-sdk-v1.28.1
2626
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4-alpha
2727
name: vpn-gw.v0.0.1

bundle/manifests/vpn-gw.kube-ovn-operator.com_vpngws.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ spec:
5050
spec:
5151
description: VpnGwSpec defines the desired state of VpnGw
5252
properties:
53-
EnableIpsecVpn:
54-
description: vpn gw enable ipsec vpn
55-
type: boolean
5653
affinity:
5754
description: vpn gw pod affinity
5855
properties:
@@ -881,6 +878,9 @@ spec:
881878
type: array
882879
type: object
883880
type: object
881+
enableIpsecVpn:
882+
description: vpn gw enable ipsec vpn
883+
type: boolean
884884
enableSslVpn:
885885
description: vpn gw enable ssl vpn
886886
type: boolean
@@ -963,8 +963,8 @@ spec:
963963
type: object
964964
type: array
965965
required:
966-
- EnableIpsecVpn
967966
- affinity
967+
- enableIpsecVpn
968968
- enableSslVpn
969969
- ip
970970
- ipsecVpnImage

config/crd/bases/vpn-gw.kube-ovn-operator.com_vpngws.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ spec:
5151
spec:
5252
description: VpnGwSpec defines the desired state of VpnGw
5353
properties:
54-
EnableIpsecVpn:
55-
description: vpn gw enable ipsec vpn
56-
type: boolean
5754
affinity:
5855
description: vpn gw pod affinity
5956
properties:
@@ -882,6 +879,9 @@ spec:
882879
type: array
883880
type: object
884881
type: object
882+
enableIpsecVpn:
883+
description: vpn gw enable ipsec vpn
884+
type: boolean
885885
enableSslVpn:
886886
description: vpn gw enable ssl vpn
887887
type: boolean
@@ -964,8 +964,8 @@ spec:
964964
type: object
965965
type: array
966966
required:
967-
- EnableIpsecVpn
968967
- affinity
968+
- enableIpsecVpn
969969
- enableSslVpn
970970
- ip
971971
- ipsecVpnImage

0 commit comments

Comments
 (0)