Skip to content

Commit

Permalink
chore: review PG4K LTS
Browse files Browse the repository at this point in the history
Signed-off-by: Niccolò Fei <[email protected]>
  • Loading branch information
NiccoloFei committed Nov 28, 2024
1 parent c491742 commit d4fd840
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 78 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ ifndef SCHEMA-GEN
$(error "Please, run: helm plugin install https://github.com/karuppiah7890/helm-schema-gen.git first")
endif
helm schema-gen charts/edb-postgres-for-kubernetes/values.yaml > charts/edb-postgres-for-kubernetes/values.schema.json
helm schema-gen charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/values.yaml \
> charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/values.schema.json
helm schema-gen charts/edb-postgres-distributed-for-kubernetes/values.yaml > charts/edb-postgres-distributed-for-kubernetes/values.schema.json
43 changes: 14 additions & 29 deletions charts/edb-postgres-distributed-for-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ EDB Postgres Distributed for Kubernetes Helm Chart

| Repository | Name | Version |
|------------|------|---------|
| | edb-postgres-for-kubernetes-lts | 0.22.1 |
| https://charts.jetstack.io | cert-manager | 1.16.1 |

## Values
Expand All @@ -37,29 +38,27 @@ EDB Postgres Distributed for Kubernetes Helm Chart
| config.create | bool | `true` | Specifies whether the secret should be created |
| config.data.PGD_IMAGE_NAME | string | `"docker.enterprisedb.com/k8s_enterprise_pgd/postgresql-pgd:16.4-5.5.1-1"` | Specifies the location of the pgd image to be used for the operator docker.enterprisedb.com/k8s_standard_pgd/postgresql-pgd:16.4-5.5.1-1 |
| config.data.PGD_PROXY_IMAGE_NAME | string | `"docker.enterprisedb.com/k8s_enterprise_pgd/edb-pgd-proxy:5.5.0"` | Specifies the location of the pgd-proxy image to be used for the operator docker.enterprisedb.com/k8s_standard_pgd/edb-pgd-proxy:5.5.0 |
| config.data | object | `{}` | The content of the configmap/secret, see https://www.enterprisedb.com/docs/postgres_for_kubernetes/latest/operator_conf/#available-options for all the available options. |
| config.data.PULL_SECRET_NAME | string | `"edb-pull-secret"` |
| config.data.PULL_SECRET_NAME | string | `"edb-pull-secret"` | |
| config.name | string | `"pgd-operator-controller-manager-config"` | |
| config.secret | bool | `false` | Specifies whether it should be stored in a secret, instead of a configmap |
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":10001,"runAsUser":10001}` | Container Security Context |
| crds.create | bool | `true` | ||
| edb-postgres-for-kubernetes-lts.enable | bool | `true` | |
| edb-postgres-for-kubernetes-lts.image.repository | string | `""` | Overrides the global image repository for pg4k operator. |
| edb-postgres-for-kubernetes-lts.image.imageName | string | `"edb-postgres-for-kubernetes"` | pg4k operator image name in repository|
| edb-postgres-for-kubernetes-lts.image.imagePullSecrets[0].name | string| `"edb-pull-secret"` | |
| edb-postgres-for-kubernetes-lts.config.data.PULL_SECRET_NAME| string| `"edb-pull-secret"` | |
|global.repository| string|`docker.enterprisedb.com/k8s_enterprise_pgd`| specifies the repository name where all the operators are pulled from, image name is not included|
| imagePullSecrets[0].name | string | `"edb-pull-secret"` | |
| crds.create | bool | `true` | |
| edb-postgres-for-kubernetes-lts.crds.create | bool | `true` | |
| edb-postgres-for-kubernetes-lts.enabled | bool | `true` | |
| edb-postgres-for-kubernetes-lts.image.repository | string | `""` | |
| fullnameOverride | string | `""` | |
| global | object | `{"repository":"docker.enterprisedb.com/k8s_enterprise_pgd"}` | Global values |
| global.repository | string | `"docker.enterprisedb.com/k8s_enterprise_pgd"` | Specifies the repository where the operator image to be downloaded from repository: docker.enterprisedb.com/k8s_standard_pgd |
| image.imageCredentials.create | bool | `true` | Specifies if an imagePullSecret should be created |
| image.imageCredentials.name | string | `"edb-pull-secret"` | |
| image.imageCredentials.password | string | `""` | |
| image.imageCredentials.registry | string | `"docker.enterprisedb.com"` | |
| image.imageCredentials.username | string | `""` | |
| image.repository | string | `""` | Overrides the global image repository for pg4k-pgd operator.|
| image.imageName | string | `"pg4k-pgd"` | pg4k-pgd operator image name in repository|
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| image.imageCredentials.username | string | `""` | |
| image.imageName | string | `"pg4k-pgd"` | Specifies the name of the operator image to be pulled from repository |
| image.imagePullPolicy | string | `"IfNotPresent"` | |
| image.imageTag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| image.repository | string | `""` | |
| imagePullSecrets[0].name | string | `"edb-pull-secret"` | |
| managerConfig.data.health.healthProbeBindAddress | string | `":9443"` | |
| managerConfig.data.leaderElection.enabled | bool | `true` | |
| managerConfig.data.leaderElection.resourceName | string | `"e72f3162.k8s.enterprisedb.io"` | |
Expand Down Expand Up @@ -89,17 +88,3 @@ EDB Postgres Distributed for Kubernetes Helm Chart
| webhook.validating.create | bool | `true` | |
| webhook.validating.failurePolicy | string | `"Fail"` | |

