Skip to content

Commit e8a2d83

Browse files
committed
Merge branch 'AbhiK_tcps_bugfix3' into 'master'
Set min tcpsCertRenewInterval to 5m and some readme changes See merge request rac-docker-dev/oracle-database-operator!225
2 parents 8c5e02f + 4d45c02 commit e8a2d83

File tree

6 files changed

+89
-7
lines changed

6 files changed

+89
-7
lines changed

apis/database/v1alpha1/singleinstancedatabase_webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,11 @@ func (r *SingleInstanceDatabase) ValidateCreate() error {
271271
"Please provide valid string to parse the tcpsCertRenewInterval."))
272272
}
273273
maxLimit, _ := time.ParseDuration("26280h")
274-
minLimit, _ := time.ParseDuration("1m")
274+
minLimit, _ := time.ParseDuration("5m")
275275
if duration > maxLimit || duration < minLimit {
276276
allErrs = append(allErrs,
277277
field.Invalid(field.NewPath("spec").Child("tcpsCertRenewInterval"), r.Spec.TcpsCertRenewInterval,
278-
"Please specify tcpsCertRenewInterval in the range: 1m to 26280h"))
278+
"Please specify tcpsCertRenewInterval in the range: 5m to 26280h"))
279279
}
280280
}
281281
if len(allErrs) == 0 {

config/crd/bases/database.oracle.com_cdbs.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ spec:
6565
spec:
6666
description: CDBSpec defines the desired state of CDB
6767
properties:
68+
TestVariable:
69+
type: string
6870
cdbAdminPwd:
6971
description: Password for the CDB Administrator to manage PDB lifecycle
7072
properties:
@@ -103,6 +105,38 @@ spec:
103105
cdbName:
104106
description: Name of the CDB
105107
type: string
108+
cdbTlsCrt:
109+
properties:
110+
secret:
111+
description: CDBSecret defines the secretName
112+
properties:
113+
key:
114+
type: string
115+
secretName:
116+
type: string
117+
required:
118+
- key
119+
- secretName
120+
type: object
121+
required:
122+
- secret
123+
type: object
124+
cdbTlsKey:
125+
properties:
126+
secret:
127+
description: CDBSecret defines the secretName
128+
properties:
129+
key:
130+
type: string
131+
secretName:
132+
type: string
133+
required:
134+
- key
135+
- secretName
136+
type: object
137+
required:
138+
- secret
139+
type: object
106140
dbPort:
107141
description: DB server port
108142
type: integer

config/crd/bases/database.oracle.com_pdbs.yaml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
- additionalPrinterColumns:
2020
- description: The connect string to be used
2121
jsonPath: .status.connString
22-
name: Connect String
22+
name: Connect_String
2323
type: string
2424
- description: Name of the CDB
2525
jsonPath: .spec.cdbName
@@ -166,6 +166,54 @@ spec:
166166
- OPEN
167167
- CLOSE
168168
type: string
169+
pdbTlsCat:
170+
properties:
171+
secret:
172+
description: PDBSecret defines the secretName
173+
properties:
174+
key:
175+
type: string
176+
secretName:
177+
type: string
178+
required:
179+
- key
180+
- secretName
181+
type: object
182+
required:
183+
- secret
184+
type: object
185+
pdbTlsCrt:
186+
properties:
187+
secret:
188+
description: PDBSecret defines the secretName
189+
properties:
190+
key:
191+
type: string
192+
secretName:
193+
type: string
194+
required:
195+
- key
196+
- secretName
197+
type: object
198+
required:
199+
- secret
200+
type: object
201+
pdbTlsKey:
202+
properties:
203+
secret:
204+
description: PDBSecret defines the secretName
205+
properties:
206+
key:
207+
type: string
208+
secretName:
209+
type: string
210+
required:
211+
- key
212+
- secretName
213+
type: object
214+
required:
215+
- secret
216+
type: object
169217
reuseTempFile:
170218
description: Whether to reuse temp file
171219
type: boolean

config/samples/sidb/singleinstancedatabase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949

5050
## TCPS Certificate Renewal Interval: The time after which TCPS certificate will be renewed if TCPS connections are enabled.
5151
## tcpsCertRenewInterval can be in hours(h), minutes(m) and seconds(s); e.g. 17520h, 8760h etc.
52-
## Maximum value is 26280h (3 years), Minimum value is 1m; Default value is 17520h (2 years)
52+
## Maximum value is 26280h (3 years), Minimum value is 5m; Default value is 17520h (2 years)
5353
## If this field is commented out/removed from the yaml, it will disable the auto-renewal feature for TCPS certificate
5454
tcpsCertRenewInterval: 17520h
5555

config/samples/sidb/singleinstancedatabase_tcps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ spec:
3636

3737
## TCPS Certificate Renewal Interval: The time after which TCPS certificate will be renewed if TCPS connections are enabled.
3838
## tcpsCertRenewInterval can be in hours(h), minutes(m) and seconds(s); e.g. 17520h, 8760h etc.
39-
## Maximum value is 26280h (3 years), Minimum value is 1m; Default value is 17520h (2 years)
39+
## Maximum value is 26280h (3 years), Minimum value is 5m; Default value is 17520h (2 years)
4040
## If this field is commented out/removed from the yaml, it will disable the auto-renewal feature for TCPS certificate
4141
tcpsCertRenewInterval: 17520h
4242

docs/sidb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ The following steps are required to connect the Database using TCPS:
560560
- Only database server authentication is supported (no mTLS).
561561
- When TCPS is enabled, a self-signed certificate is generated and stored inside the wallets. For users' convenience, a client-side wallet is generated and stored at `/opt/oracle/oradata/clientWallet/$ORACLE_SID` location in the pod.
562562
- The self-signed certificate used with TCPS has validity for 2 years. After the certificate is expired, it will be renewed by the `OraOperator` automatically. You need to download the wallet again after the auto-renewal.
563-
- You can set the certificate renew interval with the help of `tcpsCertRenewInterval` field in the **[config/samples/sidb/singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml)** file. The minimum accepted value is 1m, and the maximum value is 26280h (3 years). The certificates used with TCPS will automatically be renewed after this interval. If this field is omitted/commented in the yaml file, the certificates will not be renewed automatically.
563+
- You can set the certificate renew interval with the help of `tcpsCertRenewInterval` field in the **[config/samples/sidb/singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml)** file. The minimum accepted value is 5m, and the maximum value is 26280h (3 years). The certificates used with TCPS will automatically be renewed after this interval. If this field is omitted/commented in the yaml file, the certificates will not be renewed automatically.
564564
565565
### Specifying Custom Ports
566566
As mentioned in the section [Setup Database with LoadBalancer](#setup-database-with-loadbalancer), there are two kubernetes services possible for the database: NodePort and LoadBalancer. You can specify which port to use with these services by editing the `listenerPort` and `tcpsListenerPort` fields of the [config/samples/sidb/singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml) file.
@@ -575,7 +575,7 @@ In case of `NodePort` service, `listenerPort`, and `tcpsListenerPort` will be th
575575
- `listenerPort` and `tcpsListenerPort` can not have same values.
576576
- `tcpsListenerPort` will come into effect only when TCPS connections are enabled (i.e. `enableTCPS` field is set in [config/samples/sidb/singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml) file).
577577
- If TCPS connections are enabled, and `listenerPort` is commented/removed in the [config/samples/sidb/singleinstancedatabase.yaml](../../config/samples/sidb/singleinstancedatabase.yaml) file, only TCPS endpoint will be exposed.
578-
- If LoadBalancer is enabled, and either `listenerPort` or `tcpsListenerPort` is changed, then it takes some time to complete the work requests (drain existing backend sets and create new ones). SingleInstanceDatabase and LoadBalancer remains in the healthy state, but, you can check the progress of the work requests by logging into the OCI console and checking the corresponding LoadBalancer.
578+
- If LoadBalancer is enabled, and either `listenerPort` or `tcpsListenerPort` is changed, then it takes some time to complete the work requests (drain existing backend sets and create new ones). In this time, the database connectivity is broken. Although, SingleInstanceDatabase and LoadBalancer remain in the healthy state, you can check the progress of the work requests by logging into the cloud provider's console and checking the corresponding LoadBalancer.
579579

580580

581581
## OracleRestDataService Resource

0 commit comments

Comments
 (0)