Skip to content

Commit d2a9cbe

Browse files
committed
Merge branch 'mmalvezz' into 'master'
fix bug 35287543 See merge request rac-docker-dev/oracle-database-operator!244
2 parents f596f1d + e3a2c4d commit d2a9cbe

File tree

2 files changed

+215
-6
lines changed

2 files changed

+215
-6
lines changed

controllers/database/pdb_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ func (r *PDBReconciler) callAPI(ctx context.Context, req ctrl.Request, pdb *dbap
490490
return "", err
491491
}
492492
webUser := string(secret.Data[cdb.Spec.WebServerUser.Secret.Key])
493+
webUser = strings.TrimSpace(webUser)
493494

494495
// Get Web Server User Password
495496
secret = &corev1.Secret{}
@@ -503,6 +504,8 @@ func (r *PDBReconciler) callAPI(ctx context.Context, req ctrl.Request, pdb *dbap
503504
return "", err
504505
}
505506
webUserPwd := string(secret.Data[cdb.Spec.WebServerPwd.Secret.Key])
507+
webUserPwd = strings.TrimSpace(webUserPwd)
508+
506509

507510
var httpreq *http.Request
508511
if action == "GET" {

oracle-database-operator.yaml

Lines changed: 212 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,131 @@ status:
853853
---
854854
apiVersion: apiextensions.k8s.io/v1
855855
kind: CustomResourceDefinition
856+
metadata:
857+
annotations:
858+
controller-gen.kubebuilder.io/version: v0.6.1
859+
creationTimestamp: null
860+
name: dataguardbrokers.database.oracle.com
861+
spec:
862+
group: database.oracle.com
863+
names:
864+
kind: DataguardBroker
865+
listKind: DataguardBrokerList
866+
plural: dataguardbrokers
867+
singular: dataguardbroker
868+
scope: Namespaced
869+
versions:
870+
- additionalPrinterColumns:
871+
- jsonPath: .status.primaryDatabase
872+
name: Primary
873+
type: string
874+
- jsonPath: .status.standbyDatabases
875+
name: Standbys
876+
type: string
877+
- jsonPath: .spec.protectionMode
878+
name: Protection Mode
879+
type: string
880+
- jsonPath: .status.clusterConnectString
881+
name: Cluster Connect Str
882+
priority: 1
883+
type: string
884+
- jsonPath: .status.externalConnectString
885+
name: Connect Str
886+
type: string
887+
- jsonPath: .spec.primaryDatabaseRef
888+
name: Primary Database
889+
priority: 1
890+
type: string
891+
- jsonPath: .status.status
892+
name: Status
893+
type: string
894+
name: v1alpha1
895+
schema:
896+
openAPIV3Schema:
897+
description: DataguardBroker is the Schema for the dataguardbrokers API
898+
properties:
899+
apiVersion:
900+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
901+
type: string
902+
kind:
903+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
904+
type: string
905+
metadata:
906+
type: object
907+
spec:
908+
description: DataguardBrokerSpec defines the desired state of DataguardBroker
909+
properties:
910+
fastStartFailOver:
911+
properties:
912+
enable:
913+
type: boolean
914+
strategy:
915+
items:
916+
description: FSFO strategy
917+
properties:
918+
sourceDatabaseRef:
919+
type: string
920+
targetDatabaseRefs:
921+
type: string
922+
type: object
923+
type: array
924+
type: object
925+
loadBalancer:
926+
type: boolean
927+
nodeSelector:
928+
additionalProperties:
929+
type: string
930+
type: object
931+
primaryDatabaseRef:
932+
type: string
933+
protectionMode:
934+
enum:
935+
- MaxPerformance
936+
- MaxAvailability
937+
type: string
938+
setAsPrimaryDatabase:
939+
type: string
940+
standbyDatabaseRefs:
941+
items:
942+
type: string
943+
type: array
944+
required:
945+
- primaryDatabaseRef
946+
- protectionMode
947+
- standbyDatabaseRefs
948+
type: object
949+
status:
950+
description: DataguardBrokerStatus defines the observed state of DataguardBroker
951+
properties:
952+
clusterConnectString:
953+
type: string
954+
externalConnectString:
955+
type: string
956+
primaryDatabase:
957+
type: string
958+
primaryDatabaseRef:
959+
type: string
960+
protectionMode:
961+
type: string
962+
standbyDatabases:
963+
type: string
964+
status:
965+
type: string
966+
type: object
967+
type: object
968+
served: true
969+
storage: true
970+
subresources:
971+
status: {}
972+
status:
973+
acceptedNames:
974+
kind: ""
975+
plural: ""
976+
conditions: []
977+
storedVersions: []
978+
---
979+
apiVersion: apiextensions.k8s.io/v1
980+
kind: CustomResourceDefinition
856981
metadata:
857982
annotations:
858983
controller-gen.kubebuilder.io/version: v0.6.1
@@ -1915,7 +2040,7 @@ spec:
19152040
type: object
19162041
conditions:
19172042
items:
1918-
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
2043+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n \ttype FooStatus struct{ \t // Represents the observations of a foo's current state. \t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" \t // +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map \t // +listMapKey=type \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields \t}"
19192044
properties:
19202045
lastTransitionTime:
19212046
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
@@ -2015,26 +2140,29 @@ spec:
20152140
- jsonPath: .status.edition
20162141
name: Edition
20172142
type: string
2143+
- jsonPath: .status.sid
2144+
name: Sid
2145+
priority: 1
2146+
type: string
20182147
- jsonPath: .status.status
20192148
name: Status
20202149
type: string
20212150
- jsonPath: .status.role
20222151
name: Role
2023-
priority: 1
20242152
type: string
20252153
- jsonPath: .status.releaseUpdate
20262154
name: Version
20272155
type: string
20282156
- jsonPath: .status.connectString
20292157
name: Connect Str
20302158
type: string
2031-
- jsonPath: .status.tcpsConnectString
2032-
name: TCPS Connect Str
2033-
type: string
20342159
- jsonPath: .status.pdbConnectString
20352160
name: Pdb Connect Str
20362161
priority: 1
20372162
type: string
2163+
- jsonPath: .status.tcpsConnectString
2164+
name: TCPS Connect Str
2165+
type: string
20382166
- jsonPath: .status.tcpsPdbConnectString
20392167
name: TCPS Pdb Connect Str
20402168
priority: 1
@@ -2077,6 +2205,10 @@ spec:
20772205
type: string
20782206
cloneFrom:
20792207
type: string
2208+
createAsStandby:
2209+
type: boolean
2210+
dgBrokerConfigured:
2211+
type: boolean
20802212
edition:
20812213
enum:
20822214
- standard
@@ -2142,6 +2274,8 @@ spec:
21422274
volumeName:
21432275
type: string
21442276
type: object
2277+
primaryDatabaseRef:
2278+
type: string
21452279
readinessCheckPeriod:
21462280
type: integer
21472281
replicas:
@@ -2185,7 +2319,7 @@ spec:
21852319
type: string
21862320
conditions:
21872321
items:
2188-
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
2322+
description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, \n \ttype FooStatus struct{ \t // Represents the observations of a foo's current state. \t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" \t // +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map \t // +listMapKey=type \t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields \t}"
21892323
properties:
21902324
lastTransitionTime:
21912325
description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
@@ -2237,6 +2371,8 @@ spec:
22372371
datafilesPatched:
22382372
default: "false"
22392373
type: string
2374+
dgBrokerConfigured:
2375+
type: boolean
22402376
edition:
22412377
type: string
22422378
flashBack:
@@ -2293,6 +2429,8 @@ spec:
22932429
type: object
22942430
prebuiltDB:
22952431
type: boolean
2432+
primaryDatabase:
2433+
type: string
22962434
releaseUpdate:
22972435
type: string
22982436
replicas:
@@ -2636,6 +2774,32 @@ rules:
26362774
- get
26372775
- patch
26382776
- update
2777+
- apiGroups:
2778+
- database.oracle.com
2779+
resources:
2780+
- dataguardbrokers
2781+
verbs:
2782+
- create
2783+
- delete
2784+
- get
2785+
- list
2786+
- patch
2787+
- update
2788+
- watch
2789+
- apiGroups:
2790+
- database.oracle.com
2791+
resources:
2792+
- dataguardbrokers/finalizers
2793+
verbs:
2794+
- update
2795+
- apiGroups:
2796+
- database.oracle.com
2797+
resources:
2798+
- dataguardbrokers/status
2799+
verbs:
2800+
- get
2801+
- patch
2802+
- update
26392803
- apiGroups:
26402804
- database.oracle.com
26412805
resources:
@@ -2965,6 +3129,27 @@ webhooks:
29653129
resources:
29663130
- cdbs
29673131
sideEffects: None
3132+
- admissionReviewVersions:
3133+
- v1
3134+
- v1beta1
3135+
clientConfig:
3136+
service:
3137+
name: oracle-database-operator-webhook-service
3138+
namespace: oracle-database-operator-system
3139+
path: /mutate-database-oracle-com-v1alpha1-dataguardbroker
3140+
failurePolicy: Fail
3141+
name: mdataguardbroker.kb.io
3142+
rules:
3143+
- apiGroups:
3144+
- database.oracle.com
3145+
apiVersions:
3146+
- v1alpha1
3147+
operations:
3148+
- CREATE
3149+
- UPDATE
3150+
resources:
3151+
- dataguardbrokers
3152+
sideEffects: None
29683153
- admissionReviewVersions:
29693154
- v1
29703155
- v1beta1
@@ -3137,6 +3322,27 @@ webhooks:
31373322
resources:
31383323
- cdbs
31393324
sideEffects: None
3325+
- admissionReviewVersions:
3326+
- v1
3327+
- v1beta1
3328+
clientConfig:
3329+
service:
3330+
name: oracle-database-operator-webhook-service
3331+
namespace: oracle-database-operator-system
3332+
path: /validate-database-oracle-com-v1alpha1-dataguardbroker
3333+
failurePolicy: Fail
3334+
name: vdataguardbroker.kb.io
3335+
rules:
3336+
- apiGroups:
3337+
- database.oracle.com
3338+
apiVersions:
3339+
- v1alpha1
3340+
operations:
3341+
- CREATE
3342+
- UPDATE
3343+
resources:
3344+
- dataguardbrokers
3345+
sideEffects: None
31403346
- admissionReviewVersions:
31413347
- v1
31423348
- v1beta1

0 commit comments

Comments
 (0)