## Values for PG4K operator settings

We can use prefix `edb-postgres-for-kubernetes-lts.` to specific the configuration for PG4K values if you want to overwrite the default one.
For a list of PG4K operator configuration values, please see [PG4K Values doc](https://github.com/EnterpriseDB/edb-postgres-for-kubernetes-charts/blob/main/charts/edb-postgres-for-kubernetes/README.md#values)

edb-postgres-for-kubernetes-lts:
enabled: true
image:
repository: docker.enterprisedb.com/k8s_enterprise_pgd/edb-postgres-for-kubernetes
imagePullSecrets:
- name: edb-pull-secret
config:
data:
PULL_SECRET_NAME: edb-pull-secret
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
apiVersion: v2
name: edb-postgres-for-kubernetes-lts
description: EDB Postgres for Kubernetes lts release Helm Chart
description: EDB Postgres for Kubernetes LTS release Helm Chart
icon: https://www.enterprisedb.com/themes/custom/edb_bootstrap_sass/edb-logo-disc-dark-2.svg
type: application
version: "0.22.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,6 @@ namespace scope or clusterwide
- get
- patch
- update
- apiGroups:
- postgresql.k8s.enterprisedb.io
resources:
- imagecatalogs
verbs:
- get
- list
- watch
- apiGroups:
- postgresql.k8s.enterprisedb.io
resources:
Expand Down Expand Up @@ -303,12 +295,4 @@ Define the set of rules that must be applied clusterwide
- get
- list
- update
- apiGroups:
- postgresql.k8s.enterprisedb.io
resources:
- clusterimagecatalogs
verbs:
- get
- list
- watch
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
}
}
},
"imageName": {
"type": "string"
},
"pullPolicy": {
"type": "string"
},
Expand All @@ -137,6 +140,9 @@
}
}
},
"installCRDs": {
"type": "boolean"
},
"monitoring": {
"type": "object",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
replicaCount: 1

image:
# -- Specifies the repository where the operator image to be downloaded from
# -- Specifies the repository where the operator image should be downloaded from
# docker.enterprisedb.com/k8s_standard_pgd
repository: docker.enterprisedb.com/k8s_enterprise_pgd
# The name of the operator image to be pulled from repository
# The name of the operator image to be pulled from the repository
imageName: edb-postgres-for-kubernetes
# -- Overrides the image tag whose default is the chart appVersion.
tag: ""
Expand Down
47 changes: 17 additions & 30 deletions charts/edb-postgres-distributed-for-kubernetes/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,11 @@
"edb-postgres-for-kubernetes-lts": {
"type": "object",
"properties": {
"config": {
"crds": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"PULL_SECRET_NAME": {
"type": "string"
}
}
"create": {
"type": "boolean"
}
}
},
Expand All @@ -112,31 +107,20 @@
"type": "string"
}
}
},
"imagePullSecrets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
},
"crd": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
}
}
}
}
},
"fullnameOverride": {
"type": "string"
},
"global": {
"type": "object",
"properties": {
"repository": {
"type": "string"
}
}
},
"image": {
"type": "object",
"properties": {
Expand All @@ -160,13 +144,16 @@
}
}
},
"pullPolicy": {
"imageName": {
"type": "string"
},
"repository": {
"imagePullPolicy": {
"type": "string"
},
"tag": {
"imageTag": {
"type": "string"
},
"repository": {
"type": "string"
}
}
Expand Down

0 comments on commit d4fd840

Please sign in to comment.