From e7fbb46b49b56a7e2040e3a362171043bfa22eb3 Mon Sep 17 00:00:00 2001 From: a8s-ci Date: Fri, 21 Jun 2024 08:13:59 +0000 Subject: [PATCH] Bump manifest and update API documentation --- deploy/a8s/manifests/backup-manager.yaml | 297 +++++++++--------- .../postgresql-operator/v1beta3.md | 2 +- 2 files changed, 154 insertions(+), 145 deletions(-) diff --git a/deploy/a8s/manifests/backup-manager.yaml b/deploy/a8s/manifests/backup-manager.yaml index cfbcb446..1609d6e0 100644 --- a/deploy/a8s/manifests/backup-manager.yaml +++ b/deploy/a8s/manifests/backup-manager.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: backups.backups.anynines.com spec: group: backups.anynines.com @@ -21,14 +21,19 @@ spec: 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' + 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' + 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 @@ -37,8 +42,9 @@ spec: properties: maxRetries: default: Infinite - description: 'How many times the backup will be retried before aborting. - Allowed values: any positive integer, or "Infinite"' + description: |- + How many times the backup will be retried before aborting. + Allowed values: any positive integer, or "Infinite" pattern: ^\d+|Infinite$ type: string serviceInstance: @@ -46,18 +52,21 @@ spec: to backup. properties: apiGroup: - description: APIGroup is the API group of the Kubernetes API resource - that represents the Data Service Instance to backup or restore - (e.g. postgresql.anynines.com, redis.anynines.com, etc...). + description: |- + APIGroup is the API group of the Kubernetes API resource that represents the + Data Service Instance to backup or restore (e.g. postgresql.anynines.com, + redis.anynines.com, etc...). type: string kind: - description: Kind is the kind of the Kubernetes API resource that - represents the Data Service Instance to backup or restore (e.g. - Postgresql, Redis, etc...). + description: |- + Kind is the kind of the Kubernetes API resource that represents the + Data Service Instance to backup or restore (e.g. Postgresql, Redis, + etc...). type: string name: - description: Name is the name of the Kubernetes API resource that - represents the Data Service Instance to backup or restore. + description: |- + Name is the name of the Kubernetes API resource that represents the + Data Service Instance to backup or restore. type: string required: - apiGroup @@ -71,54 +80,53 @@ spec: description: BackupStatus defines the observed state of Backup. properties: backupID: - description: BackupID is the ID of the Backup; clients can use this - to poll the status of the Backup at the Pod identified by `PodUsedID`. + description: |- + BackupID is the ID of the Backup; clients can use this to poll the status of the Backup at + the Pod identified by `PodUsedID`. type: string conditions: - description: Conditions include a set of not mutually exclusive states - the Backup can be in, as well as the last observed time stamp for - these conditions. They include "Ready", "InProgress", "UploadedToS3", - "Terminating". + description: |- + Conditions include a set of not mutually exclusive states the Backup can be in, + as well as the last observed time stamp for these conditions. + They include "Ready", "InProgress", "UploadedToS3", "Terminating". items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n \ttype FooStatus struct{ \t // Represents the observations - of a foo's current state. \t // Known .status.conditions.type - are: \"Available\", \"Progressing\", and \"Degraded\" \t // - +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map - \t // +listMapKey=type \t Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields - \t}" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -132,11 +140,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string @@ -149,19 +158,21 @@ spec: type: object type: array lastObservationTime: - description: LastObservationTime is the timestamp of the last time - the Condition was observed to be true. + description: |- + LastObservationTime is the timestamp of the last time the Condition was + observed to be true. format: date-time type: string podUsedNamespacedName: - description: 'PodUsedNamespacedName is the namespaced name of the - DSI Pod to which the backup request was sent. TODO: Represent this - jointly with `PodUsedID` (below) via a PodRef.' + description: |- + PodUsedNamespacedName is the namespaced name of the DSI Pod to which the backup request was + sent. + TODO: Represent this jointly with `PodUsedID` (below) via a PodRef. type: string podUsedUID: - description: 'PodUsedUID is the UID of the DSI Pod to which the backup - request was sent. TODO: Represent this jointly with `PodUsedNamespacedName` - (above) via a PodRef.' + description: |- + PodUsedUID is the UID of the DSI Pod to which the backup request was sent. + TODO: Represent this jointly with `PodUsedNamespacedName` (above) via a PodRef. type: string retries: description: Number of times the backup has been retried @@ -174,18 +185,12 @@ spec: 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.4.1 + controller-gen.kubebuilder.io/version: v0.14.0 name: restores.backups.anynines.com spec: group: backups.anynines.com @@ -204,14 +209,19 @@ spec: description: Restore is the Schema for the restore 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' + 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' + 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 @@ -219,28 +229,31 @@ spec: description: RestoreSpec defines the desired state of Restore. properties: backupName: - description: BackupName is the name of the Backup API object to use - for the Restore; the namespace is assumed to be the same as the - one for the Restore object, we might reconsider this assumption - in the future. + description: |- + BackupName is the name of the Backup API object to use for the Restore; the namespace is + assumed to be the same as the one for the Restore object, we might reconsider this + assumption in the future. type: string serviceInstance: description: ServiceInstance identifies the Data Service Instance to restore. properties: apiGroup: - description: APIGroup is the API group of the Kubernetes API resource - that represents the Data Service Instance to backup or restore - (e.g. postgresql.anynines.com, redis.anynines.com, etc...). + description: |- + APIGroup is the API group of the Kubernetes API resource that represents the + Data Service Instance to backup or restore (e.g. postgresql.anynines.com, + redis.anynines.com, etc...). type: string kind: - description: Kind is the kind of the Kubernetes API resource that - represents the Data Service Instance to backup or restore (e.g. - Postgresql, Redis, etc...). + description: |- + Kind is the kind of the Kubernetes API resource that represents the + Data Service Instance to backup or restore (e.g. Postgresql, Redis, + etc...). type: string name: - description: Name is the name of the Kubernetes API resource that - represents the Data Service Instance to backup or restore. + description: |- + Name is the name of the Kubernetes API resource that represents the + Data Service Instance to backup or restore. type: string required: - apiGroup @@ -255,49 +268,48 @@ spec: description: RestoreStatus defines the observed state of Restore. properties: conditions: - description: Conditions include a set of not mutually exclusive states - the Restore can be in, as well as the last observed time stamp for - these conditions. They include "Ready", "InProgress", "Terminating". + description: |- + Conditions include a set of not mutually exclusive states the Restore can be in, + as well as the last observed time stamp for these conditions. + They include "Ready", "InProgress", "Terminating". items: description: "Condition contains details for one aspect of the current - state of this API Resource. --- This struct is intended for direct - use as an array at the field path .status.conditions. For example, - \n \ttype FooStatus struct{ \t // Represents the observations - of a foo's current state. \t // Known .status.conditions.type - are: \"Available\", \"Progressing\", and \"Degraded\" \t // - +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map - \t // +listMapKey=type \t Conditions []metav1.Condition - `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields - \t}" + state of this API Resource.\n---\nThis struct is intended for + direct use as an array at the field path .status.conditions. For + example,\n\n\n\ttype FooStatus struct{\n\t // Represents the + observations of a foo's current state.\n\t // Known .status.conditions.type + are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // + +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t + \ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" + patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t + \ // other fields\n\t}" properties: lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. This should be when - the underlying condition changed. If that is not known, then - using the time when the API field changed is acceptable. + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. format: date-time type: string message: - description: message is a human readable message indicating - details about the transition. This may be an empty string. + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. maxLength: 32768 type: string observedGeneration: - description: observedGeneration represents the .metadata.generation - that the condition was set based upon. For instance, if .metadata.generation - is currently 12, but the .status.conditions[x].observedGeneration - is 9, the condition is out of date with respect to the current - state of the instance. + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. format: int64 minimum: 0 type: integer reason: - description: reason contains a programmatic identifier indicating - the reason for the condition's last transition. Producers - of specific condition types may define expected values and - meanings for this field, and whether the values are considered - a guaranteed API. The value should be a CamelCase string. + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field may not be empty. maxLength: 1024 minLength: 1 @@ -311,11 +323,12 @@ spec: - Unknown type: string type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - --- Many .condition.type values are consistent across resources - like Available, but because arbitrary conditions can be useful - (see .node.status.conditions), the ability to deconflict is - important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + description: |- + type of condition in CamelCase or in foo.example.com/CamelCase. + --- + Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be + useful (see .node.status.conditions), the ability to deconflict is important. + The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) maxLength: 316 pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ type: string @@ -328,8 +341,9 @@ spec: type: object type: array lastObservationTime: - description: LastObservationTime is the timestamp of the last time - the Condition was observed to be true. + description: |- + LastObservationTime is the timestamp of the last time the Condition was + observed to be true. format: date-time type: string podToPoll: @@ -351,8 +365,9 @@ spec: - uid type: object restoreID: - description: RestoreID is the ID of the Restore; clients can use this - to poll the status of the Restore at the Pod identified by `PodToHit`. + description: |- + RestoreID is the ID of the Restore; clients can use this to poll the status of the Restore + at the Pod identified by `PodToHit`. type: string type: object type: object @@ -360,12 +375,6 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] --- apiVersion: v1 kind: ServiceAccount @@ -404,7 +413,6 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - creationTimestamp: null name: a8s-backup-manager-role rules: - apiGroups: @@ -623,12 +631,22 @@ spec: app.kubernetes.io/part-of: a8s-backup spec: containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=7 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https - args: - --health-probe-bind-address=:8081 - --metrics-bind-address=127.0.0.1:8080 - --leader-elect command: - - ./manager + - a8s-backup-manager env: - name: systemNamespace valueFrom: @@ -636,7 +654,7 @@ spec: fieldPath: metadata.namespace - name: BACKUP_CREDENTIAL_PATH value: /etc/backup-store-secrets - image: public.ecr.aws/w5n9a2g2/a9s-ds-for-k8s/dev/backup-manager:2616f22c4fe670541c3c78131aw018902e847rbf + image: public.ecr.aws/w5n9a2g2/a9s-ds-for-k8s/dev/backup-manager:e5a1eda537edb0e88eacc967f786d1cdac32a15f livenessProbe: httpGet: path: /healthz @@ -664,16 +682,6 @@ spec: name: backup-store-config-volume - mountPath: /etc/backup-store-secrets name: secret-volume - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=7 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https securityContext: runAsUser: 65532 serviceAccountName: a8s-backup-manager-account @@ -688,3 +696,4 @@ spec: - name: secret-volume secret: secretName: a8s-backup-storage-credentials + diff --git a/docs/application-developers/api-documentation/postgresql-operator/v1beta3.md b/docs/application-developers/api-documentation/postgresql-operator/v1beta3.md index e9ba78ad..9b24623d 100644 --- a/docs/application-developers/api-documentation/postgresql-operator/v1beta3.md +++ b/docs/application-developers/api-documentation/postgresql-operator/v1beta3.md @@ -95,7 +95,7 @@ _Appears in:_ | `volumeSize` _Quantity_ | VolumeSize sets the size of the persistent volume of the PostgreSQL instance, the minimum size is 0.5Gi. The size is to be specified as a plain integer or as a fixed-point number using one of these suffixes: E, P, T, G, M, K, corresponding to kilo-, mega-, gigabytes, etc. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki, corresponding to kibi-, mebi-, gibibytes, etc. For example a value of "0.5Gi" corresponds to an instance with a persistent volume of 0.5 gibibytes. | | `parameters` _[PostgresqlParameters](#postgresqlparameters)_ | | | `schedulingConstraints` _[PostgresqlSchedulingConstraints](#postgresqlschedulingconstraints)_ | SchedulingConstraints contains subfields that affect how the Pods of the Postgresql instance will be scheduled onto Kubernetes cluster nodes. The subfields map directly to Kubernetes API primitives such as node taints, tolerations, affinity and (anti)affinity. See the documentation of each subfield for more details. Together, the subfields of SchedulingConstraints allow you to express constraints such as "Pods of this Postgresql instance MUST be scheduled to different availability zones", or "Pods of this Postgresql instance SHOULD preferably (but not mandatorily) be scheduled to nodes that have a SSD", and many more. As a warning, the subfields of SchedulingConstraints can interfere with each other, so when you set one of them you should consider how it will interact with the values that you set for other subfields. | -| `extensions` _string array_ | Extensions defines a list of PostgreSQL extensions which should be installed. Extensions can be installed from the supported list of extensions. The currently supported extensions are: postgis, uuid-ossp, ltree, pgcrypto, pg_stat_statements, fuzzystrmatch, pg_trgm, hstore. | +| `extensions` _string array_ | Extensions defines a list of PostgreSQL extensions which should be installed. Extensions can be installed from the supported list of extensions. The currently supported extensions are: postgis, uuid-ossp, ltree, pgcrypto, pg_stat_statements, fuzzystrmatch, pg_trgm, hstore | | `enableReadOnlyService` _boolean_ | EnableReadOnlyService enables the creation of a read-only service. A read-only service is meant for read operations and allows for load-balancing across different PostgreSQL cluster members. Stale reads are possible when reading from this service. By default this feature is disabled. | | `readOnlyTargetNodes` _string_ | ReadOnlyTargetNodes specifies the target PostgreSQL cluster members which the read-only service points to. "replicas" means that only the PostgreSQL cluster replicas are used for the read-only service. "all" means that the read-only service points to all PostgreSQL cluster members. By default this feature only points to the PostgreSQL cluster replicas. | | `expose` _[ExposeOption](#exposeoption)_ | Expose determines where (and how) the DSI can be accessed from. Currently supported values are - "Internal": the DSI will be accessible only from inside the K8s cluster - "LoadBalancer": the DSI will receive dedicated load balancers with reachable IP addresses that can be used from external locations . This is only supported on K8s clusters that support external load balancers. This field applies to all the services backed by the DSI, that is, both the master-only one and the read-only one; the "LoadBalancer" value means that each service will get a dedicated LoadBalancer. |