diff --git a/charts/plugin-barman-cloud/README.md b/charts/plugin-barman-cloud/README.md index 7b39ab9ac7..b8381b63ec 100644 --- a/charts/plugin-barman-cloud/README.md +++ b/charts/plugin-barman-cloud/README.md @@ -30,6 +30,7 @@ Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud | certificate.duration | string | `"2160h"` | The duration of the certificates. | | certificate.issuerName | string | `"selfsigned-issuer"` | The name of the issuer to use for the certificates. | | certificate.renewBefore | string | `"360h"` | The renew before time for the certificates. | +| certificate.server.dnsNames | list | `[]` | The DNS names for the server certificate. If not set, it defaults to `[.Values.service.name]`. | | commonAnnotations | object | `{}` | Annotations to be added to all other resources. | | containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":10001,"runAsUser":10001,"seccompProfile":{"type":"RuntimeDefault"}}` | Container Security Context. | | crds.create | bool | `true` | Specifies whether the CRDs should be created when installing the chart. | @@ -51,9 +52,11 @@ Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud | rbac.create | bool | `true` | Specifies whether Role and RoleBinding should be created. | | replicaCount | int | `1` | | | resources | object | `{}` | | +| service.annotations | object | `{"pluginServerName":""}` | Service annotations | +| service.annotations.pluginServerName | string | `""` | The plugin server name to be used by CloudNativePG. If set, it will be added as `cnpg.io/pluginServerName` annotation. | | service.ipFamilies | list | `[]` | Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. | | service.ipFamilyPolicy | string | `""` | Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) | -| service.name | string | `"barman-cloud"` | DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate and can not be configured | +| service.name | string | `"barman-cloud"` | DO NOT CHANGE THE SERVICE NAME as it is currently used by CloudNativePG to identify the plugin | | service.port | int | `9090` | | | serviceAccount.create | bool | `true` | Specifies whether the service account should be created. | | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template. | @@ -63,3 +66,6 @@ Helm Chart for CloudNativePG's CNPG-I backup plugin using Barman Cloud | tolerations | list | `[]` | Tolerations for the operator to be installed. | | topologySpreadConstraints | list | `[]` | Topology Spread Constraints for the operator to be installed. | | updateStrategy | object | `{}` | Update strategy for the operator. ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy For example: type: RollingUpdate rollingUpdate: maxSurge: 25% maxUnavailable: 25% WARNING: the RollingUpdate strategy is not supported by the operator yet so it can currently only use the Recreate strategy. | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) diff --git a/charts/plugin-barman-cloud/templates/server-certificate.yaml b/charts/plugin-barman-cloud/templates/server-certificate.yaml index e82eaa34ba..228d28550e 100644 --- a/charts/plugin-barman-cloud/templates/server-certificate.yaml +++ b/charts/plugin-barman-cloud/templates/server-certificate.yaml @@ -26,7 +26,11 @@ metadata: spec: commonName: {{ .Values.service.name }} dnsNames: + {{- if .Values.certificate.server.dnsNames }} + {{- toYaml .Values.certificate.server.dnsNames | nindent 4 }} + {{- else }} - {{ .Values.service.name }} + {{- end }} duration: {{ .Values.certificate.duration | default "2160h" }} isCA: false issuerRef: diff --git a/charts/plugin-barman-cloud/templates/service.yaml b/charts/plugin-barman-cloud/templates/service.yaml index d98f55fbac..014f7fd489 100644 --- a/charts/plugin-barman-cloud/templates/service.yaml +++ b/charts/plugin-barman-cloud/templates/service.yaml @@ -27,6 +27,9 @@ metadata: cnpg.io/pluginClientSecret: barman-cloud-client-tls cnpg.io/pluginPort: {{ .Values.service.port | quote }} cnpg.io/pluginServerSecret: barman-cloud-server-tls + {{- if .Values.service.annotations.pluginServerName }} + cnpg.io/pluginServerName: {{ .Values.service.annotations.pluginServerName }} + {{- end }} {{- with .Values.commonAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/charts/plugin-barman-cloud/values.schema.json b/charts/plugin-barman-cloud/values.schema.json index 112c01ae19..16a89e7542 100644 --- a/charts/plugin-barman-cloud/values.schema.json +++ b/charts/plugin-barman-cloud/values.schema.json @@ -61,6 +61,24 @@ "required": [], "title": "renewBefore", "type": "string" + }, + "server": { + "properties": { + "dnsNames": { + "description": "The DNS names for the server certificate.\nIf not set, it defaults to `[.Values.service.name]`.", + "items": { + "type": "string" + }, + "required": [], + "title": "dnsNames", + "type": "array" + } + }, + "required": [ + "dnsNames" + ], + "title": "server", + "type": "object" } }, "required": [ @@ -68,7 +86,8 @@ "createServerCertificate", "issuerName", "duration", - "renewBefore" + "renewBefore", + "server" ], "title": "certificate", "type": "object" @@ -361,11 +380,27 @@ }, "name": { "default": "barman-cloud", - "description": "DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate\nand can not be configured", + "description": "DO NOT CHANGE THE SERVICE NAME as it is currently used by CloudNativePG\nto identify the plugin", "required": [], "title": "name", "type": "string" }, + "annotations": { + "properties": { + "pluginServerName": { + "default": "", + "description": "The plugin server name to be used by CloudNativePG.\nIf set, it will be added as `cnpg.io/pluginServerName` annotation.", + "required": [], + "title": "pluginServerName", + "type": "string" + } + }, + "required": [ + "pluginServerName" + ], + "title": "annotations", + "type": "object" + }, "port": { "default": 9090, "required": [], @@ -376,7 +411,8 @@ "required": [ "name", "port", - "ipFamilyPolicy" + "ipFamilyPolicy", + "annotations" ], "title": "service", "type": "object" diff --git a/charts/plugin-barman-cloud/values.yaml b/charts/plugin-barman-cloud/values.yaml index ea37056316..56fe64f02c 100644 --- a/charts/plugin-barman-cloud/values.yaml +++ b/charts/plugin-barman-cloud/values.yaml @@ -132,8 +132,8 @@ podSecurityContext: priorityClassName: "" service: - # -- DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate - # and can not be configured + # -- DO NOT CHANGE THE SERVICE NAME as it is currently used by CloudNativePG + # to identify the plugin name: barman-cloud port: 9090 # -- Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) @@ -145,6 +145,14 @@ service: # @schema # -- Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. ipFamilies: [] + # @schema + # additionalProperties: true + # @schema + # -- Service annotations + annotations: + # -- The plugin server name to be used by CloudNativePG. + # If set, it will be added as `cnpg.io/pluginServerName` annotation. + pluginServerName: "" # @schema # additionalProperties: true @@ -195,3 +203,7 @@ certificate: duration: 2160h # -- The renew before time for the certificates. renewBefore: 360h + server: + # -- The DNS names for the server certificate. + # If not set, it defaults to `[.Values.service.name]`. + dnsNames: []