Skip to content

Commit

Permalink
rgw: add events to CephBucketNotification CR
Browse files Browse the repository at this point in the history
the events are used to mark the start/finish of the reconciliation
and also to log the bucket names on which the CephbucketNotification is
created

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
  • Loading branch information
yuvalif committed Dec 23, 2021
1 parent bb0d0d3 commit 2b93a51
Show file tree
Hide file tree
Showing 7 changed files with 351 additions and 460 deletions.
134 changes: 67 additions & 67 deletions deploy/charts/rook-ceph/templates/resources.yaml
Expand Up @@ -4771,6 +4771,73 @@ status:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
helm.sh/resource-policy: keep
creationTimestamp: null
name: cephfilesystemsubvolumegroups.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephFilesystemSubVolumeGroup
listKind: CephFilesystemSubVolumeGroupList
plural: cephfilesystemsubvolumegroups
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
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: Spec represents the specification of a Ceph Filesystem SubVolumeGroup
properties:
filesystemName:
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
type: string
required:
- filesystemName
type: object
status:
description: Status represents the status of a CephFilesystem SubvolumeGroup
properties:
info:
additionalProperties:
type: string
nullable: true
type: object
phase:
description: ConditionType represent a resource's status
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
Expand Down Expand Up @@ -6001,73 +6068,6 @@ status:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
helm.sh/resource-policy: keep
creationTimestamp: null
name: cephfilesystemsubvolumegroups.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephFilesystemSubVolumeGroup
listKind: CephFilesystemSubVolumeGroupList
plural: cephfilesystemsubvolumegroups
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
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: Spec represents the specification of a Ceph Filesystem SubVolumeGroup
properties:
filesystemName:
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
type: string
required:
- filesystemName
type: object
status:
description: Status represents the status of a CephFilesystem SubvolumeGroup
properties:
info:
additionalProperties:
type: string
nullable: true
type: object
phase:
description: ConditionType represent a resource's status
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
Expand Down
132 changes: 66 additions & 66 deletions deploy/examples/crds.yaml
Expand Up @@ -4769,6 +4769,72 @@ status:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
creationTimestamp: null
name: cephfilesystemsubvolumegroups.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephFilesystemSubVolumeGroup
listKind: CephFilesystemSubVolumeGroupList
plural: cephfilesystemsubvolumegroups
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
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: Spec represents the specification of a Ceph Filesystem SubVolumeGroup
properties:
filesystemName:
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
type: string
required:
- filesystemName
type: object
status:
description: Status represents the status of a CephFilesystem SubvolumeGroup
properties:
info:
additionalProperties:
type: string
nullable: true
type: object
phase:
description: ConditionType represent a resource's status
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
Expand Down Expand Up @@ -5998,72 +6064,6 @@ status:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
creationTimestamp: null
name: cephfilesystemsubvolumegroups.ceph.rook.io
spec:
group: ceph.rook.io
names:
kind: CephFilesystemSubVolumeGroup
listKind: CephFilesystemSubVolumeGroupList
plural: cephfilesystemsubvolumegroups
singular: cephfilesystemsubvolumegroup
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: CephFilesystemSubVolumeGroup represents a Ceph Filesystem SubVolumeGroup
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: Spec represents the specification of a Ceph Filesystem SubVolumeGroup
properties:
filesystemName:
description: FilesystemName is the name of Ceph Filesystem SubVolumeGroup volume name. Typically it's the name of the CephFilesystem CR. If not coming from the CephFilesystem CR, it can be retrieved from the list of Ceph Filesystem volumes with `ceph fs volume ls`. To learn more about Ceph Filesystem abstractions see https://docs.ceph.com/en/latest/cephfs/fs-volumes/#fs-volumes-and-subvolumes
type: string
required:
- filesystemName
type: object
status:
description: Status represents the status of a CephFilesystem SubvolumeGroup
properties:
info:
additionalProperties:
type: string
nullable: true
type: object
phase:
description: ConditionType represent a resource's status
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
- spec
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.1-0.20210420220833-f284e2e8098c
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/ceph.rook.io/v1/types.go
Expand Up @@ -413,6 +413,8 @@ const (
ReconcileSucceeded ConditionReason = "ReconcileSucceeded"
// ReconcileFailed represents when a resource reconciliation failed.
ReconcileFailed ConditionReason = "ReconcileFailed"
// ReconcileStarted represents when a resource reconciliation started.
ReconcileStarted ConditionReason = "ReconcileStarted"

// DeletingReason represents when Rook has detected a resource object should be deleted.
DeletingReason ConditionReason = "Deleting"
Expand Down

0 comments on commit 2b93a51

Please sign in to comment.