Feature Gate Installation Guide

This page provides an overview of the feature gates an administrator can enable or disable during installation of Crunchy Postgres for Kubernetes. If you've downloaded the installer from the Crunchy Data Customer Portal, please refer to the customer guide there for alternative setup information.

Feature Gates Available in Crunchy Postgres for Kubernetes

PGO Feature GateDefault settingSinceUntil
AppendCustomQueriesfalsev5.5.0-
AutoCreateUserSchemafalsev5.6.1v5.6.2
AutoCreateUserSchematruev5.6.2-
AutoGrowVolumesfalsev5.6.0-
InstanceSidecarsfalsev5.2.0-
TablespaceVolumesfalsev5.4.0-
  1. 1Use the values in the PGO Feature Gate column in place of FeatureName in the installation instructions below.

Helm

First, go to GitHub and fork the Postgres Operator examples repository, which contains the Crunchy Postgres for Kubernetes Helm installer.

To enable feature gates with Helm, find helm/install/values.yaml in the examples repository and uncomment the features key. Add a key from the table above for each PGO Feature Gate you want to enable, and set the value to true. For example, you can enable disk auto-grow and custom queries for monitoring like this:

features:
  AutoGrowVolumes: true
  AppendCustomQueries: true

If you haven't installed the operator yet, run:

helm install $NAME -n $NAMESPACE helm/install

Otherwise, run:

helm upgrade $NAME -n $NAMESPACE helm/install

Kustomize

First, go to GitHub and fork the Postgres Operator examples repository, which contains the Crunchy Postgres for Kubernetes Kustomize installer.

PGO Feature Gates can be enabled with Kustomize by setting env variables in your container spec. Locate the kustomize/install/default/kustomization.yaml file in the examples repository and add a section like this:

patches:
- patch: |-
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: pgo
    spec:
      template:
        spec:
          containers:
          - name: operator
            env:
            - name: PGO_FEATURE_GATES
              value: "FeatureName=true,FeatureName2=true,FeatureName3=true"

...where each FeatureName is the PGO Feature Gate you want to enable. You can list as many PGO Feature Gates as you need.

To apply the changes, run:

kubectl apply --server-side -k kustomize/install/default 

OLM

After Crunchy Postgres for Kubernetes has been installed from OperatorHub, you can set feature gates by clicking on Installed Operators and selecting Crunchy Postgres for Kubernetes. From there, select Subscription and from the Actions dropdown menu select Edit Subscription. Scroll to the spec section and you can create a config block to set environment variables like this:

spec:
  config:
    env:
    - name: PGO_FEATURE_GATES
      value: "FeatureName=true,FeatureName2=true,FeatureName3=true"

...where each FeatureName is the PGO Feature Gate you want to enable. You can list as many PGO Feature Gates as you need. After you’ve adjusted the Subscription to meet your needs, save it and observe that the environment variables in your PGO pod have updated.