Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit a9427d1

Browse files
authored
Make security a mandatory crd field (#194)
1 parent 9bc9037 commit a9427d1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

deploy/crds/mongodb.com_mongodb_crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,24 @@ spec:
167167
description: Version defines which version of MongoDB will be used
168168
type: string
169169
required:
170+
- security
170171
- type
171172
- users
172173
- version
173174
type: object
174175
status:
175176
description: MongoDBStatus defines the observed state of MongoDB
176177
properties:
178+
members:
179+
type: integer
180+
message:
181+
type: string
177182
mongoUri:
178183
type: string
179184
phase:
180185
type: string
181186
required:
187+
- members
182188
- mongoUri
183189
- phase
184190
type: object

pkg/apis/mongodb/v1/mongodb_types.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
"fmt"
66
"strings"
77

8-
"github.com/mongodb/mongodb-kubernetes-operator/pkg/util/scale"
9-
108
appsv1 "k8s.io/api/apps/v1"
119

10+
"github.com/mongodb/mongodb-kubernetes-operator/pkg/util/scale"
11+
1212
"k8s.io/apimachinery/pkg/runtime"
1313

1414
"k8s.io/apimachinery/pkg/types"
@@ -51,7 +51,7 @@ type MongoDBSpec struct {
5151
FeatureCompatibilityVersion string `json:"featureCompatibilityVersion,omitempty"`
5252

5353
// Security configures security features, such as TLS, and authentication settings for a deployment
54-
// +optional
54+
// +required
5555
Security Security `json:"security"`
5656

5757
// Users specifies the MongoDB users that should be configured in your deployment

0 commit comments

Comments
 (0)