Moved PSQL to NG

This commit is contained in:
Aleksandr Bogomiakov committed 2026-10-05 18:30:17 +01:00
1 parent 2676ecef5d
commit bcfbfcd362
35 files changed
+32682

No files matched your search

@@ -0,0 +1,481 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"additionalArgs": {
"description": "Additional arguments to be added to the operator's args list.",
"items": {
"required": []
},
"type": "array"
},
"additionalEnv": {
"description": "Array containing extra environment variables which can be templated.",
"items": {
"required": []
},
"type": "array"
},
"affinity": {
"description": "Affinity for the operator to be installed.",
"required": [],
"type": "object"
},
"commonAnnotations": {
"description": "Annotations to be added to all other resources.",
"required": [],
"type": "object"
},
"config": {
"description": "Operator configuration.",
"properties": {
"clusterWide": {
"default": true,
"description": "This option determines if the operator is responsible for observing\nevents across the entire Kubernetes cluster or if its focus should be\nnarrowed down to the specific namespace within which it has been deployed.",
"type": "boolean"
},
"create": {
"default": true,
"description": "Specifies whether the secret should be created.",
"type": "boolean"
},
"data": {
"description": "The content of the configmap/secret, see\nhttps://cloudnative-pg.io/documentation/current/operator_conf/#available-options\nfor all the available options.",
"required": [],
"type": "object"
},
"maxConcurrentReconciles": {
"default": 10,
"description": "The maximum number of concurrent reconciles. Defaults to 10.",
"type": "integer"
},
"name": {
"default": "cnpg-controller-manager-config",
"description": "The name of the configmap/secret to use.",
"type": "string"
},
"secret": {
"default": false,
"description": "Specifies whether it should be stored in a secret, instead of a configmap.",
"type": "boolean"
}
},
"required": [],
"type": "object"
},
"containerSecurityContext": {
"description": "Container Security Context.",
"properties": {
"allowPrivilegeEscalation": {
"default": false,
"type": "boolean"
},
"capabilities": {
"properties": {
"drop": {
"items": {
"anyOf": [
{
"type": "string"
}
],
"required": []
},
"type": "array"
}
},
"required": [],
"type": "object"
},
"readOnlyRootFilesystem": {
"default": true,
"type": "boolean"
},
"runAsGroup": {
"default": 10001,
"type": "integer"
},
"runAsUser": {
"default": 10001,
"type": "integer"
},
"seccompProfile": {
"properties": {
"type": {
"default": "RuntimeDefault",
"type": "string"
}
},
"required": [],
"type": "object"
}
},
"required": [],
"type": "object"
},
"crds": {
"properties": {
"create": {
"default": true,
"description": "Specifies whether the CRDs should be created when installing the chart.",
"type": "boolean"
}
},
"required": [],
"type": "object"
},
"dnsPolicy": {
"default": "",
"type": "string"
},
"fullnameOverride": {
"default": "",
"type": "string"
},
"global": {
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
"required": [],
"type": "object"
},
"hostNetwork": {
"default": false,
"type": "boolean"
},
"image": {
"properties": {
"pullPolicy": {
"default": "IfNotPresent",
"type": "string"
},
"repository": {
"default": "ghcr.io/cloudnative-pg/cloudnative-pg",
"type": "string"
},
"tag": {
"default": "",
"description": "Overrides the image tag whose default is the chart appVersion.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"imagePullSecrets": {
"items": {
"required": []
},
"type": "array"
},
"monitoring": {
"properties": {
"grafanaDashboard": {
"properties": {
"annotations": {
"description": "Annotations that ConfigMaps can have to get configured in Grafana.",
"required": [],
"type": "object"
},
"configMapName": {
"default": "cnpg-grafana-dashboard",
"description": "The name of the ConfigMap containing the dashboard.",
"type": "string"
},
"create": {
"default": false,
"type": "boolean"
},
"labels": {
"description": "Labels that ConfigMaps should have to get configured in Grafana.",
"required": [],
"type": "object"
},
"namespace": {
"default": "",
"description": "Allows overriding the namespace where the ConfigMap will be created, defaulting to the same one as the Release.",
"type": "string"
},
"sidecarLabel": {
"default": "grafana_dashboard",
"description": "Label that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.",
"type": "string"
},
"sidecarLabelValue": {
"default": "1",
"description": "Label value that ConfigMaps should have to be loaded as dashboards. DEPRECATED: Use labels instead.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"podMonitorAdditionalLabels": {
"description": "Additional labels for the podMonitor",
"required": [],
"type": "object"
},
"podMonitorEnabled": {
"default": false,
"description": "Specifies whether the monitoring should be enabled. Requires Prometheus Operator CRDs.",
"type": "boolean"
},
"podMonitorMetricRelabelings": {
"description": "Metrics relabel configurations to apply to samples before ingestion.",
"items": {
"required": []
},
"type": "array"
},
"podMonitorRelabelings": {
"description": "Relabel configurations to apply to samples before scraping.",
"items": {
"required": []
},
"type": "array"
}
},
"required": [],
"type": "object"
},
"monitoringQueriesConfigMap": {
"description": "Default monitoring queries",
"properties": {
"name": {
"default": "cnpg-default-monitoring",
"description": "The name of the default monitoring configmap.",
"type": "string"
},
"queries": {
"default": "backends:\n query: |\n SELECT sa.datname\n , sa.usename\n , sa.application_name\n , states.state\n , COALESCE(sa.count, 0) AS total\n , COALESCE(sa.max_tx_secs, 0) AS max_tx_duration_seconds\n FROM ( VALUES ('active')\n , ('idle')\n , ('idle in transaction')\n , ('idle in transaction (aborted)')\n , ('fastpath function call')\n , ('disabled')\n ) AS states(state)\n LEFT JOIN (\n SELECT datname\n , state\n , usename\n , COALESCE(application_name, '') AS application_name\n , pg_catalog.count(*)\n , COALESCE(EXTRACT (EPOCH FROM (pg_catalog.max(pg_catalog.now() OPERATOR(pg_catalog.-) xact_start))), 0) AS max_tx_secs\n FROM pg_catalog.pg_stat_activity\n GROUP BY datname, state, usename, application_name\n ) sa ON states.state OPERATOR(pg_catalog.=) sa.state\n WHERE sa.usename IS NOT NULL\n metrics:\n - datname:\n usage: \"LABEL\"\n description: \"Name of the database\"\n - usename:\n usage: \"LABEL\"\n description: \"Name of the user\"\n - application_name:\n usage: \"LABEL\"\n description: \"Name of the application\"\n - state:\n usage: \"LABEL\"\n description: \"State of the backend\"\n - total:\n usage: \"GAUGE\"\n description: \"Number of backends\"\n - max_tx_duration_seconds:\n usage: \"GAUGE\"\n description: \"Maximum duration of a transaction in seconds\"\n\nbackends_waiting:\n query: |\n SELECT pg_catalog.count(*) AS total\n FROM pg_catalog.pg_locks blocked_locks\n JOIN pg_catalog.pg_locks blocking_locks\n ON blocking_locks.locktype OPERATOR(pg_catalog.=) blocked_locks.locktype\n AND blocking_locks.database IS NOT DISTINCT FROM blocked_locks.database\n AND blocking_locks.relation IS NOT DISTINCT FROM blocked_locks.relation\n AND blocking_locks.page IS NOT DISTINCT FROM blocked_locks.page\n AND blocking_locks.tuple IS NOT DISTINCT FROM blocked_locks.tuple\n AND blocking_locks.virtualxid IS NOT DISTINCT FROM blocked_locks.virtualxid\n AND blocking_locks.transactionid IS NOT DISTINCT FROM blocked_locks.transactionid\n AND blocking_locks.classid IS NOT DISTINCT FROM blocked_locks.classid\n AND blocking_locks.objid IS NOT DISTINCT FROM blocked_locks.objid\n AND blocking_locks.objsubid IS NOT DISTINCT FROM blocked_locks.objsubid\n AND blocking_locks.pid OPERATOR(pg_catalog.\u003c\u003e) blocked_locks.pid\n JOIN pg_catalog.pg_stat_activity blocking_activity ON blocking_activity.pid OPERATOR(pg_catalog.=) blocking_locks.pid\n WHERE NOT blocked_locks.granted\n metrics:\n - total:\n usage: \"GAUGE\"\n description: \"Total number of backends that are currently waiting on other queries\"\n\npg_database:\n query: |\n SELECT datname\n , pg_catalog.pg_database_size(datname) AS size_bytes\n , pg_catalog.age(datfrozenxid) AS xid_age\n , pg_catalog.mxid_age(datminmxid) AS mxid_age\n FROM pg_catalog.pg_database\n WHERE datallowconn\n metrics:\n - datname:\n usage: \"LABEL\"\n description: \"Name of the database\"\n - size_bytes:\n usage: \"GAUGE\"\n description: \"Disk space used by the database\"\n - xid_age:\n usage: \"GAUGE\"\n description: \"Number of transactions from the frozen XID to the current one\"\n - mxid_age:\n usage: \"GAUGE\"\n description: \"Number of multiple transactions (Multixact) from the frozen XID to the current one\"\n\npg_postmaster:\n query: |\n SELECT EXTRACT(EPOCH FROM pg_postmaster_start_time) AS start_time\n FROM pg_catalog.pg_postmaster_start_time()\n metrics:\n - start_time:\n usage: \"GAUGE\"\n description: \"Time at which postgres started (based on epoch)\"\n\npg_replication:\n query: |\n SELECT CASE WHEN (\n NOT pg_catalog.pg_is_in_recovery()\n OR pg_catalog.pg_last_wal_receive_lsn() OPERATOR(pg_catalog.=) pg_catalog.pg_last_wal_replay_lsn())\n THEN 0\n ELSE GREATEST (0,\n EXTRACT(EPOCH FROM (pg_catalog.now() OPERATOR(pg_catalog.-) pg_catalog.pg_last_xact_replay_timestamp())))\n END AS lag,\n pg_catalog.pg_is_in_recovery() AS in_recovery,\n EXISTS (TABLE pg_catalog.pg_stat_wal_receiver) AS is_wal_receiver_up,\n (SELECT pg_catalog.count(*) FROM pg_catalog.pg_stat_replication) AS streaming_replicas\n metrics:\n - lag:\n usage: \"GAUGE\"\n description: \"Replication lag behind primary in seconds\"\n - in_recovery:\n usage: \"GAUGE\"\n description: \"Whether the instance is in recovery\"\n - is_wal_receiver_up:\n usage: \"GAUGE\"\n description: \"Whether the instance wal_receiver is up\"\n - streaming_replicas:\n usage: \"GAUGE\"\n description: \"Number of streaming replicas connected to the instance\"\n\npg_replication_sloLine truncated
"description": "A string representation of a YAML defining monitoring queries.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"nameOverride": {
"default": "",
"type": "string"
},
"namespaceOverride": {
"default": "",
"type": "string"
},
"nodeSelector": {
"description": "Nodeselector for the operator to be installed.",
"required": [],
"type": "object"
},
"podAnnotations": {
"description": "Annotations to be added to the pod.",
"required": [],
"type": "object"
},
"podLabels": {
"description": "Labels to be added to the pod.",
"required": [],
"type": "object"
},
"podSecurityContext": {
"description": "Security Context for the whole pod.",
"properties": {
"runAsNonRoot": {
"default": true,
"type": "boolean"
},
"seccompProfile": {
"properties": {
"type": {
"default": "RuntimeDefault",
"type": "string"
}
},
"required": [],
"type": "object"
}
},
"required": [],
"type": "object"
},
"priorityClassName": {
"default": "",
"description": "Priority indicates the importance of a Pod relative to other Pods.",
"type": "string"
},
"rbac": {
"properties": {
"aggregateClusterRoles": {
"default": false,
"description": "Aggregate ClusterRoles to Kubernetes default user-facing roles.\nRef: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#user-facing-roles",
"type": "boolean"
},
"create": {
"default": true,
"description": "Specifies whether ClusterRole and ClusterRoleBinding should be created.",
"type": "boolean"
}
},
"required": [],
"type": "object"
},
"replicaCount": {
"default": 1,
"type": "integer"
},
"resources": {
"required": [],
"type": "object"
},
"scratchData": {
"properties": {
"emptyDir": {
"description": "EmptyDir options for the scratch-data volume.",
"required": [],
"type": "object"
}
},
"required": [],
"type": "object"
},
"service": {
"properties": {
"ipFamilies": {
"description": "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.",
"items": {
"required": []
},
"type": "array"
},
"ipFamilyPolicy": {
"default": "",
"description": "Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services)",
"type": "string"
},
"name": {
"default": "cnpg-webhook-service",
"description": "The name of the Webhook Service.",
"type": "string"
},
"port": {
"default": 443,
"type": "integer"
},
"type": {
"default": "ClusterIP",
"type": "string"
}
},
"required": [],
"type": "object"
},
"serviceAccount": {
"properties": {
"create": {
"default": true,
"description": "Specifies whether the service account should be created.",
"type": "boolean"
},
"name": {
"default": "",
"description": "The name of the service account to use.\nIf not set and create is true, a name is generated using the fullname template.",
"type": "string"
}
},
"required": [],
"type": "object"
},
"tolerations": {
"description": "Tolerations for the operator to be installed.",
"items": {
"required": []
},
"type": "array"
},
"topologySpreadConstraints": {
"description": "Topology Spread Constraints for the operator to be installed.",
"items": {
"required": []
},
"type": "array"
},
"updateStrategy": {
"description": "Update strategy for the operator.\nref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy",
"required": [],
"type": "object"
},
"webhook": {
"description": "The webhook configuration.",
"properties": {
"livenessProbe": {
"properties": {
"initialDelaySeconds": {
"default": 3,
"type": "integer"
}
},
"required": [],
"type": "object"
},
"mutating": {
"properties": {
"create": {
"default": true,
"type": "boolean"
},
"failurePolicy": {
"default": "Fail",
"type": "string"
}
},
"required": [],
"type": "object"
},
"port": {
"default": 9443,
"type": "integer"
},
"readinessProbe": {
"properties": {
"initialDelaySeconds": {
"default": 3,
"type": "integer"
}
},
"required": [],
"type": "object"
},
"startupProbe": {
"properties": {
"failureThreshold": {
"default": 6,
"type": "integer"
},
"periodSeconds": {
"default": 5,
"type": "integer"
}
},
"required": [],
"type": "object"
},
"validating": {
"properties": {
"create": {
"default": true,
"type": "boolean"
},
"failurePolicy": {
"default": "Fail",
"type": "string"
}
},
"required": [],
"type": "object"
}
},
"required": [],
"type": "object"
}
},
"required": [],
"type": "object"
}