Skip to content

Commit

Permalink
Merge pull request #28 from cloudogu/bugfix/27_add_watch_permission
Browse files Browse the repository at this point in the history
Add watch permission
  • Loading branch information
robertauer authored Jan 10, 2024
2 parents 47517ce + c7b263f commit cfd67f4
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 154 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- [#27] Added missing watch permission for statefulsets.
- This is used when waiting for the etcd on maintenance switch.

### Changed
- [#14] Updated docs for installing and configuring `k8s-longhorn` and `k8s-velero`.

Expand Down
105 changes: 47 additions & 58 deletions k8s/helm-crd/templates/k8s.cloudogu.com_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,61 +18,50 @@ spec:
singular: backup
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: Backup is the Schema for the backups 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: Spec defines the desired state of Backup
properties:
provider:
description: Provider defines the backup provider which should be
used for the backup.
type: string
syncedFromProvider:
description: 'SyncedFromProvider defines that this backup already
exists in the provider and its status should be synced. This is
necessary because we cannot set the status of a backup on creation,
see: https://stackoverflow.com/questions/73574615/how-to-create-kubernetes-objects-with-status-fields'
type: boolean
type: object
status:
description: Status defines the observed state of Backup
properties:
completionTimestamp:
description: CompletionTimestamp marks the date/time when the backup
finished being processed, regardless of any errors.
format: date-time
type: string
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to
wait until the next requeue.
format: int64
type: integer
startTimestamp:
description: StartTimestamp marks the date/time when the backup started
being processed.
format: date-time
type: string
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
- name: v1
schema:
openAPIV3Schema:
description: Backup is the Schema for the backups 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: Spec defines the desired state of Backup
properties:
provider:
description: Provider defines the backup provider which should be used for the backup.
type: string
syncedFromProvider:
description: 'SyncedFromProvider defines that this backup already exists in the provider and its status should be synced. This is necessary because we cannot set the status of a backup on creation, see: https://stackoverflow.com/questions/73574615/how-to-create-kubernetes-objects-with-status-fields'
type: boolean
type: object
status:
description: Status defines the observed state of Backup
properties:
completionTimestamp:
description: CompletionTimestamp marks the date/time when the backup finished being processed, regardless of any errors.
format: date-time
type: string
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue.
format: int64
type: integer
startTimestamp:
description: StartTimestamp marks the date/time when the backup started being processed.
format: date-time
type: string
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
96 changes: 46 additions & 50 deletions k8s/helm-crd/templates/k8s.cloudogu.com_backupschedules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
name: backupschedules.k8s.cloudogu.com
labels:
app: ces
app.kubernetes.io/name: k8s-backup-operator
k8s.cloudogu.com/part-of: backup
spec:
group: k8s.cloudogu.com
names:
Expand All @@ -14,53 +18,45 @@ spec:
singular: backupschedule
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: BackupSchedule is the Schema for the backupschedules 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: BackupScheduleSpec defines the desired state of BackupSchedule
properties:
provider:
description: Provider defines the backup provider which should be
used for the scheduled backups.
type: string
schedule:
description: Schedule is a cron expression defining when to run the
backup.
type: string
type: object
status:
description: BackupScheduleStatus defines the observed state of BackupSchedule
properties:
currentCronJobImage:
description: CurrentCronJobImage is the image currently used to create
scheduled backups.
type: string
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to
wait until the next requeue.
format: int64
type: integer
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
- name: v1
schema:
openAPIV3Schema:
description: BackupSchedule is the Schema for the backupschedules 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: BackupScheduleSpec defines the desired state of BackupSchedule
properties:
provider:
description: Provider defines the backup provider which should be used for the scheduled backups.
type: string
schedule:
description: Schedule is a cron expression defining when to run the backup.
type: string
type: object
status:
description: BackupScheduleStatus defines the observed state of BackupSchedule
properties:
currentCronJobImage:
description: CurrentCronJobImage is the image currently used to create scheduled backups.
type: string
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue.
format: int64
type: integer
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
84 changes: 39 additions & 45 deletions k8s/helm-crd/templates/k8s.cloudogu.com_restores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,42 @@ spec:
singular: restore
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
description: Restore is the Schema for the restores 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: Spec defines the desired state of Restore
properties:
backupName:
description: BackupName references the backup that should be restored.
type: string
provider:
description: Provider defines the backup provider which should be
used for the restore.
type: string
type: object
status:
description: Status defines the observed state of Restore
properties:
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to
wait until the next requeue.
format: int64
type: integer
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
- name: v1
schema:
openAPIV3Schema:
description: Restore is the Schema for the restores 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: Spec defines the desired state of Restore
properties:
backupName:
description: BackupName references the backup that should be restored.
type: string
provider:
description: Provider defines the backup provider which should be used for the restore.
type: string
type: object
status:
description: Status defines the observed state of Restore
properties:
requeueTimeNanos:
description: RequeueTimeNanos contains the time in nanoseconds to wait until the next requeue.
format: int64
type: integer
status:
description: Status represents the state of the backup.
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
3 changes: 2 additions & 1 deletion k8s/helm/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ rules:
- get
- list
- delete
- update
- update
- watch

0 comments on commit cfd67f4

Please sign in to comment.