Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the mongodb v1 API group +k8s:deepcopy-gen=package,register +groupName=mongodbcommunity.mongodb.com +versionName=v1
Package v1 contains API Schema definitions for the mongodbcommunity v1 API group +kubebuilder:object:generate=true +groupName=mongodbcommunity.mongodb.com
Index ¶
- Variables
- type AuthMode
- type Authentication
- type AuthenticationRestriction
- type CustomRole
- type LocalObjectReference
- type MongoDBCommunity
- type MongoDBCommunityList
- type MongoDBCommunitySpec
- type MongoDBCommunityStatus
- type MongoDBUser
- type MongodConfiguration
- type Phase
- type Privilege
- type ReplicaSetHorizonConfiguration
- type Resource
- type Role
- type SecretKeyReference
- type Security
- type StatefulSetConfiguration
- type StatefulSetSpecWrapper
- type TLS
- type Type
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "mongodbcommunity.mongodb.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type AuthMode ¶
type AuthMode string
AuthMode ... +kubebuilder:validation:Enum=SCRAM;SCRAM-SHA-256;SCRAM-SHA-1
type Authentication ¶
type Authentication struct { // Modes is an array specifying which authentication methods should be enabled. Modes []AuthMode `json:"modes"` // +optional // +kubebuilder:default:=true // +nullable IgnoreUnknownUsers *bool `json:"ignoreUnknownUsers,omitempty"` }
Authentication ...
func (*Authentication) DeepCopy ¶
func (in *Authentication) DeepCopy() *Authentication
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication.
func (*Authentication) DeepCopyInto ¶
func (in *Authentication) DeepCopyInto(out *Authentication)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AuthenticationRestriction ¶ added in v1.14.0
type AuthenticationRestriction struct { ClientSource []string `json:"clientSource"` ServerAddress []string `json:"serverAddress"` }
AuthenticationRestriction specifies a list of IP addresses and CIDR ranges users are allowed to connect to or from.
func (*AuthenticationRestriction) DeepCopy ¶ added in v1.14.0
func (in *AuthenticationRestriction) DeepCopy() *AuthenticationRestriction
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationRestriction.
func (*AuthenticationRestriction) DeepCopyInto ¶ added in v1.14.0
func (in *AuthenticationRestriction) DeepCopyInto(out *AuthenticationRestriction)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomRole ¶ added in v1.14.0
type CustomRole struct { // The name of the role. Role string `json:"role"` // The database of the role. DB string `json:"db"` // The privileges to grant the role. Privileges []Privilege `json:"privileges"` // An array of roles from which this role inherits privileges. // +optional Roles []Role `json:"roles"` // The authentication restrictions the server enforces on the role. // +optional AuthenticationRestrictions []AuthenticationRestriction `json:"authenticationRestrictions,omitempty"` }
CustomRole defines a custom MongoDB role.
func (*CustomRole) DeepCopy ¶ added in v1.14.0
func (in *CustomRole) DeepCopy() *CustomRole
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomRole.
func (*CustomRole) DeepCopyInto ¶ added in v1.14.0
func (in *CustomRole) DeepCopyInto(out *CustomRole)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LocalObjectReference ¶
type LocalObjectReference struct {
Name string `json:"name"`
}
LocalObjectReference is a reference to another Kubernetes object by name. TODO: Replace with a type from the K8s API. CoreV1 has an equivalent
"LocalObjectReference" type but it contains a TODO in its description that we don't want in our CRD.
func (*LocalObjectReference) DeepCopy ¶
func (in *LocalObjectReference) DeepCopy() *LocalObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference.
func (*LocalObjectReference) DeepCopyInto ¶
func (in *LocalObjectReference) DeepCopyInto(out *LocalObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MongoDBCommunity ¶ added in v1.14.0
type MongoDBCommunity struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MongoDBCommunitySpec `json:"spec,omitempty"` Status MongoDBCommunityStatus `json:"status,omitempty"` }
MongoDBCommunity is the Schema for the mongodbs API +kubebuilder:subresource:status +kubebuilder:resource:path=mongodbcommunity,scope=Namespaced,shortName=mdbc,singular=mongodbcommunity +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Current state of the MongoDB deployment" +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".status.version",description="Version of MongoDB server"
func (*MongoDBCommunity) DeepCopy ¶ added in v1.14.0
func (in *MongoDBCommunity) DeepCopy() *MongoDBCommunity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBCommunity.
func (*MongoDBCommunity) DeepCopyInto ¶ added in v1.14.0
func (in *MongoDBCommunity) DeepCopyInto(out *MongoDBCommunity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MongoDBCommunity) DeepCopyObject ¶ added in v1.14.0
func (in *MongoDBCommunity) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MongoDBCommunityList ¶ added in v1.14.0
type MongoDBCommunityList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MongoDBCommunity `json:"items"` }
MongoDBCommunityList contains a list of MongoDB
func (*MongoDBCommunityList) DeepCopy ¶ added in v1.14.0
func (in *MongoDBCommunityList) DeepCopy() *MongoDBCommunityList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBCommunityList.
func (*MongoDBCommunityList) DeepCopyInto ¶ added in v1.14.0
func (in *MongoDBCommunityList) DeepCopyInto(out *MongoDBCommunityList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MongoDBCommunityList) DeepCopyObject ¶ added in v1.14.0
func (in *MongoDBCommunityList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MongoDBCommunitySpec ¶ added in v1.14.0
type MongoDBCommunitySpec struct { // Members is the number of members in the replica set // +optional Members int `json:"members"` // Type defines which type of MongoDB deployment the resource should create // +kubebuilder:validation:Enum=ReplicaSet Type Type `json:"type"` // Version defines which version of MongoDB will be used Version string `json:"version"` // Arbiters is the number of arbiters (each counted as a member) in the replica set // +optional Arbiters int `json:"arbiters"` // FeatureCompatibilityVersion configures the feature compatibility version that will // be set for the deployment // +optional FeatureCompatibilityVersion string `json:"featureCompatibilityVersion,omitempty"` // ReplicaSetHorizons Add this parameter and values if you need your database // to be accessed outside of Kubernetes. This setting allows you to // provide different DNS settings within the Kubernetes cluster and // to the Kubernetes cluster. The Kubernetes Operator uses split horizon // DNS for replica set members. This feature allows communication both // within the Kubernetes cluster and from outside Kubernetes. // +optional ReplicaSetHorizons ReplicaSetHorizonConfiguration `json:"replicaSetHorizons,omitempty"` // Security configures security features, such as TLS, and authentication settings for a deployment // +required Security Security `json:"security"` // Users specifies the MongoDB users that should be configured in your deployment // +required Users []MongoDBUser `json:"users"` // +optional StatefulSetConfiguration StatefulSetConfiguration `json:"statefulSet,omitempty"` // AdditionalMongodConfig is additional configuration that can be passed to // each data-bearing mongod at runtime. Uses the same structure as the mongod // configuration file: https://docs.mongodb.com/manual/reference/configuration-options/ // +kubebuilder:validation:Type=object // +optional // +kubebuilder:pruning:PreserveUnknownFields // +nullable AdditionalMongodConfig MongodConfiguration `json:"additionalMongodConfig,omitempty"` }
MongoDBCommunitySpec defines the desired state of MongoDB
func (*MongoDBCommunitySpec) DeepCopy ¶ added in v1.14.0
func (in *MongoDBCommunitySpec) DeepCopy() *MongoDBCommunitySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBCommunitySpec.
func (*MongoDBCommunitySpec) DeepCopyInto ¶ added in v1.14.0
func (in *MongoDBCommunitySpec) DeepCopyInto(out *MongoDBCommunitySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MongoDBCommunityStatus ¶ added in v1.14.0
type MongoDBCommunityStatus struct { MongoURI string `json:"mongoUri"` Phase Phase `json:"phase"` CurrentStatefulSetReplicas int `json:"currentStatefulSetReplicas"` CurrentMongoDBMembers int `json:"currentMongoDBMembers"` Message string `json:"message,omitempty"` }
MongoDBCommunityStatus defines the observed state of MongoDB
func (*MongoDBCommunityStatus) DeepCopy ¶ added in v1.14.0
func (in *MongoDBCommunityStatus) DeepCopy() *MongoDBCommunityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBCommunityStatus.
func (*MongoDBCommunityStatus) DeepCopyInto ¶ added in v1.14.0
func (in *MongoDBCommunityStatus) DeepCopyInto(out *MongoDBCommunityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MongoDBUser ¶
type MongoDBUser struct { // Name is the username of the user Name string `json:"name"` // DB is the database the user is stored in. Defaults to "admin" // +optional DB string `json:"db"` // PasswordSecretRef is a reference to the secret containing this user's password PasswordSecretRef SecretKeyReference `json:"passwordSecretRef"` // Roles is an array of roles assigned to this user Roles []Role `json:"roles"` // ScramCredentialsSecretName appended by string "scram-credentials" is the name of the secret object created by the mongoDB operator for storing SCRAM credentials // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ ScramCredentialsSecretName string `json:"scramCredentialsSecretName"` }
MongoDBUser ...
func (*MongoDBUser) DeepCopy ¶
func (in *MongoDBUser) DeepCopy() *MongoDBUser
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MongoDBUser.
func (*MongoDBUser) DeepCopyInto ¶
func (in *MongoDBUser) DeepCopyInto(out *MongoDBUser)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MongodConfiguration ¶
type MongodConfiguration struct {
Object map[string]interface{} `json:"-"`
}
MongodConfiguration holds the optional mongod configuration that should be merged with the operator created one.
The CRD generator does not support map[string]interface{} on the top level and hence we need to work around this with a wrapping struct.
func (*MongodConfiguration) DeepCopy ¶
func (m *MongodConfiguration) DeepCopy() *MongodConfiguration
DeepCopy ...
func (*MongodConfiguration) DeepCopyInto ¶
func (in *MongodConfiguration) DeepCopyInto(out *MongodConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Privilege ¶ added in v1.14.0
Privilege defines the actions a role is allowed to perform on a given resource.
func (*Privilege) DeepCopy ¶ added in v1.14.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Privilege.
func (*Privilege) DeepCopyInto ¶ added in v1.14.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaSetHorizonConfiguration ¶
ReplicaSetHorizonConfiguration holds the split horizon DNS settings for replica set members.
func (ReplicaSetHorizonConfiguration) DeepCopy ¶
func (in ReplicaSetHorizonConfiguration) DeepCopy() ReplicaSetHorizonConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetHorizonConfiguration.
func (ReplicaSetHorizonConfiguration) DeepCopyInto ¶
func (in ReplicaSetHorizonConfiguration) DeepCopyInto(out *ReplicaSetHorizonConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Resource ¶ added in v1.14.0
type Resource struct { // +optional DB *string `json:"db,omitempty"` // +optional Collection *string `json:"collection,omitempty"` // +optional Cluster bool `json:"cluster,omitempty"` // +optional AnyResource bool `json:"anyResource,omitempty"` }
Resource specifies specifies the resources upon which a privilege permits actions. See https://docs.mongodb.com/manual/reference/resource-document for more.
func (*Resource) DeepCopy ¶ added in v1.14.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶ added in v1.14.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Role ¶
type Role struct { // DB is the database the role can act on DB string `json:"db"` // Name is the name of the role Name string `json:"name"` }
Role is the database role this user should have
func (*Role) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role.
func (*Role) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeyReference ¶
type SecretKeyReference struct { // Name is the name of the secret storing this user's password Name string `json:"name"` // Key is the key in the secret storing this password. Defaults to "password" // +optional Key string `json:"key"` }
SecretKeyReference is a reference to the secret containing the user's password
func (*SecretKeyReference) DeepCopy ¶
func (in *SecretKeyReference) DeepCopy() *SecretKeyReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeyReference.
func (*SecretKeyReference) DeepCopyInto ¶
func (in *SecretKeyReference) DeepCopyInto(out *SecretKeyReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Security ¶
type Security struct { // +optional Authentication Authentication `json:"authentication"` // TLS configuration for both client-server and server-server communication // +optional TLS TLS `json:"tls"` // User-specified custom MongoDB roles that should be configured in the deployment. // +optional Roles []CustomRole `json:"roles,omitempty"` }
Security ...
func (*Security) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Security.
func (*Security) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulSetConfiguration ¶
type StatefulSetConfiguration struct { // +kubebuilder:pruning:PreserveUnknownFields SpecWrapper StatefulSetSpecWrapper `json:"spec"` }
StatefulSetConfiguration holds the optional custom StatefulSet that should be merged into the operator created one.
func (*StatefulSetConfiguration) DeepCopy ¶
func (in *StatefulSetConfiguration) DeepCopy() *StatefulSetConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetConfiguration.
func (*StatefulSetConfiguration) DeepCopyInto ¶
func (in *StatefulSetConfiguration) DeepCopyInto(out *StatefulSetConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatefulSetSpecWrapper ¶ added in v1.14.0
type StatefulSetSpecWrapper struct {
Spec appsv1.StatefulSetSpec `json:"-"`
}
StatefulSetSpecWrapper is a wrapper around StatefulSetSpec with a custom implementation of MarshalJSON and UnmarshalJSON which delegate to the underlying Spec to avoid CRD pollution.
func (*StatefulSetSpecWrapper) DeepCopy ¶ added in v1.14.0
func (m *StatefulSetSpecWrapper) DeepCopy() *StatefulSetSpecWrapper
DeepCopy ...
func (*StatefulSetSpecWrapper) DeepCopyInto ¶ added in v1.14.0
func (in *StatefulSetSpecWrapper) DeepCopyInto(out *StatefulSetSpecWrapper)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLS ¶
type TLS struct { Enabled bool `json:"enabled"` // Optional configures if TLS should be required or optional for connections // +optional Optional bool `json:"optional"` // CertificateKeySecret is a reference to a Secret containing a private key and certificate to use for TLS. // The key and cert are expected to be PEM encoded and available at "tls.key" and "tls.crt". // This is the same format used for the standard "kubernetes.io/tls" Secret type, but no specific type is required. // +optional CertificateKeySecret LocalObjectReference `json:"certificateKeySecretRef"` // CaConfigMap is a reference to a ConfigMap containing the certificate for the CA which signed the server certificates // The certificate is expected to be available under the key "ca.crt" // +optional CaConfigMap LocalObjectReference `json:"caConfigMapRef"` }
TLS is the configuration used to set up TLS encryption
func (*TLS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS.
func (*TLS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.