Skip to content

Commit

Permalink
MongoDB Atlas Operator 2.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Igor Karpukhin <[email protected]>
  • Loading branch information
igor-karpukhin committed Dec 4, 2023
1 parent 88cd17d commit c7d5b90
Show file tree
Hide file tree
Showing 14 changed files with 4,263 additions and 0 deletions.
25 changes: 25 additions & 0 deletions operators/mongodb-atlas-kubernetes/2.0.1/bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM scratch

LABEL com.redhat.openshift.versions="v4.8"
LABEL com.redhat.delivery.backport=true
LABEL com.redhat.delivery.operator.bundle=true

# Core bundle labels.
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=mongodb-atlas-kubernetes
LABEL operators.operatorframework.io.bundle.channels.v1=stable
LABEL operators.operatorframework.io.bundle.channel.default.v1=stable
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.15.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2

# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/

# Copy files to locations specified by labels.
COPY manifests /manifests/
COPY metadata /metadata/
COPY tests/scorecard /tests/scorecard/
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: mongodb-atlas-kubernetes-operator
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
name: atlasbackuppolicies.atlas.mongodb.com
spec:
group: atlas.mongodb.com
names:
kind: AtlasBackupPolicy
listKind: AtlasBackupPolicyList
plural: atlasbackuppolicies
singular: atlasbackuppolicy
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: AtlasBackupPolicy is the Schema for the atlasbackuppolicies API
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
description: AtlasBackupPolicySpec defines the desired state of AtlasBackupPolicy
properties:
items:
description: A list of BackupPolicy items
items:
properties:
frequencyInterval:
description: Desired frequency of the new backup policy item
specified by FrequencyType. A value of 1 specifies the first
instance of the corresponding FrequencyType. The only accepted
value you can set for frequency interval with NVMe clusters
is 12.
enum:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 40
type: integer
frequencyType:
description: 'Frequency associated with the backup policy item.
One of the following values: hourly, daily, weekly or monthly.
You cannot specify multiple hourly and daily backup policy
items.'
enum:
- hourly
- daily
- weekly
- monthly
type: string
retentionUnit:
description: 'Scope of the backup policy item: days, weeks,
or months'
enum:
- days
- weeks
- months
type: string
retentionValue:
description: Value to associate with RetentionUnit
type: integer
required:
- frequencyInterval
- frequencyType
- retentionUnit
- retentionValue
type: object
type: array
required:
- items
type: object
status:
properties:
backupScheduleIDs:
description: DeploymentID of the deployment using the backup policy
items:
type: string
type: array
conditions:
description: Conditions is the list of statuses showing the current
state of the Atlas Custom Resource
items:
description: Condition describes the state of an Atlas Custom Resource
at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of Atlas Custom Resource condition.
type: string
required:
- status
- type
type: object
type: array
observedGeneration:
description: ObservedGeneration indicates the generation of the resource
specification that the Atlas Operator is aware of. The Atlas Operator
updates this field to the 'metadata.generation' as soon as it starts
reconciliation of the resource.
format: int64
type: integer
required:
- conditions
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
labels:
app.kubernetes.io/component: controller
app.kubernetes.io/instance: mongodb-atlas-kubernetes-operator
app.kubernetes.io/name: mongodb-atlas-kubernetes-operator
name: atlasbackupschedules.atlas.mongodb.com
spec:
group: atlas.mongodb.com
names:
kind: AtlasBackupSchedule
listKind: AtlasBackupScheduleList
plural: atlasbackupschedules
singular: atlasbackupschedule
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: AtlasBackupSchedule is the Schema for the atlasbackupschedules
API
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
description: AtlasBackupScheduleSpec defines the desired state of AtlasBackupSchedule
properties:
autoExportEnabled:
default: false
description: Specify true to enable automatic export of cloud backup
snapshots to the AWS bucket. You must also define the export policy
using export. If omitted, defaults to false.
type: boolean
copySettings:
description: Copy backups to other regions for increased resiliency
and faster restores.
items:
properties:
cloudProvider:
default: AWS
description: Identifies the cloud provider that stores the snapshot
copy.
enum:
- AWS
- GCP
- AZURE
type: string
frequencies:
description: List that describes which types of snapshots to
copy.
items:
type: string
minItems: 1
type: array
regionName:
description: Target region to copy snapshots belonging to replicationSpecId
to.
type: string
shouldCopyOplogs:
description: Flag that indicates whether to copy the oplogs
to the target region.
type: boolean
type: object
type: array
export:
description: Export policy for automatically exporting cloud backup
snapshots to AWS bucket.
properties:
exportBucketId:
description: Unique Atlas identifier of the AWS bucket which was
granted access to export backup snapshot
type: string
frequencyType:
default: monthly
enum:
- monthly
type: string
required:
- exportBucketId
- frequencyType
type: object
policy:
description: A reference (name & namespace) for backup policy in the
desired updated backup policy.
properties:
name:
description: Name is the name of the Kubernetes Resource
type: string
namespace:
description: Namespace is the namespace of the Kubernetes Resource
type: string
required:
- name
type: object
referenceHourOfDay:
description: UTC Hour of day between 0 and 23, inclusive, representing
which hour of the day that Atlas takes snapshots for backup policy
items
format: int64
maximum: 23
minimum: 0
type: integer
referenceMinuteOfHour:
description: UTC Minutes after ReferenceHourOfDay that Atlas takes
snapshots for backup policy items. Must be between 0 and 59, inclusive.
format: int64
maximum: 59
minimum: 0
type: integer
restoreWindowDays:
default: 1
description: Number of days back in time you can restore to with Continuous
Cloud Backup accuracy. Must be a positive, non-zero integer. Applies
to continuous cloud backups only.
format: int64
type: integer
updateSnapshots:
description: Specify true to apply the retention changes in the updated
backup policy to snapshots that Atlas took previously.
type: boolean
useOrgAndGroupNamesInExportPrefix:
description: Specify true to use organization and project names instead
of organization and project UUIDs in the path for the metadata files
that Atlas uploads to your S3 bucket after it finishes exporting
the snapshots
type: boolean
required:
- policy
type: object
status:
properties:
conditions:
description: Conditions is the list of statuses showing the current
state of the Atlas Custom Resource
items:
description: Condition describes the state of an Atlas Custom Resource
at a certain point.
properties:
lastTransitionTime:
description: Last time the condition transitioned from one status
to another.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of Atlas Custom Resource condition.
type: string
required:
- status
- type
type: object
type: array
deploymentID:
items:
type: string
type: array
observedGeneration:
description: ObservedGeneration indicates the generation of the resource
specification that the Atlas Operator is aware of. The Atlas Operator
updates this field to the 'metadata.generation' as soon as it starts
reconciliation of the resource.
format: int64
type: integer
required:
- conditions
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading

0 comments on commit c7d5b90

Please sign in to comment.