Skip to content

Commit

Permalink
Merge branch 'main' into renovate/benjefferies-branch-protection-bot-1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
NiccoloFei authored Sep 12, 2023
2 parents 88f2423 + 11ad634 commit 03e52fe
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

Expand All @@ -20,7 +20,7 @@ jobs:
version: v3.6.2

- name: Create kind cluster
uses: helm/kind-action@fa81e57adff234b2908110485695db0f181f3c67 # v1.7.0
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0

- name: Deploy using helm chart
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

Expand All @@ -20,7 +20,7 @@ jobs:
with:
version: v3.4.0

- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4
with:
python-version: 3.7

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
-
name: Get tag
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
-
name: Temporarily disable "include administrators" branch protection
if: ${{ always() && github.ref == 'refs/heads/main' }}
Expand Down
4 changes: 2 additions & 2 deletions charts/cloudnative-pg/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ name: cloudnative-pg
description: CloudNativePG Helm Chart
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
type: application
version: "0.18.1"
version: "0.18.2"
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning, they should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.20.1"
appVersion: "1.20.2"
sources:
- https://github.com/cloudnative-pg/charts
keywords:
Expand Down
3 changes: 2 additions & 1 deletion charts/cloudnative-pg/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloudnative-pg

![Version: 0.18.1](https://img.shields.io/badge/Version-0.18.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.20.1](https://img.shields.io/badge/AppVersion-1.20.1-informational?style=flat-square)
![Version: 0.18.2](https://img.shields.io/badge/Version-0.18.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.20.2](https://img.shields.io/badge/AppVersion-1.20.2-informational?style=flat-square)

CloudNativePG Helm Chart

Expand Down Expand Up @@ -44,6 +44,7 @@ CloudNativePG Helm Chart
| podLabels | object | `{}` | Labels to be added to the pod. |
| podSecurityContext | object | `{"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Security Context for the whole pod. |
| priorityClassName | string | `""` | Priority indicates the importance of a Pod relative to other Pods. |
| rbac.aggregateClusterRoles | bool | `false` | Aggregate ClusterRoles to Kubernetes default user-facing roles. Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles |
| rbac.create | bool | `true` | Specifies whether ClusterRole and ClusterRoleBinding should be created. |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
Expand Down
28 changes: 22 additions & 6 deletions charts/cloudnative-pg/templates/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
helm.sh/resource-policy: keep
name: backups.postgresql.cnpg.io
spec:
Expand Down Expand Up @@ -310,7 +310,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
helm.sh/resource-policy: keep
name: clusters.postgresql.cnpg.io
spec:
Expand Down Expand Up @@ -1813,8 +1813,9 @@ spec:
available backup in chronological order.
type: string
exclusive:
description: Set the target to be exclusive (defaults
to true)
description: Set the target to be exclusive. If omitted,
defaults to false, so that in Postgres, `recovery_target_inclusive`
will be true
type: boolean
targetImmediate:
description: End recovery as soon as a consistent state
Expand Down Expand Up @@ -2877,6 +2878,12 @@ spec:
- unsupervised
- supervised
type: string
priorityClassName:
description: Name of the priority class which will be used in every
generated Pod, if the PriorityClass specified does not exist, the
pod will not be able to schedule. Please refer to https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass
for more information
type: string
projectedVolumeTemplate:
description: Template to be used to define projected volumes, projected
volumes will be mounted under `/projected` base folder
Expand Down Expand Up @@ -4311,6 +4318,15 @@ spec:
type: object
description: Instances contains the pod topology of the instances
type: object
nodesUsed:
description: NodesUsed represents the count of distinct nodes
accommodating the instances. A value of '1' suggests that all
instances are hosted on a single node, implying the absence
of High Availability (HA). Ideally, this value should be the
same as the number of instances in the Postgres HA cluster,
implying shared nothing architecture on the compute side.
format: int32
type: integer
successfullyExtracted:
description: SuccessfullyExtracted indicates if the topology data
was extract. It is useful to enact fallback behaviors in synchronous
Expand Down Expand Up @@ -4340,7 +4356,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
helm.sh/resource-policy: keep
name: poolers.postgresql.cnpg.io
spec:
Expand Down Expand Up @@ -12102,7 +12118,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.12.1
helm.sh/resource-policy: keep
name: scheduledbackups.postgresql.cnpg.io
spec:
Expand Down
50 changes: 50 additions & 0 deletions charts/cloudnative-pg/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,54 @@ subjects:
- kind: ServiceAccount
name: {{ include "cloudnative-pg.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "cloudnative-pg.fullname" . }}-view
labels:
{{- include "cloudnative-pg.labels" . | nindent 4 }}
{{- if .Values.rbac.aggregateClusterRoles }}
rbac.authorization.k8s.io/aggregate-to-view: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
{{- end }}
rules:
- apiGroups:
- postgresql.cnpg.io
resources:
- backups
- clusters
- poolers
- scheduledbackups
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "cloudnative-pg.fullname" . }}-edit
labels:
{{- include "cloudnative-pg.labels" . | nindent 4 }}
{{- if .Values.rbac.aggregateClusterRoles }}
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
{{- end }}
rules:
- apiGroups:
- postgresql.cnpg.io
resources:
- backups
- clusters
- poolers
- scheduledbackups
verbs:
- create
- delete
- deletecollection
- patch
- update
---
{{- end }}
3 changes: 3 additions & 0 deletions charts/cloudnative-pg/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
"properties": {
"create": {
"type": "boolean"
},
"aggregateClusterRoles": {
"type": "boolean"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions charts/cloudnative-pg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ serviceAccount:
rbac:
# -- Specifies whether ClusterRole and ClusterRoleBinding should be created.
create: true
# -- Aggregate ClusterRoles to Kubernetes default user-facing roles.
# Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles
aggregateClusterRoles: false

# -- Annotations to be added to all other resources.
commonAnnotations: {}
Expand Down

0 comments on commit 03e52fe

Please sign in to comment.