Skip to content

Commit

Permalink
K8SPG-120 PG Operator 1.0.0 chart (percona#95)
Browse files Browse the repository at this point in the history
* K8SPG-120 PG Operator 1.0.0 chart

- Remove disable_fsgroup due to auto detection mechanism inside the operator
- RBAC extension
- Minor code refactoring

* K8SPG-128 Bump supported version
  • Loading branch information
cap1984 authored Oct 1, 2021
1 parent d8c9515 commit 00182f0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions charts/pg-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pg-operator
description: 'A Helm chart to deploy the Percona Distribution for PostgreSQL Operator'
type: application
version: 0.2.0
appVersion: 0.2.0
version: 1.0.0
appVersion: 1.0.0
home: https://github.com/percona/percona-postgresql-operator
maintainers:
- name: cap1984
Expand Down
7 changes: 3 additions & 4 deletions charts/pg-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ A job will be created based on `helm` `install`, `upgrade`, or `uninstall`. Afte
job has completed the RBAC will be cleaned up.

## Pre-requisites
* Kubernetes 1.16+
* Kubernetes 1.18+
* PV support on the underlying infrastructure - only if you are provisioning persistent volume(s).
* At least `v2.5.0` version of helm
* At least `v3.2.3` version of helm

## Deployment Details
* <https://kubernetes.io/docs/concepts/workloads/controllers/deployment/>
Expand All @@ -23,7 +23,7 @@ To install the chart with the `pg-operator` release name using a dedicated names

```sh
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-operator percona/pg-operator --version 0.2.0 --namespace my-namespace
helm install my-operator percona/pg-operator --version 1.0.0 --namespace my-namespace
```

## Configuration
Expand All @@ -38,4 +38,3 @@ Chart.
| rbac.useClusterAdmin | false | If enabled the ServiceAccount will be given cluster-admin privileges. |
| serviceAccount.create | true | If false a ServiceAccount will not be created. A ServiceAccount must be created manually. |
| serviceAccount.name | "" | Use to override the default ServiceAccount name. If serviceAccount.create is false this ServiceAccount will be used. |
| disableFSGroup | false | Set the option to `true` if you plan to run the operator on Openshift. |
2 changes: 1 addition & 1 deletion charts/pg-operator/templates/_deployer_job_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
restartPolicy: Never
containers:
- name: pgo-deploy
image: {{ .Values.pgo_image_prefix }}:{{ .Values.pgo_image_tag }}-pgo-deployer
image: {{ .Values.pgo_image_prefix }}:{{ .Values.pgo_image_tag | default .Chart.AppVersion }}-pgo-deployer
imagePullPolicy: IfNotPresent
env:
- name: DEPLOY_ACTION
Expand Down
6 changes: 2 additions & 4 deletions charts/pg-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@ values.yaml: |
{{- if has $index $namespace_fields }}
{{ $index | indent 2 }}: {{ $namespace | quote }}
{{- else if eq $index "pgo_image_tag" }}
{{ $index | indent 2 }}: {{ $.Chart.AppVersion | quote }}
{{ $index | indent 2 }}: {{ $value | default $.Chart.AppVersion | quote }}
{{- else if eq $index "ccp_image_tag" }}
{{ $index | indent 2 }}: "{{ $.Chart.AppVersion }}-postgres-ha"
{{- else if eq $index "disable_fsgroup" }}
{{ $index | indent 2 }}: "{{ $.Values.disableFSGroup }}"
{{ $index | indent 2 }}: "{{ $value | default $.Chart.AppVersion }}-postgres-ha"
{{- else }}
{{ $index | indent 2 }}: {{ $value | quote }}
{{- end }}
Expand Down
5 changes: 4 additions & 1 deletion charts/pg-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rules:
- get
- create
- delete
- patch
- apiGroups:
- ''
resources:
Expand All @@ -58,6 +59,7 @@ rules:
- create
- delete
- list
- patch
- apiGroups:
- ''
resources:
Expand Down Expand Up @@ -116,8 +118,9 @@ rules:
- delete
- list
- apiGroups:
- crunchydata.com
- pg.percona.com
resources:
- perconapgclusters
- pgclusters
- pgreplicas
- pgpolicies
Expand Down
5 changes: 2 additions & 3 deletions charts/pg-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ badger: "false"
ccp_image_prefix: "percona/percona-postgresql-operator"
ccp_image_pull_secret: ""
ccp_image_pull_secret_manifest: ""
ccp_image_tag: "0.2.0-postgres-ha"
ccp_image_tag: ""
create_rbac: "true"
crunchy_debug: "false"
db_name: ""
Expand All @@ -51,7 +51,6 @@ default_exporter_memory: "24Mi"
delete_operator_namespace: "false"
delete_watched_namespaces: "false"
disable_auto_failover: "false"
disable_fsgroup: "false"
reconcile_rbac: "true"
exporterport: "9187"
metrics: "false"
Expand All @@ -77,7 +76,7 @@ pgo_image_prefix: "percona/percona-postgresql-operator"
pgo_image_pull_policy: "Always"
pgo_image_pull_secret: ""
pgo_image_pull_secret_manifest: ""
pgo_image_tag: "0.2.0"
pgo_image_tag: ""
pgo_installation_name: "devtest"
pgo_noauth_routes: ""
pgo_operator_namespace: "pgo"
Expand Down

0 comments on commit 00182f0

Please sign in to comment.