Adding postgres to the chart so it can be used without dependecies.
This commit is contained in:
parent
38715290a4
commit
79510232b8
5
contrib/helm/clair/requirements.yaml
Normal file
5
contrib/helm/clair/requirements.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: postgresql
|
||||||
|
version: "*"
|
||||||
|
condition: postgresql.enabled
|
||||||
|
repository: "alias:stable"
|
@ -14,3 +14,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|||||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
Create a default fully qualified postgresql name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
*/}}
|
||||||
|
{{- define "postgresql.fullname" -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
@ -13,7 +13,9 @@ data:
|
|||||||
options:
|
options:
|
||||||
# PostgreSQL Connection string
|
# PostgreSQL Connection string
|
||||||
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
|
# https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
|
||||||
source: "{{ .Values.config.postgresURI }}"
|
# This should be done using secrets or Vault, but for now this will also work
|
||||||
|
|
||||||
|
source: "postgres://{{ .Values.postgresql.postgresUser }}:{{ .Values.postgresql.postgresPassword }}@{{ template "postgresql.fullname" . }}:5432/{{ .Values.postgresql.postgresDatabase }}?sslmode=disable"
|
||||||
|
|
||||||
# Number of elements kept in the cache
|
# Number of elements kept in the cache
|
||||||
# Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database.
|
# Values unlikely to change (e.g. namespaces) are cached in order to save prevent needless roundtrips to the database.
|
||||||
|
@ -36,7 +36,6 @@ resources:
|
|||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 128Mi
|
memory: 128Mi
|
||||||
config:
|
config:
|
||||||
postgresURI: "postgres://user:password@host:5432/postgres?sslmode=disable"
|
|
||||||
paginationKey: "XxoPtCUzrUv4JV5dS+yQ+MdW7yLEJnRMwigVY/bpgtQ="
|
paginationKey: "XxoPtCUzrUv4JV5dS+yQ+MdW7yLEJnRMwigVY/bpgtQ="
|
||||||
updateInterval: 2h
|
updateInterval: 2h
|
||||||
notificationWebhookEndpoint: https://example.com/notify/me
|
notificationWebhookEndpoint: https://example.com/notify/me
|
||||||
@ -56,3 +55,16 @@ config:
|
|||||||
- apk
|
- apk
|
||||||
- dpkg
|
- dpkg
|
||||||
- rpm
|
- rpm
|
||||||
|
## Configuration values for the postgresql dependency.
|
||||||
|
## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md
|
||||||
|
##
|
||||||
|
postgresql:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 1Gi
|
||||||
|
## Harcording for now till https://github.com/kubernetes/helm/issues/2196
|
||||||
|
postgresUser: clair
|
||||||
|
postgresPassword: clair
|
||||||
|
postgresDatabase: clair
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
size: 10Gi
|
Loading…
Reference in New Issue
Block a user